From bb364d49a9db585534aac965d1068bee0bda3054 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Thu, 12 Jul 2018 00:16:00 -0400 Subject: [PATCH] cmd/go: delete TestGoBuildDashA* The behavior of -a no longer changes depending on which kind of branch of Go you are using (the new build cache fixed all that). These tests are not doing anything useful (and failing). Change-Id: I1c65120a3e05286e888951d61bca4a903e2c1158 Reviewed-on: https://go-review.googlesource.com/123575 Run-TryBot: Russ Cox Reviewed-by: Brad Fitzpatrick Reviewed-by: Bryan C. Mills TryBot-Result: Gobot Gobot --- src/cmd/go/go_test.go | 38 -------------------------------------- 1 file changed, 38 deletions(-) diff --git a/src/cmd/go/go_test.go b/src/cmd/go/go_test.go index 00dde724c5d..c9353e9a1a9 100644 --- a/src/cmd/go/go_test.go +++ b/src/cmd/go/go_test.go @@ -838,44 +838,6 @@ func TestBrokenTestsWithoutTestFunctionsAllFail(t *testing.T) { tg.grepBoth("FAIL.*badtest/badvar", "test did not run everything") } -func TestGoBuildDashAInDevBranch(t *testing.T) { - if testing.Short() { - t.Skip("don't rebuild the standard library in short mode") - } - - tg := testgo(t) - defer tg.cleanup() - tg.run("install", "math") // should be up to date already but just in case - tg.setenv("TESTGO_IS_GO_RELEASE", "0") - tg.run("build", "-v", "-a", "math") - tg.grepStderr("runtime", "testgo build -a math in dev branch DID NOT build runtime, but should have") - - // Everything is out of date. Rebuild to leave things in a better state. - tg.run("install", "std") -} - -func TestGoBuildDashAInReleaseBranch(t *testing.T) { - if testing.Short() { - t.Skip("don't rebuild the standard library in short mode") - } - - tg := testgo(t) - defer tg.cleanup() - tg.run("install", "math", "net/http") // should be up to date already but just in case - tg.setenv("TESTGO_IS_GO_RELEASE", "1") - tg.run("install", "-v", "-a", "math") - tg.grepStderr("runtime", "testgo build -a math in release branch DID NOT build runtime, but should have") - - // Now runtime.a is updated (newer mtime), so everything would look stale if not for being a release. - tg.run("build", "-v", "net/http") - tg.grepStderrNot("strconv", "testgo build -v net/http in release branch with newer runtime.a DID build strconv but should not have") - tg.grepStderrNot("golang.org/x/net/http2/hpack", "testgo build -v net/http in release branch with newer runtime.a DID build .../golang.org/x/net/http2/hpack but should not have") - tg.grepStderrNot("net/http", "testgo build -v net/http in release branch with newer runtime.a DID build net/http but should not have") - - // Everything is out of date. Rebuild to leave things in a better state. - tg.run("install", "std") -} - func TestNewReleaseRebuildsStalePackagesInGOPATH(t *testing.T) { if testing.Short() { t.Skip("don't rebuild the standard library in short mode")