summaryrefslogtreecommitdiffstats
path: root/ci/cyclicTestTrigger.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ci/cyclicTestTrigger.sh')
-rwxr-xr-xci/cyclicTestTrigger.sh28
1 files changed, 27 insertions, 1 deletions
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
+}