diff --git a/TestScripts/cryptest.sh b/TestScripts/cryptest.sh index fd8c530b..000ea2b5 100755 --- a/TestScripts/cryptest.sh +++ b/TestScripts/cryptest.sh @@ -1945,14 +1945,20 @@ if true; then if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" + # Stop now if things are broke + [[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1 else ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then echo "ERROR: failed to execute validation suite" | tee -a "$TEST_RESULTS" + # Stop now if things are broke + [[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1 fi ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then echo "ERROR: failed to execute test vectors" | tee -a "$TEST_RESULTS" + # Stop now if things are broke + [[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1 fi fi @@ -1973,14 +1979,20 @@ if true; then if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" + # Stop now if things are broke + [[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1 else ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then echo "ERROR: failed to execute validation suite" | tee -a "$TEST_RESULTS" + # Stop now if things are broke + [[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1 fi ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then echo "ERROR: failed to execute test vectors" | tee -a "$TEST_RESULTS" + # Stop now if things are broke + [[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1 fi echo fi diff --git a/cryptest.sh b/cryptest.sh index fd8c530b..000ea2b5 100755 --- a/cryptest.sh +++ b/cryptest.sh @@ -1945,14 +1945,20 @@ if true; then if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" + # Stop now if things are broke + [[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1 else ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then echo "ERROR: failed to execute validation suite" | tee -a "$TEST_RESULTS" + # Stop now if things are broke + [[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1 fi ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then echo "ERROR: failed to execute test vectors" | tee -a "$TEST_RESULTS" + # Stop now if things are broke + [[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1 fi fi @@ -1973,14 +1979,20 @@ if true; then if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" + # Stop now if things are broke + [[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1 else ./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS" if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then echo "ERROR: failed to execute validation suite" | tee -a "$TEST_RESULTS" + # Stop now if things are broke + [[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1 fi ./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS" if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then echo "ERROR: failed to execute test vectors" | tee -a "$TEST_RESULTS" + # Stop now if things are broke + [[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1 fi echo fi