-docker_image_dir=$WORKSPACE/docker_image_build
-function env_clean {
- container_id=`sudo docker ps -a | grep kvmfornfv |awk '{print $1}'`
- sudo docker rm $container_id
- sudo ssh root@10.2.117.23 "rm -rf /root/workspace/*"
- sudo ssh root@10.2.117.23 "pid=\$(ps aux | grep 'qemu' | awk '{print \$2}' | head -1); echo \$pid |xargs kill"
- sudo rm -rf /tmp/kvmtest-*
-}
-
-#Cleaning up the test environment before running cyclictest through yardstick.
-env_clean
-
-#Creating a docker image with yardstick installed.
-( cd ${docker_image_dir}; sudo docker build -t kvmfornfv:latest --no-cache=true . )
-if [ ${?} -ne 0 ] ; then
- echo "Docker image build failed"
- id=$(sudo docker ps -a | head -2 | tail -1 | awk '{print $1}'); sudo docker rm -f $id
- exit 1
+test_type=$1
+
+if [ ${test_type} == "verify" ];then
+ HOST_IP="10.2.117.23"
+ test_time=600000 # 10m
+elif [ ${test_type} == "daily" ];then
+ HOST_IP="10.2.117.25"
+ test_time=7200000 #2h
+elif [ ${test_type} == "merge" ];then
+ echo "Test is not enabled for ${test_type}"
+ exit 0