From 49b983001c58084990321f31f17590fc18122196 Mon Sep 17 00:00:00 2001 From: pmikus Date: Thu, 2 Nov 2023 05:45:53 +0000 Subject: [PATCH] fix(core): Remove unwanted code Signed-off-by: pmikus Change-Id: Ib03e469da3e93944ae7fb612e7a71df36f711cdd --- resources/libraries/bash/function/common.sh | 50 +++++++++++++---------------- 1 file changed, 22 insertions(+), 28 deletions(-) diff --git a/resources/libraries/bash/function/common.sh b/resources/libraries/bash/function/common.sh index 9db0ac8dcb..8296e8176f 100644 --- a/resources/libraries/bash/function/common.sh +++ b/resources/libraries/bash/function/common.sh @@ -311,37 +311,31 @@ function deactivate_docker_topology () { # Variables read: # - NODENESS - Node multiplicity of desired testbed. # - FLAVOR - Node flavor string, usually describing the processor. - # - CSIT_NO_CLEANUP - Variable to disable cleaning up the environment. set -exuo pipefail - if [[ ${CSIT_NO_CLEANUP:-0} -eq 0 ]]; then - case_text="${NODENESS}_${FLAVOR}" - case "${case_text}" in - "1n_skx" | "1n_tx2" | "1n_spr") - ssh="ssh root@172.17.0.1 -p 6022" - env_vars=$(env | grep CSIT_ | tr '\n' ' ' ) || die - # The "declare -f" output is long and boring. - set +x - ${ssh} "$(declare -f); deactivate_wrapper ${env_vars}" || { - die "Topology cleanup via shim-dcr failed!" - } - set -x - ;; - "1n_vbox") - enter_mutex || die - clean_environment || { - die "Topology cleanup locally failed!" - } - exit_mutex || die - ;; - *) - die "Unknown specification: ${case_text}!" - esac - else - echo "CSIT_NO_CLEANUP environment variable is set" - echo "Environment Cleanup Abandoned" - fi + case_text="${NODENESS}_${FLAVOR}" + case "${case_text}" in + "1n_skx" | "1n_tx2" | "1n_spr") + ssh="ssh root@172.17.0.1 -p 6022" + env_vars=$(env | grep CSIT_ | tr '\n' ' ' ) || die + # The "declare -f" output is long and boring. + set +x + ${ssh} "$(declare -f); deactivate_wrapper ${env_vars}" || { + die "Topology cleanup via shim-dcr failed!" + } + set -x + ;; + "1n_vbox") + enter_mutex || die + clean_environment || { + die "Topology cleanup locally failed!" + } + exit_mutex || die + ;; + *) + die "Unknown specification: ${case_text}!" + esac } -- 2.16.6