From c57f8096542cfd433ff8a5c484ef6a7282781912 Mon Sep 17 00:00:00 2001 From: "Julian M. Kunkel" Date: Sat, 7 Jul 2018 00:20:07 +0100 Subject: [PATCH] Test scripts can be run from any directory. --- testing/docker/prepare.sh | 5 +++++ testing/docker/run-all-tests.sh | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/testing/docker/prepare.sh b/testing/docker/prepare.sh index c8ed22b..74ecd31 100755 --- a/testing/docker/prepare.sh +++ b/testing/docker/prepare.sh @@ -1,4 +1,9 @@ #!/bin/bash +cd "${0%/*}" +if [[ ! -e run-all-tests.sh ]] ; then + echo "Error, this script must run from the ./testing/docker directory" + exit 1 +fi echo "Checking docker" docker ps diff --git a/testing/docker/run-all-tests.sh b/testing/docker/run-all-tests.sh index 30d2deb..466116f 100755 --- a/testing/docker/run-all-tests.sh +++ b/testing/docker/run-all-tests.sh @@ -1,6 +1,11 @@ #!/bin/bash # This script runs the testscript for all supported docker images +cd "${0%/*}" +if [[ ! -e run-all-tests.sh ]] ; then + echo "Error, this script must run from the ./testing/docker directory" + exit 1 +fi TARGET=../../build-docker mkdir -p $TARGET