Commit 49151d8b authored by Ævar Arnfjörð Bjarmason's avatar Ævar Arnfjörð Bjarmason Committed by Junio C Hamano

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's avatarÆvar Arnfjörð Bjarmason <[email protected]>
Signed-off-by: Jakub Narębski's avatarJakub Narębski <[email protected]>
Signed-off-by: default avatarJunio C Hamano <[email protected]>
parent 98885c29
......@@ -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
......
This diff is collapsed.
......@@ -126,7 +126,6 @@ test_expect_success 'load checking: load too high (default action)' '
grep "Status: 503 Service Unavailable" gitweb.headers &&
grep "503 - The load average on the server is too high" gitweb.body
'
test_debug 'cat gitweb.log' # just in case
test_debug 'cat gitweb.headers'
# turn off load checking
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment