summaryrefslogtreecommitdiffstats
path: root/ctdb/tests/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'ctdb/tests/scripts')
-rw-r--r--ctdb/tests/scripts/common.sh6
-rwxr-xr-xctdb/tests/scripts/run_tests4
2 files changed, 5 insertions, 5 deletions
diff --git a/ctdb/tests/scripts/common.sh b/ctdb/tests/scripts/common.sh
index 481ef298c6..2d7b2e292e 100644
--- a/ctdb/tests/scripts/common.sh
+++ b/ctdb/tests/scripts/common.sh
@@ -2,7 +2,11 @@
# Common variables and functions for all CTDB tests.
-export TEST_SUBDIR=$(dirname $0)
+# This expands the most probable problem cases like "." and "..".
+TEST_SUBDIR=$(dirname "$0")
+if [ $(dirname "$TEST_SUBDIR") = "." ] ; then
+ TEST_SUBDIR=$(cd "$TEST_SUBDIR" ; pwd)
+fi
CTDB_DIR=$(dirname $(dirname "$TEST_SUBDIR"))
diff --git a/ctdb/tests/scripts/run_tests b/ctdb/tests/scripts/run_tests
index 5efe6e4147..2fc6979961 100755
--- a/ctdb/tests/scripts/run_tests
+++ b/ctdb/tests/scripts/run_tests
@@ -168,10 +168,6 @@ run_one_test ()
for f ; do
if [ -d "$f" ] ; then
- # This expands the most probable problem cases like "." and "..".
- if [ $(dirname "$f") = "." ] ; then
- f=$(cd "$f" ; pwd)
- fi
for i in $(ls "${f%/}/"*".sh" 2>/dev/null) ; do
run_one_test "$i"
done