diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2011-02-19 19:16:19 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-02-21 10:38:40 -0800 |
commit | 49151d8b2cde68bc110a8bb899b8610631430941 (patch) | |
tree | b90ddb8d2472a48ffd798f89bf744be834079e63 /t/gitweb-lib.sh | |
parent | 98885c2914b22d70d09302528d86f87e795f7485 (diff) | |
download | git-49151d8b2cde68bc110a8bb899b8610631430941.tar.gz |
t/gitweb-lib.sh: Ensure that errors are shown for --debug --immediate
Because '--immediate' stops test suite after first error, therefore in
this mode
test_debug 'cat gitweb.log'
was never ran, thus in effect negating effect of '--debug' option.
This made finidng the cause of errors in gitweb test sute difficult.
Modify the gitweb_run test subroutine to run test_debug itself in the
case of errors (and also remove "test_debug 'cat gitweb.log'" from
gitweb tests).
This makes it possible to run *gitweb tests* with --immediate ---debug
combination of options; also it makes gitweb tests to not output
spurious debug data that is not considered error.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Jakub Narębski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/gitweb-lib.sh')
-rw-r--r-- | t/gitweb-lib.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/t/gitweb-lib.sh b/t/gitweb-lib.sh index b9bb95feaa..143eb1f240 100644 --- a/t/gitweb-lib.sh +++ b/t/gitweb-lib.sh @@ -82,7 +82,12 @@ gitweb_run () { } close O; ' gitweb.output && - if grep '^[[]' gitweb.log >/dev/null 2>&1; then false; else true; fi + if grep '^[[]' gitweb.log >/dev/null 2>&1; then + test_debug 'cat gitweb.log >&2' && + false + else + true + fi # gitweb.log is left for debugging # gitweb.output is used to parse HTTP output |