Browse Source

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 <felipe.contreras@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
maint
Felipe Contreras 12 years ago committed by Jeff King
parent
commit
dd78478fe1
  1. 3
      t/test-lib.sh

3
t/test-lib.sh

@ -389,7 +389,8 @@ test_done () {
then then
test_results_dir="$TEST_OUTPUT_DIRECTORY/test-results" test_results_dir="$TEST_OUTPUT_DIRECTORY/test-results"
mkdir -p "$test_results_dir" mkdir -p "$test_results_dir"
test_results_path="$test_results_dir/${0%.sh}-$$.counts" base=${0##*/}
test_results_path="$test_results_dir/${base%.sh}-$$.counts"


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

Loading…
Cancel
Save