summaryrefslogtreecommitdiff
path: root/t/valgrind
diff options
context:
space:
mode:
authorLibravatar John Keeping <john@keeping.me.uk>2013-04-29 19:16:21 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-04-29 11:26:23 -0700
commit2d14e13c56a407eea6084ff2d5713a8d23d337f5 (patch)
tree6f58f7861ad192d448f3d10a93850e5a7fec32a2 /t/valgrind
parentt/Makefile: fix result handling with TEST_OUTPUT_DIRECTORY (diff)
downloadtgif-2d14e13c56a407eea6084ff2d5713a8d23d337f5.tar.xz
test output: respect $TEST_OUTPUT_DIRECTORY
Most test results go in $TEST_OUTPUT_DIRECTORY, but the output files for tests run with --tee or --valgrind just use bare "test-results". Changes these so that they do respect $TEST_OUTPUT_DIRECTORY. As a result of this, the valgrind/analyze.sh script may no longer inspect the correct files so it is also updated to respect $TEST_OUTPUT_DIRECTORY by adding it to GIT-BUILD-OPTIONS. This may be a regression for people who have TEST_OUTPUT_DIRECTORY in their config.mak but want to override it in the environment, but this change merely brings it into line with GIT_TEST_OPTS which already cannot be overridden if it is specified in config.mak. Signed-off-by: John Keeping <john@keeping.me.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/valgrind')
-rwxr-xr-xt/valgrind/analyze.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/t/valgrind/analyze.sh b/t/valgrind/analyze.sh
index d8105d9fab..2ffc80f721 100755
--- a/t/valgrind/analyze.sh
+++ b/t/valgrind/analyze.sh
@@ -1,6 +1,10 @@
#!/bin/sh
-out_prefix=$(dirname "$0")/../test-results/valgrind.out
+# Get TEST_OUTPUT_DIRECTORY from GIT-BUILD-OPTIONS if it's there...
+. "$(dirname "$0")/../../GIT-BUILD-OPTIONS"
+# ... otherwise set it to the default value.
+: ${TEST_OUTPUT_DIRECTORY=$(dirname "$0")/..}
+
output=
count=0
total_count=0
@@ -115,7 +119,7 @@ handle_one () {
finish_output
}
-for test_script in "$(dirname "$0")"/../test-results/*.out
+for test_script in "$TEST_OUTPUT_DIRECTORY"/test-results/*.out
do
handle_one $test_script
done