diff options
author | Ayush Ranjan <ayushranjan@google.com> | 2020-07-30 10:19:36 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-07-30 10:26:09 -0700 |
commit | f7281902f8f6f748e661c2b18a0bd3b227a55ce8 (patch) | |
tree | 4efbe035bb6555b6501702bac1852171fa36c3d9 /test/runtimes/proctor | |
parent | 2775ecd931ec67a8ba68f743b684d88c19d45d44 (diff) |
[runtime tests] go language test enhancement
- Unexported some passing tests. This will increase the testing surface and
will be especially helpful when this is enabled for vfs2.
- Run tool tests with -v (verbose output). We only print the output when a test
fails so this should not clutter the output.
- Run tool tests with "-no-rebuild" flag.
- Surround test name with appropriate regex, i.e. ^testname$. This will ensure
that only that test is run. Earlier running go_test:os would also run
go_test:os/exec, go_test:os/signal, go_test:os/user. This should help speed
up the tests as we do not run the same test multiple times anymore.
- Updated bugs.
Updates #3191
PiperOrigin-RevId: 324028878
Diffstat (limited to 'test/runtimes/proctor')
-rw-r--r-- | test/runtimes/proctor/go.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/runtimes/proctor/go.go b/test/runtimes/proctor/go.go index 073c2959d..d0ae844e6 100644 --- a/test/runtimes/proctor/go.go +++ b/test/runtimes/proctor/go.go @@ -81,13 +81,13 @@ func (goRunner) TestCmds(tests []string) []*exec.Cmd { if strings.HasSuffix(test, ".go") { onDiskTests = append(onDiskTests, test) } else { - toolTests = append(toolTests, test) + toolTests = append(toolTests, "^"+test+"$") } } var cmds []*exec.Cmd if len(toolTests) > 0 { - cmds = append(cmds, exec.Command("go", "tool", "dist", "test", "-run", strings.Join(toolTests, "\\|"))) + cmds = append(cmds, exec.Command("go", "tool", "dist", "test", "-v", "-no-rebuild", "-run", strings.Join(toolTests, "\\|"))) } if len(onDiskTests) > 0 { cmd := exec.Command("go", append([]string{"run", "run.go", "-v", "--"}, onDiskTests...)...) |