automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[FYI] {testuite-work} testsuite: user can force skipping of compiler-req


From: Stefano Lattarini
Subject: [FYI] {testuite-work} testsuite: user can force skipping of compiler-requiring tests
Date: Wed, 25 May 2011 16:05:31 +0200
User-agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )

* 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  |   10 ++++++++++
 tests/defs |   18 ++++++++++--------
 2 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 04e8921..b61cfdc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2011-05-24  Stefano Lattarini  <address@hidden>
+
+       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  <address@hidden>
 
        tests: tweak and improve tests on "Simple Tests" driver
diff --git a/tests/defs b/tests/defs
index b254ef4..873271f 100644
--- a/tests/defs
+++ b/tests/defs
@@ -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.
-- 
1.7.2.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]