2af22afad5fa0aaa6973b6a42b00ad3edcf2873b
[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/scripts/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 ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \
25 root@$HOST_IP "cp /root/images/guest1.qcow2 /root/"
26
27 #Running cyclictest through yardstick
28 yardstick -d task start ${cyclictest_context_file}
29 output=$?
30 chmod 777 /tmp/yardstick.out
31 cat /tmp/yardstick.out  > /opt/yardstick.out
32 if [ $output != 0 ];then
33    echo "Someproblem with execution of Yardstick"
34    exit 1
35 fi