Execution of kvm4nfv cyclictest based on job type.
[kvmfornfv.git] / ci / envs / cyclictest.sh
1 #!/bin/bash
2
3 ###########################################################
4 ## Invoking this script from ubuntu docker container runs
5 ## cyclictest through yardstick
6 ###########################################################
7 source utils.sh
8
9 HOST_IP=$( getHostIP )
10 pod_config='/opt/pod.yaml'
11 cyclictest_context_file='/opt/cyclictest-node-context.yaml'
12
13 if [ ! -f ${pod_config} ] ; then
14     echo "file ${pod_config} not found"
15     exit 1
16 fi
17
18 if [ ! -f ${cyclictest_context_file} ] ; then
19     echo "file ${cyclictest_context_file} not found"
20     exit 1
21 fi
22
23 #setting up of image for launching guest vm.
24 sudo ssh root@$HOST_IP "cp /root/images/guest1.qcow2 /root/"
25
26 #Running cyclictest through yardstick
27 yardstick -d task start ${cyclictest_context_file}
28 chmod 777 /tmp/yardstick.out
29 cat /tmp/yardstick.out  > /opt/yardstick.out