updateYaml
#Running PCM utility
collect_MBWInfo $test_type
- #Checking which test cases will be executed first and last from the list to perform cleaning operations.
- first_test_case=cyclictest_env_$test_type[0]
- last_test_case=cyclictest_env_$test_type[-1]
#Cleaning the environment before running cyclictest through yardstick
- if [ ${test_case} == "${!first_test_case}" ];then
- env_clean
- else
- sudo ssh root@${HOST_IP} "pid=\$(ps aux | grep 'qemu' | awk '{print \$2}' | head -1); echo \$pid |xargs kill"
- fi
+ env_clean
#Creating a docker image with yardstick installed and launching ubuntu docker to run yardstick cyclic testcase
- if runCyclicTest;then
+ if runCyclicTest ${ftrace_enable};then
cyclictest_result=`expr ${cyclictest_result} + 0`
else
echo "Test case execution FAILED for ${test_case} environment"
fi
echo "Terminating PCM Process"
sudo ssh root@${HOST_IP} "pid=\$(ps aux | grep 'pcm' | awk '{print \$2}' | head -1); echo \$pid |xargs kill -SIGTERM"
- if [ ${test_case} != "${!last_test_case}" ];then
- sudo ssh root@${HOST_IP} "reboot"
- fi
}
function collect_MBWInfo {
#Collecting the Memory Bandwidth Information using pcm-memory utility
'
}
-function ftrace_disable {
- sudo ssh root@${HOST_IP} "sh /root/workspace/scripts/disbale-trace.sh"
- sudo ssh root@${HOST_IP} "cd /tmp ; a=\$(ls -rt | tail -1) ; echo \$a ; mv \$a cyclictest_${env}.txt"
- sudo mkdir -p $WORKSPACE/build_output/log/kernel_trace
- sudo scp root@${HOST_IP}:/tmp/cyclictest_${env}.txt $WORKSPACE/build_output/log/kernel_trace/
-}
-
#Execution of testcases based on test type and test name from releng.
if [ ${test_type} == "verify" ];then
HOST_IP="10.10.100.21"
for env in ${cyclictest_env_verify[@]}
do
#Enabling ftrace for kernel debugging.
- sed -i '/host-setup1.sh/a\ \- \"enable-trace.sh\"' kvmfornfv_cyclictest_hostenv_guestenv.yaml
+ sed -i '/host-setup1.sh/a\ \- \"enable-trace.sh\"' $WORKSPACE/tests/kvmfornfv_cyclictest_hostenv_guestenv.yaml
#Executing cyclictest through yardstick.
cyclictest ${env}
- #disabling ftrace and collecting the logs to upload to artifact repository.
- ftrace_disable
sleep 10
done
#Execution of packet forwarding test cases.
cyclictest ${env}
sleep 10
done
- env_clean
- host_clean
#Execution of packet forwarding test cases.
packetForward
fi
cyclictest ${env}
sleep 5
done
- env_clean
- host_clean
fi
if [ ${cyclictest_result} -ne 0 ] ; then
echo "Cyclictest case execution FAILED"