FIX: testcode detection in perf jobs
[csit.git] / resources / libraries / bash / function / common.sh
index b3a06d4..0202fbe 100644 (file)
@@ -303,9 +303,6 @@ function reserve_testbed () {
             if [[ "${result}" == "0" ]]; then
                 WORKING_TOPOLOGY="${topo}"
                 echo "Reserved: ${WORKING_TOPOLOGY}"
-                python "${PYTHON_SCRIPTS_DIR}/topo_cleanup.py" -t "${topo}" || {
-                    die "Testbed cleanup failed."
-                }
                 trap "untrap_and_unreserve_testbed" EXIT || {
                     message="TRAP ATTEMPT AND UNRESERVE FAILED, FIX MANUALLY."
                     untrap_and_unreserve_testbed "${message}" || {
@@ -313,6 +310,9 @@ function reserve_testbed () {
                     }
                     die "Trap attempt failed, unreserve succeeded. Aborting."
                 }
+                python "${PYTHON_SCRIPTS_DIR}/topo_cleanup.py" -t "${topo}" || {
+                    die "Testbed cleanup failed."
+                }
                 break
             fi
         done
@@ -391,8 +391,6 @@ function select_tags () {
     # Variables set:
     # - TAGS - Array of processed tag boolean expressions.
 
-    # TODO: Empty exclude_nics (with failing grep) is expected,
-    #       but others possible errors coule be checked explicitly.
     # NIC SELECTION
     # All topologies NICs
     available=$(grep -hoPR "model: \K.*" "${TOPOLOGIES_DIR}"/* | sort -u)
@@ -414,6 +412,9 @@ function select_tags () {
                             "mrrAND78bAND1c"
                             "mrrAND78bAND2c"
                             "mrrAND78bAND4c"
+                            "mrrAND114bAND1c"
+                            "mrrAND114bAND2c"
+                            "mrrAND114bAND4c"
                             "mrrANDimixAND1cANDvhost"
                             "mrrANDimixAND2cANDvhost"
                             "mrrANDimixAND4cANDvhost"
@@ -428,7 +429,7 @@ function select_tags () {
                 # in Robot Framework.
                 test_tag_array=("mrrANDnic_intel-x710AND1cAND64bANDip4base"
                                 "mrrANDnic_intel-x710AND1cAND78bANDip6base"
-                                "mrrANDnic_intel-x710AND1cAND64bANDl2bdbase"
+                                "mrrANDnic_intel-x710AND1cAND64bANDl2bdbaseANDbase"
                                 "mrrANDnic_intel-x710AND1cAND64bANDl2xcbase")
             else
                 # If trigger contains tags, split them into array.
@@ -437,6 +438,23 @@ function select_tags () {
             ;;
     esac
 
+    # Blacklisting certain tags per topology.
+    case "${TEST_CODE}" in
+        *"3n-hsw"*)
+            test_tag_array+=("!drv_avf")
+            ;;
+        *"2n-skx"*)
+            test_tag_array+=("!ipsechw")
+            ;;
+        *"3n-skx"*)
+            test_tag_array+=("!ipsechw")
+            ;;
+        *)
+            # Default to 3n-hsw due to compatibility.
+            test_tag_array+=("!drv_avf")
+            ;;
+    esac
+
     # We will add excluded NICs.
     test_tag_array+=("${exclude_nics[@]/#/!NIC_}")
 
@@ -484,7 +502,7 @@ function select_topology () {
                         "${TOPOLOGIES_DIR}/lf_3n_hsw_testbed2.yaml"
                         "${TOPOLOGIES_DIR}/lf_3n_hsw_testbed3.yaml"
                        )
-            TOPOLOGIES_TAGS="3_node_*_link_topo"
+            TOPOLOGIES_TAGS="3_node_single_link_topo"
             ;;
         "2n_skx")
             TOPOLOGIES=(