]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
testsuite: use `skip_' for skipping of tests
authorStefano Lattarini <stefano.lattarini@gmail.com>
Wed, 2 Jun 2010 22:30:03 +0000 (00:30 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 1 May 2011 10:03:33 +0000 (12:03 +0200)
* tests/defs: Use the `skip_' subroutine for test skipping.  Also
give sometimes more detailed messages about the reasons for the
skipping.
* tests/canon7.test: Likewise.
* tests/color.test: Likewise.
* tests/color2.test: Likewise.
* tests/compile2.test: Likewise.
* tests/dejagnu7.test: Likewise.
* tests/depcomp6.test: Likewise.
* tests/depcomp9.test: Likewise.
* tests/depcomp10.test: Likewise.
* tests/distlinks.test: Likewise.
* tests/distlinksbrk.test: Likewise.
* tests/fn99.test: Likewise.
* tests/fn99subdir.test: Likewise.
* tests/forcemiss2.test: Likewise.
* tests/fort5.test: Likewise.
* tests/gettext3.test: Likewise.
* tests/install2.test: Likewise.
* tests/instfail-info.test: Likewise.
* tests/instfail-java.test: Likewise.
* tests/instfail-libtool.test: Likewise.
* tests/instfail.test: Likewise.
* tests/instmany-mans.test: Likewise.
* tests/instmany-python.test: Likewise.
* tests/instmany.test: Likewise.
* tests/instsh3.test: Likewise.
* tests/ltinit.test: Likewise.
* tests/makej2.test: Likewise.
* tests/mdate6.test: Likewise.
* tests/mkinst3.test: Likewise.
* tests/parallel-tests3.test: Likewise.
* tests/parallel-tests-reset-term.test: Likewise.
* tests/parallel-tests-unreadable-log.test: Likewise,
* tests/python-virtualenv.test: Likewise.
* tests/remake-gnulib-remove-header.test: Likewise.
* tests/subobj9.test: Likewise.
* tests/symlink2.test: Likewise.
* tests/tar.test: Likewise.
* tests/tar2.test: Likewise.
* tests/txinfo26.test: Likewise.
* tests/vala2.test: Likewise.
* tests/vala3.test: Likewise.
* tests/vala5.test: Likewise.
* tests/vtexi4.test: Likewise.
* tests/instdir-texi.test: Likewise.
* tests/txinfo21.test: Likewise.

SquashMe

46 files changed:
ChangeLog
tests/canon7.test
tests/color.test
tests/color2.test
tests/compile2.test
tests/defs
tests/dejagnu7.test
tests/depcomp10.test
tests/depcomp6.test
tests/depcomp9.test
tests/distlinks.test
tests/distlinksbrk.test
tests/fn99.test
tests/fn99subdir.test
tests/forcemiss2.test
tests/fort5.test
tests/gettext3.test
tests/install2.test
tests/instdir-texi.test
tests/instfail-info.test
tests/instfail-java.test
tests/instfail-libtool.test
tests/instfail.test
tests/instmany-mans.test
tests/instmany-python.test
tests/instmany.test
tests/instsh3.test
tests/ltinit.test
tests/makej2.test
tests/mdate6.test
tests/mkinst3.test
tests/parallel-tests-reset-term.test
tests/parallel-tests-unreadable-log.test
tests/parallel-tests3.test
tests/python-virtualenv.test
tests/remake-gnulib-remove-header.test
tests/subobj9.test
tests/symlink2.test
tests/tar.test
tests/tar2.test
tests/txinfo21.test
tests/txinfo26.test
tests/vala2.test
tests/vala3.test
tests/vala5.test
tests/vtexi4.test

index b52a375bc7967ca4b381b175b7c8d358e5705899..98b19d0d2b4303b34a7aa88b32795a54d0d144e7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,54 @@
+2011-05-01  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       testsuite: use `skip_' for skipping of tests
+       * tests/defs: Use the `skip_' subroutine for test skipping.  Also
+       give sometimes more detailed messages about the reasons for the
+       skipping.
+       * tests/canon7.test: Likewise.
+       * tests/color.test: Likewise.
+       * tests/color2.test: Likewise.
+       * tests/compile2.test: Likewise.
+       * tests/dejagnu7.test: Likewise.
+       * tests/depcomp6.test: Likewise.
+       * tests/depcomp9.test: Likewise.
+       * tests/depcomp10.test: Likewise.
+       * tests/distlinks.test: Likewise.
+       * tests/distlinksbrk.test: Likewise.
+       * tests/fn99.test: Likewise.
+       * tests/fn99subdir.test: Likewise.
+       * tests/forcemiss2.test: Likewise.
+       * tests/fort5.test: Likewise.
+       * tests/gettext3.test: Likewise.
+       * tests/install2.test: Likewise.
+       * tests/instfail-info.test: Likewise.
+       * tests/instfail-java.test: Likewise.
+       * tests/instfail-libtool.test: Likewise.
+       * tests/instfail.test: Likewise.
+       * tests/instmany-mans.test: Likewise.
+       * tests/instmany-python.test: Likewise.
+       * tests/instmany.test: Likewise.
+       * tests/instsh3.test: Likewise.
+       * tests/ltinit.test: Likewise.
+       * tests/makej2.test: Likewise.
+       * tests/mdate6.test: Likewise.
+       * tests/mkinst3.test: Likewise.
+       * tests/parallel-tests3.test: Likewise.
+       * tests/parallel-tests-reset-term.test: Likewise.
+       * tests/parallel-tests-unreadable-log.test: Likewise,
+       * tests/python-virtualenv.test: Likewise.
+       * tests/remake-gnulib-remove-header.test: Likewise.
+       * tests/subobj9.test: Likewise.
+       * tests/symlink2.test: Likewise.
+       * tests/tar.test: Likewise.
+       * tests/tar2.test: Likewise.
+       * tests/txinfo26.test: Likewise.
+       * tests/vala2.test: Likewise.
+       * tests/vala3.test: Likewise.
+       * tests/vala5.test: Likewise.
+       * tests/vtexi4.test: Likewise.
+       * tests/instdir-texi.test: Likewise.
+       * tests/txinfo21.test: Likewise.
+
 2011-04-29  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        testsuite: more environment sanitization
