Commit 510f1dba authored by Ian Lance Taylor's avatar Ian Lance Taylor

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/12366Reviewed-by: default avatarDavid Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent b9a3e597
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment