Increase timeout for go tool dist test suite.

eed95da275 ("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
This commit is contained in:
Ayush Ranjan
2023-04-14 16:44:03 -07:00
committed by gVisor bot
parent 96bc3756b0
commit c617b2523a
+6 -1
View File
@@ -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...)...)