index 4e700df1e7759d1935e4f38653244f7d7f8d97c3..32b607c2540b5894330a72969125cff9b7eac308 100755 (executable)
@@ -26,8 +26,11 @@ AC_PROG_LIBTOOL dnl: for libtool libraries
 AC_OUTPUT
 END
 
-touch ,foo-bar libb.az+baz lib~zardoz,, || Exit 77
-rm -f ,foo-bar libb.az+baz lib~zardoz,,
+if touch ,foo-bar libb.az+baz lib~zardoz,,; then
+  rm -f ,foo-bar libb.az+baz lib~zardoz,,
+else
+  skip_ "cannot create regular files with \"tricky\" names"
+fi
 
 cat > Makefile.am << 'END'
 noinst_PROGRAMS = dummy_static dummy_dynamic ,foo-bar
index 570b21d6674629bdc80487269c2b25a1952b6cc9..d912aa2dab4ab4b784418405f829b14ccd9102fa 100755 (executable)
@@ -33,7 +33,7 @@ std='\e[m'
 # GNU or BSD 'grep -a' works on files, but is not portable.
 case `echo "$std" | grep .` in
   "$std") ;;
-  *) echo "$me: grep can't parse nonprinting characters" >&2; Exit 77;;
+  *) skip_ "grep can't parse nonprinting characters";;
 esac
 
 cat >>configure.in <<END
index c3315deb409e70e8d874c1168ff578f2e0221bfa..e0bfdab8c162530723cc95411f0a38477b7a6f29 100755 (executable)
@@ -33,7 +33,7 @@ std='\e[m'
 # GNU or BSD 'grep -a' works on files, but is not portable.
 case `echo "$std" | grep .` in
   "$std") ;;
-  *) echo "$me: grep can't parse nonprinting characters" >&2; Exit 77;;
+  *) skip_ "grep can't parse nonprinting characters";;
 esac
 
 # Check that we have a working expect program.
@@ -42,10 +42,8 @@ cat >expect-check <<'END'
 spawn $env(THE_SYSTEM_SHELL) -c :
 expect eof
 END
-THE_SYSTEM_SHELL=/bin/sh expect -f expect-check || {
-    echo "$me: failed to find a working expect program" >&2
-    Exit 77
-}
+THE_SYSTEM_SHELL=/bin/sh expect -f expect-check \
+  || skip_ "$me: failed to find a working expect program"
 
 # Do the tests.
 
index 04fee90846c38bf83a40586f150fb05b9021ad8a..a466dc4130e0a3c5da05228c6f991d66fc3e3846 100755 (executable)
@@ -63,8 +63,13 @@ test -f "$amtest_object"
 
 # Absolute w32 paths should be accepted.
 # Do not actually run this test on anything that could be w32.
-test -d "C:\\" && Exit 77
-case $PATH_SEPARATOR in ';'|':');; *) Exit 77;; esac
+if test -d 'C:\'; then
+  skip_ "this test shouldn't run on a win32-like system"
+fi
+case $PATH_SEPARATOR in
+ ';'|':');;
+ *) skip_ "unrecognized PATH separator \`$PATH_SEPARATOR'"
+esac
 
 amtest_source='C:\libltdl\libltdl\slist.c'
 amtest_object='C:\libltdl\libltdl\libltdl_libltdl_la-slist.obj'
index 46ff08b2ea954138de3b3b41c56bdd7c5f6fefa4..9f862af7effc6b603c9ae239e97105d8974ed72f 100644 (file)
@@ -241,18 +241,20 @@ do
     bzip2)
       # Do not use --version, bzip2 still tries to compress stdin.
       echo "$me: running bzip2 --help"
-      bzip2 --help || exit 77
+      bzip2 --help \
+        || skip_ "required program \`bzip2' not available"
       ;;
     cl)
       CC=cl
       export CC
       echo "$me: running $CC -?"
-      $CC -? || exit 77
+      $CC -? || skip_ "Microsoft C compiler \`$CC' not available"
       ;;
     cscope)
       # Sun cscope is interactive without redirection.
       echo "$me: running cscope --version </dev/null"
-      cscope --version </dev/null || exit 77
+      cscope --version </dev/null \
+        || skip_ "required program \`cscope' not available"
       ;;
     etags)
       # Exuberant Ctags will create a TAGS file even
@@ -260,11 +262,12 @@ do
       # does not have such problem.)  Use -o /dev/null
       # to make sure we do not pollute the tests/ directory.
       echo "$me: running etags --version -o /dev/null"
-      etags --version -o /dev/null || exit 77
+      etags --version -o /dev/null \
+        || skip_ "required program \`etags' not available"
       ;;
     GNUmake)
       echo "$me: determine if $MAKE is GNU make"
-      using_gmake || exit 77
+      using_gmake || skip_ "this test requires GNU make"
       ;;
     gcc)
       # When gcc is required, export `CC=gcc' so that ./configure
