aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/bash
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2019-02-18 16:53:17 +0100
committerVratko Polak <vrpolak@cisco.com>2019-02-19 17:35:06 +0000
commit9e158c1ee4ea59a23fd747ebfe6ddb00dd9cc668 (patch)
tree0ea5e82d4601cff4398989462e9fcb6a9820dcf3 /resources/libraries/bash
parentab596c32fdda48aa8140f428710b98d47baf9cae (diff)
Allow more perftest strings in get_test_tag_string
This is needed to support other TBs in perpatch job. Change-Id: I9de70e818a32fa9990d90cb14498a26570b774a4 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources/libraries/bash')
-rw-r--r--resources/libraries/bash/function/common.sh13
1 files changed, 9 insertions, 4 deletions
diff --git a/resources/libraries/bash/function/common.sh b/resources/libraries/bash/function/common.sh
index 5982af9427..7f640678ae 100644
--- a/resources/libraries/bash/function/common.sh
+++ b/resources/libraries/bash/function/common.sh
@@ -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}"