From 7065702ba12b7e891b5a4e28c191d56b26cc27d5 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Thu, 5 Apr 2018 18:38:43 -0400 Subject: [PATCH] Fix return codes from cryptest-ios.sh --- TestScripts/cryptest-android.sh | 4 +++- TestScripts/cryptest-ios.sh | 9 +++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/TestScripts/cryptest-android.sh b/TestScripts/cryptest-android.sh index 2490c766..1bf35e44 100755 --- a/TestScripts/cryptest-android.sh +++ b/TestScripts/cryptest-android.sh @@ -59,5 +59,7 @@ cat /tmp/build.log # let the script fail if any of the builds failed if [ -f /tmp/build.failed ]; then - exit 1 + [[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1 fi + +[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 0 || return 0 diff --git a/TestScripts/cryptest-ios.sh b/TestScripts/cryptest-ios.sh index 8e4fca4f..a7cf00dc 100755 --- a/TestScripts/cryptest-ios.sh +++ b/TestScripts/cryptest-ios.sh @@ -50,3 +50,12 @@ do touch /tmp/build.failed fi done + +cat /tmp/build.log + +# let the script fail if any of the builds failed +if [ -f /tmp/build.failed ]; then + [[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1 +fi + +[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 0 || return 0