@matheusbsbs / matheus-bagliano / commits / 3da9365234
Fork 0

Tests: let --valgrind imply --verbose and --tee

It does not make much sense to run the (expensive) valgrind tests and not look at the output. To prevent output from scrolling out of reach, the parameter --tee is implied, too. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johannes Schindelin committed Feb 4, 2009 at 00:26 UTC 3da936523445eb7a74dfe3ab1fe0ce82fac56174
3 files changed +7 -3
t/Makefile
+1 -1
@@ -39,6 +39,6 @@ full-svn-test:
39 $(MAKE) $(TSVN) GIT_SVN_NO_OPTIMIZE_COMMITS=0 LC_ALL=en_US.UTF-8
40
41 valgrind:
42 - GIT_TEST_OPTS='--valgrind -v --tee' $(MAKE) -k
42 + GIT_TEST_OPTS=--valgrind $(MAKE)
43
44 .PHONY: pre-clean $(T) aggregate-results clean valgrind
t/README
+4
@@ -65,6 +65,10 @@ appropriately before running "make".
65 the test script when running under -i). Valgrind errors
66 go to stderr, so you might want to pass the -v option, too.
67
68 + Since it makes no sense to run the tests with --valgrind and
69 + not see any output, this option implies --verbose. For
70 + convenience, it also implies --tee.
71 +
72 --tee::
73 In addition to printing the test output to the terminal,
74 write it to files named 't/test-results/$TEST_NAME.out'.
t/test-lib.sh
+2 -2
@@ -9,7 +9,7 @@ case "$GIT_TEST_TEE_STARTED, $* " in
9 done,*)
10 # do not redirect again
11 ;;
12 -*' --tee '*)
12 +*' --tee '*|*' --va'*)
13 mkdir -p test-results
14 BASE=test-results/$(basename "$0" .sh)
15 (GIT_TEST_TEE_STARTED=done ${SHELL-sh} "$0" "$@" 2>&1;
@@ -111,7 +111,7 @@ do
111 # noop now...
112 shift ;;
113 --va|--val|--valg|--valgr|--valgri|--valgrin|--valgrind)
114 - valgrind=t; shift ;;
114 + valgrind=t; verbose=t; shift ;;
115 --tee)
116 shift ;; # was handled already
117 *)