top_builddir = os.environ['top_builddir']
+top_srcdir = os.environ['top_srcdir']
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger('test')
# 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']
)]
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