test-lib: write test results to test-results/<basename>-<pid>
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Fri, 13 Mar 2009 16:26:36 +0000 (17:26 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sat, 14 Mar 2009 20:37:00 +0000 (13:37 -0700)
The earlier code meant to attempt to strip everything except the test
number, but only stripped the part starting with the last dash.

However, there is no reason why we should not use the whole basename.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/test-lib.sh

index 7a847ecbde018f36911ee6a1074ba169af1f350d..1e01a912abe41cd61206553caea095ad4a0bd064 100644 (file)
@@ -464,7 +464,7 @@ test_done () {
        trap - EXIT
        test_results_dir="$TEST_DIRECTORY/test-results"
        mkdir -p "$test_results_dir"
-       test_results_path="$test_results_dir/${0%-*}-$$"
+       test_results_path="$test_results_dir/${0%.sh}-$$"
 
        echo "total $test_count" >> $test_results_path
        echo "success $test_success" >> $test_results_path