diff options
author | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2018-12-10 00:00:00 +0000 |
---|---|---|
committer | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2018-12-10 21:21:49 +0100 |
commit | 6ef3d0209dd6e78c1247c1dded0948e0cadf2ffb (patch) | |
tree | 14a6e95179461b460258abed1cc36fb1c2ed4246 | |
parent | 0d64a3482cb9b28b61bd724ec8288d222cfaa2d7 (diff) | |
download | dconf-6ef3d0209dd6e78c1247c1dded0948e0cadf2ffb.tar.gz |
tests: Sanitize additional environment variables used by dconf
-rwxr-xr-x | tests/test-dconf.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/test-dconf.py b/tests/test-dconf.py index b5b511d..88f6769 100755 --- a/tests/test-dconf.py +++ b/tests/test-dconf.py @@ -749,8 +749,12 @@ if __name__ == '__main__': mandatory_profile = '/run/dconf/user/{}'.format(os.getuid()) assert not os.path.isfile(mandatory_profile) - # Avoid profile sourced from environment + # Avoid profile sourced from environment or system data dirs. os.environ.pop('DCONF_PROFILE', None) + os.environ.pop('XDG_DATA_DIRS', None) + # Avoid interfering with external message buses. + os.environ.pop('DBUS_SYSTEM_BUS_ADDRESS', None) + os.environ.pop('DBUS_SESSION_BUS_ADDRESS', None) if len(sys.argv) < 3: message = 'Usage: {} path-to-dconf path-to-dconf-service'.format( |