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>
hostname=$(grep search /etc/resolv.conf | cut -d' ' -f3) || die
ssh="ssh root@${hostname} -p 6022"
run="activate_wrapper ${NODENESS} ${FLAVOR} ${device_image}"
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!"
}
# backtics to avoid https://midnight-commander.org/ticket/2142
env_vars=`${ssh} "$(declare -f); ${run}"` || {
die "Topology reservation via shim-dcr failed!"
}
set -a
source <(echo "$env_vars" | grep -v /usr/bin/docker) || {
die "Source failed!"
set -a
source <(echo "$env_vars" | grep -v /usr/bin/docker) || {
die "Source failed!"
hostname=$(grep search /etc/resolv.conf | cut -d' ' -f3) || die
ssh="ssh root@${hostname} -p 6022"
env_vars=$(env | grep CSIT_ | tr '\n' ' ' ) || die
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!"
}
${ssh} "$(declare -f); deactivate_wrapper ${env_vars}" || {
die "Topology cleanup via shim-dcr failed!"
}
;;
"1n_vbox")
enter_mutex || die
;;
"1n_vbox")
enter_mutex || die