diff options
Diffstat (limited to 'conform')
-rw-r--r-- | conform/Makefile | 8 | ||||
-rw-r--r-- | conform/conformtest.pl | 5 |
2 files changed, 11 insertions, 2 deletions
diff --git a/conform/Makefile b/conform/Makefile index c07cc1d8d9..eb2288f144 100644 --- a/conform/Makefile +++ b/conform/Makefile @@ -197,13 +197,19 @@ conformtest-cc-flags = -I../include $(+sysdep-includes) $(sysincludes) -I.. # in xfail[cond]- lines in test expectations. conformtest-xfail = $(if $(conformtest-xfail-conds),\ --xfail='$(conformtest-xfail-conds)') +ifeq (no,$(cross-compiling)) +conformtest-cross = +else +conformtest-cross = --cross +endif $(conformtest-header-tests): $(objpfx)%/conform.out: \ conformtest.pl $(conformtest-headers-data) (set -e; std_hdr=$*; std=$${std_hdr%%/*}; hdr=$${std_hdr#*/}; \ mkdir -p $(@D)/scratch; \ $(PERL) -I. conformtest.pl --tmpdir=$(@D)/scratch --cc='$(CC)' \ --flags='$(conformtest-cc-flags)' --standard=$$std \ - --headers=$$hdr $(conformtest-xfail) > $@); \ + --headers=$$hdr $(conformtest-xfail) $(conformtest-cross) \ + > $@); \ $(evaluate-test) $(linknamespace-symlists-tests): $(objpfx)symlist-%: list-header-symbols.pl diff --git a/conform/conformtest.pl b/conform/conformtest.pl index 41682e9b86..7594f466ed 100644 --- a/conform/conformtest.pl +++ b/conform/conformtest.pl @@ -7,10 +7,11 @@ use POSIX; $standard = "XOPEN2K8"; $CC = "gcc"; $tmpdir = "/tmp"; +$cross = ""; $xfail_str = ""; GetOptions ('headers=s' => \@headers, 'standard=s' => \$standard, 'flags=s' => \$flags, 'cc=s' => \$CC, 'tmpdir=s' => \$tmpdir, - 'xfail=s' => \$xfail_str); + 'cross' => \$cross, 'xfail=s' => \$xfail_str); @headers = split(/,/,join(',',@headers)); # List of the headers we are testing. @@ -192,6 +193,8 @@ sub runtest } note_error($xfail); $result = 1; + } elsif ($cross) { + printf (" SKIP\n"); } else { # Now run the program. If the exit code is not zero something is wrong. $result = system "$fnamebase > $fnamebase.out2 2>&1"; |