tests: optimize `instspc-*.test' for speed
authorStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 5 Nov 2010 14:51:56 +0000 (15:51 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 15 Feb 2011 08:29:32 +0000 (09:29 +0100)
commit1d77ab5edb701607bbea2b8a9ac27d8195ad3e6f
treebe6161fa77332a79b1b937628b7cb91b55cc9cca
parentfeac65b70b29c759b99ebdcba81f93b9450f401e
tests: optimize `instspc-*.test' for speed

After the split of `instspc.test' into various generated tests,
the running time of the testsuite has noticeably increased, since
all these new generated tests must run aclocal, autoconf and
automake, whereas previously they were run only once (at the
beginning of `instspc.test').  But luckily, since the new tests
share the same input files for the autotools, this situation can
be easily worked around (at the expenses of a slight increase of
complexity for the testsuite scaffolding).

* tests/instspc-data.test: New helper test, properly calling
the `instspc-tests.sh' script to generate input data for the
others `instspc-*.test' tests.
* tests/Makefile.am (TESTS): Add `instspc-data.test'.
($(instspc_tests:.test=.log)): Depend on its log file.
(instspc-data.log): Depend on `instspc-tests.sh'.
* tests/instspc-tests.sh: Recognize new action `generate-data',
and use it to create hand-written and autotools-generated static
files shared by all the `instspc-*.test' tests.
When sourced by the `instspc-*.test' tests, use those previously
created files instead of recreating them from scratch.
(unindent, create_input_data): New subroutines.
Some other related changes and refactorings.

From a suggestion by Ralf Wildenhues.
ChangeLog
tests/Makefile.am
tests/Makefile.in
tests/instspc-data.test [new file with mode: 0755]
tests/instspc-tests.sh