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
This commit is contained in:
Nicolas Lacasse
2019-09-17 13:29:19 -07:00
committed by gVisor bot
parent 3b7119a7c9
commit 062190d983
6 changed files with 11 additions and 8 deletions
+2 -2
View File
@@ -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}
+2 -2
View File
@@ -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}
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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{}
+1 -1
View File
@@ -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...)
}
+4 -1
View File
@@ -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)
}