termux-packages/x11-packages/libxkbcommon/disable_tests.patch

229 lines
7.4 KiB
Diff

diff -uNr libxkbcommon-xkbcommon-0.10.0/meson.build libxkbcommon-xkbcommon-0.10.0.mod/meson.build
--- libxkbcommon-xkbcommon-0.10.0/meson.build 2020-01-18 23:08:45.000000000 +0200
+++ libxkbcommon-xkbcommon-0.10.0.mod/meson.build 2020-01-30 22:51:08.757256489 +0200
@@ -294,182 +294,6 @@
endif
-# 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())
-test_env.set('top_builddir', meson.build_root())
-
-test_configh_data = configuration_data()
-test_configh_data.set_quoted('TEST_XKB_CONFIG_ROOT', join_paths(meson.source_root(), 'test', 'data'))
-configure_file(output: 'test-config.h', configuration: test_configh_data)
-
-# Some tests need to use unexported symbols, so we link them against
-# an internal copy of libxkbcommon with all symbols exposed.
-libxkbcommon_test_internal = static_library(
- 'xkbcommon-test-internal',
- 'test/common.c',
- 'test/test.h',
- 'test/evdev-scancodes.h',
- libxkbcommon_sources,
- include_directories: include_directories('src'),
-)
-test_dep = declare_dependency(
- include_directories: include_directories('src'),
- link_with: libxkbcommon_test_internal,
-)
-if get_option('enable-x11')
- x11_test_dep = declare_dependency(
- link_with: libxkbcommon_x11_internal,
- dependencies: [
- test_dep,
- xcb_dep,
- xcb_xkb_dep,
- ],
- )
-endif
-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,
-)
-# 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
-test(
- 'rules-file',
- executable('test-rules-file', 'test/rules-file.c', dependencies: test_dep),
- env: test_env,
-)
-test(
- 'rules-file-includes',
- executable('test-rules-file-includes', 'test/rules-file-includes.c', dependencies: test_dep),
- 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(
- 'symbols-leak-test',
- find_program('test/symbols-leak-test.bash'),
- env: test_env,
-)
-if get_option('enable-x11')
- test(
- 'x11',
- executable('test-x11', 'test/x11.c', dependencies: x11_test_dep),
- env: test_env,
- )
- # test/x11comp is meant to be run, but it is (temporarily?) disabled.
- # See: https://github.com/xkbcommon/libxkbcommon/issues/30
- executable('test-x11comp', 'test/x11comp.c', dependencies: x11_test_dep)
-endif
-
-
-# Fuzzing target programs.
-executable('fuzz-keymap', 'fuzz/keymap/target.c', dependencies: test_dep)
-executable('fuzz-compose', 'fuzz/compose/target.c', dependencies: test_dep)
-
-
-# Demo programs.
-if cc.has_header_symbol('getopt.h', 'getopt_long', prefix: '#define _GNU_SOURCE')
- executable('rmlvo-to-kccgst', 'test/rmlvo-to-kccgst.c', dependencies: test_dep)
- executable('rmlvo-to-keymap', 'test/rmlvo-to-keymap.c', dependencies: test_dep)
- executable('print-compiled-keymap', 'test/print-compiled-keymap.c', dependencies: test_dep)
-endif
-if cc.has_header('linux/input.h')
- executable('interactive-evdev', 'test/interactive-evdev.c', dependencies: test_dep)
-endif
-if get_option('enable-x11')
- executable('interactive-x11', 'test/interactive-x11.c', dependencies: x11_test_dep)
-endif
-if get_option('enable-wayland')
- wayland_client_dep = dependency('wayland-client', version: '>=1.2.0', required: false)
- wayland_protocols_dep = dependency('wayland-protocols', version: '>=1.12', required: false)
- wayland_scanner_dep = dependency('wayland-scanner', required: false, native: true)
- if not wayland_client_dep.found() or not wayland_protocols_dep.found() or not wayland_scanner_dep.found()
- error('''The Wayland demo programs require wayland-client >= 1.2.0, wayland-protocols >= 1.7 which were not found.
-You can disable the Wayland demo programs with -Denable-wayland=false.''')
- endif
-
- wayland_scanner = find_program(wayland_scanner_dep.get_pkgconfig_variable('wayland_scanner'))
- wayland_scanner_code_gen = generator(
- wayland_scanner,
- output: '@BASENAME@-protocol.c',
- arguments: ['code', '@INPUT@', '@OUTPUT@'],
- )
- wayland_scanner_client_header_gen = generator(
- wayland_scanner,
- output: '@BASENAME@-client-protocol.h',
- arguments: ['client-header', '@INPUT@', '@OUTPUT@'],
- )
- wayland_protocols_datadir = wayland_protocols_dep.get_pkgconfig_variable('pkgdatadir')
- xdg_shell_xml = join_paths(wayland_protocols_datadir, 'stable/xdg-shell/xdg-shell.xml')
- xdg_shell_sources = [
- wayland_scanner_code_gen.process(xdg_shell_xml),
- wayland_scanner_client_header_gen.process(xdg_shell_xml),
- ]
- executable('interactive-wayland', 'test/interactive-wayland.c', xdg_shell_sources, dependencies: [test_dep, wayland_client_dep])
-endif
-
# xkeyboard-config "verifier"
xkct_config = configuration_data()
xkct_config.set('MESON_BUILD_ROOT', meson.build_root())
@@ -480,41 +304,6 @@
install: false)
-# 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)