Overhauled and modularized tests in `instspc.test'.
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 6 Jun 2010 16:38:27 +0000 (18:38 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 4 Nov 2010 10:25:15 +0000 (11:25 +0100)
commite1181261dfd80b3046f1219e8fcfbb99707288f5
treea658afa0df16269ea29c84350c3a18ae5f2ec68e
parentd3134dcba601c678a932066a99d1c91a56fc190d
Overhauled and modularized tests in `instspc.test'.

The test `instspc.test' was way too big and fragile.  Its running
time was very long.  It also produced a log that was nearly
unreadable due to its length, making it very difficult to find
out the reason for failures.
Also, it was too much monolithic, with a single (maybe spurious)
failure in a corner case causing the whole test to fail (even if
everything worked as expected in the other 99% of cases).
The present change should solve these problems, by separating
`instspc.test' into many smaller, self-contained, auto-generated
tests.

* tests/instspc.test: Removed.
* tests/instspc-tests.sh: New script, fullfilling a double role:
1. it generates a Makefile.am snippet `tests/instspc-tests.am',
containing the definition of a list of new tests which will take
over the older `instspc.test', and
2. it is sourced by said generated tests with proper parameters
pre-set, to run the "meat" of the checks.
This apparent abuse is indeed required because the test generation
code and test execution code are inevitably interwined.
* tests/Makefile.am ($(srcdir)/instspc-tests.am): Include this
snippet, which (among the other things) defines ...
(instspc_tests): ... this new macro, containing the list of the
newly generated `instspc*.test' tests, and ...
(instspc_xfail_tests): ... this new macro, containing the list
of the `instspc*.test' tests expected to fail.
($(instspc_tests)): New rule, generates the `instspc*.test' tests.
($(instspc_tests:.test=.log)): New rule, registers the dependency
of all `instspc*.test' tests on the `instspc-tests.sh' script.
(TESTS): Add `$(instspc_tests)', remove `instspc.test'.
(XFAIL_TESTS): Add `$(xfail_instspc_tests)'.
(EXTRA_DIST): Distribute instspc-tests.sh.
(MAINTAINERCLEANFILES): Added $(instspc_tests).
Other minor cosmetic changes.
* bootstrap: Generate instspc-tests.am.
* tests/.gitignore: Updated.
ChangeLog
bootstrap
tests/.gitignore
tests/Makefile.am
tests/Makefile.in
tests/instspc-tests.sh [new file with mode: 0755]
tests/instspc.test [deleted file]