tests: some tests make no sense if "$CC -c -o" doesn't work
authorStefano Lattarini <stefano.lattarini@gmail.com>
Wed, 15 May 2013 13:48:08 +0000 (15:48 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 24 May 2013 15:35:48 +0000 (17:35 +0200)
So just skip them, to avoid spurious failures when running
"make check-no-cc-c-o".

* t/ax/am-test-lib.sh (require_tool): New requirement '-c-o'.
* t/subobj10.sh ($required): Add it.
* gen-testsuite-part (%depmodes): Adjust so that tests that
use 'makedepend' will be skipped if the compiler is being
forced not to grasp "-c -o".

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
gen-testsuite-part
t/ax/am-test-lib.sh
t/subobj10.sh

index 4584d2b..3bd5c9f 100755 (executable)
@@ -342,7 +342,7 @@ my %depmodes =
   (
     auto         => ["cc"],
     disabled     => ["cc"],
-    makedepend   => ["cc", "makedepend"],
+    makedepend   => ["cc", "makedepend", "-c-o"],
     dashmstdout  => ["gcc"],
     cpp          => ["gcc"],
 # This was for older (pre-3.x) GCC versions (newer versions
index 53dd27e..07ef9c9 100644 (file)
@@ -765,6 +765,11 @@ require_tool ()
   case $1 in
     cc|c++|fortran|fortran77)
       require_compiler_ $1;;
+    -c-o)
+      if test x"$AM_TESTSUITE_SIMULATING_NO_CC_C_O" = x"yes"; then
+        skip_all_ "need a C compiler that grasps -c and -o together"
+      fi
+      ;;
     xsi-lib-shell)
       if test x"$am_test_prefer_config_shell" = x"yes"; then
         require_xsi "$SHELL"
index 1be42a9..f3181d1 100644 (file)
@@ -16,7 +16,7 @@
 
 # PR 492: Test asm subdir-objects.
 
-required=gcc
+required='gcc -c-o'
 . test-init.sh
 
 cat > configure.ac << END