From 5f15b4e0409bacfba2d843bd25ad71f093432287 Mon Sep 17 00:00:00 2001 From: Alberto Bertogli Date: Thu, 22 Sep 2016 11:12:40 +0100 Subject: [PATCH] test: Skip exim test if the binary is not found The exim test requires a bit more preparation than the rest, so skip it if the binary is not found or not working properly. --- test/t-02-exim/run.sh | 5 +++++ test/util/lib.sh | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/test/t-02-exim/run.sh b/test/t-02-exim/run.sh index f689395..880c4fd 100755 --- a/test/t-02-exim/run.sh +++ b/test/t-02-exim/run.sh @@ -27,6 +27,11 @@ set -e init +if ! .exim4/exim4 --version > /dev/null; then + skip "(exim4 binary at .exim4/exim4 is not functional)" + exit 0 +fi + # Create a temporary directory for exim4 to use, and generate the exim4 # config based on the template. mkdir -p .exim4 diff --git a/test/util/lib.sh b/test/util/lib.sh index 0dfd423..3ea873e 100644 --- a/test/util/lib.sh +++ b/test/util/lib.sh @@ -58,6 +58,10 @@ function success() { echo "SUCCESS" } +function skip() { + echo "SKIPPED" $* +} + # Wait until there's something listening on the given port. function wait_until_ready() { PORT=$1