Skip to content

Commit 32e788a

Browse files
Merge pull request #3205 from Random-Liu/test-runtime-for-cri
Use $TEST_RUNTIME for cri test.
2 parents 906e8bc + a12f836 commit 32e788a

1 file changed

Lines changed: 14 additions & 7 deletions

File tree

.travis.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,21 @@ script:
7474
- if [ "$GOOS" = "linux" ]; then sudo PATH=$PATH GOPATH=$GOPATH make integration ; fi
7575
# Run the integration suite a second time. See discussion in github.com/containerd/containerd/pull/1759
7676
- if [ "$GOOS" = "linux" ]; then sudo PATH=$PATH GOPATH=$GOPATH TESTFLAGS_PARALLEL=1 make integration ; fi
77-
- if [ "$GOOS" = "linux" ]; then
77+
- |
78+
if [ "$GOOS" = "linux" ]; then
79+
sudo mkdir -p /etc/containerd
80+
sudo bash -c "cat > /etc/containerd/config.toml <<EOF
81+
[plugins.cri.containerd.default_runtime]
82+
runtime_type = \"${TEST_RUNTIME}\"
83+
EOF"
7884
sudo PATH=$PATH containerd -log-level debug &> /tmp/containerd-cri.log &
79-
sudo ctr version ;
80-
sudo PATH=$PATH GOPATH=$GOPATH critest --runtime-endpoint=/var/run/containerd/containerd.sock --parallel=8 ;
81-
TEST_RC=$? ;
82-
test $TEST_RC -ne 0 && cat /tmp/containerd-cri.log ;
83-
sudo pkill containerd ;
84-
test $TEST_RC -eq 0 || /bin/false ;
85+
sudo ctr version
86+
sudo PATH=$PATH GOPATH=$GOPATH critest --runtime-endpoint=/var/run/containerd/containerd.sock --parallel=8
87+
TEST_RC=$?
88+
test $TEST_RC -ne 0 && cat /tmp/containerd-cri.log
89+
sudo pkill containerd
90+
sudo rm -rf /etc/containerd
91+
test $TEST_RC -eq 0 || /bin/false
8592
fi
8693
8794
after_success:

0 commit comments

Comments
 (0)