From c617b2523a3e802a005f2cd48a32d444112fbc7b Mon Sep 17 00:00:00 2001 From: Ayush Ranjan Date: Fri, 14 Apr 2023 16:41:44 -0700 Subject: [PATCH] Increase timeout for `go tool dist test` suite. eed95da2755e ("Actually run multiple tool tests in golang runtime test suite.") fixed runtime tests to run all go tool tests. This exposed some tests that take long to run in gVisor. The default timeout is 3 minutes. The only way to increase it is via GO_TEST_TIMEOUT_SCALE. PiperOrigin-RevId: 524415426 --- test/runtimes/proctor/lib/go.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/runtimes/proctor/lib/go.go b/test/runtimes/proctor/lib/go.go index a699206e2..bc568055d 100644 --- a/test/runtimes/proctor/lib/go.go +++ b/test/runtimes/proctor/lib/go.go @@ -87,7 +87,12 @@ func (goRunner) TestCmds(tests []string) []*exec.Cmd { var cmds []*exec.Cmd if len(toolTests) > 0 { - cmds = append(cmds, exec.Command("go", "tool", "dist", "test", "-v", "-no-rebuild", "-run", strings.Join(toolTests, "|"))) + cmd := exec.Command("go", "tool", "dist", "test", "-v", "-no-rebuild", "-run", strings.Join(toolTests, "|")) + // Bump up timeout. Some go tool tests take more than 3 minutes to run. + // golang/go/src/cmd/dist/test.go:registerStdTest() sets default timeout to + // 3 minutes which can only be increased via GO_TEST_TIMEOUT_SCALE. + cmd.Env = append(cmd.Environ(), "GO_TEST_TIMEOUT_SCALE=2") + cmds = append(cmds, cmd) } if len(onDiskTests) > 0 { cmd := exec.Command("go", append([]string{"run", "run.go", "-v", "--"}, onDiskTests...)...)