X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Fbash%2Ffunction%2Fcommon.sh;h=93adda7e0cde4671002d1c2a9147d9086b1c0f21;hb=b0d6fc976be09da5d5c0d57b58a87d8b0b286ca4;hp=e4783dd1ecc7f03d9e9cd7ab2247ee503903986f;hpb=0227e20f014f8ad2103000c1d91a37b6afba0fda;p=csit.git diff --git a/resources/libraries/bash/function/common.sh b/resources/libraries/bash/function/common.sh index e4783dd1ec..93adda7e0c 100644 --- a/resources/libraries/bash/function/common.sh +++ b/resources/libraries/bash/function/common.sh @@ -515,8 +515,8 @@ function get_test_tag_string () { *"device"*) # On parsing error, ${trigger} stays empty. trigger="$(echo "${GERRIT_EVENT_COMMENT_TEXT}" \ - | grep -oE '(devicetest$|devicetest[[:space:]].+$)')" \ - || true + | grep -oE '(devicetest$|devicetest[[:space:]].+$)' \ + || true)" # Set test tags as string. TEST_TAG_STRING="${trigger#$"devicetest"}" ;; @@ -760,7 +760,7 @@ function select_tags () { *"3n-skx"* | *"2n-skx"* | *"2n-clx"*) default_nic="nic_intel-xxv710" ;; - *"3n-hsw"*) + *"3n-hsw"* | *"mrr-daily-master") default_nic="nic_intel-xl710" ;; *) @@ -876,6 +876,12 @@ function select_tags () { if [[ "${tag}" == "!"* ]]; then # Exclude tags are not prefixed. TAGS+=("${tag}") + elif [[ "${tag}" == " "* || "${tag}" == *"perftest"* ]]; then + # Badly formed tag expressions can trigger way too much tests. + set -x + warn "The following tag expression hints at bad trigger: ${tag}" + warn "Possible cause: Multiple triggers in a single comment." + die "Aborting to avoid triggering too many tests." elif [[ "${tag}" != "" && "${tag}" != "#"* ]]; then # Empty and comment lines are skipped. # Other lines are normal tags, they are to be prefixed.