diff options
author | Ran Benita <ran@unusedvar.com> | 2020-09-07 11:10:19 +0300 |
---|---|---|
committer | Ran Benita <ran@unusedvar.com> | 2020-09-07 22:06:22 +0300 |
commit | c8f309a2ded976e070be8b4f73573ccb6ea1a992 (patch) | |
tree | f43bddeb992512f45f83ffc65853221b1194a180 /test | |
parent | 737030ad5b733aa497b19037ae8ed23ba4c2046f (diff) | |
download | xorg-lib-libxkbcommon-c8f309a2ded976e070be8b4f73573ccb6ea1a992.tar.gz |
test/tool-option-parsing: keep isolated by using our own test data
Make it possible to run the test on all machines.
Signed-off-by: Ran Benita <ran@unusedvar.com>
Diffstat (limited to 'test')
-rwxr-xr-x | test/tool-option-parsing.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/tool-option-parsing.py b/test/tool-option-parsing.py index 367e799..3863be1 100755 --- a/test/tool-option-parsing.py +++ b/test/tool-option-parsing.py @@ -37,6 +37,7 @@ except ImportError: top_builddir = os.environ['top_builddir'] +top_srcdir = os.environ['top_srcdir'] logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger('test') @@ -45,7 +46,7 @@ logger.setLevel(logging.DEBUG) # Permutation of RMLVO that we use in multiple tests rmlvos = [list(x) for x in itertools.permutations( ['--rules=evdev', '--model=pc104', - '--layout=fr', '--options=eurosign:5'] + '--layout=ch', '--options=eurosign:5'] )] @@ -302,10 +303,14 @@ def test_interactive_wayland(xkbcli_interactive_wayland): if __name__ == '__main__': with tempfile.TemporaryDirectory() as tmpdir: + # Use our own test xkeyboard-config copy. + os.environ['XKB_CONFIG_ROOT'] = top_srcdir + '/test/data' # libxkbcommon has fallbacks when XDG_CONFIG_HOME isn't set so we need # to override it with a known (empty) directory. Otherwise our test # behavior depends on the system the test is run on. os.environ['XDG_CONFIG_HOME'] = tmpdir + # Prevent the legacy $HOME/.xkb from kicking in. + del os.environ['HOME'] # This needs to be separated if we do specific extra path testing os.environ['XKB_CONFIG_EXTRA_PATH'] = tmpdir |