Re: [PATCH 3/6] test-lib: verbose mode for only tests matching a pattern
- From
Jeff King <peff@peff.net>
- Date
- May 29, 2013, 05:00 UTC
- Message-ID
- <20130529050000.GB31762@sigill.intra.peff.net>
- In-Reply-To
- <10e5eacece7fc9657c312b5c51747d23ae9ef40b.1368736093.git.trast@inf.ethz.ch>
On Thu, May 16, 2013 at 10:50:14PM +0200, Thomas Rast wrote:
Show 11 quoted lines
> With the new --verbose-only=<pattern> option, one can enable --verbose > at a per-test granularity. The pattern is matched against the test > number, e.g. > > ./t0000-basic.sh --verbose-only='2[0-2]' > > to see only the full output of test 20-22, while showing the rest in the > one-liner format. > > This is arguably not *too* useful on its own, but makes the next patch > easier to follow.
Hmm, I don't think this is quite right. Try:
./t4052-stat-output.sh --verbose-only=85
The script and test number aren't important; I just picked these at random, but they show the issue clearly. The output I get is:
[...] ok 83 - log respects prefix greater than COLUMNS (big change) ok 84 - log --graph respects prefix greater than COLUMNS (big change) Switched to a new branch 'branch' ok 85 - merge --stat respects COLUMNS (big change)
expecting success:
COLUMNS=100 git merge --stat --no-ff master >output &&
grep " | " output >actual
test_cmp expect actualok 86 - merge --stat respects COLUMNS (long filename)
So we see 83 and 84 non-verbose, which is good. And we see the actual output from 85 (the output from a "git checkout"). But we do not see the "expecting success" for it. We see it for the _next_ test, which we should not see at all. So I think your toggling is happening in the wrong spot, but I haven't looked further than that.
-Peff