aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/test-lib.sh
diff options
context:
space:
mode:
authorGravatar Austin Clements <amdragon@MIT.EDU>2012-11-27 23:13:16 -0500
committerGravatar David Bremner <bremner@debian.org>2012-11-29 09:24:12 -0400
commitec59896de06cf76d6d7ee6ff7bc46df522c7afe3 (patch)
tree3d4cbe54092085acf6698fdc50a05e1fedad2e2b /test/test-lib.sh
parentd59d9c81522d9127dde089ae9457f44de53f28e9 (diff)
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.
Diffstat (limited to 'test/test-lib.sh')
-rw-r--r--test/test-lib.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/test-lib.sh b/test/test-lib.sh
index e0922315..77063a4d 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -920,7 +920,7 @@ test_done () {
GIT_EXIT_OK=t
test_results_dir="$TEST_DIRECTORY/test-results"
mkdir -p "$test_results_dir"
- test_results_path="$test_results_dir/${0%.sh}-$$"
+ test_results_path="$test_results_dir/${0%.sh}"
echo "total $test_count" >> $test_results_path
echo "success $test_success" >> $test_results_path