tests: prefer "test ! -e FILE" to check that a file doesn't exist
authorStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 28 Jun 2012 22:48:11 +0000 (00:48 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 28 Jun 2012 22:48:11 +0000 (00:48 +0200)
commitbf258729df870cf308f9f92e833d75f192d48a2d
treed835872bfd85ec82eb047e2eb4ec3f2c9d6d4731
parente857a8e7e44592e98848177271d1b41710e4fdaa
tests: prefer "test ! -e FILE" to check that a file doesn't exist

Once, for the sake of (at least) Solaris 10 /bin/sh, we had to use
"test ! -f FILE" or "test ! -r FILE" or "test ! -d FILE" instead,
because the that shell's 'test' built-in didn't grok the '-e' option.

Note however that we still can't use "test ! -e" in the Makefile recipes
used in the test cases; that is because those recipes are run with the
shell detected by 'configure', and Autoconf-generated configure scripts
do no guarantee to find or provide a POSIX-compatible shell.

* Several tests: Adjust.
* t/yacc-clean-cxx: Adjust, and remove a couple of useless commands.
* t/parallel-tests-dry-run-2.sh: Adjust, and add invocation to
"make -n" forgotten in previous versions of the test.
* t/txinfo26.sh: Adjust, and don't bother to skip the test when it's
run in a directory whose absolute path contain whitespace: that setup
is not supported anyway.
* t/maken3.sh: Adjust, and fix a typo that could cause a minor false
negative.
* t/test-trs-recover2.sh: Prefer using 'skip_' with a suitable error
message over a bare 'exit 77'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
163 files changed:
t/acloca10.sh
t/acloca18.sh
t/aclocal-install-fail.sh
t/aclocal-install-mkdir.sh
t/aclocal-no-install-no-mkdir.sh
t/aclocal-path-install.sh
t/alpha.sh
t/autodist-subdir.sh
t/autodist.sh
t/autohdrdry.sh
t/ax/test-init.sh
t/backcompat5.sh
t/backcompat6.sh
t/c-demo.sh
t/check12.sh
t/check3.sh
t/clean2.sh
t/colon6.sh
t/compile.sh
t/cond33.sh
t/cond40.sh
t/condhook.sh
t/conflnk3.sh
t/cscope.tap
t/cxx-demo.sh
t/cxx-lt-demo.sh
t/cygnus-check-without-all.sh
t/cygnus-no-installinfo.sh
t/dejagnu-siteexp-extend.sh
t/distcom-subdir.sh
t/disthook.sh
t/distlinksbrk.sh
t/fort4.sh
t/fort5.sh
t/help3.sh
t/install-info-dir.sh
t/instdir-cond.sh
t/instdir-cond2.sh
t/instdir-java.sh
t/instdir-lisp.sh
t/instdir-ltlib.sh
t/instdir-no-empty.sh
t/instdir-prog.sh
t/instdir-python.sh
t/instdir-texi.sh
t/instdir.sh
t/instdir2.sh
t/java-extra.sh
t/java-mix.sh
t/java-uninstall.sh
t/java3.sh
t/lex-clean-cxx.sh
t/lex-clean.sh
t/lex3.sh
t/libtoo10.sh
t/license.sh
t/lisp6.sh
t/lisp7.sh
t/lispdry.sh
t/ltcond.sh
t/ltconv.sh
t/maintclean-vpath.sh
t/maintclean.sh
t/maken3.sh
t/man2.sh
t/man5.sh
t/man7.sh
t/missing-auxfile-stops-makefiles-creation.sh
t/missing5.sh
t/mkinst2.sh
t/nobase-nodist.sh
t/output13.sh
t/override-conditional-1.sh
t/parallel-tests-driver-install.sh
t/parallel-tests-dry-run-2.sh
t/parallel-tests-exeext.sh
t/parallel-tests-extra-programs.sh
t/parallel-tests-fork-bomb.sh
t/parallel-tests-log-override-1.sh
t/parallel-tests-log-override-2.sh
t/parallel-tests-recheck-depends-on-all.sh
t/parallel-tests.sh
t/parallel-tests2.sh
t/parallel-tests8.sh
t/parallel-tests9.sh
t/pr300-ltlib.sh
t/pr401.sh
t/pr401b.sh
t/pr401c.sh
t/python-dist.sh
t/python-pr10995.sh
t/python-virtualenv.sh
t/python10.sh
t/remake-gnulib-add-header.sh
t/remake-gnulib-remove-header.sh
t/remake-moved-m4-file.sh
t/remake-renamed-am.sh
t/remake-renamed-m4-file.sh
t/remake-renamed-m4-macro-and-file.sh
t/remake1a.sh
t/remake8a.sh
t/remake8b.sh
t/repeated-options.sh
t/self-check-cleanup.tap
t/self-check-dir.tap
t/serial-tests.sh
t/stamph2.sh
t/subdir-distclean.sh
t/subdir-with-slash.sh
t/subobj-clean-lt-pr10697.sh
t/subobj-clean-pr10697.sh
t/subpkg-yacc.sh
t/subpkg.sh
t/suffix3.tap
t/symlink2.sh
t/tagsub.sh
t/tap-basic.sh
t/tap-log.sh
t/tap-recheck.sh
t/test-driver-custom-multitest-recheck.sh
t/test-driver-custom-multitest-recheck2.sh
t/test-driver-custom.sh
t/test-driver-fail.sh
t/test-log.sh
t/test-missing.sh
t/test-missing2.sh
t/test-trs-basic.sh
t/test-trs-recover.sh
t/test-trs-recover2.sh
t/txinfo13.sh
t/txinfo16.sh
t/txinfo19.sh
t/txinfo20.sh
t/txinfo21.sh
t/txinfo22.sh
t/txinfo23.sh
t/txinfo24.sh
t/txinfo25.sh
t/txinfo26.sh
t/txinfo28.sh
t/txinfo30.sh
t/txinfo33.sh
t/txinfo5b.sh
t/uninstall-pr9578.sh
t/vala-headers.sh
t/vala-parallel.sh
t/vala-vpath.sh
t/vala3.sh
t/vala5.sh
t/yacc-auxdir.sh
t/yacc-basic.sh
t/yacc-clean-cxx.sh
t/yacc-clean.sh
t/yacc-cxx.sh
t/yacc-d-basic.sh
t/yacc-d-cxx.sh
t/yacc-deleted-headers.sh
t/yacc-dist-nobuild-subdir.sh
t/yacc-mix-c-cxx.sh
t/yacc4.sh
t/yacc7.sh
t/yaccdry.sh
t/yflags-cmdline-override.sh