+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
# 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"
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.