diff options
author | Yulong Pei <yulong.pei@intel.com> | 2020-06-03 00:32:40 +0800 |
---|---|---|
committer | Vratko Polak <vrpolak@cisco.com> | 2020-06-30 11:03:49 +0000 |
commit | b9457dab3abab7b16f5766c93de6d4d3ca0d03c2 (patch) | |
tree | 3a42200549b55fedef677c1407d6535c2fe94c6b /resources/libraries/bash | |
parent | 4cbb1b7c9aa616e377b73b9d22ed2b5ac1735b65 (diff) |
make graph node variant can be configured from gerrit trigger
for example, below will trigger VPP with default code path test in CSIT,
"csit-2n-clx-perftest mrrAND64bANDnic_intel-xxv710ANDeth-l2bdbasemaclrnNOTdrv_avf"
and below will trigger VPP with avx512 code path test in CSIT,
"csit-2n-clx-perftest icl mrrAND64bANDnic_intel-xxv710ANDeth-l2bdbasemaclrnNOTdrv_avf"
Change-Id: Id3abf932203ce00f34f8643c5bc4d5fc4d3e6efb
Signed-off-by: Yulong Pei <yulong.pei@intel.com>
Diffstat (limited to 'resources/libraries/bash')
-rw-r--r-- | resources/libraries/bash/function/common.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/resources/libraries/bash/function/common.sh b/resources/libraries/bash/function/common.sh index ec335f171f..f724e53ea0 100644 --- a/resources/libraries/bash/function/common.sh +++ b/resources/libraries/bash/function/common.sh @@ -524,6 +524,19 @@ function get_test_tag_string () { cmd=("grep" "-oP" '\S*'"${trigger}"'\S*\s\K.+$') || die "Unset trigger?" # On parsing error, TEST_TAG_STRING probably stays empty. TEST_TAG_STRING=$("${cmd[@]}" <<< "${comment}") || true + if [[ -n "${TEST_TAG_STRING-}" ]]; then + test_tag_array=(${TEST_TAG_STRING}) + if [[ "${test_tag_array[0]}" == "icl" ]]; then + export GRAPH_NODE_VARIANT="icl" + TEST_TAG_STRING="${test_tag_array[@]:1}" || true + elif [[ "${test_tag_array[0]}" == "skx" ]]; then + export GRAPH_NODE_VARIANT="skx" + TEST_TAG_STRING="${test_tag_array[@]:1}" || true + elif [[ "${test_tag_array[0]}" == "hsw" ]]; then + export GRAPH_NODE_VARIANT="hsw" + TEST_TAG_STRING="${test_tag_array[@]:1}" || true + fi + fi fi } |