diff options
author | pmikus <peter.mikus@protonmail.ch> | 2023-11-02 05:45:53 +0000 |
---|---|---|
committer | pmikus <peter.mikus@protonmail.ch> | 2023-11-02 05:45:53 +0000 |
commit | 49b983001c58084990321f31f17590fc18122196 (patch) | |
tree | b3b1d4f0a284229679621703cfeaed94619d135a | |
parent | 4e0ee1b55e6db6d54ad468df42044e853c9272c4 (diff) |
fix(core): Remove unwanted code
Signed-off-by: pmikus <peter.mikus@protonmail.ch>
Change-Id: Ib03e469da3e93944ae7fb612e7a71df36f711cdd
-rw-r--r-- | resources/libraries/bash/function/common.sh | 50 |
1 files 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 } |