It's easy enough to tell if a testfile wants a table by looking at its
name. Getting rid of this option is a step towards putting all
tableopts tests in the generated set so they are trivially portable to
new back ends.
With a minor tweak to testwrapper we can allow all the versions of
a test for different back ends (counting _r and _nr as back ends)
to share a common input file.
They now all work under a POSIX compliant sh. Specifically, 'dash' can
now be used for running "make check" tests.
Note that none of these scripts has ever been using a pipe, so
`set -o pipefail` is unnecessary and removed.
If a '-1' test program returns a non-zero status, don't go further and
compare it's (numeric) output values. This allows a '-1' test to
indicate a "skip" status or an otherwise error. (Currently no such '-1'
test would skip like this, though.)
Shell syntax note: `set -e` will not exit with the syntax like this
`test $(false) = $(false);`. The exit statuses of `false` in the
example will be ignored instead. But putting the output in a variable,
such as `VAR=$(false)`, DOES exit.
The current test wrapper works only when the inputs are specified using
relative paths. If they're specified with absolute paths, the driver
fails to detect the inputs because it always prepends the input dir name
which itself is a relative path:
$ cd tests
$ ./testwrapper.sh -d . -i $PWD/reject.txt -t ./reject_ver.table
<fails to open inputs>
This normally doesn't show up because people run `./configure` or, for
out of tree builds, `../configure`. But if you happen to run configure
with an absolute path, then automake tends to generate absolute paths
as well leading to test failures.
Fix all of this by dropping the implicit input directory prepending.
- INPUT_NAME is often a list of files, not just a single one
- the input directory is used to find the testname tables which are
usually generated, so it's impossible to use files from both source
and build directories
- most of the time, the full/correct path is already specified
Split out reject test into its constituant tests. Add .reject tests
and .table tests for automake test log generation. Rewrite
testwrapper.sh to handle running with a tables file and specifying
optional input using command line options rather than positional
parameters.
Since output is redirected by the automake parallel test suite driver,
turn on both -v and -x in bash for the testwrapper.sh shell
script. This helps a ton in debugging problems with the test harness
itself.
In general, the input files are in automake's srcdir and the name of
the test includes the relative path to it (even though that's supposed
to be ./). Therefore, pass srcdir in AM_LOG_FLAGS and prepend that to
the test name as part of constructing the input file's name.