r=`pwd`; export r; \
LC_ALL=C; export LC_ALL; \
EXPECT=$(EXPECT); export EXPECT; \
+ if [ "@host@" = "@target@" ] ; then \
+ TEST_CROSS=no; \
+ else \
+ TEST_CROSS=yes; \
+ fi; \
runtest=$(RUNTEST); \
if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
$$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \
- CC="$(CC)" CC_FOR_TARGET="$(CC_FOR_TARGET)" \
+ CC="$(CC)" CC_FOR_TARGET="$(CC_FOR_TARGET)" TEST_CROSS="$${TEST_CROSS}" \
CFLAGS="$(CFLAGS) -I$(INCDIR) -I$(srcdir) -I$(builddir) -I$(builddir)/../bfd $(ZLIBINC)" \
LIBS="$(libctf_nobfd_la_LIBADD) $(LIBS)" $(RUNTESTFLAGS); \
else echo "WARNING: could not find \`runtest'" 1>&2; :;\
r=`pwd`; export r; \
LC_ALL=C; export LC_ALL; \
EXPECT=$(EXPECT); export EXPECT; \
+ if [ "@host@" = "@target@" ] ; then \
+ TEST_CROSS=no; \
+ else \
+ TEST_CROSS=yes; \
+ fi; \
runtest=$(RUNTEST); \
if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
$$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \
- CC="$(CC)" CC_FOR_TARGET="$(CC_FOR_TARGET)" \
+ CC="$(CC)" CC_FOR_TARGET="$(CC_FOR_TARGET)" TEST_CROSS="$${TEST_CROSS}" \
CFLAGS="$(CFLAGS) -I$(INCDIR) -I$(srcdir) -I$(builddir) -I$(builddir)/../bfd $(ZLIBINC)" \
LIBS="$(libctf_nobfd_la_LIBADD) $(LIBS)" $(RUNTESTFLAGS); \
else echo "WARNING: could not find \`runtest'" 1>&2; :;\
# xfail: GLOB|PROC ...
# This test is expected to fail on a specified list of targets.
#
+# no_cross:
+# If set, do not run this test when host != target.
+#
# Each option may occur at most once unless otherwise mentioned.
#
# After the option lines come regexp lines. run_lookup_test calls
# regexps in FILE.d.
#
proc run_lookup_test { name } {
- global CC_FOR_TARGET CFLAGS_FOR_TARGET LIBS
+ global CC_FOR_TARGET CFLAGS_FOR_TARGET LIBS TEST_CROSS
global copyfile env runtests srcdir subdir verbose
if ![runtest_file_p $runtests $name] then {
set opts(name) {}
set opts(source) {}
set opts(xfail) {}
+ set opts(no_cross) {}
foreach i $opt_array {
set opt_name [lindex $i 0]
set opts($opt_name) [concat $opts($opt_name) $opt_val]
}
+ if { [llength $opts(no_cross)] != 0
+ && "$TEST_CROSS" eq "yes" } {
+ untested "$subdir/$name not tested when cross-compiling"
+ return
+ }
+
if { [llength $opts(lookup)] == 0 } {
set opts(lookup) "$file.c"
} else {
# source: unnamed-field-info-ctf.c
+# no_cross: yes
Offset validation complete.