@@ -274,25 +277,25 @@ do
       CC=gcc
       export CC
       echo "$me: running $CC --version"
-      $CC --version || exit 77
+      $CC --version || skip_ "GNU C compiler not available"
       echo "$me: running $CC -v"
-      $CC -v || exit 77
+      $CC -v || skip_ "botched installation for GNU C compiler"
       ;;
     gcj)
       GCJ=gcj
       export GCJ
       echo "$me: running $GCJ --version"
-      $GCJ --version || exit 77
+      $GCJ --version || skip_ "GNU Java compiler not available"
       echo "$me: running $GCJ -v"
-      $GCJ -v || exit 77
+      $GCJ -v || skip_ "botched installation for GNU Java compiler"
       ;;
     g++)
       CXX=g++
       export CXX
       echo "$me: running $CXX --version"
-      $CXX --version || exit 77
+      $CXX --version || skip_ "GNU C++ compiler not available"
       echo "$me: running $CXX -v"
-      $CXX -v || exit 77
+      $CXX -v || skip_ "botched installation for GNU C++ compiler"
       ;;
     icc)
       CC=icc
@@ -302,7 +305,7 @@ do
       # it will try link *nothing* and complain it cannot find
       # main(); funny).  Use -help so it does not try linking anything.
       echo "$me: running $CC -V -help"
-      $CC -V -help || exit 77
+      $CC -V -help || skip_ "Intel C compiler \`$CC' not available"
       ;;
     javac)
       # The Java compiler from JDK 1.5 (and presumably earlier versions)
@@ -310,16 +313,19 @@ do
       # telling that source files are missing.  Adding also the `-help'
       # option seems to solve the problem.
       echo "$me: running javac -version -help"
-      javac -version -help || exit 77
+      javac -version -help || skip_ "Sun Java compiler not available"
       ;;
     makedepend)
       echo "$me: running makedepend -f-"
-      makedepend -f- || exit 77
+      makedepend -f- \
+        || skip_ "required program \`makedepend' not available"
       ;;
     makeinfo-html)
-      # Make sure makeinfo understands --html.
+      # Make sure we have makeinfo, and it understands `--html'.
       echo "$me: running makeinfo --html --version"
-      makeinfo --html --version || exit 77
+      makeinfo --html --version \
+        || skip_ "cannot find a makeinfo program that groks the" \
+                 "\`--html' option"
       ;;
     non-root)
       # Skip this test case if the user is root.
@@ -331,21 +337,19 @@ do
       overwrite_status=$?
       rm -f $priv_check_temp
       if test $overwrite_status -eq 0; then
-        echo "$me: cannot drop file write permissions" >&2
-        exit 77
+        skip_ "cannot drop file write permissions"
       fi
       unset priv_check_temp overwrite_status
       ;;
     perl-threads)
       if test "$WANT_NO_THREADS" = "yes"; then
-        echo "$me: skip with Devel::Cover: cannot cope with threads" >&2
-        exit 77
+        skip_ "Devel::Cover cannot cope with threads"
       fi
       ;;
     python)
       # Python doesn't support --version, it has -V
       echo "$me: running python -V"
-      python -V || exit 77
+      python -V || skip_ "python interpreter not available"
       ;;
     ro-dir)
       # Skip this test case if read-only directories aren't supported
@@ -357,8 +361,7 @@ do
       create_status=$?
       rm -rf $ro_dir_temp
       if test $create_status -eq 0; then
-        echo "$me: cannot drop directory write permissions" >&2
-        exit 77
+        skip_ "cannot drop directory write permissions"
       fi
       unset ro_dir_temp create_status
       ;;
@@ -369,8 +372,7 @@ do
           echo "$me: running $r2h --version"
           $r2h --version && break 2
         done
-        echo "$me: no proper rst2html program found" >&2
-        exit 77
+        skip_ "no proper rst2html program found"
       done
       unset r2h
       ;;
@@ -379,20 +381,21 @@ do
       # the program on the runtest command-line. This requires
       # DejaGnu 1.4.3 or later.
       echo "$me: running runtest SOMEPROGRAM=someprogram --version"
-      runtest SOMEPROGRAM=someprogram --version || exit 77
+      runtest SOMEPROGRAM=someprogram --version \
+        || skip_ "DejaGnu is not available"
       ;;
     tex)
       # No all versions of Tex support `--version', so we use
       # a configure check.
       if test -z "$TEX"; then
-        echo "$me: TeX is required, but it wasn't found by configure" >&2
-        exit 77
+        skip_ "TeX is required, but it wasn't found by configure"
       fi
       ;;
     texi2dvi-o)
       # Texi2dvi supports `-o' since Texinfo 4.1.
       echo "$me: running texi2dvi -o /dev/null --version"
-      texi2dvi -o /dev/null --version || exit 77
+      texi2dvi -o /dev/null --version \
+        || skip_ "required program \`texi2dvi' not available"
       ;;
     xsi-shell)
       # Try some XSI features.
@@ -402,14 +405,14 @@ do
        test "${_am_dummy##*/},${_am_dummy%/*},${_am_dummy#??}"${_am_dummy%"$_am_dummy"}, \
                = c,a/b,b/c, \
        && eval 'test $(( 1 + 1 )) -eq 2 \
-       && test "${#_am_dummy}" -eq 5' ) || exit 77
+       && test "${#_am_dummy}" -eq 5' ) \
+          || skip_ "the shell lacks some required XSI features"
       ;;
     yacc)
       if test x"$YACC" = x"no"; then
         # The user has explicitly told he doesn't want a yacc program
         # to be used.
-        echo "$me: \$YACC is \"no\", skipping test" >&2
-        exit 77
+        skip_ "$me: \$YACC is \"no\", skipping test"
       elif 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
@@ -417,7 +420,7 @@ do
         YACC='bison -y'
         export YACC
         echo "$me: running bison --version"
-        bison --version || exit 77
+        bison --version || skip_ "required program \`bison' not available"
       fi
       ;;
     *)
@@ -426,7 +429,7 @@ do
       # It is not likely but possible that $tool is a special builtin,
       # in which case the shell is allowed to exit after an error.
       # So, please leave the subshell here.
-      ( $tool --version ) || exit 77
+      ($tool --version) || skip_ "required program \`$tool' not available"
       ;;
   esac
 done
@@ -438,10 +441,8 @@ case $testbuilddir in
   *\ *|*\      *)
     case " $required " in
       *' libtool '* | *' libtoolize '* )
-        echo "$me: libtool/libtoolized cannot cope correctly" >&2
-        echo "$me: with spaces in the build tree" >&2
-        exit 77
-        ;;
+        skip_ "libtool and libtoolize cannot cope correctly" \
+              "with spaces in the build tree";;
     esac
     ;;
 esac
@@ -454,10 +455,8 @@ case $testsrcdir in
   *\ * |*\     *)
     case " $required " in
       *' libtool '* | *' libtoolize '* | *' gettext '* )
-        echo "$me: our testsuite setup cannot cope correctly with spaces" >&2
-        echo "$me: in the source tree for libtool/gettext tests" >&2
-        exit 77
-        ;;
+        skip_ "our testsuite setup cannot cope with spaces in the" \
+              "source tree name for libtool/gettext tests.";;
    esac
    ;;
 esac
@@ -494,16 +493,14 @@ case " $required " in
     case " $required " in
       *' libtool '*|*' libtoolize '*)
         if test $libtool_found != yes; then
-          echo "$me: libtool/libtoolize is required, but libtool.m4 wasn't" >&2
-          echo "$me: found in directories $aclocaldir $extra_includes" >&2
-          exit 77
+          skip_ "libtool is required, but libtool.m4 wasn't found in" \
+                "directories $aclocaldir $extra_includes"
         fi
         ;;
       *' gettext '*)
         if test $gettext_found != yes; then
-          echo "$me: gettext is required, but gettext.m4 wasn't found" >&2
-          echo "$me: in directories $aclocaldir $extra_includes" >&2
-          exit 77
+          skip_ "gettext is required, but gettext.m4 wasn't found in" \
+                "directories $aclocaldir $extra_includes"
         fi
         ;;
     esac
index d2f36e155917d37cb57f98abf8e85e689c4f983e..d16e02d2ac53a4b05f2eafe6fcd67a4b356bf0b7 100755 (executable)
@@ -20,8 +20,8 @@
 required=runtest
 . ./defs || Exit 1
 
-# Check whether DejaGnu supports --status
-runtest --help | grep '.*--status' || Exit 77
+runtest --help | grep '.*--status' \
+  || skip_ "dejagnu lacks support for '--status'"
 
 cat > failtcl << 'END'
 #! /bin/sh
index 0fa6c6a467e49ce5d2b0d334fa18df3b81be65d2..b278766c1409fe89eec7ed4fa209e30ddcff61f2 100755 (executable)
@@ -76,7 +76,7 @@ cd build
 ../configure am_cv_CC_dependencies_compiler_type=hp
 # Do not error out with the first make, as the forced 'hp' depmode might
 # not actually work, but we have overridden the _AM_DEPENDENCIES tests.
-$MAKE || Exit 77
+$MAKE || skip_ "forced depmode doesn't work"
 
 # We must clean and rebuild, as the actual error only happens the second
 # time the objects are built because 'depcomp' has silently messed up the
index b937b9fe8c77ce2d328c9985e8c8b5c85967a865..baf9fd58fd648a3061969e7c25a4bd5f977fe94c 100755 (executable)
@@ -86,9 +86,8 @@ $AUTOMAKE -a
 ./configure --enable-dependency-tracking
 $MAKE
 
-# Check that dependency tracking works.
 if grep 'depmode=none' Makefile; then
-  Exit 77
+  skip_ "automatic dependency tracking couldn't be activated"
 fi
 
 cd sub2
index 9972c3da81302c2a5589f1ccc350152c31917ea6..d1323545b69b12209785d55cf7d9a6fcfa51da3e 100755 (executable)
@@ -78,7 +78,7 @@ cd build
 # Do not error out with the first make, as the forced 'makedepend'
 # depmode might not actually work, but we have overridden the
 # _AM_DEPENDENCIES tests.
-$MAKE || Exit 77
+$MAKE || skip_ "forced depmode doesn't work"
 
 # We must clean and rebuild, as the actual error only happens the second
 # time the objects are built because 'makedepend' has silently messed up
index 3021cae135c840c2ba25f9a9ac029a5ce2c86248..0f68bee1ca26f9b0b28f92ca0dfa3964ce9ad66a 100755 (executable)
 
 echo text > file
 
-ln -s file lnk || {
-  echo "$me: cannot create symlinks to files" >&2
-  Exit 77
-}
+ln -s file lnk || skip_ "cannot create symlinks to files"
 
 mkdir A
 mkdir B
index 45755717d47822f03dcc8425c589d8c6d5ff8d66..ac0dc28c35c45fe5ca9d7674d8837a0ca15ab0c8 100755 (executable)
@@ -27,10 +27,7 @@ lnk2=${lnk_base}__002
 lnka=${lnk_base}__aaa
 lnkb=${lnk_base}__bbb
 
