summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkos Chandras <mchandras@suse.de>2017-02-16 23:29:13 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-02-16 23:29:13 +0000
commit4256b90cce33dd8e54b5ebbc3cc725df20faf5ba (patch)
tree083d475e941c9eeb243eda0946c1181c0a11e44b
parent95f77d6645caf00c2e5544707010ef4e51dbb13e (diff)
parent62ca1cf05a8930be33583aebb18716ce93f1a9f8 (diff)
Merge "prototypes: bifrost: Collect logs even if deployment fails"
-rwxr-xr-xprototypes/bifrost/scripts/test-bifrost-deployment.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/prototypes/bifrost/scripts/test-bifrost-deployment.sh b/prototypes/bifrost/scripts/test-bifrost-deployment.sh
index 914a906f4..3e2381fea 100755
--- a/prototypes/bifrost/scripts/test-bifrost-deployment.sh
+++ b/prototypes/bifrost/scripts/test-bifrost-deployment.sh
@@ -79,6 +79,11 @@ source ${ANSIBLE_INSTALL_ROOT}/ansible/hacking/env-setup
ANSIBLE=$(which ansible-playbook)
set -x -o nounset
+logs_on_exit() {
+ $SCRIPT_HOME/collect-test-info.sh
+}
+trap logs_on_exit EXIT
+
# Change working directory
cd $BIFROST_HOME/playbooks
@@ -129,6 +134,4 @@ if [ $EXITCODE != 0 ]; then
echo "****************************"
fi
-$SCRIPT_HOME/collect-test-info.sh
-
exit $EXITCODE