]> git.notmuchmail.org Git - notmuch/commit
test: Abort driver if a test script aborts
authorAustin Clements <amdragon@MIT.EDU>
Wed, 28 Nov 2012 04:13:16 +0000 (23:13 -0500)
committerDavid Bremner <bremner@debian.org>
Thu, 29 Nov 2012 13:24:12 +0000 (09:24 -0400)
commitec59896de06cf76d6d7ee6ff7bc46df522c7afe3
tree3d4cbe54092085acf6698fdc50a05e1fedad2e2b
parentd59d9c81522d9127dde089ae9457f44de53f28e9
test: Abort driver if a test script aborts

Previously, if a test script aborted (e.g., because it passed too few
arguments to a test function), the test driver loop would simply
continue on to the next test script and the final results would
declare that everything passed (except that the test count would look
suspiciously low, but maybe you just misremembered how many tests
there were).

Now, if a test script exits with a non-zero status and did not produce
a final results file, we propagate that failure out of the driver loop
immediately.

To keep this simple, this patch removes the PID from the test-results
file name.  This PID was inherited from the git test system and seems
unnecessary, since the file name already includes the name of the test
script and the test-results directory is created anew for each run.
test/basic
test/notmuch-test
test/test-lib.sh