From da23e19dad7566d78fd6a3f71b08ea2d2dfe6cff Mon Sep 17 00:00:00 2001 From: Christian Hofstaedtler Date: Sat, 5 Jul 2014 14:32:09 +0200 Subject: [PATCH] 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. --- modules/remotebackend/testrunner.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 -- 2.47.2