summaryrefslogtreecommitdiffstats
path: root/ci/envs/cyclictest.sh
diff options
context:
space:
mode:
authorJiang, Yunhong <yunhong.jiang@intel.com>2016-10-14 05:26:39 +0000
committerGerrit Code Review <gerrit@opnfv.org>2016-10-14 05:26:39 +0000
commit15f48a2a1322a8dae448031ea2372d05dbf84731 (patch)
tree75377d6f10702e34abe19e38f18f6dadbe801570 /ci/envs/cyclictest.sh
parent71833ad15517efc8dabfbea4ba1dbf08e33c4a93 (diff)
parent596c056f98f1225a2fffd76cf30f6982b69ec0e4 (diff)
Merge "This patch contains scripts to publish the data to local Grafana Dashboard for daily Job"
Diffstat (limited to 'ci/envs/cyclictest.sh')
-rwxr-xr-xci/envs/cyclictest.sh40
1 files changed, 37 insertions, 3 deletions
diff --git a/ci/envs/cyclictest.sh b/ci/envs/cyclictest.sh
index 2af22afad..c5b980d77 100755
--- a/ci/envs/cyclictest.sh
+++ b/ci/envs/cyclictest.sh
@@ -6,6 +6,7 @@
###########################################################
source utils.sh
+testType=$1 #daily/verify/merge
HOST_IP=$( getHostIP )
pod_config='/opt/scripts/pod.yaml'
cyclictest_context_file='/opt/cyclictest-node-context.yaml'
@@ -24,12 +25,45 @@ fi
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://10.2.117.21: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 = root
+password = root
+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}
output=$?
-chmod 777 /tmp/yardstick.out
-cat /tmp/yardstick.out > /opt/yardstick.out
+
+if [ "$testType" == "verify" ];then
+ chmod 777 /tmp/yardstick.out
+ cat /tmp/yardstick.out > /opt/yardstick.out
+fi
+
if [ $output != 0 ];then
- echo "Someproblem with execution of Yardstick"
+ echo "Yardstick Failed !!!"
exit 1
fi