]> Cypherpunks repositories - gostls13.git/commitdiff
go test: don't try to print package with error message.
authorRoger Peppe <rogpeppe@gmail.com>
Thu, 5 Jan 2012 21:19:25 +0000 (13:19 -0800)
committerRobert Griesemer <gri@golang.org>
Thu, 5 Jan 2012 21:19:25 +0000 (13:19 -0800)
If there's a error compiling a _test.go file, the error
message tries to print a *Package with %s. There's no String
method on *Package, so the error message looks bad.
Since the error messages identify the file in question
anyway, this CL removes the package from the error message.

R=rsc, gri
CC=golang-dev
https://golang.org/cl/5520045

src/cmd/go/test.go

index 1807e42f723263346f1c7d3699624ca885e60054..fb0ba7b4d0d8d4da817bcbae42dbb15a0d6285b5 100644 (file)
@@ -228,7 +228,7 @@ func runTest(cmd *Command, args []string) {
        for _, p := range pkgs {
                buildTest, runTest, err := b.test(p)
                if err != nil {
-                       errorf("%s: %s", p, err)
+                       errorf("%s", err)
                        continue
                }
                builds = append(builds, buildTest)