X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fbash%2Ffunction%2Fcommon.sh;h=2445a5deae9f8e097fd97925f0ee4ffeedd2e976;hp=2ae135425bcf933f86da919007f4bef730a7c53b;hb=6e96fee163eb9622bf39ed48743db86f7bcf743a;hpb=89e6be275715aefa8473835eb78eed309f37f2ee diff --git a/resources/libraries/bash/function/common.sh b/resources/libraries/bash/function/common.sh index 2ae135425b..2445a5deae 100644 --- a/resources/libraries/bash/function/common.sh +++ b/resources/libraries/bash/function/common.sh @@ -127,7 +127,7 @@ function activate_virtualenv () { die "Requirements installation failed." } # Most CSIT Python scripts assume PYTHONPATH is set and exported. - export PYTHONPATH="${root_path}" || die "Export failed." + export PYTHONPATH="${CSIT_DIR}" || die "Export failed." } @@ -556,17 +556,23 @@ function select_tags () { # - TAGS - Array of processed tag boolean expressions. # NIC SELECTION - # All topologies NICs - available=$(grep -hoPR "model: \K.*" "${TOPOLOGIES_DIR}"/* | sort -u) - # Selected topology NICs - reserved=$(grep -hoPR "model: \K.*" "${WORKING_TOPOLOGY}" | sort -u) - # All topologies NICs - Selected topology NICs + start_pattern='^ TG:' + end_pattern='^ \? \?[A-Za-z0-9]\+:' + # Remove the TG section from topology file + sed_command="/${start_pattern}/,/${end_pattern}/d" + # All topologies DUT NICs + available=$(sed "${sed_command}" "${TOPOLOGIES_DIR}"/* \ + | grep -hoP "model: \K.*" | sort -u) + # Selected topology DUT NICs + reserved=$(sed "${sed_command}" "${WORKING_TOPOLOGY}" \ + | grep -hoP "model: \K.*" | sort -u) + # All topologies DUT NICs - Selected topology DUT NICs exclude_nics=($(comm -13 <(echo "${reserved}") <(echo "${available}"))) # Select default NIC case "${TEST_CODE}" in *"3n-tsh"*) - DEFAULT_NIC='nic_intel-82599es' + DEFAULT_NIC='nic_intel-x520-da2' ;; *) DEFAULT_NIC='nic_intel-x710' @@ -707,6 +713,10 @@ function select_tags () { ;; *"3n-tsh"*) test_tag_array+=("!ipsechw") + test_tag_array+=("!memif") + test_tag_array+=("!srv6_proxy") + test_tag_array+=("!vhost") + test_tag_array+=("!vts") ;; *) # Default to 3n-hsw due to compatibility.