fix runtime test on linux

This commit is contained in:
Omar Polo 2021-01-17 11:49:32 +00:00
parent 364f10dbcd
commit b3927be446
1 changed files with 11 additions and 1 deletions

View File

@ -12,7 +12,7 @@ get() {
# check "path" "expected-sha256"
check() {
got=`get "$1" | sha256`
got=`get "$1" | $sha | awk '{print \$1}'`
if [ "$got" '!=' "$2" ]; then
echo "FAIL $1 (with_cgi: $with_cgi)"
quit
@ -26,6 +26,16 @@ quit() {
exit ${1:-1}
}
# check for sha256sum (linux) or sha256 (OpenBSD)
if which sha256sum >/dev/null; then
sha=sha256sum
elif which sha256 >/dev/null; then
sha=sha256
else
echo "No sha256/sha256sum binary available"
exit 1
fi
with_cgi="no"
./../gmid -c no-cgi.conf 2>/dev/null &