-ln -s nonesuch $lnk1 || {
-  echo "$me: cannot create broken symlinks" >&2
-  Exit 77
-}
+ln -s nonesuch $lnk1 || skip_ "cannot create broken symlinks"
 
 ln -s "`pwd`/nonesuch" $lnk2
 
index c2afd2e29a14da5022ed41b51a5715dc7f521bd4..c04880284bf76cfdda1bfcd8d5ca9d0e085e0730 100755 (executable)
@@ -25,15 +25,13 @@ AUTOMAKE_OPTIONS = filename-length-max=99
 EXTRA_DIST = 12345678
 END
 
-(for i in 1 2 3 4 5 6 7 8 9
-do
-  mkdir -p 12345678 || Exit 77
-  cd 12345678
-  touch x
-done) || Exit 77
+(for i in 1 2 3 4 5 6 7 8 9; do
+  mkdir -p 12345678 && cd 12345678 && touch x || Exit 1
+done) || skip_ "failed to create deep directory hierarchy"
 
 # AIX 5.3 `cp -R' is too buggy for `make dist'.
-cp -R 12345678 t || Exit 77
+cp -R 12345678 t \
+  || skip_ "'cp -R' failed to copy deep directory hierarchy"
 
 $ACLOCAL
 $AUTOCONF
@@ -41,15 +39,13 @@ $AUTOMAKE
 ./configure
 $MAKE distcheck
 
-(for i in 1 2 3 4 5 6 7 8 9 10 11
-do
-  mkdir -p 12345678 || Exit 77
-  cd 12345678
-  touch x
-done) || Exit 77
+(for i in 1 2 3 4 5 6 7 8 9 10 11; do
+  mkdir -p 12345678 && cd 12345678 && touch x || Exit 1
+done) || skip_ "failed to create deeper directory hierarchy"
 
 $MAKE dist 2>stderr && { cat stderr >&2; Exit 1; }
 cat stderr >&2
 grep 'filenames are too long' stderr
 test 2 = `grep 12345678 stderr | wc -l`
+
 :
index a040e58019e27b58258fc0d4519857055129d63e..3f793c8d8ad56db5609452182cb16bd850ec9c9f 100755 (executable)
@@ -46,15 +46,14 @@ AUTOMAKE_OPTIONS = filename-length-max=99
 EXTRA_DIST = 12345678
 END
 
-(cd ${subdirname}; for i in 1 2 3 4 5 6 7 8
-do
-  mkdir -p 12345678 || Exit 77
-  cd 12345678
-  touch x
-done)
+(cd ${subdirname} || Exit 1
+for i in 1 2 3 4 5 6 7 8; do
+  mkdir -p 12345678 && cd 12345678 && touch x || Exit 1
+done) || skip_ "failed to create deep directory hierarchy"
 
 # AIX 5.3 `cp -R' is too buggy for `make dist'.
