Skip to content

Commit 49151d8

Browse files
avargitster
authored andcommitted
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 <[email protected]> Signed-off-by: Jakub Narębski <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 98885c2 commit 49151d8

File tree

3 files changed

+6
-88
lines changed

3 files changed

+6
-88
lines changed

t/gitweb-lib.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,12 @@ gitweb_run () {
8282
}
8383
close O;
8484
' gitweb.output &&
85-
if grep '^[[]' gitweb.log >/dev/null 2>&1; then false; else true; fi
85+
if grep '^[[]' gitweb.log >/dev/null 2>&1; then
86+
test_debug 'cat gitweb.log >&2' &&
87+
false
88+
else
89+
true
90+
fi
8691

8792
# gitweb.log is left for debugging
8893
# gitweb.output is used to parse HTTP output

0 commit comments

Comments
 (0)