diff options
author | Ayush Ranjan <ayushranjan@google.com> | 2020-07-11 08:17:07 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-07-11 08:18:35 -0700 |
commit | 69f2059e5d38bacac4bcda7912cca580ab70914d (patch) | |
tree | 31236d8bd287834ea01938144b1408542ffb8681 /test/runtimes/proctor/php.go | |
parent | 216dcebc066c82907b0de790a77a3deb6a734805 (diff) |
Runtime test batch executor
Earlier we were docker exec-ing each test at a time. However invoking the test
framework has a fixed overhead which made it infeasible to make the runtime
tests run as presubmits. This change now executes tests in batches of 50 (can
be altered). This really speeds up testing process.
With this change, the following tests can be run in reasonable times:
- Go
- Nodejs
- Php
- Python
PiperOrigin-RevId: 320763916
Diffstat (limited to 'test/runtimes/proctor/php.go')
-rw-r--r-- | test/runtimes/proctor/php.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/runtimes/proctor/php.go b/test/runtimes/proctor/php.go index 9115040e1..6a83d64e3 100644 --- a/test/runtimes/proctor/php.go +++ b/test/runtimes/proctor/php.go @@ -17,6 +17,7 @@ package main import ( "os/exec" "regexp" + "strings" ) var phpTestRegEx = regexp.MustCompile(`^.+\.phpt$`) @@ -35,8 +36,8 @@ func (phpRunner) ListTests() ([]string, error) { return testSlice, nil } -// TestCmd implements TestRunner.TestCmd. -func (phpRunner) TestCmd(test string) *exec.Cmd { - args := []string{"test", "TESTS=" + test} - return exec.Command("make", args...) +// TestCmds implements TestRunner.TestCmds. +func (phpRunner) TestCmds(tests []string) []*exec.Cmd { + args := []string{"test", "TESTS=" + strings.Join(tests, " ")} + return []*exec.Cmd{exec.Command("make", args...)} } |