summaryrefslogtreecommitdiffstats
path: root/ci/envs/cyclictest.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ci/envs/cyclictest.sh')
-rwxr-xr-xci/envs/cyclictest.sh50
1 files changed, 45 insertions, 5 deletions
diff --git a/ci/envs/cyclictest.sh b/ci/envs/cyclictest.sh
index 747f34758..805f9088f 100755
--- a/ci/envs/cyclictest.sh
+++ b/ci/envs/cyclictest.sh
@@ -6,9 +6,10 @@
###########################################################
source utils.sh
+testType=$1 #daily/verify/merge
HOST_IP=$( getHostIP )
-pod_config='/opt/pod.yaml'
-cyclictest_context_file='/opt/cyclictest-node-context.yaml'
+pod_config='/opt/scripts/pod.yaml'
+cyclictest_context_file='/opt/kvmfornfv_cyclictest_idle_idle.yaml'
if [ ! -f ${pod_config} ] ; then
echo "file ${pod_config} not found"
@@ -21,9 +22,48 @@ if [ ! -f ${cyclictest_context_file} ] ; then
fi
#setting up of image for launching guest vm.
-sudo ssh root@$HOST_IP "cp /root/images/guest1.qcow2 /root/"
+ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \
+root@$HOST_IP "cp /root/images/guest1.qcow2 /root/"
+
+#Updating the yardstick.conf file for daily
+function updateConfDaily() {
+ DISPATCHER_TYPE=influxdb
+ DISPATCHER_FILE_NAME="/tmp/yardstick.out"
+ # Use the influxDB on the jumping server
+ DISPATCHER_INFLUXDB_TARGET="http://104.197.68.199:8086"
+ mkdir -p /etc/yardstick
+ cat << EOF > /etc/yardstick/yardstick.conf
+[DEFAULT]
+debug = True
+dispatcher = ${DISPATCHER_TYPE}
+
+[dispatcher_file]
+file_name = ${DISPATCHER_FILE_NAME}
+
+[dispatcher_influxdb]
+timeout = 5
+db_name = yardstick
+username = opnfv
+password = 0pnfv2015
+target = ${DISPATCHER_INFLUXDB_TARGET}
+EOF
+}
+
+#Function call to update yardstick conf file based on Job type
+if [ "$testType" == "daily" ];then
+ updateConfDaily
+fi
#Running cyclictest through yardstick
yardstick -d task start ${cyclictest_context_file}
-chmod 777 /tmp/yardstick.out
-cat /tmp/yardstick.out > /opt/yardstick.out
+output=$?
+
+if [ "$testType" == "verify" ];then
+ chmod 777 /tmp/yardstick.out
+ cat /tmp/yardstick.out > /opt/yardstick.out
+fi
+
+if [ $output != 0 ];then
+ echo "Yardstick Failed !!!"
+ exit 1
+fi