]> Cypherpunks repositories - gostls13.git/commit
cmd/test2json: fix processing of --- BENCH: output
authorRuss Cox <rsc@golang.org>
Fri, 5 Jan 2018 21:06:47 +0000 (16:06 -0500)
committerRuss Cox <rsc@golang.org>
Fri, 5 Jan 2018 22:27:17 +0000 (22:27 +0000)
commit65fa53183b3978085e20e3f5794e88ae8c2671c1
tree97fe206782e91dce9d7f8545baf7a6fbf1865fa4
parentacc1ec9b9d2724e58babf533068ac2d23225f8cb
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>
src/cmd/internal/test2json/test2json.go
src/cmd/internal/test2json/testdata/bench.json [new file with mode: 0644]
src/cmd/internal/test2json/testdata/bench.test [new file with mode: 0644]
src/cmd/internal/test2json/testdata/benchfail.json [new file with mode: 0644]
src/cmd/internal/test2json/testdata/benchfail.test [new file with mode: 0644]
src/cmd/test2json/main.go