[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] tests: use different output files to simplify reading failed
From: |
Jim Meyering |
Subject: |
Re: [PATCH] tests: use different output files to simplify reading failed .log files |
Date: |
Wed, 17 Mar 2010 10:05:09 +0100 |
Paolo Bonzini wrote:
> I noticed that from the .log files it is hard to understand which
> grep invocation fails. One way to work around it would be to use
> set -x, but I think this other fix is better.
>
> * tests/case-fold-backref, tests/case-fold-char-class,
> tests/case-fold-char-range, tests/case-fold-char-type: Use a different
> name for each output file from grep.
> * tests/dfaexec-multibyte: Likewise, and merge some grep invocations.
I normally diagnose such problems via
make -C tests TESTS='test_name1 test_name2 ...' VERBOSE=yes
The VERBOSE=yes makes each init.sh-based test "set -x".
However, if you find it worthwhile, go ahead, but please factor
out the duplication. I find that having long names like that
(especially when repeated) is a maintenance headache.
out=out2-$LOC
LC_ALL=$LOC grep -E '^([[:digit:]]+[[:space:]]+){2}' < exp2 > $out || fail=1
compare $out exp2 || fail=1
...
> + LC_ALL=$LOC grep -E '^([[:digit:]]+[[:space:]]+){2}' < exp2 > out2-$LOC ||
> fail=1
> + compare out2-$LOC exp2 || fail=1
>
> done