-#Verifying the results of cyclictest
-result=`grep -o '"errors":[^,]*' $volume/yardstick.out | awk -F '"' \
-'{print $4}'| awk '{if (NF=0) print "SUCCESS" }'`
-if [ "$result" = "SUCCESS" ]; then
- echo "####################################################"
- echo ""
- echo `grep -o '"data":[^}]*' $volume/yardstick.out | awk -F '{' '{print $2}'`
- echo ""
- echo "####################################################"
- exit 0
+#Execution of testcases based on test type and test name from releng.
+if [ ${test_type} == "verify" ];then
+ HOST_IP="10.10.100.21"
+ test_time=120000 # 2m
+ for env in ${cyclictest_env_verify[@]}
+ do
+ #Executing cyclictest through yardstick.
+ cyclictest ${env}
+ sleep 10
+ done
+ #Execution of packet forwarding test cases.
+ packetForward
+ if [ ${cyclictest_result} -ne 0 ] || [ ${packetforward_result} -ne 0 ];then
+ echo "Test case FAILED"
+ exit 1
+ else
+ exit 0
+ fi
+elif [ ${test_type} == "daily" ];then
+ HOST_IP="10.10.100.22"
+ test_time=3600000 #1h
+ if [ ${test_name} == "packet_forward" ];then
+ packetForward
+ if [ ${packetforward_result} -ne 0 ] ; then
+ exit 1
+ else
+ exit 0
+ fi
+ elif [ ${test_name} == "cyclictest" ];then
+ for env in ${cyclictest_env_daily[@]}
+ do
+ #Executing cyclictest through yardstick.
+ cyclictest ${env}
+ sleep 5
+ done
+ if [ ${cyclictest_result} -ne 0 ] ; then
+ echo "Cyclictest case execution FAILED"
+ exit 1
+ else
+ echo "Cyclictest case executed SUCCESSFULLY"
+ exit 0
+ fi
+ fi
+elif [ ${test_type} == "merge" ];then
+ echo "Test is not enabled for ${test_type}"
+ exit 0