Skip to content

Commit

Permalink
t/gitweb-lib.sh: Ensure that errors are shown for --debug --immediate
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ævar Arnfjörð Bjarmason authored and Junio C Hamano committed Feb 21, 2011
1 parent 98885c2 commit 49151d8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 88 deletions.
7 changes: 6 additions & 1 deletion t/gitweb-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit 49151d8

Please sign in to comment.