diff options
author | Alban Crequy <alban.crequy@collabora.co.uk> | 2011-11-01 17:25:31 +0000 |
---|---|---|
committer | Alban Crequy <alban.crequy@collabora.co.uk> | 2011-11-04 16:19:50 +0000 |
commit | 41c5b207f8482182834d7ea05d677316538f358b (patch) | |
tree | 0789cb9841c467dfb594f68d084cf43bf8e09dac | |
parent | be2e5c2d899d9542b567983e809caf371ba9be6c (diff) |
update-parameters.py: fix the cache directory
Use $XDG_CACHE_HOME instead of $MC_ACCOUNT_DIR to find the file
mcp-test-diverted-account-plugin.conf because the test-only plugin
mcp-account-diversion uses g_get_user_cache_dir().
This is a no-op because both variables have the same value, as defined in
tests/twisted/Makefile.am:
BASIC_TESTS_ENVIRONMENT = \
MC_ACCOUNT_DIR=@abs_top_builddir@/tests/twisted/tmp-$(TMPSUFFIX) \
XDG_CACHE_HOME=@abs_top_builddir@/tests/twisted/tmp-$(TMPSUFFIX) \
However, this was not semantically correct, and the two directories could be
different in the future, with installed tests for example.
-rw-r--r-- | tests/twisted/account-manager/update-parameters.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/twisted/account-manager/update-parameters.py b/tests/twisted/account-manager/update-parameters.py index 16c94d85..337ea73b 100644 --- a/tests/twisted/account-manager/update-parameters.py +++ b/tests/twisted/account-manager/update-parameters.py @@ -248,7 +248,7 @@ def test(q, bus, mc): not_yet = ret.value[0] assertEquals([], not_yet) - accounts_dir = os.environ['MC_ACCOUNT_DIR'] + cache_dir = os.environ['XDG_CACHE_HOME'] # fd.o #28557: when the file has been updated, the account parameter # has its two backslashes doubled to 4 (because of the .desktop encoding), @@ -257,7 +257,7 @@ def test(q, bus, mc): updated = False while i < 500: - for line in open(accounts_dir + + for line in open(cache_dir + '/mcp-test-diverted-account-plugin.conf', 'r'): if line.startswith('param-account=') and '\\' in line: assertEquals(r'param-account=\\\\' + '\n', line) |