Re: [PATCH v2 1/3] t/gitweb-lib.sh: print to stderr when gitweb_run has errors
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Feb 19, 2011, 15:46 UTC
- Message-ID
- <201102191646.02543.jnareb@gmail.com>
- In-Reply-To
- <1298129262-10468-2-git-send-email-avarab@gmail.com>
On Sat, 19 Feb 2011, Ævar Arnfjörð Bjarmason wrote:
Show 6 quoted lines
> Change the gitweb_run test subroutine to spew errors to stderr if > there are any, previously it would just silently fail, which made > tests very hard to debug. > > Before you'd get this output, when running tests under `--verbose > --immediate --debug`:
Which test?
[...]
Show 13 quoted lines
> --- 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
> + cat gitweb.log >&2
> + false
> + else
> + true
> + fiI don't understand this change. Either it is not necessary, because test suite (or at least t9500) has
test_debug 'cat gitweb.log'
after each test, so that error messages would be printed with `--debug`, or it doesn't go far enough: if the above is used then those test_debug should be removed.
-- Jakub Narebski Poland