summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dabdbee)
raw | patch | inline | side by side (parent: dabdbee)
author | Mathias Lafeldt <misfire@debugon.org> | |
Fri, 29 Apr 2011 12:30:30 +0000 (14:30 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 29 Apr 2011 15:27:52 +0000 (08:27 -0700) |
Apply parameter expansion. Also use here document to save
test results instead of appending each line with ">>".
Signed-off-by: Mathias Lafeldt <misfire@debugon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
test results instead of appending each line with ">>".
Signed-off-by: Mathias Lafeldt <misfire@debugon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/test-lib.sh | patch | blob | history |
diff --git a/t/test-lib.sh b/t/test-lib.sh
index abc47f3abc5d925ed217d0d95f10bf078bc26034..aca03d2db0eaf2411c01f58554ec0075da491ea7 100644 (file)
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
test_external_without_stderr () {
# The temporary file has no (and must have no) security
# implications.
- tmp="$TMPDIR"; if [ -z "$tmp" ]; then tmp=/tmp; fi
+ tmp=${TMPDIR:-/tmp}
stderr="$tmp/git-external-stderr.$$.tmp"
test_external "$@" 4> "$stderr"
[ -f "$stderr" ] || error "Internal error: $stderr disappeared."
mkdir -p "$test_results_dir"
test_results_path="$test_results_dir/${0%.sh}-$$.counts"
- echo "total $test_count" >> $test_results_path
- echo "success $test_success" >> $test_results_path
- echo "fixed $test_fixed" >> $test_results_path
- echo "broken $test_broken" >> $test_results_path
- echo "failed $test_failure" >> $test_results_path
- echo "" >> $test_results_path
+ cat >>"$test_results_path" <<-EOF
+ total $test_count
+ success $test_success
+ fixed $test_fixed
+ broken $test_broken
+ failed $test_failure
+
+ EOF
fi
if test "$test_fixed" != 0