summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2012-04-24 14:02:28 +1000
committerMartin Schwenke <martin@meltin.net>2012-04-27 15:42:42 +1000
commitcb0995906327bf137b9ae402ef25e5b7e6bfd59e (patch)
treed26dee754a5d22661dc6a85ea848ef06fb25d389
parentb7b6f10e9be4a610866b3aee10491e3292ba09df (diff)
downloadsamba-cb0995906327bf137b9ae402ef25e5b7e6bfd59e.tar.gz
samba-cb0995906327bf137b9ae402ef25e5b7e6bfd59e.tar.xz
samba-cb0995906327bf137b9ae402ef25e5b7e6bfd59e.zip
tests: Unit tests should use $TEST_VAR_DIR
This directory is already guaranteed to be absolute, so no check is needed. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 78f6f209eb15102f4e8baa9106583df0ef4bb693)
-rw-r--r--ctdb/tests/eventscripts/scripts/local.sh9
-rw-r--r--ctdb/tests/onnode/scripts/local.sh2
2 files changed, 3 insertions, 8 deletions
diff --git a/ctdb/tests/eventscripts/scripts/local.sh b/ctdb/tests/eventscripts/scripts/local.sh
index 4c2d8fe6dd..79d0ea053a 100644
--- a/ctdb/tests/eventscripts/scripts/local.sh
+++ b/ctdb/tests/eventscripts/scripts/local.sh
@@ -29,8 +29,8 @@ else
fi
export CTDB_BASE
-export EVENTSCRIPTS_TESTS_VAR_DIR="${TEST_SUBDIR}/var"
-if [ "$EVENTSCRIPTS_TESTS_VAR_DIR" != "/var" ] ; then
+export EVENTSCRIPTS_TESTS_VAR_DIR="${TEST_VAR_DIR}/unit_eventscripts"
+if [ "$EVENTSCRIPTS_TESTS_VAR_DIR" != "/unit_eventscripts" ] ; then
rm -r "$EVENTSCRIPTS_TESTS_VAR_DIR"
fi
mkdir -p "$EVENTSCRIPTS_TESTS_VAR_DIR"
@@ -67,11 +67,6 @@ setup_generic ()
for i in $(seq 1 3) ; do
_s="${EVENTSCRIPTS_TESTS_VAR_DIR}/shares/${i}_existing"
mkdir -p "$_s"
- # Shares must begin with /
- case "$_s" in
- /*) : ;;
- *) _s="${PWD}/$_s"
- esac
FAKE_SHARES="${FAKE_SHARES}${FAKE_SHARES:+ }${_s}"
done
diff --git a/ctdb/tests/onnode/scripts/local.sh b/ctdb/tests/onnode/scripts/local.sh
index 35fd013540..9973a55563 100644
--- a/ctdb/tests/onnode/scripts/local.sh
+++ b/ctdb/tests/onnode/scripts/local.sh
@@ -23,7 +23,7 @@ fi
export CTDB_NODES_FILE
-export ONNODE_TESTS_VAR_DIR="${TEST_SUBDIR}/var"
+export ONNODE_TESTS_VAR_DIR="${TEST_VAR_DIR}/unit_onnode"
mkdir -p "$ONNODE_TESTS_VAR_DIR"
if [ -z "$CTDB_BASE" ] ; then