aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2012-11-04 03:13:33 +0100
committerJeff King <peff@peff.net>2012-11-04 08:35:20 -0500
commitdd78478fe115072df2cd0756eb1c59dd70d554da (patch)
treec310c8583b359330b0cd0600aac3d03fa33c45b9 /t
parent7ee719e18074a47e41dd315fcf8ced777a71adbd (diff)
downloadgit-dd78478fe115072df2cd0756eb1c59dd70d554da.tar.gz
git-dd78478fe115072df2cd0756eb1c59dd70d554da.tar.xz
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>
Diffstat (limited to 't')
-rw-r--r--t/test-lib.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 489bc80fc..0f4548180 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -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