diff options
| author | Russ Cox <rsc@golang.org> | 2018-01-05 16:06:47 -0500 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2018-01-05 22:27:17 +0000 |
| commit | 65fa53183b3978085e20e3f5794e88ae8c2671c1 (patch) | |
| tree | 97fe206782e91dce9d7f8545baf7a6fbf1865fa4 /src/cmd/internal/test2json/testdata/benchfail.json | |
| parent | acc1ec9b9d2724e58babf533068ac2d23225f8cb (diff) | |
| download | go-65fa53183b3978085e20e3f5794e88ae8c2671c1.tar.xz | |
cmd/test2json: fix processing of --- BENCH: output
If a benchmark calls b.Log without failing (without b.Error/b.Fatal/b.FailNow)
then that turns into output very much like a test passing,
except it says BENCH instead of PASS.
Benchmarks failing say FAIL just like tests failing.
Fixes #23346.
Change-Id: Ib188e695952da78057ab4a13f90d49937aa3c232
Reviewed-on: https://go-review.googlesource.com/86396
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/cmd/internal/test2json/testdata/benchfail.json')
| -rw-r--r-- | src/cmd/internal/test2json/testdata/benchfail.json | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cmd/internal/test2json/testdata/benchfail.json b/src/cmd/internal/test2json/testdata/benchfail.json new file mode 100644 index 0000000000..ad3ac9e179 --- /dev/null +++ b/src/cmd/internal/test2json/testdata/benchfail.json @@ -0,0 +1,6 @@ +{"Action":"output","Test":"BenchmarkFoo","Output":"--- FAIL: BenchmarkFoo\n"} +{"Action":"output","Test":"BenchmarkFoo","Output":"\tx_test.go:8: My benchmark\n"} +{"Action":"fail","Test":"BenchmarkFoo"} +{"Action":"output","Output":"FAIL\n"} +{"Action":"output","Output":"FAIL\tcommand-line-arguments\t0.008s\n"} +{"Action":"fail"} |
