diff options
author | Vratko Polak <vrpolak@cisco.com> | 2019-12-13 18:54:31 +0100 |
---|---|---|
committer | Vratko Polak <vrpolak@cisco.com> | 2019-12-13 18:54:31 +0100 |
commit | 722aaac15c0b01f0ab5a32084a58c2dd81fcac99 (patch) | |
tree | 7118fa2b005b34a5463626848579e4fdbdd92a2f /resources/libraries/bash/function | |
parent | f9b8be87e9564f3cc5e0664803ef032126468e68 (diff) |
Reduce spam from device bootstrap
It uses "declare -f" to paste the complete common.sh file. Twice.
The output from ssh remote side still remains visible,
but avoiding the spam should ease scrolling to Robot console output.
Change-Id: I746484ada7650a6dfa6794e76550757af5413a82
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources/libraries/bash/function')
-rw-r--r-- | resources/libraries/bash/function/common.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/resources/libraries/bash/function/common.sh b/resources/libraries/bash/function/common.sh index 86659138bc..f3e86164e1 100644 --- a/resources/libraries/bash/function/common.sh +++ b/resources/libraries/bash/function/common.sh @@ -53,10 +53,13 @@ function activate_docker_topology () { hostname=$(grep search /etc/resolv.conf | cut -d' ' -f3) || die ssh="ssh root@${hostname} -p 6022" run="activate_wrapper ${NODENESS} ${FLAVOR} ${device_image}" + # The "declare -f" output is long and boring. + set +x # backtics to avoid https://midnight-commander.org/ticket/2142 env_vars=`${ssh} "$(declare -f); ${run}"` || { die "Topology reservation via shim-dcr failed!" } + set -x set -a source <(echo "$env_vars" | grep -v /usr/bin/docker) || { die "Source failed!" @@ -332,9 +335,12 @@ function deactivate_docker_topology () { hostname=$(grep search /etc/resolv.conf | cut -d' ' -f3) || die ssh="ssh root@${hostname} -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 |