Signed-off-by: Martin Schwenke <martin@meltin.net>
# 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"))
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