Allow whck override with bin/whck or whck from env

otherwise explicit whck is not passed to test_web.sh which will try
to build from whck submodule
This commit is contained in:
southerntofu 2022-02-22 18:53:27 +01:00
parent c6142711dd
commit cb339f0e75
1 changed files with 10 additions and 1 deletions

View File

@ -17,9 +17,18 @@ fi
# If bin/server succeeds, it contains a path to the executable
# Otherwise it may contain build error messages
server="$("$BASEDIR"/bin/server)"
# Try to detect a whck override
if [ -f "$BASEDIR"/bin/whck ]; then
whck="$BASEDIR"/bin/whck
elif which "whck"; then
whck="$(which "whck")"
else
whck=""
if [ $? -eq 0 ]; then
# Let test_web.sh figure out the path to whck
"$BASEDIR"/spec/test_web.sh "$server"
"$BASEDIR"/spec/test_web.sh "$server" "$whck"
status=$?
else
status=1