]> git.ipfire.org Git - thirdparty/automake.git/commit
testsuite: TAP tests properly decide when to remove tempdirs
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 7 Aug 2011 13:20:00 +0000 (15:20 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 7 Aug 2011 13:33:14 +0000 (15:33 +0200)
commit5c1bb4e240c3538a6bfa7026dfe5f590ac747863
tree16c8df072b16734c78fc5ec40a797dc7d41d0d5f
parent3f5dcfb065552773b4b0fe295647a9c16363d180
testsuite: TAP tests properly decide when to remove tempdirs

Before this change, the TAP tests in the Automake testsuite were
removing the temporary test directory even when they failed or
were skipped, thus making debugging more difficult.

* tests/tap-functions.sh (incr_tap_count): Removed, superseded
by ...
(incr_): ... this function, which can increment the value of any
variable passed to it.
(result_):  Updated to use `incr_' instead of the now-removed
`incr_tap_count_'.  Keep count of failures, xfailures, xpasses,
and skips, using ...
($tap_skip_count_, $tap_bad_count, _$tap_xfail_count_): ...
these new variables.
* tests/defs (trap): Try to use their values to decide whether
the temporary directory being used by the test script should be
removed or not.  Other code reorganizations.  And move the code
for the removal of the temporary directory out to ...
(rm_rf_): ... this new subroutine.
(Main code): Use that instead of duplicating the code.
ChangeLog
tests/defs
tests/tap-functions.sh