CSIT-1126: Detection and reporting of failed MRR tests
[csit.git] / bootstrap-verify-perf.sh
index 86714a7..f2e4df5 100755 (executable)
@@ -203,7 +203,8 @@ case "$TEST_TAG" in
         ;;
     VERIFY-PERF-L2 )
         TAGS=('mrrANDnic_intel-x520-da2AND1t1cANDl2xcbase'
-              'mrrANDnic_intel-x520-da2AND1t1cANDl2bdbase')
+              'mrrANDnic_intel-x520-da2AND1t1cANDl2bdbase'
+              '!lbond_dpdk')
         ;;
     VERIFY-PERF-LISP )
         TAGS=('mrrANDnic_intel-x520-da2AND1t1cANDlisp')
@@ -212,7 +213,8 @@ case "$TEST_TAG" in
         TAGS=('mrrANDnic_intel-x520-da2AND1t1cANDvxlan')
         ;;
     VERIFY-PERF-VHOST )
-        TAGS=('mrrANDnic_intel-x520-da2AND1t1cANDvhost')
+        TAGS=('mrrANDnic_intel-x520-da2AND1t1cANDvhost'
+              '!lbond_dpdk')
         ;;
     VERIFY-PERF-MEMIF )
         TAGS=('pdrdiscANDnic_intel-x520-da2AND1t1cANDmemif'
@@ -226,6 +228,10 @@ case "$TEST_TAG" in
               'mrrANDnic_intel-xl710AND1t1cANDipsechw'
               'mrrANDnic_intel-xl710AND2t2cANDipsechw')
         ;;
+    VERIFY-PERF-SRV6 )
+        TAGS=('mrrANDsrv6AND1t1c'
+              'mrrANDsrv6AND2t2c')
+        ;;
     VPP-VERIFY-PERF-IP4 )
         TAGS=('mrrANDnic_intel-x520-da2AND1t1cANDip4base'
               'mrrANDnic_intel-x520-da2AND1t1cANDip4fwdANDfib_2m')
@@ -237,7 +243,8 @@ case "$TEST_TAG" in
     VPP-VERIFY-PERF-L2 )
         TAGS=('mrrANDnic_intel-x520-da2AND1t1cANDl2xcbase'
               'mrrANDnic_intel-x520-da2AND1t1cANDl2bdbase'
-              'mrrANDnic_intel-x520-da2AND1t1cANDdot1q')
+              'mrrANDnic_intel-x520-da2AND1t1cANDdot1q'
+              '!lbond_dpdk')
         ;;
     VPP-VERIFY-PERF-LISP )
         TAGS=('mrrANDnic_intel-x520-da2AND1t1cANDlisp')
@@ -246,7 +253,8 @@ case "$TEST_TAG" in
         TAGS=('mrrANDnic_intel-x520-da2AND1t1cANDvxlan')
         ;;
     VPP-VERIFY-PERF-VHOST )
-        TAGS=('mrrANDnic_intel-x520-da2AND1t1cANDvhost')
+        TAGS=('mrrANDnic_intel-x520-da2AND1t1cANDvhost'
+              '!lbond_dpdk')
         ;;
     VPP-VERIFY-PERF-MEMIF )
         TAGS=('pdrdiscANDnic_intel-x520-da2AND1t1cANDmemif'
@@ -264,15 +272,58 @@ case "$TEST_TAG" in
               'mrrANDnic_intel-xl710AND1t1cANDipsechw'
               'mrrANDnic_intel-xl710AND2t2cANDipsechw')
         ;;
+    VPP-VERIFY-PERF-SRV6 )
+        TAGS=('mrrANDsrv6AND1t1c'
+              'mrrANDsrv6AND2t2c')
+        ;;
+    VERIFY-PERF-PATCH )
+        if [[ -z "$TEST_TAG_STRING" ]]; then
+            # If nothing is specified, we will run pre-selected tests by
+            # following tags. Items of array will be concatenated by OR in Robot
+            # Framework.
+            TEST_TAG_ARRAY=('mrrANDnic_intel-x710AND1t1cAND64bANDip4base'
+                            'mrrANDnic_intel-x710AND1t1cAND78bANDip6base'
+                            'mrrANDnic_intel-x710AND1t1cAND64bANDl2bdbase')
+        else
+            # If trigger contains tags, split them into array.
+            TEST_TAG_ARRAY=(${TEST_TAG_STRING//:/ })
+        fi
+
+        TAGS=()
+
+        for TAG in "${TEST_TAG_ARRAY[@]}"; do
+            if [[ ${TAG} == "!"* ]]; then
+                # Exclude tags are not prefixed.
+                TAGS+=("${TAG}")
+            else
+                # We will prefix with perftest to prevent running other tests
+                # (e.g. Functional).
+                prefix="perftestAND"
+                if [[ ${JOB_NAME} == vpp-* ]] ; then
+                    # Automatic prefixing for VPP jobs to limit the NIC used and
+                    # traffic evaluation to MRR.
+                    prefix="${prefix}mrrANDnic_intel-x710AND"
+                fi
+                TAGS+=("$prefix${TAG}")
+            fi
+        done
+        ;;
     * )
         TAGS=('perftest')
 esac
 
-# Catenate TAG selections by 'OR'
-printf -v INCLUDES " --include %s " "${TAGS[@]}"
+# Catenate TAG selections
+EXPANDED_TAGS=()
+for TAG in "${TAGS[@]}"; do
+    if [[ ${TAG} == "!"* ]]; then
+        EXPANDED_TAGS+=(" --exclude ${TAG#$"!"} ")
+    else
+        EXPANDED_TAGS+=(" --include ${TAG} ")
+    fi
+done
 
 # Execute the test
-pybot ${PYBOT_ARGS}${INCLUDES} tests/
+pybot ${PYBOT_ARGS}${EXPANDED_TAGS[@]} tests/
 RETURN_STATUS=$(echo $?)
 
 # Archive JOB artifacts in jenkins