From: Christian Hofstaedtler Date: Sat, 5 Jul 2014 12:32:09 +0000 (+0200) Subject: Fix remotebackend tests without socat X-Git-Tag: auth-3.4.0-rc1~102^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=da23e19dad7566d78fd6a3f71b08ea2d2dfe6cff;p=thirdparty%2Fpdns.git Fix remotebackend tests without socat When socat is not installed, the testrunner would fail instead of exiting without testing as planned. This also adds `set -x` to the testrunner for future error diagnosis. --- diff --git a/modules/remotebackend/testrunner.sh b/modules/remotebackend/testrunner.sh index e607351dc7..f1c0d8deb0 100755 --- a/modules/remotebackend/testrunner.sh +++ b/modules/remotebackend/testrunner.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash - +set -x new_api=0 mode=$1 @@ -76,8 +76,8 @@ function stop_zeromq() { } function start_unix() { - if [ ! -x $socat ]; then - echo "Cannot find socat - cannot test (non-fatal)" + if [ -z "$socat" -o ! -x "$socat" ]; then + echo "Cannot find socat - skipping test (non-fatal)" exit 0 fi @@ -144,7 +144,7 @@ case "$mode" in stop_zeromq ;; *) - echo "Usage: $0 test_remotebackend_(pipe|http|post|json)" + echo "Usage: $0 test_remotebackend_(pipe|unix|http|post|json|zeromq)" exit 1 ;; esac