]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
testsuite: user can force skipping of compiler-requiring tests
authorStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 24 May 2011 08:42:27 +0000 (10:42 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 24 May 2011 10:01:51 +0000 (12:01 +0200)
* tests/defs (cc, c++, fortran, fortran77): Skip the test if
the relevant compiler is disabled by having the corresponding
variable (CC, CXX, FC and F77, respectively) set to "false".
(yacc): For consistency, skip the test when the YACC variable
is set to "false", not when it's set to "no".  Since we are at
it, fix the skip message to be shorter and more consistent.

ChangeLog
tests/defs

index 04e8921140b0bd7a8fd42571f947901a1a790dce..b61cfdce6ec398aa98d489d181aa29b573a86994 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2011-05-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       testsuite: user can force skipping of compiler-requiring tests
+       * tests/defs (cc, c++, fortran, fortran77): Skip the test if
+       the relevant compiler is disabled by having the corresponding
+       variable (CC, CXX, FC and F77, respectively) set to "false".
+       (yacc): For consistency, skip the test when the YACC variable
+       is set to "false", not when it's set to "no".  Since we are at
+       it, fix the skip message to be shorter and more consistent.
+
 2011-05-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        tests: tweak and improve tests on "Simple Tests" driver
index b254ef4bf9c33d2b4b7ec3ddd7460260950c67b8..873271feb9378405ba9f1d71e31114d40a41e3c8 100644 (file)
@@ -256,9 +256,14 @@ do
   # Check that each required tool is present.
   case $tool in
     :) ;;
-    cc|c++|fortran|fortran77)
-      echo "$me: dummy requirement '$tool', no check done"
-      ;;
+    cc)
+      test "$CC"  = false && skip_ "no C compiler available";;
+    c++)
+      test "$CXX" = false && skip_ "no C++ compiler available";;
+    fortran)
+      test "$FC"  = false && skip_ "no Fortran compiler available";;
+    fortran77)
+      test "$F77" = false && skip_ "no Fortran 77 compiler available";;
     bzip2)
       # Do not use --version, bzip2 still tries to compress stdin.
       echo "$me: running bzip2 --help"
@@ -471,11 +476,8 @@ do
       flex --version || exit 77
       ;;
     yacc)
-      if test x"$YACC" = x"no"; then
-        # The user has explicitly told he doesn't want a yacc program
-        # to be used.
-        skip_ "$me: \$YACC is \"no\", skipping test"
-      elif test -z "$YACC"; then
+      test "$YACC" = false && skip_ "no Yacc program available"
+      if test -z "$YACC"; then
         # The user hasn't explicitly specified any yacc program in the
         # environment, so we try to use bison, skipping the test if it's
         # not found.