about summary refs log tree commit diff
path: root/conform/conformtest.pl
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2017-03-17 01:21:10 +0000
committerJoseph Myers <joseph@codesourcery.com>2017-03-17 01:21:10 +0000
commitc33eac51f4a8aa6a7ea77cccf6bea3f417eaff6d (patch)
tree96868af3f817ec48e35119387dcb0984af16e630 /conform/conformtest.pl
parent33c02810c5fdc06deddbf0b1bfd78969da9ec739 (diff)
downloadglibc-c33eac51f4a8aa6a7ea77cccf6bea3f417eaff6d.tar.gz
glibc-c33eac51f4a8aa6a7ea77cccf6bea3f417eaff6d.tar.xz
glibc-c33eac51f4a8aa6a7ea77cccf6bea3f417eaff6d.zip
conformtest: Skip execution tests when cross-compiling.
This patch makes conformtest skip execution tests when
cross-compiling, as an interim step towards running most of these
tests (presently disabled) in that case.  It omits the (obvious)
Makefile change to actually enable the conformtest tests when
cross-compiling, as there are still enough failures seen with
build-many-glibcs.py that I'd like to get the results cleaner before
enabling these tests.

Tested for x86_64, and with the tests actually enabled for
cross-compilation with build-many-glibcs.py.

	* conform/conformtest.pl ($cross): New variable.
	(--cross): New command-line option.
	(runtest): Skip test execution when cross-compiling.
	* conform/Makefile (conformtest-cross): New variable.
	($(conformtest-header-tests)): Pass $(conformtest-cross) to
	conformtest.pl.
Diffstat (limited to 'conform/conformtest.pl')
-rw-r--r--conform/conformtest.pl5
1 files changed, 4 insertions, 1 deletions
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";