-cp -R ${subdirname} t || Exit 77
+cp -R ${subdirname} t \
+  || skip_ "'cp -R' failed to copy deep directory hierarchy"
 
 for init_dir in ${subdirname} .; do
        (
@@ -67,15 +66,14 @@ done
 ./configure
 $MAKE distcheck
 
-(cd ${subdirname}; for i in 1 2 3 4 5 6 7 8 9
-do
-  mkdir -p 12345678 || Exit 77
-  cd 12345678
-  touch x
-done)
+(cd ${subdirname} || Exit 1
+for i in 1 2 3 4 5 6 7 8 9; do
+  mkdir -p 12345678 && cd 12345678 && touch x || Exit 1
+done) || skip_ "failed to create deeper directory hierarchy"
 
 $MAKE dist 2>stderr && { cat stderr >&2; Exit 1; }
 cat stderr >&2
 grep 'filenames are too long' stderr
 test 1 = `grep 12345678 stderr | wc -l`
+
 :
index 0b6b77529eb23833a352843950e659d439a74cd4..80d78d3ba0c3ac2c4e0421e4a893b230b0f5c4f8 100755 (executable)
@@ -25,10 +25,7 @@ rm -f install-sh
 echo zot > foo
 cp foo foo2
 
-ln -s foo2 install-sh || {
-  echo "$me: cannot create symlinks to files" >&2
-  Exit 77
-}
+ln -s foo2 install-sh || skip_ "cannot create symlinks to files"
 
 : > Makefile.am
 
index c4a4b55edfb5a411c7424c1be93bbd931458f1ef..de68a6cd51f010bda36a58095526ca6012db49de 100755 (executable)
@@ -78,14 +78,13 @@ $AUTOMAKE -a
 $AUTOCONF
 
 # This test requires Libtool >= 2.0.  Earlier Libtool does not
-# have the LT_PREREQ macro to cause autoconf failure, so let's
-# skip in this case:
-grep LT_PREREQ configure && Exit 77
+# have the LT_PREREQ macro to cause autoconf failure.
+grep LT_PREREQ configure && skip_ "libtool is too old (probably < 2.0)"
 
 # Ensure we use --tag for f90, too.
 grep " --tag=FC" Makefile.in
 
-# configure may Exit 77 if no compiler is found,
+# configure may exit with status 77 if no compiler is found,
 # or if the compiler cannot compile Fortran 90 files).
 ./configure
 $MAKE
index 46b3cbc8c7a1012dd09d057b91909eac6b46ae5a..66a32a8d637461ce777d4483f08e68e4b9929a45 100755 (executable)
@@ -30,7 +30,7 @@ mkdir po
 
 # if aclocal fails, assume the gettext macros are too old and do not
 # define AM_GNU_GETTEXT_INTL_SUBDIR.
-$ACLOCAL || Exit 77
+$ACLOCAL || skip_ "your gettext macros are probably too old"
 
 # config.rpath is required.
 : >config.rpath
index 2afdd375d68dc86032c1bd80c410cfdb94085ce1..a04c0afc40e9c2bf181f74fac610a0a65c0b62b8 100755 (executable)
@@ -39,7 +39,7 @@ $AUTOMAKE -a
 chmod 000 Makefile.am
 
 # On some systems (like DOS and Windows), files are always readable.
-test ! -r Makefile.am || Exit 77
+test ! -r Makefile.am || skip_ "cannot drop file read permissions"
 
 ./configure
 
index 9de8428c263a829492d3ff3e7fcb69a4227a4815..5e9ee9d6b736e3e1ab71dd032559072ef3086331 100755 (executable)
 required='makeinfo-html tex texi2dvi'
 . ./defs || Exit 1
 
-dvips --help || Exit 77
-pdfetex --help || pdftex --help || Exit 77
+dvips --help \
+  || skip_ "dvips is missing"
+pdfetex --version || pdftex --version \
+  || skip_ "pdeftex and pdftex are both missing"
 
 cat >>configure.in <<'END'
 AC_OUTPUT
index becf59b006508e1400709c1a9c07ed0dc0bbb5a4..3ac29860c02d4e79ba82256ec0e360813d2c7a72 100755 (executable)
@@ -55,7 +55,7 @@ $MAKE uninstall
 for file in info1.info
 do
   chmod a-r $file
-  test ! -r $file || Exit 77
+  test ! -r $file || skip_ "cannot drop file read permissions"
   $MAKE install-data && Exit 1
   chmod u+r $file
 done
index a57029713dd4a1d33384b0edfb5575d42a90f36a..a584d647d40627550c94e6c09f4844e0b793549f 100755 (executable)
@@ -53,7 +53,7 @@ $MAKE uninstall
 for file in java1.class
 do
   chmod a-r $file
-  test ! -r $file || Exit 77
+  test ! -r $file || skip_ "cannot drop file read permissions"
   $MAKE install-data && Exit 1
   chmod u+r $file
 done
index b580c400ee0376e3a775b91dbf75f67163e3ed4c..114f290899d6efacc765f14c4d0c72004d589da7 100755 (executable)
@@ -64,7 +64,7 @@ $MAKE uninstall
 for file in liblt1.la libltn1.la
 do
   chmod a-r $file
-  test ! -r $file || Exit 77
+  test ! -r $file || skip_ "cannot drop file read permissions"
   $MAKE install-exec && Exit 1
   chmod u+r $file
 done
index d7fa736419299d642f02727f8be8ba670cf84ce1..440438794202b7ed9d6d09abdea855a0e51d7142 100755 (executable)
@@ -68,7 +68,7 @@ $MAKE uninstall
 for file in lib1.a libn1.a
 do
   chmod a-r $file
-  test ! -r $file || Exit 77
+  test ! -r $file || skip_ "cannot drop file read permissions"
   $MAKE install-exec && Exit 1
   chmod u+r $file
 done
index b8f52a3ff7fe061f268dfb4c30a096be092bb769..4a475c656dcb8f0b5ef7d13fe972e14f3a835f28 100755 (executable)
@@ -134,7 +134,7 @@ srcdir=../../$subdir
 
 for file in page3.1 page$nfiles.1 npage3.1 npage$nfiles.1; do
   chmod a-r $srcdir/$file
-  test ! -r $srcdir/$file || Exit 77
+  test ! -r $srcdir/$file || skip_ "cannot drop file read permissions"
   $MAKE install-man1 && Exit 1
   chmod u+r $srcdir/$file
 done
index ab4aa73a0ce04c299906b7db209414bb17386e99..26a6b16dd9ac4ae671edef0731625ac44ef96044 100755 (executable)
@@ -121,7 +121,7 @@ srcdir=../../$subdir
 for file in python3.py python$nfiles.py
 do
   chmod a-r $srcdir/$file
-  test ! -r $srcdir/$file || Exit 77
+  test ! -r $srcdir/$file || skip_ "cannot drop file read permissions"
   $MAKE install && Exit 1
   chmod u+r $srcdir/$file
 done
index effee82894ae36fd0d351d98752b82f6082fa02c..5c55165b19300c67ba41204a6e0dcf0717191831 100755 (executable)
@@ -149,7 +149,7 @@ srcdir=../../$subdir
 for file in script3 script$nfiles
 do
   chmod a-r $srcdir/$file
-  test ! -r $srcdir/$file || Exit 77
+  test ! -r $srcdir/$file || skip_ "cannot drop file read permissions"
   $MAKE install-binSCRIPTS && Exit 1
   chmod u+r $srcdir/$file
 done
index a2bb9d3447a4516269a2a5827b03a39d4e5461ce..da504190558f68eb0cf3c2eb7d0dea32008e470f 100755 (executable)
 
 required=non-root
 . ./defs || Exit 1
+
 # Solaris /usr/ucb/touch does not accept -t.
-touch -t $old_timestamp foo || Exit 77
+touch -t $old_timestamp foo \
+  || skip_ "touch utility doesn't accept '-t' option"
 
 ./install-sh -d d1
 
index 42c39138e85a51db7e45fd24fc62f8368bbde46a..e541431dc4140ea0157fad5d50d98b161667a2b2 100755 (executable)
@@ -45,7 +45,11 @@ END
 libtoolize
 # Skip if older libtool (pre-2.0) is used.
 { $ACLOCAL && $AUTOCONF; } || {
-  if test $? -eq 63; then Exit 77; else Exit 1; fi
+  if test $? -eq 63; then
+    skip_ "libtool is too old (probably < 2.0)"
+  else
+    Exit 1
+  fi
 }
 $EGREP 'LT_(INIT|PREREQ)' configure && Exit 1 # Sanity check.
 $AUTOMAKE -a
index 2adc75abad989d67986c5473c1117d50b914b4b3..3025c06b9b09c3e5c1c77f2138a6f88ddae9d371 100755 (executable)
@@ -37,7 +37,7 @@ mkdir build
 cd build
 ../configure "--prefix=`pwd`/inst"
 
-$MAKE -j2 || Exit 77
+$MAKE -j2 || skip_ "$MAKE failed to run with two parallel jobs"
 $MAKE -j2 distcheck
 $MAKE test-distdir-removed
 
index 17672ee7cc7d402cd51c285a080421c1d72d11e0..94ddb4dc504c77ba50f79f73ae3c06ca064a030c 100755 (executable)
@@ -20,7 +20,8 @@
 
 a=
 file='file  name $a'
-( : > "$file" ) || Exit 77
+( : > "$file" ) \
+  || skip_ "file name with spaces and metacharacters not accepted"
 
 cp "$top_testsrcdir/lib/mdate-sh" .
 $SHELL ./mdate-sh "$file" >stdout 2>stderr ||
index 8d9efe7081bf9f535772a04cf8b9077f7b57f334..0082b53fb6815fbe7c0fa3a32dbc22e680b007a3 100755 (executable)
@@ -19,8 +19,8 @@
 . ./defs || Exit 1
 
 # Make sure the directory we will create can be created...
-mkdir '~a b' || Exit 77
-mkdir '~a b/-x  y' || Exit 77
+mkdir '~a b' && mkdir '~a b/-x  y' \
+  || skip_ "directory names with spaces and metacharacters not accepted"
 rm -rf '~a b'
 
 cp "$top_testsrcdir/lib/mkinstalldirs" .
index 3a222c0b8c7cf8df2e2fe82bb70fc8005cf4e6df..1544c3f981b578c60c0f43dd9f3a2ff976cde0b8 100755 (executable)
@@ -27,7 +27,7 @@ esc='\e['
 # GNU or BSD 'grep -a' works on files, but is not portable.
 case `echo "$esc" | $FGREP "$esc"` in
   "$esc") ;;
