diff options
author | Nicolas Lacasse <nlacasse@google.com> | 2019-09-17 13:28:07 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-09-17 13:29:19 -0700 |
commit | 062190d983b133c26dd0abcc398ec9f008b167b4 (patch) | |
tree | f663d7a563d7f74a957e3c1a0b04d1b0bfafd960 /test/runtimes/images/proctor | |
parent | 3b7119a7c91789f69d8637401a1359229a33b213 (diff) |
Follow-up fixes for image tests.
- Fix ARG syntax in Dockerfiles.
- Fix curl commands in Dockerfiles.
- Fix some paths in proctor binaries.
- Check error from Walk in search helper.
PiperOrigin-RevId: 269641686
Diffstat (limited to 'test/runtimes/images/proctor')
-rw-r--r-- | test/runtimes/images/proctor/java.go | 2 | ||||
-rw-r--r-- | test/runtimes/images/proctor/nodejs.go | 2 | ||||
-rw-r--r-- | test/runtimes/images/proctor/proctor.go | 5 |
3 files changed, 6 insertions, 3 deletions
diff --git a/test/runtimes/images/proctor/java.go b/test/runtimes/images/proctor/java.go index 594dc6cc6..8b362029d 100644 --- a/test/runtimes/images/proctor/java.go +++ b/test/runtimes/images/proctor/java.go @@ -26,7 +26,7 @@ import ( var javaExclDirs = regexp.MustCompile(`(^(sun\/security)|(java\/util\/stream)|(java\/time)| )`) // Location of java tests. -const javaTestDir = "/root/test" +const javaTestDir = "/root/test/jdk" // javaRunner implements TestRunner for Java. type javaRunner struct{} diff --git a/test/runtimes/images/proctor/nodejs.go b/test/runtimes/images/proctor/nodejs.go index 4ef1afe63..bd57db444 100644 --- a/test/runtimes/images/proctor/nodejs.go +++ b/test/runtimes/images/proctor/nodejs.go @@ -41,6 +41,6 @@ func (nodejsRunner) ListTests() ([]string, error) { // TestCmd implements TestRunner.TestCmd. func (nodejsRunner) TestCmd(test string) *exec.Cmd { - args := []string{filepath.Join(nodejsTestDir, "tools", "test.py"), test} + args := []string{filepath.Join("tools", "test.py"), test} return exec.Command("/usr/bin/python", args...) } diff --git a/test/runtimes/images/proctor/proctor.go b/test/runtimes/images/proctor/proctor.go index 45b3212de..e2c198b46 100644 --- a/test/runtimes/images/proctor/proctor.go +++ b/test/runtimes/images/proctor/proctor.go @@ -100,6 +100,10 @@ func search(root string, testFilter *regexp.Regexp) ([]string, error) { var testSlice []string err := filepath.Walk(root, func(path string, info os.FileInfo, err error) error { + if err != nil { + return err + } + name := filepath.Base(path) if info.IsDir() || !testFilter.MatchString(name) { @@ -113,7 +117,6 @@ func search(root string, testFilter *regexp.Regexp) ([]string, error) { testSlice = append(testSlice, relPath) return nil }) - if err != nil { return nil, fmt.Errorf("walking %q: %v", root, err) } |