summaryrefslogtreecommitdiffhomepage
path: root/test/runtimes/images
diff options
context:
space:
mode:
authorNicolas Lacasse <nlacasse@google.com>2019-09-17 13:28:07 -0700
committergVisor bot <gvisor-bot@google.com>2019-09-17 13:29:19 -0700
commit062190d983b133c26dd0abcc398ec9f008b167b4 (patch)
treef663d7a563d7f74a957e3c1a0b04d1b0bfafd960 /test/runtimes/images
parent3b7119a7c91789f69d8637401a1359229a33b213 (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')
-rw-r--r--test/runtimes/images/Dockerfile_nodejs12.4.04
-rw-r--r--test/runtimes/images/Dockerfile_php7.3.64
-rw-r--r--test/runtimes/images/Dockerfile_python3.7.32
-rw-r--r--test/runtimes/images/proctor/java.go2
-rw-r--r--test/runtimes/images/proctor/nodejs.go2
-rw-r--r--test/runtimes/images/proctor/proctor.go5
6 files changed, 11 insertions, 8 deletions
diff --git a/test/runtimes/images/Dockerfile_nodejs12.4.0 b/test/runtimes/images/Dockerfile_nodejs12.4.0
index 387824910..26f68b487 100644
--- a/test/runtimes/images/Dockerfile_nodejs12.4.0
+++ b/test/runtimes/images/Dockerfile_nodejs12.4.0
@@ -12,8 +12,8 @@ RUN apt-get update && apt-get install -y \
python
WORKDIR /root
-ARG VERSION v12.4.0
-RUN curl https://nodejs.org/dist/${VERSION}/node-${VERSION}.tar.gz
+ARG VERSION=v12.4.0
+RUN curl -o node-${VERSION}.tar.gz https://nodejs.org/dist/${VERSION}/node-${VERSION}.tar.gz
RUN tar -zxf node-${VERSION}.tar.gz
WORKDIR /root/node-${VERSION}
diff --git a/test/runtimes/images/Dockerfile_php7.3.6 b/test/runtimes/images/Dockerfile_php7.3.6
index 272b491b4..e6b4c6329 100644
--- a/test/runtimes/images/Dockerfile_php7.3.6
+++ b/test/runtimes/images/Dockerfile_php7.3.6
@@ -15,8 +15,8 @@ RUN apt-get update && apt-get install -y \
re2c
WORKDIR /root
-ARG VERSION 7.3.6
-RUN curl -o https://www.php.net/distributions/php-${VERSION}.tar.gz
+ARG VERSION=7.3.6
+RUN curl -o php-${VERSION}.tar.gz https://www.php.net/distributions/php-${VERSION}.tar.gz
RUN tar -zxf php-${VERSION}.tar.gz
WORKDIR /root/php-${VERSION}
diff --git a/test/runtimes/images/Dockerfile_python3.7.3 b/test/runtimes/images/Dockerfile_python3.7.3
index c9cc52d3a..905cd22d7 100644
--- a/test/runtimes/images/Dockerfile_python3.7.3
+++ b/test/runtimes/images/Dockerfile_python3.7.3
@@ -18,7 +18,7 @@ RUN apt-get update && apt-get install -y \
# Use flags -LJO to follow the html redirect and download .tar.gz.
WORKDIR /root
-ARG VERSION 3.7.3
+ARG VERSION=3.7.3
RUN curl -LJO https://github.com/python/cpython/archive/v${VERSION}.tar.gz
RUN tar -zxf cpython-${VERSION}.tar.gz
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)
}