From 4f73c9f767c8fb623e0afc1b89f775a73734dc76 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Thu, 3 Jun 2010 00:30:03 +0200 Subject: 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. SquashMe --- ChangeLog | 51 ++++++++++++++++++ tests/canon7.test | 7 ++- tests/color.test | 2 +- tests/color2.test | 8 ++- tests/compile2.test | 9 +++- tests/defs | 93 ++++++++++++++++---------------- tests/dejagnu7.test | 4 +- tests/depcomp10.test | 2 +- tests/depcomp6.test | 3 +- tests/depcomp9.test | 2 +- tests/distlinks.test | 5 +- tests/distlinksbrk.test | 5 +- tests/fn99.test | 22 ++++---- tests/fn99subdir.test | 24 ++++----- tests/forcemiss2.test | 5 +- tests/fort5.test | 7 ++- tests/gettext3.test | 2 +- tests/install2.test | 2 +- tests/instdir-texi.test | 6 ++- tests/instfail-info.test | 2 +- tests/instfail-java.test | 2 +- tests/instfail-libtool.test | 2 +- tests/instfail.test | 2 +- tests/instmany-mans.test | 2 +- tests/instmany-python.test | 2 +- tests/instmany.test | 2 +- tests/instsh3.test | 4 +- tests/ltinit.test | 6 ++- tests/makej2.test | 2 +- tests/mdate6.test | 3 +- tests/mkinst3.test | 4 +- tests/parallel-tests-reset-term.test | 2 +- tests/parallel-tests-unreadable-log.test | 2 +- tests/parallel-tests3.test | 3 +- tests/python-virtualenv.test | 6 ++- tests/remake-gnulib-remove-header.test | 5 +- tests/subobj9.test | 2 +- tests/symlink2.test | 5 +- tests/tar.test | 4 +- tests/tar2.test | 4 +- tests/txinfo21.test | 6 +-- tests/txinfo26.test | 4 +- tests/vala2.test | 2 +- tests/vala3.test | 4 +- tests/vala5.test | 3 +- tests/vtexi4.test | 11 ++-- 46 files changed, 201 insertions(+), 154 deletions(-) diff --git a/ChangeLog b/ChangeLog index b52a375bc..98b19d0d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,54 @@ +2011-05-01 Stefano Lattarini + + 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 testsuite: more environment sanitization diff --git a/tests/canon7.test b/tests/canon7.test index 4e700df1e..32b607c25 100755 --- a/tests/canon7.test +++ b/tests/canon7.test @@ -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 diff --git a/tests/color.test b/tests/color.test index 570b21d66..d912aa2da 100755 --- a/tests/color.test +++ b/tests/color.test @@ -33,7 +33,7 @@ std='' # 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 <&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. diff --git a/tests/compile2.test b/tests/compile2.test index 04fee9084..a466dc413 100755 --- a/tests/compile2.test +++ b/tests/compile2.test @@ -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' diff --git a/tests/defs b/tests/defs index 46ff08b2e..9f862af7e 100644 --- a/tests/defs +++ b/tests/defs @@ -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 &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 diff --git a/tests/dejagnu7.test b/tests/dejagnu7.test index d2f36e155..d16e02d2a 100755 --- a/tests/dejagnu7.test +++ b/tests/dejagnu7.test @@ -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 diff --git a/tests/depcomp10.test b/tests/depcomp10.test index 0fa6c6a46..b278766c1 100755 --- a/tests/depcomp10.test +++ b/tests/depcomp10.test @@ -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 diff --git a/tests/depcomp6.test b/tests/depcomp6.test index b937b9fe8..baf9fd58f 100755 --- a/tests/depcomp6.test +++ b/tests/depcomp6.test @@ -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 diff --git a/tests/depcomp9.test b/tests/depcomp9.test index 9972c3da8..d1323545b 100755 --- a/tests/depcomp9.test +++ b/tests/depcomp9.test @@ -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 diff --git a/tests/distlinks.test b/tests/distlinks.test index 3021cae13..0f68bee1c 100755 --- a/tests/distlinks.test +++ b/tests/distlinks.test @@ -21,10 +21,7 @@ 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 diff --git a/tests/distlinksbrk.test b/tests/distlinksbrk.test index 45755717d..ac0dc28c3 100755 --- a/tests/distlinksbrk.test +++ b/tests/distlinksbrk.test @@ -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 diff --git a/tests/fn99.test b/tests/fn99.test index c2afd2e29..c04880284 100755 --- a/tests/fn99.test +++ b/tests/fn99.test @@ -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` + : diff --git a/tests/fn99subdir.test b/tests/fn99subdir.test index a040e5801..3f793c8d8 100755 --- a/tests/fn99subdir.test +++ b/tests/fn99subdir.test @@ -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` + : diff --git a/tests/forcemiss2.test b/tests/forcemiss2.test index 0b6b77529..80d78d3ba 100755 --- a/tests/forcemiss2.test +++ b/tests/forcemiss2.test @@ -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 diff --git a/tests/fort5.test b/tests/fort5.test index c4a4b55ed..de68a6cd5 100755 --- a/tests/fort5.test +++ b/tests/fort5.test @@ -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 diff --git a/tests/gettext3.test b/tests/gettext3.test index 46b3cbc8c..66a32a8d6 100755 --- a/tests/gettext3.test +++ b/tests/gettext3.test @@ -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 diff --git a/tests/install2.test b/tests/install2.test index 2afdd375d..a04c0afc4 100755 --- a/tests/install2.test +++ b/tests/install2.test @@ -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 diff --git a/tests/instdir-texi.test b/tests/instdir-texi.test index 9de8428c2..5e9ee9d6b 100755 --- a/tests/instdir-texi.test +++ b/tests/instdir-texi.test @@ -20,8 +20,10 @@ 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 diff --git a/tests/instfail-info.test b/tests/instfail-info.test index becf59b00..3ac29860c 100755 --- a/tests/instfail-info.test +++ b/tests/instfail-info.test @@ -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 diff --git a/tests/instfail-java.test b/tests/instfail-java.test index a57029713..a584d647d 100755 --- a/tests/instfail-java.test +++ b/tests/instfail-java.test @@ -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 diff --git a/tests/instfail-libtool.test b/tests/instfail-libtool.test index b580c400e..114f29089 100755 --- a/tests/instfail-libtool.test +++ b/tests/instfail-libtool.test @@ -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 diff --git a/tests/instfail.test b/tests/instfail.test index d7fa73641..440438794 100755 --- a/tests/instfail.test +++ b/tests/instfail.test @@ -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 diff --git a/tests/instmany-mans.test b/tests/instmany-mans.test index b8f52a3ff..4a475c656 100755 --- a/tests/instmany-mans.test +++ b/tests/instmany-mans.test @@ -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 diff --git a/tests/instmany-python.test b/tests/instmany-python.test index ab4aa73a0..26a6b16dd 100755 --- a/tests/instmany-python.test +++ b/tests/instmany-python.test @@ -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 diff --git a/tests/instmany.test b/tests/instmany.test index effee8289..5c55165b1 100755 --- a/tests/instmany.test +++ b/tests/instmany.test @@ -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 diff --git a/tests/instsh3.test b/tests/instsh3.test index a2bb9d344..da5041905 100755 --- a/tests/instsh3.test +++ b/tests/instsh3.test @@ -18,8 +18,10 @@ 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 diff --git a/tests/ltinit.test b/tests/ltinit.test index 42c39138e..e541431dc 100755 --- a/tests/ltinit.test +++ b/tests/ltinit.test @@ -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 diff --git a/tests/makej2.test b/tests/makej2.test index 2adc75aba..3025c06b9 100755 --- a/tests/makej2.test +++ b/tests/makej2.test @@ -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 diff --git a/tests/mdate6.test b/tests/mdate6.test index 17672ee7c..94ddb4dc5 100755 --- a/tests/mdate6.test +++ b/tests/mdate6.test @@ -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 || diff --git a/tests/mkinst3.test b/tests/mkinst3.test index 8d9efe708..0082b53fb 100755 --- a/tests/mkinst3.test +++ b/tests/mkinst3.test @@ -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" . diff --git a/tests/parallel-tests-reset-term.test b/tests/parallel-tests-reset-term.test index 3a222c0b8..1544c3f98 100755 --- a/tests/parallel-tests-reset-term.test +++ b/tests/parallel-tests-reset-term.test @@ -27,7 +27,7 @@ esc='[' # 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' diff --git a/tests/parallel-tests-unreadable-log.test b/tests/parallel-tests-unreadable-log.test index 572f03df5..8560c371d 100755 --- a/tests/parallel-tests-unreadable-log.test +++ b/tests/parallel-tests-unreadable-log.test @@ -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 diff --git a/tests/parallel-tests3.test b/tests/parallel-tests3.test index 9f0ce4289..1d621eb12 100755 --- a/tests/parallel-tests3.test +++ b/tests/parallel-tests3.test @@ -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' diff --git a/tests/python-virtualenv.test b/tests/python-virtualenv.test index 11055b0b3..d7f87064e 100755 --- a/tests/python-virtualenv.test +++ b/tests/python-virtualenv.test @@ -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 diff --git a/tests/remake-gnulib-remove-header.test b/tests/remake-gnulib-remove-header.test index c28a078b3..ab77f11ba 100755 --- a/tests/remake-gnulib-remove-header.test +++ b/tests/remake-gnulib-remove-header.test @@ -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 diff --git a/tests/subobj9.test b/tests/subobj9.test index a910d22d5..fb81d70cc 100755 --- a/tests/subobj9.test +++ b/tests/subobj9.test @@ -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 diff --git a/tests/symlink2.test b/tests/symlink2.test index f2a9b4552..413c60cb4 100755 --- a/tests/symlink2.test +++ b/tests/symlink2.test @@ -20,10 +20,7 @@ . ./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 diff --git a/tests/tar.test b/tests/tar.test index 3dcf7ba90..22fdcb96f 100755 --- a/tests/tar.test +++ b/tests/tar.test @@ -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 diff --git a/tests/tar2.test b/tests/tar2.test index 987ff403e..205a37ec4 100755 --- a/tests/tar2.test +++ b/tests/tar2.test @@ -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 diff --git a/tests/txinfo21.test b/tests/txinfo21.test index 39b7a549a..5196680df 100755 --- a/tests/txinfo21.test +++ b/tests/txinfo21.test @@ -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 diff --git a/tests/txinfo26.test b/tests/txinfo26.test index ba935518d..20a708f12 100755 --- a/tests/txinfo26.test +++ b/tests/txinfo26.test @@ -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 diff --git a/tests/vala2.test b/tests/vala2.test index d5308e35b..d020c5883 100755 --- a/tests/vala2.test +++ b/tests/vala2.test @@ -64,7 +64,7 @@ $ACLOCAL $AUTOCONF $AUTOMAKE -a -./configure || Exit 77 +./configure || skip_ "configure failure" $MAKE # test rebuild rules diff --git a/tests/vala3.test b/tests/vala3.test index 2d9c85c33..8de96d667 100755 --- a/tests/vala3.test +++ b/tests/vala3.test @@ -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 diff --git a/tests/vala5.test b/tests/vala5.test index d6ff62954..66cffe70a 100755 --- a/tests/vala5.test +++ b/tests/vala5.test @@ -67,6 +67,7 @@ $ACLOCAL $AUTOCONF $AUTOMAKE -a -./configure || Exit 77 +./configure || skip_ "configuration step failure" $MAKE +: diff --git a/tests/vtexi4.test b/tests/vtexi4.test index b6d970ad1..2bdcc35df 100755 --- a/tests/vtexi4.test +++ b/tests/vtexi4.test @@ -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 'x' | grep x) || { - echo "$me: grep doesn't work on input that is not pure text" >&2 - Exit 77 -} +(echo 'x' | 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 -- cgit v1.2.1