From 5120b1082aa70f6e75511e9d95a2a7c303e25f9a Mon Sep 17 00:00:00 2001 From: Peter Mikus Date: Wed, 13 Jun 2018 12:09:47 +0000 Subject: CSIT-PERF: New trigger design - CSIT-1128 - This patch is implementing processing of TAGS specified as part of commit message Change-Id: Iad0923d22fae369dfe923a917e1c0d47d5cbf656 Signed-off-by: Peter Mikus --- bootstrap-verify-perf-DPDK.sh | 47 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 41 insertions(+), 6 deletions(-) (limited to 'bootstrap-verify-perf-DPDK.sh') diff --git a/bootstrap-verify-perf-DPDK.sh b/bootstrap-verify-perf-DPDK.sh index b75caebefc..f15a38c2f4 100755 --- a/bootstrap-verify-perf-DPDK.sh +++ b/bootstrap-verify-perf-DPDK.sh @@ -128,19 +128,54 @@ case "$TEST_TAG" in 'mrrANDimixAND2t2c' 'mrrANDimixAND4t4c') ;; - VERIFY-PERF-MRR ) - TAGS=('mrrAND1t1c' - 'mrrAND2t2c') + 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 -- cgit 1.2.3-korg