aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal/test2json
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2018-07-06 13:15:01 -0700
committerRuss Cox <rsc@golang.org>2018-07-09 14:42:21 +0000
commit7254cfc37b3a93a6e83dae22c4bfd6f777edb97e (patch)
tree2bf51bce0c1d507a21e834004cbb77dddd1b112c /src/cmd/internal/test2json
parentb56e24782f81002fabe06bdf65a735ac7e2b6e1f (diff)
downloadgo-7254cfc37b3a93a6e83dae22c4bfd6f777edb97e.tar.xz
cmd/go: revert "output coverage report even if there are no test files"
Original CL description: When using test -cover or -coverprofile the output for "no test files" is the same format as for "no tests to run". Reverting because this CL changed cmd/go to build test binaries for packages that have no tests, leading to extra work and confusion. Updates #24570 Fixes #25789 Fixes #26157 Fixes #26242 Change-Id: Ibab1307d39dfaec0de9359d6d96706e3910c8efd Reviewed-on: https://go-review.googlesource.com/122518 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/cmd/internal/test2json')
-rw-r--r--src/cmd/internal/test2json/test2json.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/internal/test2json/test2json.go b/src/cmd/internal/test2json/test2json.go
index 1a54a1c3bb..f8052136be 100644
--- a/src/cmd/internal/test2json/test2json.go
+++ b/src/cmd/internal/test2json/test2json.go
@@ -147,7 +147,7 @@ var (
fourSpace = []byte(" ")
skipLinePrefix = []byte("? \t")
- skipLineSuffix = []byte(" [no test files]\n")
+ skipLineSuffix = []byte("\t[no test files]\n")
)
// handleInputLine handles a single whole test output line.
@@ -166,7 +166,7 @@ func (c *converter) handleInputLine(line []byte) {
return
}
- // Special case for entirely skipped test binary: "? \tpkgname\t0.001s [no test files]\n" is only line.
+ // Special case for entirely skipped test binary: "? \tpkgname\t[no test files]\n" is only line.
// Report it as plain output but remember to say skip in the final summary.
if bytes.HasPrefix(line, skipLinePrefix) && bytes.HasSuffix(line, skipLineSuffix) && len(c.report) == 0 {
c.result = "skip"