tests: detect openconnect's path and fail if not found

Resolves: #311

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
This commit is contained in:
Nikos Mavrogiannopoulos
2020-06-11 22:26:30 +02:00
parent 62cd787536
commit fdb80bb23e

View File

@@ -23,11 +23,11 @@
builddir=${builddir:-.}
OPENCONNECT=${OPENCONNECT:-/usr/sbin/openconnect}
OPENCONNECT=${OPENCONNECT:-$(which openconnect)}
if ! test -x ${OPENCONNECT};then
if test -z "${OPENCONNECT}" || ! test -x ${OPENCONNECT};then
echo "You need openconnect to run this test"
exit 77
exit 1
fi
if test -z "$NO_NEED_ROOT";then