-  *) echo "$me: $FGREP can't parse nonprinting characters" >&2; Exit 77;;
+  *) skip_ "$FGREP can't parse nonprinting characters" ;;
 esac
 
 cat >> configure.in << 'END'
index 572f03df5fcaf3ddd44c40042d414255f186ce35..8560c371ddadf172b9d60b31ea9ceb8f6f7c8fb9 100755 (executable)
@@ -51,7 +51,7 @@ line=PASS; export line
 $MAKE foo.log
 $MAKE bar.log
 chmod a-r foo.log bar.log
-test ! -r foo.log || Exit 77
+test ! -r foo.log || skip_ "cannot drop file read permissions"
 $MAKE test-suite.log >stdout && { cat stdout; Exit 1; }
 cat stdout
 grep '^2 of 2 tests failed *$' stdout
index 9f0ce4289e7db787bc60704697d868110067a460..1d621eb122c5e001824fe7f0643e67519548e2bd 100755 (executable)
@@ -21,9 +21,8 @@ parallel_tests=yes
 required=GNUmake
 . ./defs || Exit 1
 
-# This test does not work well if $MAKE contains -j.
 case $MAKE in
-*\ -j*) Exit 77 ;;
+  *\ -j*) skip_ "this test does not work well if \$MAKE contains \`-j'";;
 esac
 
 cat >> configure.in << 'END'
index 11055b0b388dae667fa17f24cf69072c0fab92c9..d7f87064ea8ef7f0ad110d61580ebcd139dd8ae1 100755 (executable)
@@ -24,8 +24,10 @@ required='python virtualenv'
 CONFIG_SITE=/dev/null; export CONFIG_SITE
 
 # Skip the test if a proper virtualenv cannot be created.
-virtualenv --verbose virtenv || Exit 77
-test -f virtenv/bin/activate || Exit 77
+virtualenv --verbose virtenv \
+  || skip_ "virtualenv program not found"
+test -f virtenv/bin/activate \
+  || skip_ "creation of python virtual environment failed"
 
 # Activate the virtualenv.
 . ./virtenv/bin/activate
index c28a078b34a54b13198a4bbb3681736aaaf12c73..ab77f11ba6a238bd53ce416da2cd9e3c356c3716 100755 (executable)
@@ -95,8 +95,9 @@ for vpath in : false; do
 
   # Do not reject slow dependency extractors: we need dependency tracking.
   $srcdir/configure --enable-dependency-tracking
-  # Skip the test if dependency tracking couldn't be activated.
-  $FGREP 'depmode=none' Makefile && Exit 77
+  if $FGREP 'depmode=none' Makefile; then
+    skip_ "automatic dependency tracking couldn't be activated"
+  fi
 
   $MAKE
   ls -l
index a910d22d5eb93bdc67a1e12ccbc1e795e5e64bfb..fb81d70ccea48143f4f17a580a02dba13cdc0f7c 100755 (executable)
@@ -61,7 +61,7 @@ $AUTOCONF
 $AUTOMAKE -a
 
 # Skip this test on configure errors (e.g., broken C++ compilers).
-./configure || Exit 77
+./configure || skip_ "configure failure"
 
 # Ensure './libtool --help' will use the right tool versions.
 export AUTOCONF AUTOMAKE
