From 7fc3527e1d5b3451f1983a38ebd348c3cb44728a Mon Sep 17 00:00:00 2001 From: Timofey Turenko Date: Thu, 18 Apr 2019 12:10:24 +0300 Subject: [PATCH] Check for Docker in run_npm_test.sh Lack of Docker can cause build failure To avoid it if Docker is not available test is not started, simply returns 0 It is hard to make Docker installation reliable especially for very old or very new distros --- test/run_npm_test.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/run_npm_test.sh b/test/run_npm_test.sh index 8cd614f5b..ef3c855df 100755 --- a/test/run_npm_test.sh +++ b/test/run_npm_test.sh @@ -12,6 +12,21 @@ then exit 1 fi +# Prevent failures in case if Docker is not available +command -v docker +if [ $? != 0 ] +then + echo "Docker is not available, skipping the test" + exit 0 +fi + +command -v docker-compose +if [ $? != 0 ] +then + echo "docker-compose is not available, skipping the test" + exit 0 +fi + srcdir=$1 testsrc=$2 testdir=$3