X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=resources%2Flibraries%2Fbash%2Ffunction%2Fcommon.sh;h=ed3b2044d3d6d018e95c2260a2e501c34efa6bc1;hb=6da5a6920171682bd5bf6a77517bedfef91cbd0e;hp=f5f86067adedf25c28dbedf566177dd2a9548f5b;hpb=647a693a245ae450756fb3bd9446db856e712812;p=csit.git diff --git a/resources/libraries/bash/function/common.sh b/resources/libraries/bash/function/common.sh index f5f86067ad..ed3b2044d3 100644 --- a/resources/libraries/bash/function/common.sh +++ b/resources/libraries/bash/function/common.sh @@ -526,7 +526,8 @@ function get_test_tag_string () { TEST_TAG_STRING=$("${cmd[@]}" <<< "${comment}" || true) if [[ -z "${TEST_TAG_STRING-}" ]]; then # Probably we got a base64 encoded comment. - comment=$(base64 --decode <<< "${GERRIT_EVENT_COMMENT_TEXT}" || true) + comment="${GERRIT_EVENT_COMMENT_TEXT}" + comment=$(base64 --decode <<< "${comment}" || true) comment=$(fgrep "${trigger}" <<< "${comment}" || true) TEST_TAG_STRING=$("${cmd[@]}" <<< "${comment}" || true) fi @@ -829,6 +830,7 @@ function select_tags () { awk_nics_sub_cmd+='gsub("cx556a","100ge2p1cx556a");' awk_nics_sub_cmd+='gsub("vic1227","10ge2p1vic1227");' awk_nics_sub_cmd+='gsub("vic1385","40ge2p1vic1385");' + awk_nics_sub_cmd+='gsub("nitro-50g","50ge1p1ENA");' awk_nics_sub_cmd+='if ($9 =="drv_avf") drv="avf-";' awk_nics_sub_cmd+='else if ($9 =="drv_rdma_core") drv ="rdma-";' awk_nics_sub_cmd+='else drv="";' @@ -1059,11 +1061,11 @@ function select_topology () { ;; "2n_aws") TOPOLOGIES=( "${TOPOLOGIES_DIR}"/*2n_aws*.yaml ) - TOPOLOGIES_TAGS="2_node_*_link_topo" + TOPOLOGIES_TAGS="2_node_single_link_topo" ;; "3n_aws") TOPOLOGIES=( "${TOPOLOGIES_DIR}"/*3n_aws*.yaml ) - TOPOLOGIES_TAGS="2_node_*_link_topo" + TOPOLOGIES_TAGS="3_node_single_link_topo" ;; *) # No falling back to 3n_hsw default, that should have been done @@ -1137,6 +1139,31 @@ function select_vpp_device_tags () { done } + +function set_environment_variables () { + + # Depending on testbed topology, overwrite defaults set in the + # resources/libraries/python/Constants.py file + # + # Variables read: + # - TEST_CODE - String affecting test selection, usually jenkins job name. + # Variables set: + # See specific cases + + set -exuo pipefail + + case "${TEST_CODE}" in + *"2n-aws"* | *"3n-aws"*) + # T-Rex 2.88 workaround for ENA NICs + export TREX_RX_DESCRIPTORS_COUNT=1024 + export TREX_EXTRA_CMDLINE="--mbuf-factor 19" + # Settings to prevent duration stretching + export PERF_TRIAL_STL_DELAY=0.1 + ;; + esac +} + + function untrap_and_unreserve_testbed () { # Use this as a trap function to ensure testbed does not remain reserved.