diff --git a/scripts/collect-test-info.sh b/scripts/collect-test-info.sh index 3039b1d96..e033f2527 100755 --- a/scripts/collect-test-info.sh +++ b/scripts/collect-test-info.sh @@ -45,3 +45,5 @@ sudo chown $USER ${LOG_LOCATION}/ironic-conductor.log # In CI scenarios, we want other users to be able to read the logs. sudo chmod o+r ${LOG_LOCATION}/ironic-api.log sudo chmod o+r ${LOG_LOCATION}/ironic-conductor.log + +exit 0 diff --git a/scripts/test-bifrost.sh b/scripts/test-bifrost.sh index 408d86fe9..b1da20d4f 100755 --- a/scripts/test-bifrost.sh +++ b/scripts/test-bifrost.sh @@ -93,6 +93,11 @@ elif [ ${ENABLE_KEYSTONE} = "true" ]; then CLOUD_CONFIG="-e cloud_name=bifrost" fi +logs_on_exit() { + $SCRIPT_HOME/collect-test-info.sh +} +trap logs_on_exit EXIT + # Change working directory cd $BIFROST_HOME/playbooks @@ -157,6 +162,4 @@ if [ $EXITCODE != 0 ]; then echo "****************************" fi -$SCRIPT_HOME/collect-test-info.sh - exit $EXITCODE