X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=ci%2FcyclicTestTrigger.sh;h=7ec3616a0aba68442a280129060042cf0882de80;hb=ac6ed7c1037d6734a622bfe7f4bcb1bbac099ff0;hp=b10acddd13b906548cad16156498e5c3a2e354b4;hpb=d0deb639c35881c25f2b5ca77d64de0d4c649841;p=kvmfornfv.git diff --git a/ci/cyclicTestTrigger.sh b/ci/cyclicTestTrigger.sh index b10acddd1..7ec3616a0 100755 --- a/ci/cyclicTestTrigger.sh +++ b/ci/cyclicTestTrigger.sh @@ -36,6 +36,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/