# Functions called:
# - die - Print to stderr and exit.
- # TODO: Do we want the callers to be able to set the env dir name?
- # TODO: + In that case, do we want to support env switching?
- # TODO: + In that case we want to make env_dir global.
- # TODO: Do we want the callers to override PYTHONPATH loaction?
-
root_path="${1-$CSIT_DIR}"
env_dir="${root_path}/env"
req_path=${2-$CSIT_DIR/requirements.txt}
set -exuo pipefail
# Fail if there are no files visible in ${DOWNLOAD_DIR}.
- # TODO: Do we need this as a function, if it is (almost) a one-liner?
#
# Variables read:
# - DOWNLOAD_DIR - Path to directory pybot takes the build to test from.
NODENESS="3n"
FLAVOR="skx"
;;
+ *"2n-dnv"*)
+ NODENESS="2n"
+ FLAVOR="dnv"
+ ;;
+ *"3n-dnv"*)
+ NODENESS="3n"
+ FLAVOR="dnv"
+ ;;
*"3n-tsh"*)
NODENESS="3n"
FLAVOR="tsh"
comment="${comment/perftest-3n/perftest}"
comment="${comment/perftest-hsw/perftest}"
comment="${comment/perftest-skx/perftest}"
+ comment="${comment/perftest-dnv/perftest}"
comment="${comment/perftest-tsh/perftest}"
tag_string="$(echo "${comment}" \
| grep -oE '(perftest$|perftest[[:space:]].+$)' || true)"
# Variables read:
# - TOPOLOGIES - Array of paths to topology yaml to attempt reservation on.
# - PYTHON_SCRIPTS_DIR - Path to directory holding the reservation script.
+ # - BUILD_TAG - Any string suitable as filename, identifying
+ # test run executing this function. May be unset.
+ # - BUILD_URL - Any string suitable as URL, identifying
+ # test run executing this function. May be unset.
# Variables set:
# - TOPOLOGIES - Array of paths to topologies, with failed cleanups removed.
# - WORKING_TOPOLOGY - Path to topology yaml file of the reserved testbed.
while [[ ${TOPOLOGIES[@]} ]]; do
for topo in "${TOPOLOGIES[@]}"; do
set +e
- python "${PYTHON_SCRIPTS_DIR}/topo_reservation.py" -t "${topo}"
+ scrpt="${PYTHON_SCRIPTS_DIR}/topo_reservation.py"
+ opts=("-t" "${topo}" "-r" "${BUILD_TAG:-Unknown}")
+ opts+=("-u" "${BUILD_URL:-Unknown}")
+ python "${scrpt}" "${opts[@]}"
result="$?"
set -e
if [[ "${result}" == "0" ]]; then
# - die - Print to stderr and exit.
all_options=("--outputdir" "${ARCHIVE_DIR}" "${PYBOT_ARGS[@]}")
+ all_options+=("--noncritical" "EXPECTED_FAILING")
all_options+=("${EXPANDED_TAGS[@]}")
pushd "${CSIT_DIR}" || die "Change directory operation failed."
set +e
- # TODO: Make robot tests not require "$(pwd)" == "${CSIT_DIR}".
pybot "${all_options[@]}" "${GENERATED_DIR}/tests/"
PYBOT_EXIT_STATUS="$?"
set -e
# Select default NIC
case "${TEST_CODE}" in
+ *"3n-dnv"* | *"2n-dnv"*)
+ DEFAULT_NIC='nic_intel-x553'
+ ;;
*"3n-tsh"*)
DEFAULT_NIC='nic_intel-x520-da2'
;;
# Not enough nic_intel-xxv710 to support double link tests.
test_tag_array+=("!3_node_double_link_topoANDnic_intel-xxv710")
;;
+ *"2n-dnv"*)
+ test_tag_array+=("!ipsechw")
+ test_tag_array+=("!memif")
+ test_tag_array+=("!srv6_proxy")
+ test_tag_array+=("!vhost")
+ test_tag_array+=("!vts")
+ ;;
+ *"3n-dnv"*)
+ test_tag_array+=("!memif")
+ test_tag_array+=("!srv6_proxy")
+ test_tag_array+=("!vhost")
+ test_tag_array+=("!vts")
+ ;;
*"3n-tsh"*)
test_tag_array+=("!ipsechw")
test_tag_array+=("!memif")
TOPOLOGIES=( "${TOPOLOGIES_DIR}"/*3n_skx*.yaml )
TOPOLOGIES_TAGS="3_node_*_link_topo"
;;
+ "2n_dnv")
+ TOPOLOGIES=( "${TOPOLOGIES_DIR}"/*2n_dnv*.yaml )
+ TOPOLOGIES_TAGS="2_node_single_link_topo"
+ ;;
+ "3n_dnv")
+ TOPOLOGIES=( "${TOPOLOGIES_DIR}"/*3n_dnv*.yaml )
+ TOPOLOGIES_TAGS="3_node_single_link_topo"
+ ;;
"3n_hsw")
TOPOLOGIES=( "${TOPOLOGIES_DIR}"/*3n_hsw*.yaml )
TOPOLOGIES_TAGS="3_node_single_link_topo"