FIX: TAG processing 26/13026/4
authorPeter Mikus <pmikus@cisco.com>
Wed, 13 Jun 2018 12:25:51 +0000 (12:25 +0000)
committerPeter Mikus <pmikus@cisco.com>
Wed, 13 Jun 2018 12:38:40 +0000 (12:38 +0000)
- Improve TAG post processing

Change-Id: I5a36f5874ea747cbcae2562fc58c9f5abe9bac02
Signed-off-by: Peter Mikus <pmikus@cisco.com>
bootstrap-verify-perf.sh
tests/vpp/perf/ip4/10ge2p1x520-ethip4-ip4base-ipolicemarkbase-mrr.robot
tests/vpp/perf/ip4/10ge2p1x520-ethip4-ip4base-ipolicemarkbase-ndrpdrdisc.robot

index a944ea3..5540f9f 100755 (executable)
@@ -203,8 +203,8 @@ case "$TEST_TAG" in
         ;;
     VERIFY-PERF-L2 )
         TAGS=('mrrANDnic_intel-x520-da2AND1t1cANDl2xcbase'
-              'mrrANDnic_intel-x520-da2AND1t1cANDl2bdbase')
-        ETAGS=('lbond_dpdk')
+              'mrrANDnic_intel-x520-da2AND1t1cANDl2bdbase'
+              '!lbond_dpdk')
         ;;
     VERIFY-PERF-LISP )
         TAGS=('mrrANDnic_intel-x520-da2AND1t1cANDlisp')
@@ -213,8 +213,8 @@ case "$TEST_TAG" in
         TAGS=('mrrANDnic_intel-x520-da2AND1t1cANDvxlan')
         ;;
     VERIFY-PERF-VHOST )
-        TAGS=('mrrANDnic_intel-x520-da2AND1t1cANDvhost')
-        ETAGS=('lbond_dpdk')
+        TAGS=('mrrANDnic_intel-x520-da2AND1t1cANDvhost'
+              '!lbond_dpdk')
         ;;
     VERIFY-PERF-MEMIF )
         TAGS=('pdrdiscANDnic_intel-x520-da2AND1t1cANDmemif'
@@ -243,8 +243,8 @@ case "$TEST_TAG" in
     VPP-VERIFY-PERF-L2 )
         TAGS=('mrrANDnic_intel-x520-da2AND1t1cANDl2xcbase'
               'mrrANDnic_intel-x520-da2AND1t1cANDl2bdbase'
-              'mrrANDnic_intel-x520-da2AND1t1cANDdot1q')
-        ETAGS=('lbond_dpdk')
+              'mrrANDnic_intel-x520-da2AND1t1cANDdot1q'
+              '!lbond_dpdk')
         ;;
     VPP-VERIFY-PERF-LISP )
         TAGS=('mrrANDnic_intel-x520-da2AND1t1cANDlisp')
@@ -253,8 +253,8 @@ case "$TEST_TAG" in
         TAGS=('mrrANDnic_intel-x520-da2AND1t1cANDvxlan')
         ;;
     VPP-VERIFY-PERF-VHOST )
-        TAGS=('mrrANDnic_intel-x520-da2AND1t1cANDvhost')
-        ETAGS=('lbond_dpdk')
+        TAGS=('mrrANDnic_intel-x520-da2AND1t1cANDvhost'
+              '!lbond_dpdk')
         ;;
     VPP-VERIFY-PERF-MEMIF )
         TAGS=('pdrdiscANDnic_intel-x520-da2AND1t1cANDmemif'
@@ -280,12 +280,18 @@ case "$TEST_TAG" in
         TAGS=('perftest')
 esac
 
-# Catenate TAG selections by 'OR'
-if [[ ! -z "$TAGS" ]]; then printf -v INCLUDES " --include %s " "${TAGS[@]}"; fi
-if [[ ! -z "$ETAGS" ]]; then printf -v EXCLUDES " --exclude %s " "${ETAGS[@]}"; fi
+# 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}${EXCLUDES} tests/
+pybot ${PYBOT_ARGS}${EXPANDED_TAGS} tests/
 RETURN_STATUS=$(echo $?)
 
 # Archive JOB artifacts in jenkins
index 72ba467..b6222a5 100644 (file)
@@ -16,7 +16,7 @@
 | Library | resources.libraries.python.Policer
 | ...
 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | MRR
-| ... | NIC_Intel-X520-DA2 | IP4FWD | BASE | DOT1Q
+| ... | NIC_Intel-X520-DA2 | IP4FWD | BASE | POLICE_MARK
 | ...
 | Suite Setup | Set up 3-node performance topology with DUT's NIC model
 | ... | L3 | Intel-X520-DA2
index 63c186c..51baa78 100644 (file)
@@ -16,7 +16,7 @@
 | Library | resources.libraries.python.Policer
 | ...
 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | NDRPDRDISC
-| ... | NIC_Intel-X520-DA2 | IP4FWD | BASE | DOT1Q
+| ... | NIC_Intel-X520-DA2 | IP4FWD | BASE | POLICE_MARK
 | ...
 | Suite Setup | Set up 3-node performance topology with DUT's NIC model
 | ... | L3 | Intel-X520-DA2

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.