X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=ci%2FcyclicTestTrigger.sh;h=12b2a66dee43d0a588fb87414e1d01ddaccc3e0f;hb=a9df9f4fdafc08c33d1debd0e4999e58cdbf4b31;hp=741a865d08ceacfd868b92a4a733e6eb91c8b747;hpb=af712826966ee75ba5ac466a6c192580abdf0c29;p=kvmfornfv.git diff --git a/ci/cyclicTestTrigger.sh b/ci/cyclicTestTrigger.sh index 741a865d0..12b2a66de 100755 --- a/ci/cyclicTestTrigger.sh +++ b/ci/cyclicTestTrigger.sh @@ -118,6 +118,7 @@ function env_clean { #Cleaning the latest kernel changes on host after executing the test. function host_clean { sudo ssh root@${HOST_IP} "rpm=\$(rpm -qa | grep 'kernel-${KERNELRPM_VERSION}' | awk '{print \$1}'); rpm -ev \$rpm" + sudo ssh root@${HOST_IP} "rpm=\$(rpm -qa | grep 'kernel-devel-${KERNELRPM_VERSION}' | awk '{print \$1}'); rpm -ev \$rpm" sudo ssh root@${HOST_IP} "rm -rf /boot/initramfs-${KERNELRPM_VERSION}*.img" sudo ssh root@${HOST_IP} "grub2-mkconfig -o /boot/grub2/grub.cfg" sudo ssh root@${HOST_IP} "rpm=\$(rpm -qa | grep 'qemu-${QEMURPM_VERSION}'| awk '{print \$1}'); rpm -ev \$rpm" @@ -136,6 +137,31 @@ function cleanup { fi } +#environment setup for executing packet forwarding test cases +function setUpPacketForwarding { + #copying required files to run packet forwarding test cases + ssh root@$HOST_IP "mkdir -p /root/workspace/image" + ssh root@$HOST_IP "mkdir -p /root/workspace/rpm" + ssh root@$HOST_IP "mkdir -p /root/workspace/scripts" + #Copying the host configuration scripts on to host + scp -r $WORKSPACE/ci/envs/* root@$HOST_IP:/root/workspace/scripts + scp -r $WORKSPACE/tests/vsperf.conf* root@$HOST_IP:/root/workspace/scripts + scp -r $WORKSPACE/build_output/kernel-${KERNELRPM_VERSION}*.rpm root@$HOST_IP:/root/workspace/rpm + scp -r $WORKSPACE/build_output/kernel-devel-${KERNELRPM_VERSION}*.rpm root@$HOST_IP:/root/workspace/rpm + scp -r $WORKSPACE/build_output/qemu-${QEMURPM_VERSION}*.rpm root@$HOST_IP:/root/workspace/rpm + #execute host configuration script for installing kvm built kernel. + ssh root@$HOST_IP "cd /root/workspace/scripts ; ./host-setup0.sh" + ssh root@$HOST_IP "cd /root/workspace/rpm ; rpm -ivh kernel-devel-${KERNELRPM_VERSION}*.rpm" + ssh root@$HOST_IP "reboot" + sleep 10 +} + +#executing packet forwarding test cases +function runPacketForwarding { + testType=$1 + ssh -t -t root@$HOST_IP "cd /root/workspace/scripts ; sudo scl enable python33 'sh packet_forwarding.sh $testType $QEMURPM_VERSION'" +} + #Creating a docker image with yardstick installed and Verify the results of cyclictest function runCyclicTest { container_id=`sudo docker ps -a | grep kvmfornfv_${testType} |awk '{print \$1}'|sed -e 's/\r//g'` @@ -189,4 +215,4 @@ function runCyclicTest { return 1 fi fi -} \ No newline at end of file +}