tests init: don't automatically re-execute tests with a POSIX shell
authorStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 6 Jul 2012 10:24:33 +0000 (12:24 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 6 Jul 2012 19:24:19 +0000 (21:24 +0200)
commitb6e6409a68595fec2c9bf484b36f0a498bd18d87
tree614a7798855827fd5b2c6d96db939e855750d4e0
parent3e4f53df611d0592a9f8d7b154a48573b2b29ae6
tests init: don't automatically re-execute tests with a POSIX shell

I've unwittingly broken support for that feature *again* in some of
my recent testsuite tweaking.  In this case, the re-execution code
works correctly when the tests are executed with a POSIX shells, but
breaks when they are invoked by an old-style Bourne shells (e.g.,
/bin/sh on Solaris).

It's time to face it: that feature is too much brittle, and too seldom
used (because the Makefile takes care of running the tests with the
correct shell anyway, so that a breakage is only experienced when
running the tests by hand).  It just don't remain working for long, not
when we often touch the testsuite setup (which we are going to do again
when we'll try to move part of our testsuite framework to Gnulib, or a
similar project).

So, instead of trying to be extra-smart and automatically re-execute the
tests with the correct shell, we now offer a simple wrapper script that
the user can employ to run the test scripts with the proper shell.  And
while we are at it, we write this wrapper to also deal with TAP tests in
a better way, running them through the prove(1) utility, so that their
results are correctly recognized and reported.

* t/ax/test-runner.in: New file; the wrapper script we were talking about.
* configure.ac (AC_CONFIG_FILES): Process it into 't/ax/test-runner'.
* .gitignore: Add 't/ax/test-runner'.
* defs: Remove code for automatic re-execution of the scripts with the
correct shell.  This file now just a very thin layer around 'defs-static'
and 't/ax/test-init.sh'.
* t/README: Adjust, and remove or fix some imprecise or outdated text in
the process (like "... test scripts are written with portability in mind,
so that they should run with any decent Bourne-compatible shell ..." ).
* Makefile.am (AM_TESTS_ENVIRONMENT): No need to export 'AM_TESTS_REEXEC'
to "no" anymore.
* t/self-check-explicit-skips.sh: Likewise.
* t/self-check-exit.tap: Likewise.
* t/self-check-me.tap: Likewise.
* t/self-check-dir.tap: Likewise.
* t/self-check-reexec.tap: Remove as obsolete.
* t/list-of-tests.mk: Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
12 files changed:
.gitignore
Makefile.am
configure.ac
defs
t/README
t/ax/test-runner.in [new file with mode: 0644]
t/list-of-tests.mk
t/self-check-dir.tap
t/self-check-exit.tap
t/self-check-explicit-skips.sh
t/self-check-me.tap
t/self-check-reexec.tap [deleted file]