X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=ci%2FcyclicTestTrigger.sh;h=6765569f678536d919e6dcda5c88b2ef21a3a2aa;hb=053855503b272bb3df55670be40c8eb6c0c41c3b;hp=7a0c2a49b5e2d5c5c98da4acda2050bca86fe4bb;hpb=96e7a4ce5a4d186ed8297af9fd4333c510f2b9a1;p=kvmfornfv.git diff --git a/ci/cyclicTestTrigger.sh b/ci/cyclicTestTrigger.sh index 7a0c2a49b..6765569f6 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 @@ -179,10 +189,15 @@ function runCyclicTest { sudo docker run -i -v ${volume}:/opt --net=host --name kvmfornfv_${testType}_${testName} \ kvmfornfv:latest /bin/bash -c "cd /opt/scripts && ls; ./cyclictest.sh $testType $testName" cyclictest_output=$? - if [ "$testName" == "iostress_idle" ];then + if [ "$testName" == "memorystress_idle" ];then 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}'`