X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=ci%2FcyclicTestTrigger.sh;h=43d2d6ac511eda8cd3f129e8e24f735f0d542466;hb=0666e6b9c92cdba1d90c951423e5ef1fb2736c48;hp=b10acddd13b906548cad16156498e5c3a2e354b4;hpb=48f1b1f5298bc4960f261df412315d6e15897c43;p=kvmfornfv.git diff --git a/ci/cyclicTestTrigger.sh b/ci/cyclicTestTrigger.sh index b10acddd1..43d2d6ac5 100755 --- a/ci/cyclicTestTrigger.sh +++ b/ci/cyclicTestTrigger.sh @@ -14,6 +14,9 @@ testName=$4 source $WORKSPACE/ci/envs/utils.sh source $WORKSPACE/ci/envs/host-config + +checkRPMNames + KERNELRPM_VERSION=$( getKernelVersion ) QEMURPM_VERSION=$( getQemuVersion ) @@ -36,6 +39,29 @@ function verifyGuestImage { fi } +#Verifying the availability of the host after reboot +function connect_host { + n=0 + while [ $n -lt 25 ]; do + host_ping_test="ping -c 1 ${HOST_IP}" + eval $host_ping_test &> /dev/null + if [ ${?} -ne 0 ] ; then + sleep 10 + echo "host machine is still under reboot..trying to connect...." + n=$(($n+1)) + else + echo "resuming the execution of test cases....." + #Waiting for ssh to be available for the host machine. + sleep 30 + break + fi + if [ $n == 24 ];then + echo "Host machine unable to boot-up!" + exit 1 + fi + done +} + #Updating the pod.yaml file with HOST_IP,kvmfornfv_cyclictest_idle_idle.yaml with loops and interval function updateYaml { cd $WORKSPACE/tests/ @@ -128,8 +154,10 @@ 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 + copyLogs + fi #Verifying the results of cyclictest - if [ "$testType" == "verify" ];then result=`grep -o '"errors":[^,]*' ${volume}/yardstick.out | awk -F '"' '{print $4}'`