index f2a9b4552c3e956ec0a3c3aa437006cee8b142f0..413c60cb44080755e46916be2b3b1d9a2d0ecfc2 100755 (executable)
 . ./defs || Exit 1
 
 rm -f install-sh
-ln -s Zardoz install-sh || {
-  echo "$me: cannot create broken symlinks" >&2
-  Exit 77
-}
+ln -s Zardoz install-sh || skip_ "cannot create broken symlinks"
 
 : > Makefile.am
 
index 3dcf7ba90a1e7db59500850d04d96fa3b42a240e..22fdcb96f441a6061ce176ca86c4a894ec104884 100755 (executable)
@@ -32,7 +32,9 @@ $AUTOCONF
 $AUTOMAKE
 ./configure
 
-grep 'am__tar.*false' Makefile && Exit 77
+if grep 'am__tar.*false' Makefile; then
+  skip_ "cannot find proper archiver program"
+fi
 
 $MAKE distcheck
 test -f tar-1.0.tar.gz
index 987ff403e22fc2d81bb14fff809aa26b0228b806..205a37ec49706f27291cf15bb34d393606407a45 100755 (executable)
@@ -32,7 +32,9 @@ $AUTOCONF
 $AUTOMAKE
 ./configure
 
-grep 'am__tar.*false' Makefile && Exit 77
+if grep 'am__tar.*false' Makefile; then
+  skip_ "cannot find proper archiver program"
+fi
 
 $MAKE distcheck
 test -f tar2-1.0.tar.gz
index 39b7a549af37a3c196e6a5583d1a766b412a4737..5196680dfdfdf583038926020c20d17af2a5b770 100755 (executable)
@@ -149,7 +149,7 @@ test ! -f share/txinfo21/dvi/main.dvi
 test ! -f share/txinfo21/dvi/main2.dvi
 test ! -f share/txinfo21/dvi/main3.dvi
 
-(dvips --help 2>/dev/null >/dev/null) || Exit 77
+dvips --help || skip_ "dvips is missing"
 
 $MAKE install-ps
 test -f share/txinfo21/ps/main.ps
@@ -160,8 +160,8 @@ test ! -f share/txinfo21/ps/main.ps
 test ! -f share/txinfo21/ps/main2.ps
 test ! -f share/txinfo21/ps/main3.ps
 
-(pdfetex --help 2>/dev/null >/dev/null) ||
-  (pdftex --help 2>/dev/null >/dev/null) || Exit 77
+pdfetex --help || pdftex --help \
+  || skip_ "pdftex and pdfetex are both missing"
 
 $MAKE install-pdf
 test -f share/txinfo21/pdf/main.pdf
index ba935518d7e94d7c57e1ae34ab4a899c2b867627..20a708f12942d08485d6b8186626193ec4c9600c 100755 (executable)
@@ -46,9 +46,9 @@ $AUTOCONF
 $MAKE
 $MAKE distclean
 
-# We do not require this to work with a directory that contains white space.
 case `pwd` in
-  *\ * | *\    *) Exit 77;;
+  *\ * | *\    *)
+    skip_ "this test might fail in a directory containing white spaces";;
 esac
 
 mkdir build
index d5308e35b93593d3978f695fcc1cdd6d64dfb030..d020c58839be49c61b98629dcd29916552ca64db 100755 (executable)
@@ -64,7 +64,7 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
-./configure || Exit 77
+./configure || skip_ "configure failure"
 $MAKE
 
 # test rebuild rules
index 2d9c85c331af78eebac84d8b9d0146204fa9ebf7..8de96d667fe7b59b7c9828dad4e640830bff17f0 100755 (executable)
@@ -58,7 +58,7 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
-./configure || Exit 77
+./configure || skip_ "configure failure"
 $MAKE
 $MAKE distcheck
 $MAKE distclean
@@ -88,7 +88,7 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
-./configure || Exit 77
+./configure || skip_ "configure failure"
 $MAKE
 $MAKE distcheck
 $MAKE distclean
index d6ff62954080e19030c9c68517e57d4910298dc9..66cffe70a9c6d70c7b7ce562591c4d65c21efff3 100755 (executable)
@@ -67,6 +67,7 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
-./configure || Exit 77
+./configure || skip_ "configuration step failure"
 $MAKE
 
+:
index b6d970ad14e31b4315bcf87a88d3665a3c21ed86..2bdcc35dfd6f46a82cab61ddd8d076eed49b0013 100755 (executable)
@@ -32,14 +32,11 @@ $date_is_posix \
   && day=`LC_ALL=C date '+%d'` && test -n "$day" \
   && month=`LC_ALL=C date '+%B'` && test -n "$month" \
   && year=`LC_ALL=C date '+%Y'`&& test -n "$year" \
-  || { echo "$me: 'date' is not POSIX-compliant enough"; Exit 77; }
+  || skip_ "'date' is not POSIX-compliant enough"
 day=`echo "$day" | sed 's/^0//'`
 
-# This test requires a grep program that can work on non-text input.
-(echo '\ex\a' | grep x) || {
-  echo "$me: grep doesn't work on input that is not pure text" >&2
-  Exit 77
-}
+(echo '\ex\a' | grep x) \
+  || skip_ "grep doesn't work on input that is not pure text"
 
 cat > configure.in << END
 AC_INIT([$me], [123.456])
@@ -102,7 +99,7 @@ $AUTOMAKE -a
 ./configure
 $MAKE all dvi
 
-# debugging & sanity checks
+# Debugging & sanity checks.
 ls -l
 cat version.texi
 cat foo.info