summaryrefslogtreecommitdiffstats
path: root/ci/cyclicTestTrigger.sh
diff options
context:
space:
mode:
authorkalyanreddy <reddyx.gundarapu@intel.com>2017-03-02 06:03:56 -0800
committerKalyan reddy Gundarapu <reddyx.gundarapu@intel.com>2017-03-21 05:50:08 +0000
commitf835f6520f491d554fa9655efe9e52dd8153c352 (patch)
treee785dc40e9f1c81ba2568ab2fc36de52e5c17a55 /ci/cyclicTestTrigger.sh
parentd946629e1c1851dd12fd2f2664e9a12fc1b6c9bc (diff)
This patch includes updated scripts to enable ftrace and collect
logs for debugging high latency values. Change-Id: Ibdea5dab0c6d47eb6dd9d47d879fdd42dd95f8e4 Signed-off-by: Gundarapu Kalyan Reddy <reddyx.gundarapu@intel.com>
Diffstat (limited to 'ci/cyclicTestTrigger.sh')
-rwxr-xr-xci/cyclicTestTrigger.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/ci/cyclicTestTrigger.sh b/ci/cyclicTestTrigger.sh
index 7a0c2a49b..640a0738a 100755
--- a/ci/cyclicTestTrigger.sh
+++ b/ci/cyclicTestTrigger.sh
@@ -39,6 +39,15 @@ function verifyGuestImage {
fi
}
+#disabling ftrace and collecting the logs to upload to artifact repository.
+function ftrace_disable {
+ sudo ssh root@${HOST_IP} "sh /root/workspace/scripts/disable_trace.sh"
+ sudo ssh root@${HOST_IP} "cd /tmp ; mv trace.txt cyclictest_${env}.txt"
+ mkdir -p $WORKSPACE/build_output/log/kernel_trace
+ scp root@${HOST_IP}:/tmp/cyclictest_${env}.txt $WORKSPACE/build_output/log/kernel_trace/
+ sudo ssh root@${HOST_IP} "cd /tmp ; rm -rf cyclictest_${env}.txt"
+}
+
#Verifying the availability of the host after reboot
function connect_host {
n=0
@@ -158,6 +167,7 @@ function runPacketForwarding {
#Creating a docker image with yardstick installed and Verify the results of cyclictest
function runCyclicTest {
+ ftrace_enable=$1
docker_image_dir=$WORKSPACE/docker_image_build
( cd ${docker_image_dir}; sudo docker build -t kvmfornfv:latest --no-cache=true . )
if [ ${?} -ne 0 ] ; then
@@ -183,6 +193,11 @@ function runCyclicTest {
copyLogs
fi
+ #Disabling ftrace after completion of executing test cases.
+ if [ ${ftrace_enable} -eq '1' ]; then
+ ftrace_disable
+ fi
+
#Verifying the results of cyclictest
if [ "$testType" == "verify" ];then
result=`grep -o '"errors":[^,]*' ${volume}/yardstick.out | awk -F '"' '{print $4}'`