3 ############################################################
4 ## This script is an interface to trigger the
5 ## cyclicTestTrigger.sh for test type like patch verification,
7 ## Releng will trigger this script by passing test type as
8 ## verify/daily and test name as idle_idle/stress_idle/
9 ## packet_forward as arguments.
10 ## Verify Job runs idle_idle,packet_forward test
11 ## daily job runs base on the test name parameter
12 ############################################################
16 cyclictest_env_verify=("idle_idle" "cpustress_idle" "memorystress_idle" "iostress_idle") #cyclictest environment
17 cyclictest_env_daily=("idle_idle" "cpustress_idle" "memorystress_idle" "iostress_idle")
18 cyclictest_result=0 #exit code of cyclictest
19 packetforward_result=0 #exit code of packet forward
21 function packetForward {
22 # source $WORKSPACE/ci/packet_forward_test.sh $HOST_IP
23 echo "Packetforwarding need to be implemented"
24 packetforward_result=$?
25 if [ ${packetforward_result} -ne 0 ];then
26 echo "Packet Forwarding test case execution FAILED"
28 echo "Packet Forwarding test case executed SUCCESSFULLY"
35 source $WORKSPACE/ci/cyclicTestTrigger.sh $HOST_IP $test_time $test_type $test_case
36 #calculating and verifying sha512sum of the guestimage.
37 if ! verifyGuestImage;then
40 #Update kvmfornfv_cyclictest_${testName}.yaml with test_time and pod.yaml with IP
42 #Cleaning up the test environment before running cyclictest through yardstick.
44 #Creating a docker image with yardstick installed and launching ubuntu docker to run yardstick cyclic testcase
46 cyclictest_result=`expr ${cyclictest_result} + 0`
48 echo "Test case execution FAILED for ${test_case} environment"
49 cyclictest_result=`expr ${cyclictest_result} + 1`
53 #Execution of testcases based on test type and test name from releng.
54 if [ ${test_type} == "verify" ];then
55 HOST_IP="10.10.100.21"
57 for env in ${cyclictest_env_verify[@]}
59 #Executing cyclictest through yardstick.
63 #Execution of packet forwarding test cases.
65 if [ ${cyclictest_result} -ne 0 ] || [ ${packetforward_result} -ne 0 ];then
66 echo "Test case FAILED"
71 elif [ ${test_type} == "daily" ];then
72 HOST_IP="10.10.100.22"
74 if [ ${test_name} == "packet_forward" ];then
76 if [ ${packetforward_result} -ne 0 ] ; then
81 elif [ ${test_name} == "cyclictest" ];then
82 for env in ${cyclictest_env_daily[@]}
84 #Executing cyclictest through yardstick.
88 if [ ${cyclictest_result} -ne 0 ] ; then
89 echo "Cyclictest case execution FAILED"
92 echo "Cyclictest case executed SUCCESSFULLY"
96 elif [ ${test_type} == "merge" ];then
97 echo "Test is not enabled for ${test_type}"
100 echo "Incorrect test type ${test_type}"