2020-09-12 21:43:57 +02:00
|
|
|
diff -uNr libxkbcommon-xkbcommon-1.0.1/meson.build libxkbcommon-xkbcommon-1.0.1.mod/meson.build
|
|
|
|
--- libxkbcommon-xkbcommon-1.0.1/meson.build 2020-09-11 12:07:49.000000000 +0000
|
|
|
|
+++ libxkbcommon-xkbcommon-1.0.1.mod/meson.build 2020-09-12 19:40:19.523612699 +0000
|
|
|
|
@@ -493,224 +493,6 @@
|
|
|
|
output: 'xkeyboard-config-test',
|
|
|
|
configuration: xkct_config)
|
2019-10-27 21:16:51 +01:00
|
|
|
|
2018-09-10 00:42:26 +02:00
|
|
|
-# Tests
|
|
|
|
-test_env = environment()
|
|
|
|
-test_env.set('XKB_LOG_LEVEL', 'debug')
|
|
|
|
-test_env.set('XKB_LOG_VERBOSITY', '10')
|
|
|
|
-test_env.set('top_srcdir', meson.source_root())
|
2019-10-27 21:16:51 +01:00
|
|
|
-test_env.set('top_builddir', meson.build_root())
|
2020-09-12 21:43:57 +02:00
|
|
|
-test_env.set('HAVE_XKBCLI_INTERACTIVE_EVDEV', configh_data.get('HAVE_XKBCLI_INTERACTIVE_EVDEV', 0).to_string())
|
|
|
|
-test_env.set('HAVE_XKBCLI_INTERACTIVE_WAYLAND', configh_data.get('HAVE_XKBCLI_INTERACTIVE_WAYLAND', 0).to_string())
|
|
|
|
-test_env.set('HAVE_XKBCLI_INTERACTIVE_X11', configh_data.get('HAVE_XKBCLI_INTERACTIVE_X11', 0).to_string())
|
|
|
|
-test_env.set('HAVE_XKBCLI_LIST', configh_data.get('HAVE_XKBCLI_LIST', 0).to_string())
|
2020-01-30 21:51:55 +01:00
|
|
|
-
|
|
|
|
-test_configh_data = configuration_data()
|
2020-09-12 21:43:57 +02:00
|
|
|
-test_configh_data.set_quoted('TEST_XKB_CONFIG_ROOT', meson.source_root()/'test'/'data')
|
2020-01-30 21:51:55 +01:00
|
|
|
-configure_file(output: 'test-config.h', configuration: test_configh_data)
|
|
|
|
-
|
2018-09-10 00:42:26 +02:00
|
|
|
-# Some tests need to use unexported symbols, so we link them against
|
2019-05-19 00:12:48 +02:00
|
|
|
-# an internal copy of libxkbcommon with all symbols exposed.
|
2018-09-10 00:42:26 +02:00
|
|
|
-libxkbcommon_test_internal = static_library(
|
|
|
|
- 'xkbcommon-test-internal',
|
|
|
|
- 'test/common.c',
|
|
|
|
- 'test/test.h',
|
|
|
|
- 'test/evdev-scancodes.h',
|
2019-05-19 00:12:48 +02:00
|
|
|
- libxkbcommon_sources,
|
2018-09-10 00:42:26 +02:00
|
|
|
- include_directories: include_directories('src'),
|
|
|
|
-)
|
|
|
|
-test_dep = declare_dependency(
|
|
|
|
- include_directories: include_directories('src'),
|
|
|
|
- link_with: libxkbcommon_test_internal,
|
|
|
|
-)
|
2018-09-28 16:14:26 +02:00
|
|
|
-if get_option('enable-x11')
|
2020-09-12 21:43:57 +02:00
|
|
|
- libxkbcommon_x11_internal = static_library(
|
|
|
|
- 'xkbcommon-x11-internal',
|
|
|
|
- libxkbcommon_x11_sources,
|
|
|
|
- include_directories: include_directories('src'),
|
|
|
|
- link_with: libxkbcommon_test_internal,
|
|
|
|
- dependencies: [
|
|
|
|
- xcb_dep,
|
|
|
|
- xcb_xkb_dep,
|
|
|
|
- ],
|
|
|
|
- )
|
2018-09-28 16:14:26 +02:00
|
|
|
- x11_test_dep = declare_dependency(
|
|
|
|
- link_with: libxkbcommon_x11_internal,
|
|
|
|
- dependencies: [
|
|
|
|
- test_dep,
|
|
|
|
- xcb_dep,
|
|
|
|
- xcb_xkb_dep,
|
|
|
|
- ],
|
|
|
|
- )
|
|
|
|
-endif
|
2018-09-10 00:42:26 +02:00
|
|
|
-test(
|
|
|
|
- 'keysym',
|
|
|
|
- executable('test-keysym', 'test/keysym.c', dependencies: test_dep),
|
|
|
|
- env: test_env,
|
|
|
|
-)
|
|
|
|
-test(
|
|
|
|
- 'keymap',
|
|
|
|
- executable('test-keymap', 'test/keymap.c', dependencies: test_dep),
|
|
|
|
- env: test_env,
|
|
|
|
-)
|
|
|
|
-test(
|
|
|
|
- 'filecomp',
|
|
|
|
- executable('test-filecomp', 'test/filecomp.c', dependencies: test_dep),
|
|
|
|
- env: test_env,
|
|
|
|
-)
|
2020-01-30 21:51:55 +01:00
|
|
|
-# TODO: This test currently uses some functions that don't exist on Windows.
|
|
|
|
-if cc.get_id() != 'msvc'
|
|
|
|
- test(
|
|
|
|
- 'context',
|
|
|
|
- executable('test-context', 'test/context.c', dependencies: test_dep),
|
|
|
|
- env: test_env,
|
|
|
|
- )
|
|
|
|
-endif
|
2018-09-10 00:42:26 +02:00
|
|
|
-test(
|
2020-01-30 21:51:55 +01:00
|
|
|
- 'rules-file',
|
|
|
|
- executable('test-rules-file', 'test/rules-file.c', dependencies: test_dep),
|
2018-09-10 00:42:26 +02:00
|
|
|
- env: test_env,
|
|
|
|
-)
|
|
|
|
-test(
|
2020-01-30 21:51:55 +01:00
|
|
|
- 'rules-file-includes',
|
|
|
|
- executable('test-rules-file-includes', 'test/rules-file-includes.c', dependencies: test_dep),
|
2018-09-10 00:42:26 +02:00
|
|
|
- env: test_env,
|
|
|
|
-)
|
|
|
|
-test(
|
|
|
|
- 'stringcomp',
|
|
|
|
- executable('test-stringcomp', 'test/stringcomp.c', dependencies: test_dep),
|
|
|
|
- env: test_env,
|
|
|
|
-)
|
|
|
|
-test(
|
|
|
|
- 'buffercomp',
|
|
|
|
- executable('test-buffercomp', 'test/buffercomp.c', dependencies: test_dep),
|
|
|
|
- env: test_env,
|
|
|
|
-)
|
|
|
|
-test(
|
|
|
|
- 'log',
|
|
|
|
- executable('test-log', 'test/log.c', dependencies: test_dep),
|
|
|
|
- env: test_env,
|
|
|
|
-)
|
|
|
|
-test(
|
|
|
|
- 'atom',
|
|
|
|
- executable('test-atom', 'test/atom.c', dependencies: test_dep),
|
|
|
|
- env: test_env,
|
|
|
|
-)
|
|
|
|
-test(
|
|
|
|
- 'utf8',
|
|
|
|
- executable('test-utf8', 'test/utf8.c', dependencies: test_dep),
|
|
|
|
- env: test_env,
|
|
|
|
-)
|
|
|
|
-test(
|
|
|
|
- 'state',
|
|
|
|
- executable('test-state', 'test/state.c', dependencies: test_dep),
|
|
|
|
- env: test_env,
|
|
|
|
-)
|
|
|
|
-test(
|
|
|
|
- 'keyseq',
|
|
|
|
- executable('test-keyseq', 'test/keyseq.c', dependencies: test_dep),
|
|
|
|
- env: test_env,
|
|
|
|
-)
|
|
|
|
-test(
|
|
|
|
- 'rulescomp',
|
|
|
|
- executable('test-rulescomp', 'test/rulescomp.c', dependencies: test_dep),
|
|
|
|
- env: test_env,
|
|
|
|
-)
|
|
|
|
-test(
|
|
|
|
- 'compose',
|
|
|
|
- executable('test-compose', 'test/compose.c', dependencies: test_dep),
|
|
|
|
- env: test_env,
|
|
|
|
-)
|
|
|
|
-test(
|
2020-09-12 21:43:57 +02:00
|
|
|
- 'utils',
|
|
|
|
- executable('test-utils', 'test/utils.c', dependencies: test_dep),
|
|
|
|
- env: test_env,
|
|
|
|
-)
|
|
|
|
-test(
|
2018-09-10 00:42:26 +02:00
|
|
|
- 'symbols-leak-test',
|
2020-09-12 21:43:57 +02:00
|
|
|
- find_program('test/symbols-leak-test.py'),
|
2018-09-10 00:42:26 +02:00
|
|
|
- env: test_env,
|
2020-09-12 21:43:57 +02:00
|
|
|
- suite: ['python-tests'],
|
2018-09-10 00:42:26 +02:00
|
|
|
-)
|
|
|
|
-if get_option('enable-x11')
|
|
|
|
- test(
|
|
|
|
- 'x11',
|
2018-09-28 16:14:26 +02:00
|
|
|
- executable('test-x11', 'test/x11.c', dependencies: x11_test_dep),
|
2018-09-10 00:42:26 +02:00
|
|
|
- env: test_env,
|
|
|
|
- )
|
|
|
|
- # test/x11comp is meant to be run, but it is (temporarily?) disabled.
|
|
|
|
- # See: https://github.com/xkbcommon/libxkbcommon/issues/30
|
2018-09-28 16:14:26 +02:00
|
|
|
- executable('test-x11comp', 'test/x11comp.c', dependencies: x11_test_dep)
|
2018-09-10 00:42:26 +02:00
|
|
|
-endif
|
2020-09-12 21:43:57 +02:00
|
|
|
-if get_option('enable-xkbregistry')
|
|
|
|
- test(
|
|
|
|
- 'registry',
|
|
|
|
- executable('test-registry', 'test/registry.c',
|
|
|
|
- include_directories: include_directories('src'),
|
|
|
|
- dependencies: dep_libxkbregistry),
|
|
|
|
- env: test_env,
|
|
|
|
- )
|
|
|
|
-endif
|
|
|
|
-if build_tools
|
|
|
|
- test('tool-option-parsing',
|
|
|
|
- find_program('test/tool-option-parsing.py'),
|
|
|
|
- env: test_env,
|
|
|
|
- suite: ['python-tests'])
|
|
|
|
-endif
|
|
|
|
-
|
|
|
|
-valgrind = find_program('valgrind', required: false)
|
|
|
|
-if valgrind.found()
|
|
|
|
- add_test_setup('valgrind',
|
|
|
|
- exe_wrapper: [valgrind,
|
|
|
|
- '--leak-check=full',
|
|
|
|
- '--track-origins=yes',
|
|
|
|
- '--gen-suppressions=all',
|
|
|
|
- '--error-exitcode=99'],
|
|
|
|
- timeout_multiplier : 10)
|
|
|
|
-else
|
|
|
|
- message('valgrind not found, disabling valgrind test setup')
|
|
|
|
-endif
|
2018-09-10 00:42:26 +02:00
|
|
|
-
|
|
|
|
-
|
2018-09-28 16:14:26 +02:00
|
|
|
-# Fuzzing target programs.
|
|
|
|
-executable('fuzz-keymap', 'fuzz/keymap/target.c', dependencies: test_dep)
|
|
|
|
-executable('fuzz-compose', 'fuzz/compose/target.c', dependencies: test_dep)
|
|
|
|
-
|
|
|
|
-
|
2018-09-10 00:42:26 +02:00
|
|
|
-# Benchmarks.
|
|
|
|
-libxkbcommon_bench_internal = static_library(
|
|
|
|
- 'xkbcommon-bench-internal',
|
|
|
|
- 'bench/bench.c',
|
|
|
|
- 'bench/bench.h',
|
|
|
|
- link_with: libxkbcommon_test_internal,
|
|
|
|
-)
|
|
|
|
-bench_dep = declare_dependency(
|
|
|
|
- include_directories: include_directories('src'),
|
|
|
|
- link_with: libxkbcommon_bench_internal,
|
|
|
|
-)
|
|
|
|
-bench_env = environment()
|
|
|
|
-bench_env.set('top_srcdir', meson.source_root())
|
|
|
|
-benchmark(
|
|
|
|
- 'key-proc',
|
|
|
|
- executable('bench-key-proc', 'bench/key-proc.c', dependencies: bench_dep),
|
|
|
|
- env: bench_env,
|
|
|
|
-)
|
|
|
|
-benchmark(
|
|
|
|
- 'rules',
|
|
|
|
- executable('bench-rules', 'bench/rules.c', dependencies: bench_dep),
|
|
|
|
- env: bench_env,
|
|
|
|
-)
|
|
|
|
-benchmark(
|
|
|
|
- 'rulescomp',
|
|
|
|
- executable('bench-rulescomp', 'bench/rulescomp.c', dependencies: bench_dep),
|
|
|
|
- env: bench_env,
|
|
|
|
-)
|
|
|
|
-benchmark(
|
|
|
|
- 'compose',
|
|
|
|
- executable('bench-compose', 'bench/compose.c', dependencies: bench_dep),
|
|
|
|
- env: bench_env,
|
|
|
|
-)
|
|
|
|
-
|
|
|
|
-
|
|
|
|
# Documentation.
|
|
|
|
if get_option('enable-docs')
|
|
|
|
doxygen = find_program('doxygen', required: false)
|