From: Ian Lance Taylor Date: Mon, 20 Jul 2015 16:15:46 +0000 (-0700) Subject: cmd/go: build errors rather than fmt in a couple of tests X-Git-Tag: go1.5beta3~146 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=510f1dbad7cea17ca1154df862b7750eb9eeebb9;p=gostls13.git cmd/go: build errors rather than fmt in a couple of tests 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 TryBot-Result: Gobot Gobot --- diff --git a/src/cmd/go/go_test.go b/src/cmd/go/go_test.go index eb1690e2e7..aebb966b02 100644 --- a/src/cmd/go/go_test.go +++ b/src/cmd/go/go_test.go @@ -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