Don't use BASH_SOURCE in cryptest.sh
parent
ed7f4a0493
commit
3747e3d944
|
|
@ -257,7 +257,7 @@ if [[ (-z "$TMPDIR") ]]; then
|
||||||
TMPDIR="$HOME/tmp"
|
TMPDIR="$HOME/tmp"
|
||||||
else
|
else
|
||||||
echo "Please set TMPDIR to a valid directory"
|
echo "Please set TMPDIR to a valid directory"
|
||||||
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -1949,19 +1949,19 @@ if true; then
|
||||||
if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then
|
if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then
|
||||||
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
|
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
|
||||||
# Stop now if things are broke
|
# Stop now if things are broke
|
||||||
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
|
exit 1
|
||||||
else
|
else
|
||||||
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
|
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
|
||||||
if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then
|
if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then
|
||||||
echo "ERROR: failed to execute validation suite" | tee -a "$TEST_RESULTS"
|
echo "ERROR: failed to execute validation suite" | tee -a "$TEST_RESULTS"
|
||||||
# Stop now if things are broke
|
# Stop now if things are broke
|
||||||
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
|
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
|
||||||
if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then
|
if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then
|
||||||
echo "ERROR: failed to execute test vectors" | tee -a "$TEST_RESULTS"
|
echo "ERROR: failed to execute test vectors" | tee -a "$TEST_RESULTS"
|
||||||
# Stop now if things are broke
|
# Stop now if things are broke
|
||||||
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -1983,19 +1983,19 @@ if true; then
|
||||||
if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then
|
if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then
|
||||||
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
|
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
|
||||||
# Stop now if things are broke
|
# Stop now if things are broke
|
||||||
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
|
exit 1
|
||||||
else
|
else
|
||||||
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
|
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
|
||||||
if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then
|
if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then
|
||||||
echo "ERROR: failed to execute validation suite" | tee -a "$TEST_RESULTS"
|
echo "ERROR: failed to execute validation suite" | tee -a "$TEST_RESULTS"
|
||||||
# Stop now if things are broke
|
# Stop now if things are broke
|
||||||
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
|
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
|
||||||
if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then
|
if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then
|
||||||
echo "ERROR: failed to execute test vectors" | tee -a "$TEST_RESULTS"
|
echo "ERROR: failed to execute test vectors" | tee -a "$TEST_RESULTS"
|
||||||
# Stop now if things are broke
|
# Stop now if things are broke
|
||||||
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
@ -7168,7 +7168,7 @@ echo
|
||||||
############################################
|
############################################
|
||||||
# http://tldp.org/LDP/abs/html/exitcodes.html#EXITCODESREF
|
# http://tldp.org/LDP/abs/html/exitcodes.html#EXITCODESREF
|
||||||
if (( "$ECOUNT" == "0" )); then
|
if (( "$ECOUNT" == "0" )); then
|
||||||
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 0 || return 0
|
exit 0
|
||||||
else
|
else
|
||||||
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
18
cryptest.sh
18
cryptest.sh
|
|
@ -257,7 +257,7 @@ if [[ (-z "$TMPDIR") ]]; then
|
||||||
TMPDIR="$HOME/tmp"
|
TMPDIR="$HOME/tmp"
|
||||||
else
|
else
|
||||||
echo "Please set TMPDIR to a valid directory"
|
echo "Please set TMPDIR to a valid directory"
|
||||||
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -1949,19 +1949,19 @@ if true; then
|
||||||
if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then
|
if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then
|
||||||
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
|
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
|
||||||
# Stop now if things are broke
|
# Stop now if things are broke
|
||||||
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
|
exit 1
|
||||||
else
|
else
|
||||||
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
|
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
|
||||||
if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then
|
if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then
|
||||||
echo "ERROR: failed to execute validation suite" | tee -a "$TEST_RESULTS"
|
echo "ERROR: failed to execute validation suite" | tee -a "$TEST_RESULTS"
|
||||||
# Stop now if things are broke
|
# Stop now if things are broke
|
||||||
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
|
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
|
||||||
if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then
|
if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then
|
||||||
echo "ERROR: failed to execute test vectors" | tee -a "$TEST_RESULTS"
|
echo "ERROR: failed to execute test vectors" | tee -a "$TEST_RESULTS"
|
||||||
# Stop now if things are broke
|
# Stop now if things are broke
|
||||||
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -1983,19 +1983,19 @@ if true; then
|
||||||
if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then
|
if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then
|
||||||
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
|
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
|
||||||
# Stop now if things are broke
|
# Stop now if things are broke
|
||||||
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
|
exit 1
|
||||||
else
|
else
|
||||||
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
|
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
|
||||||
if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then
|
if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then
|
||||||
echo "ERROR: failed to execute validation suite" | tee -a "$TEST_RESULTS"
|
echo "ERROR: failed to execute validation suite" | tee -a "$TEST_RESULTS"
|
||||||
# Stop now if things are broke
|
# Stop now if things are broke
|
||||||
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
|
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
|
||||||
if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then
|
if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then
|
||||||
echo "ERROR: failed to execute test vectors" | tee -a "$TEST_RESULTS"
|
echo "ERROR: failed to execute test vectors" | tee -a "$TEST_RESULTS"
|
||||||
# Stop now if things are broke
|
# Stop now if things are broke
|
||||||
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
@ -7168,7 +7168,7 @@ echo
|
||||||
############################################
|
############################################
|
||||||
# http://tldp.org/LDP/abs/html/exitcodes.html#EXITCODESREF
|
# http://tldp.org/LDP/abs/html/exitcodes.html#EXITCODESREF
|
||||||
if (( "$ECOUNT" == "0" )); then
|
if (( "$ECOUNT" == "0" )); then
|
||||||
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 0 || return 0
|
exit 0
|
||||||
else
|
else
|
||||||
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue