X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fbash%2Ffunction%2Fcommon.sh;h=ec95f9227cbb45ea9ef052c33f25511f17fd9f7c;hp=e511b1755749462f2eab436e7c603f8c5e4122f6;hb=425a606f9adb93da33a9ce861d0aa09e8c6b0526;hpb=5d871ce45cf74a25768e8456c441c16335d23076 diff --git a/resources/libraries/bash/function/common.sh b/resources/libraries/bash/function/common.sh index e511b17557..ec95f9227c 100644 --- a/resources/libraries/bash/function/common.sh +++ b/resources/libraries/bash/function/common.sh @@ -1060,11 +1060,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 @@ -1138,6 +1138,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.