diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2021-02-22 12:54:15 +1000 |
---|---|---|
committer | Ran Benita <ran@unusedvar.com> | 2021-02-22 13:43:16 +0200 |
commit | 0abd430e85586cc37b900e3451b40f9dec4e2783 (patch) | |
tree | 22dba37ba4da7de151415678f67f9971cc3af64f /meson.build | |
parent | b4802b06428b417be453384eac6654eec2bba44a (diff) | |
download | xorg-lib-libxkbcommon-0abd430e85586cc37b900e3451b40f9dec4e2783.tar.gz |
test: add a keysym tester
A simple script that creates a new layout with the given keysym replacing TLDE.
Then we compile a keymap and search for the keysym being assigned to TLDE and
bail if that fails.
The list of keysyms is manually maintained but we only need to add one or two to
spot-check whenever the xorgproto is updated.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/meson.build b/meson.build index 47c436f..9478fcf 100644 --- a/meson.build +++ b/meson.build @@ -389,11 +389,11 @@ if build_tools dependencies: tools_dep, install: true) install_man('tools/xkbcli.1') - executable('xkbcli-compile-keymap', - 'tools/compile-keymap.c', - dependencies: tools_dep, - install: true, - install_dir: dir_libexec) + xkbcli_compile_keymap = executable('xkbcli-compile-keymap', + 'tools/compile-keymap.c', + dependencies: tools_dep, + install: true, + install_dir: dir_libexec) install_man('tools/xkbcli-compile-keymap.1') # The same tool again, but with access to some private APIs. executable('compile-keymap', @@ -657,6 +657,22 @@ if build_tools find_program('test/tool-option-parsing.py'), env: test_env, suite: ['python-tests']) + + # A set of keysyms to test for. Add one or two symbols to this array + # whenever the xorgproto gets updated to make sure we resolve them. + keysyms_to_test = [ + 'XF86Macro23', + ] + + env = environment() + env.set('XKB_CONFIG_ROOT', meson.source_root()/'test'/'data') + foreach keysym: keysyms_to_test + test('keysym-test-@0@'.format(keysym), + find_program('test/test-keysym.py'), + env: env, + args: [keysym, '--tool', xkbcli_compile_keymap], + suite: ['python-tests']) + endforeach endif valgrind = find_program('valgrind', required: false) |