]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: build errors rather than fmt in a couple of tests
authorIan Lance Taylor <iant@golang.org>
Mon, 20 Jul 2015 16:15:46 +0000 (09:15 -0700)
committerIan Lance Taylor <iant@golang.org>
Mon, 20 Jul 2015 16:31:37 +0000 (16:31 +0000)
The errors package is smaller and builds faster.

Update #11779.

Change-Id: Iaf2d43734ec4b0aa325590eb5d38522306b608cb
Reviewed-on: https://go-review.googlesource.com/12366
Reviewed-by: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/cmd/go/go_test.go

index eb1690e2e7829b16b53b89e0c9228e553bd84b38..aebb966b0203756a16daf1a0a8fefc9066dd3f42 100644 (file)
@@ -1277,9 +1277,10 @@ func TestRejectRelativePathsInGOPATHCommandLinePackage(t *testing.T) {
 func TestGoTestWithPackageListedMultipleTimes(t *testing.T) {
        tg := testgo(t)
        defer tg.cleanup()
-       tg.run("test", "fmt", "fmt", "fmt", "fmt", "fmt")
+       tg.parallel()
+       tg.run("test", "errors", "errors", "errors", "errors", "errors")
        if strings.Index(strings.TrimSpace(tg.getStdout()), "\n") != -1 {
-               t.Error("go test fmt fmt fmt fmt fmt tested the same package multiple times")
+               t.Error("go test errors errors errors errors errors tested the same package multiple times")
        }
 }
 
@@ -1779,12 +1780,13 @@ func TestCgoHandlesWlORIGIN(t *testing.T) {
        tg.run("build", "origin")
 }
 
-// "go test -c -test.bench=XXX fmt" should not hang'
+// "go test -c -test.bench=XXX errors" should not hang
 func TestIssue6480(t *testing.T) {
        tg := testgo(t)
        defer tg.cleanup()
-       tg.creatingTemp("fmt.test" + exeSuffix)
-       tg.run("test", "-c", "-test.bench=XXX", "fmt")
+       tg.makeTempdir()
+       tg.cd(tg.path("."))
+       tg.run("test", "-c", "-test.bench=XXX", "errors")
 }
 
 // cmd/cgo: undefined reference when linking a C-library using gccgo