[Xfce4-commits] <midori:master> Reset folders before both successful run and re-run
Christian Dywan
noreply at xfce.org
Sun Dec 16 15:12:04 CET 2012
Updating branch refs/heads/master
to 5f7cc2a801ed77a73dbc7c28605ddf98fb192024 (commit)
from 2997c1fede969304ad5cb6a978cc6d5c5eb7c479 (commit)
commit 5f7cc2a801ed77a73dbc7c28605ddf98fb192024
Author: Christian Dywan <christian at twotoasts.de>
Date: Sun Dec 16 14:24:57 2012 +0100
Reset folders before both successful run and re-run
Not before individual tests so that it remains possible to
inspect result files.
wscript | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/wscript b/wscript
index 726a98f..f8b85db 100644
--- a/wscript
+++ b/wscript
@@ -570,18 +570,20 @@ def shutdown ():
Utils.pprint ('YELLOW', "gtk-update-icon-cache -q -f -t %s" % dir)
elif Options.commands['check']:
- import tempfile, shutil
- base = os.path.join (tempfile.gettempdir (), 'midori-test', '%s')
- if os.path.exists (base):
- shutil.rmtree (base % '')
- for x in ['XDG_CONFIG_HOME', 'XDG_CACHE_HOME', 'XDG_DATA_HOME', 'TMPDIR']:
- os.environ[x] = (base % x).lower ()
- Utils.check_dir (os.environ[x])
+ def reset_xdg_dirs ():
+ import tempfile, shutil
+ base = os.path.join (tempfile.gettempdir (), 'midori-test', '%s')
+ if os.path.exists (base % ''):
+ shutil.rmtree (base % '')
+ for x in ['XDG_CONFIG_HOME', 'XDG_CACHE_HOME', 'XDG_DATA_HOME', 'TMPDIR']:
+ os.environ[x] = (base % x).lower ()
+ Utils.check_dir (os.environ[x])
# Avoid i18n-related false failures
os.environ['LC_ALL'] = 'C'
os.environ['UNIQUE_BACKEND'] = 'bacon'
test = UnitTest.unit_test ()
+ reset_xdg_dirs ()
if True:
test.unit_test_results = {}
for obj in Build.bld.all_task_gen:
@@ -620,6 +622,7 @@ def shutdown ():
test.want_to_see_test_error = True
test.run ()
+ reset_xdg_dirs ()
for label in test.unit_tests.allkeys:
if not test.unit_test_results[label]:
Utils.pprint ('YELLOW', label + '...FAILED')
More information about the Xfce4-commits
mailing list