mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2024-11-27 11:50:29 +00:00
Don't use BASH_SOURCE in cryptest.sh
This commit is contained in:
parent
ed7f4a0493
commit
3747e3d944
@ -257,7 +257,7 @@ if [[ (-z "$TMPDIR") ]]; then
|
||||
TMPDIR="$HOME/tmp"
|
||||
else
|
||||
echo "Please set TMPDIR to a valid directory"
|
||||
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -1949,19 +1949,19 @@ 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
|
||||
exit 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
|
||||
exit 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
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -1983,19 +1983,19 @@ 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
|
||||
exit 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
|
||||
exit 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
|
||||
exit 1
|
||||
fi
|
||||
echo
|
||||
fi
|
||||
@ -7168,7 +7168,7 @@ echo
|
||||
############################################
|
||||
# http://tldp.org/LDP/abs/html/exitcodes.html#EXITCODESREF
|
||||
if (( "$ECOUNT" == "0" )); then
|
||||
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 0 || return 0
|
||||
exit 0
|
||||
else
|
||||
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
|
||||
exit 1
|
||||
fi
|
||||
|
18
cryptest.sh
18
cryptest.sh
@ -257,7 +257,7 @@ if [[ (-z "$TMPDIR") ]]; then
|
||||
TMPDIR="$HOME/tmp"
|
||||
else
|
||||
echo "Please set TMPDIR to a valid directory"
|
||||
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -1949,19 +1949,19 @@ 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
|
||||
exit 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
|
||||
exit 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
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -1983,19 +1983,19 @@ 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
|
||||
exit 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
|
||||
exit 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
|
||||
exit 1
|
||||
fi
|
||||
echo
|
||||
fi
|
||||
@ -7168,7 +7168,7 @@ echo
|
||||
############################################
|
||||
# http://tldp.org/LDP/abs/html/exitcodes.html#EXITCODESREF
|
||||
if (( "$ECOUNT" == "0" )); then
|
||||
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 0 || return 0
|
||||
exit 0
|
||||
else
|
||||
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
|
||||
exit 1
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user