[tracker] Funtional tests: set XDG variables to /tmp directories
- From: Ivan Frade <ifrade src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] Funtional tests: set XDG variables to /tmp directories
- Date: Mon, 10 May 2010 16:23:42 +0000 (UTC)
commit 5bef3cf9eaaf0ca2062fc2bd9d5092a14f4e2862
Author: Ivan Frade <ivan frade nokia com>
Date: Mon May 10 19:13:01 2010 +0300
Funtional tests: set XDG variables to /tmp directories
It is not nice that a test destroys the real databases
tests/functional-tests/helper-test-data.sh | 21 +++++++++++++++++++--
1 files changed, 19 insertions(+), 2 deletions(-)
---
diff --git a/tests/functional-tests/helper-test-data.sh b/tests/functional-tests/helper-test-data.sh
index cf0015e..117069d 100644
--- a/tests/functional-tests/helper-test-data.sh
+++ b/tests/functional-tests/helper-test-data.sh
@@ -23,5 +23,22 @@ else
echo "TTL files already in place"
fi
-echo "Cleaning tracker DBs and restarting"
-tracker-control -rs
+echo "Killing tracker-processes"
+tracker-control -k
+# Give time to dbus to free the name!
+sleep 2
+
+
+echo "Setting temporal directories for the DBs"
+if [[ -e /tmp/xdg-data-home ]]; then
+ rm -rf /tmp/xdg-data-home
+fi
+mkdir /tmp/xdg-data-home
+export XDG_DATA_HOME=/tmp/xdg-data-home/
+
+if [[ -e /tmp/xdg-cache-home ]]; then
+ rm -rf /tmp/xdg-cache-home
+fi
+mkdir /tmp/xdg-cache-home
+export XDG_CACHE_HOME=/tmp/xdg-cache-home/
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]