Skip to content

Commit

Permalink
test-lib: avoid full path to store test results
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Felipe Contreras authored and Jeff King committed Nov 4, 2012
1 parent 7ee719e commit dd78478
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion t/test-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,8 @@ test_done () {
then
test_results_dir="$TEST_OUTPUT_DIRECTORY/test-results"
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
total $test_count
Expand Down

0 comments on commit dd78478

Please sign in to comment.