summaryrefslogtreecommitdiffhomepage
path: root/test/scenario_test/ci-scripts/jenkins-build-script.sh
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-07-24 11:15:39 +0900
committerISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-07-24 11:48:09 +0900
commit4390dfea9ab033490ef0f94329d7098ffd0ca4dc (patch)
treed30981a85871386df0e6532271d5329f823b234e /test/scenario_test/ci-scripts/jenkins-build-script.sh
parent17deee6aa3e9a10179cda2e7e21fe435312b0051 (diff)
test: build docker image once, use it for all tests
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'test/scenario_test/ci-scripts/jenkins-build-script.sh')
-rw-r--r--test/scenario_test/ci-scripts/jenkins-build-script.sh17
1 files changed, 11 insertions, 6 deletions
diff --git a/test/scenario_test/ci-scripts/jenkins-build-script.sh b/test/scenario_test/ci-scripts/jenkins-build-script.sh
index 0ed43247..ac42289b 100644
--- a/test/scenario_test/ci-scripts/jenkins-build-script.sh
+++ b/test/scenario_test/ci-scripts/jenkins-build-script.sh
@@ -3,6 +3,7 @@ rm -rf /usr/local/jenkins/{bin,pkg,src}
mkdir /usr/local/jenkins/{bin,pkg,src}
mkdir -p /usr/local/jenkins/src/github.com/osrg/
+export GOBGP_IMAGE=gobgp
export GOPATH=/usr/local/jenkins
export GOROOT=/usr/local/go
export GOBGP=/usr/local/jenkins/src/github.com/osrg/gobgp
@@ -14,6 +15,10 @@ cd $GOBGP
ls -al
git log | head -20
+sudo docker rmi $(docker images | grep "^<none>" | awk "{print $3}")
+
+sudo fab -f $GOBGP/test/scenario_test/lib/base.py make_gobgp_ctn --set tag=$GOBGP_IMAGE
+
cd $GOBGP/gobgpd
$GOROOT/bin/go get -v
cd $GOBGP/test/scenario_test
@@ -22,32 +27,32 @@ set +e
sudo -E pip install -r pip-requires.txt
# route server test
-sudo -E python route_server_test.py --use-local --go-path $GOROOT/bin -s --with-xunit
+sudo -E python route_server_test.py --gobgp-image $GOBGP_IMAGE --go-path $GOROOT/bin -s --with-xunit
RET1=$?
mv nosetests.xml ${WS}/nosetest.xml
# route server ipv4 ipv6 test
-sudo -E python route_server_ipv4_v6_test.py --use-local --go-path $GOROOT/bin -s --with-xunit
+sudo -E python route_server_ipv4_v6_test.py --gobgp-image $GOBGP_IMAGE --go-path $GOROOT/bin -s --with-xunit
RET2=$?
mv nosetests.xml ${WS}/nosetest_ip.xml
# route server malformed message test
-sudo -E python route_server_malformed_test.py --use-local --go-path $GOROOT/bin -s --with-xunit
+sudo -E python route_server_malformed_test.py --gobgp-image $GOBGP_IMAGE --go-path $GOROOT/bin -s --with-xunit
RET3=$?
mv nosetests.xml ${WS}/nosetest_malformed.xml
# bgp router test
-sudo -E python bgp_router_test.py --use-local --go-path $GOROOT/bin -s --with-xunit
+sudo -E python bgp_router_test.py --gobgp-image $GOBGP_IMAGE --go-path $GOROOT/bin -s --with-xunit
RET4=$?
mv nosetests.xml ${WS}/nosetest_bgp.xml
# route server policy test
-sudo -E python route_server_policy_test.py --use-local --go-path $GOROOT/bin -s --with-xunit
+sudo -E python route_server_policy_test.py --gobgp-image $GOBGP_IMAGE --go-path $GOROOT/bin -s --with-xunit
RET5=$?
mv nosetests.xml ${WS}/nosetest_policy.xml
# bgp router test
-sudo -E python ibgp_router_test.py --use-local --go-path $GOROOT/bin -s --with-xunit
+sudo -E python ibgp_router_test.py --gobgp-image $GOBGP_IMAGE --go-path $GOROOT/bin -s --with-xunit
RET6=$?
mv nosetests.xml ${WS}/nosetest_ibgp.xml