Skip to content

Commit 97c0047

Browse files
authored
Merge pull request #1098 from Letty5411/0411
test: seperate integration test and cri test in travisCI
2 parents c67f0c8 + 4ef6e10 commit 97c0047

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

.travis.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,9 @@ before_install:
1818
- sudo apt-get update -qq
1919
- sudo apt-get install -y -qq autoconf automake
2020

21+
env:
22+
- TEST_SUITE=integration-test
23+
- TEST_SUITE=cri-test
24+
2125
script:
22-
- sudo make -e test
26+
- sudo make -e ${TEST_SUITE}

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ uninstall:
9797
# Ref https://unix.stackexchange.com/questions/83191/how-to-make-sudo-preserve-path
9898
.PHONY: integration-test
9999
integration-test:
100-
@bash -c "env PATH=$(PATH) hack/make.sh pre build integration-test"
100+
@bash -c "env PATH=$(PATH) hack/make.sh build integration-test"
101101

102102
.PHONY: cri-test
103103
cri-test:
104-
@bash -c "env PATH=$(PATH) hack/make.sh pre build cri-test"
104+
@bash -c "env PATH=$(PATH) hack/make.sh build cri-test"
105105

106106
.PHONY: test
107107
test:

hack/make.sh

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ DIR="$( cd "$( dirname "$0" )/.." && pwd )"
99
cd $DIR/
1010
SOURCEDIR=/go/src/github.com/alibaba/pouch
1111
IMAGE=pouch:test
12+
if [[ $SOURCEDIR != $DIR ]];then
13+
[ -d $SOURCEDIR ] && rm -rf $SOURCEDIR
14+
POUCHTOPDIR=$(dirname $SOURCEDIR)
15+
[ ! -d $POUCHTOPDIR ] && mkdir -p $POUCHTOPDIR
16+
ln -sf $DIR/ $SOURCEDIR
17+
fi
1218

1319
# install pouch and essential binaries: containerd, runc and so on
1420
function install_pouch ()
@@ -88,13 +94,6 @@ function target()
8894
install_dumb_init || echo "Warning: dumb-init install failed! rich container related tests will be skipped"
8995
docker run --rm -v $(pwd):$SOURCEDIR $IMAGE bash -c "cd test && go test -c -o integration-test"
9096

91-
if [[ $SOURCEDIR != $DIR ]];then
92-
[ -d $SOURCEDIR ] && rm -rf $SOURCEDIR
93-
POUCHTOPDIR=$(dirname $SOURCEDIR)
94-
[ ! -d $POUCHTOPDIR ] && mkdir -p $POUCHTOPDIR
95-
ln -sf $DIR/ $SOURCEDIR
96-
fi
97-
9897
#start pouch daemon
9998
echo "start pouch daemon"
10099
if stat /usr/bin/lxcfs ; then

0 commit comments

Comments
 (0)