Skip to content

Commit dd78478

Browse files
felipecpeff
authored andcommitted
test-lib: avoid full path to store test results
No reason to use the full path in case this is used externally. Otherwise we might get errors such as: ./test-lib.sh: line 394: /home/bob/dev/git/t/test-results//home/bob/dev/git/contrib/remote-hg/test-2894.counts: No such file or directory Signed-off-by: Felipe Contreras <[email protected]> Signed-off-by: Jeff King <[email protected]>
1 parent 7ee719e commit dd78478

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

t/test-lib.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,8 @@ test_done () {
389389
then
390390
test_results_dir="$TEST_OUTPUT_DIRECTORY/test-results"
391391
mkdir -p "$test_results_dir"
392-
test_results_path="$test_results_dir/${0%.sh}-$$.counts"
392+
base=${0##*/}
393+
test_results_path="$test_results_dir/${base%.sh}-$$.counts"
393394

394395
cat >>"$test_results_path" <<-EOF
395396
total $test_count

0 commit comments

Comments
 (0)