From 8a8c221286cbf37f6f6a853a5fc348e3b09a2a7c Mon Sep 17 00:00:00 2001 From: Pierre Riteau <pierre@stackhpc.com> Date: Thu, 10 Sep 2020 17:11:57 +0200 Subject: [PATCH] Fix test-ironic.sh not catching errors Change-Id: Ia4626479e092be8b033bcd4e75e78a33167423d3 --- tests/test-ironic.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test-ironic.sh b/tests/test-ironic.sh index b92c1407f6..72fdc8e5a3 100755 --- a/tests/test-ironic.sh +++ b/tests/test-ironic.sh @@ -131,12 +131,14 @@ function test_ironic_logged { function test_ironic { echo "Testing Ironic" - if ! test_ironic_logged > /tmp/logs/ansible/test-ironic 2>&1; then + test_ironic_logged > /tmp/logs/ansible/test-ironic 2>&1 + result=$? + if [[ $result != 0 ]]; then echo "Testing Ironic failed. See ansible/test-ironic for details" - return 1 else echo "Successfully tested Ironic. See ansible/test-ironic for details" fi + return $result } test_ironic