mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
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:
committed by
gVisor bot
parent
3b7119a7c9
commit
062190d983
@@ -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}
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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{}
|
||||
|
||||
@@ -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...)
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user