[Telepathy-commits] [telepathy-mission-control/master] Twisted tests: delete accounts.cfg file for each test
Alban Crequy
alban.crequy at collabora.co.uk
Thu Nov 20 07:43:10 PST 2008
---
test/twisted/accounts/README | 2 +-
test/twisted/tools/exec-with-log.sh.in | 12 ++++++++++++
2 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/test/twisted/accounts/README b/test/twisted/accounts/README
index a8b118f..27bd48f 100644
--- a/test/twisted/accounts/README
+++ b/test/twisted/accounts/README
@@ -1,3 +1,3 @@
Directory for twisted test to write the accounts.cfg file. $MC_ACCOUNT_DIR is
-set to this directory in the twisted environment.
+set to this directory in the twisted environment. accounts.cfg is deleted before running any test.
diff --git a/test/twisted/tools/exec-with-log.sh.in b/test/twisted/tools/exec-with-log.sh.in
index e10c197..e65cc40 100644
--- a/test/twisted/tools/exec-with-log.sh.in
+++ b/test/twisted/tools/exec-with-log.sh.in
@@ -2,6 +2,7 @@
cd "@abs_top_builddir@/test/twisted/tools"
+# Run Mission Control in a private environment
export MC_DEBUG=2
export MC_CHANDLERS_DIR="@abs_top_builddir@/test/twisted/chandlers"
export MC_MANAGER_DIR="@abs_top_builddir@/test/twisted/managers"
@@ -17,4 +18,15 @@ if test -n "$MISSIONCONTROL_TEST_VALGRIND"; then
MISSIONCONTROL_WRAPPER="valgrind --leak-check=full --num-callers=20"
fi
+# Delete previous Mission Control accounts
+if [ -f "@abs_top_builddir@/test/twisted/accounts/accounts.cfg" ] ; then
+ echo "Delete @abs_top_builddir@/test/twisted/accounts/accounts.cfg"
+ rm -f -- "@abs_top_builddir@/test/twisted/accounts/accounts.cfg"
+fi
+if [ -e "@abs_top_builddir@/test/twisted/accounts/accounts.cfg" ] ; then
+ echo "Error: accounts.cfg file exists:"
+ echo "@abs_top_builddir@/test/twisted/accounts/accounts.cfg"
+ exit 1
+fi
+
exec $MISSIONCONTROL_WRAPPER @abs_top_builddir@/server/mission-control
--
1.5.6.5
More information about the Telepathy-commits
mailing list