summaryrefslogtreecommitdiff
path: root/ctdb/tests/run_tests.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ctdb/tests/run_tests.sh')
-rwxr-xr-xctdb/tests/run_tests.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/ctdb/tests/run_tests.sh b/ctdb/tests/run_tests.sh
index b74d7c5f193..5cca297fd64 100755
--- a/ctdb/tests/run_tests.sh
+++ b/ctdb/tests/run_tests.sh
@@ -181,6 +181,13 @@ run_one_test ()
{
local f="$1"
+ CTDB_TEST_SUITE_DIR=$(dirname "$f")
+ export CTDB_TEST_SUITE_DIR
+ # This expands the most probable problem cases like "." and "..".
+ if [ "$(dirname "$CTDB_TEST_SUITE_DIR")" = "." ] ; then
+ CTDB_TEST_SUITE_DIR=$(cd "$CTDB_TEST_SUITE_DIR" && pwd)
+ fi
+
tests_total=$((tests_total + 1))
ctdb_test_run "$f" | show_progress