Allow more perftest strings in get_test_tag_string
[csit.git] / resources / libraries / bash / function / common.sh
index f2931b3..7f64067 100644 (file)
@@ -415,11 +415,16 @@ function get_test_tag_string () {
                 ;;
             *"perf"*)
                 # On parsing error, ${trigger} stays empty.
-                trigger="$(echo "${GERRIT_EVENT_COMMENT_TEXT}" \
-                    | grep -oE '(perftest$|perftest[[:space:]].+$)')" \
-                    || true
+                comment="${GERRIT_EVENT_COMMENT_TEXT}"
+                # As "perftest" can be followed by something, we substitute it.
+                comment="${comment/perftest-2n/perftest}"
+                comment="${comment/perftest-3n/perftest}"
+                comment="${comment/perftest-hsw/perftest}"
+                comment="${comment/perftest-skx/perftest}"
+                tag_string="$(echo "${comment}" \
+                    | grep -oE '(perftest$|perftest[[:space:]].+$)' || true)"
                 # Set test tags as string.
-                TEST_TAG_STRING="${trigger#$"perftest"}"
+                TEST_TAG_STRING="${tag_string#$"perftest"}"
                 ;;
             *)
                 die "Unknown specification: ${TEST_CODE}"
@@ -555,7 +560,7 @@ function select_tags () {
             test_tag_array=("ndrpdrAND64bAND1c"
                             "ndrpdrAND78bAND1c")
             ;;
-        *"mrr-daily"* | *"mrr-weekly"* )
+        *"mrr-daily"* )
             test_tag_array=(# vic
                             "mrrANDnic_cisco-vic-1227AND64b"
                             "mrrANDnic_cisco-vic-1385AND64b"
@@ -644,7 +649,15 @@ function select_tags () {
                             "!vhost_256ANDnic_intel-x520-da2"
                             "!vhostANDnic_intel-xl710"
                             "!cfs_opt"
-                            "!lbond_dpdk")
+                            "!lbond_dpdk"
+                            "!nf_density")
+            ;;
+        *"mrr-weekly"* )
+            test_tag_array=(# NF Density tests
+                            "mrrANDnf_densityAND64b"
+                            "mrrANDnf_densityANDimix"
+                            # DPDK
+                            "mrrANDdpdkAND64b")
             ;;
         * )
             if [[ -z "${TEST_TAG_STRING-}" ]]; then
@@ -782,7 +795,7 @@ function select_topology () {
             TOPOLOGIES=(
                         "${TOPOLOGIES_DIR}/lf_2n_skx_testbed21.yaml"
                         #"${TOPOLOGIES_DIR}/lf_2n_skx_testbed22.yaml"
-                        #"${TOPOLOGIES_DIR}/lf_2n_skx_testbed23.yaml"
+                        "${TOPOLOGIES_DIR}/lf_2n_skx_testbed23.yaml"
                         "${TOPOLOGIES_DIR}/lf_2n_skx_testbed24.yaml"
                        )
             TOPOLOGIES_TAGS="2_node_*_link_topo"