mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2026-01-02 21:30:11 +01:00
This protocol is wayland-like though it uses a slightly different message format. The XML file uses the same structure, except for the "fixed" type which is "float" here. The scanner uses a jinja template to generate source and header files for ei and eis which are now used instead of the protobuf-generated objects. Note that the scanner is a minimal working version, some features like enum value checks are not yet implemented. Unlike wayland we do not need to generate the libwayland-like library, we only need the wire protocol parser - some shortcuts can thus be taken. To keep the changes simple, the protocol currently is a flat protocol with only one interface and all messages copied over from the previous ei.proto file. In future commits, this will be moved to the respective interfaces instead.
114 lines
3.6 KiB
Meson
114 lines
3.6 KiB
Meson
subproject('munit', default_options: 'werror=false')
|
|
|
|
munit = dependency('munit', fallback: ['munit', 'munit_dep'])
|
|
|
|
lib_unittest = static_library('unittest',
|
|
'../src/util-munit.c',
|
|
dependencies: munit,
|
|
include_directories: [inc_builddir],
|
|
)
|
|
|
|
dep_unittest = declare_dependency(
|
|
link_with: lib_unittest,
|
|
dependencies: munit
|
|
)
|
|
|
|
test('unit-tests-utils',
|
|
executable('unit-tests-utils',
|
|
'unit-tests.c',
|
|
src_libutil,
|
|
include_directories: [inc_src, inc_builddir],
|
|
c_args: ['-D_enable_tests_'],
|
|
dependencies: [dep_unittest]))
|
|
|
|
test('unit-tests-ei',
|
|
executable('unit-tests-ei',
|
|
'unit-tests.c',
|
|
src_libei,
|
|
include_directories: [inc_src, inc_proto, inc_builddir],
|
|
c_args: ['-D_enable_tests_'],
|
|
dependencies: deps_libei + [dep_unittest]))
|
|
|
|
test('unit-tests-eis',
|
|
executable('unit-tests-eis',
|
|
'unit-tests.c',
|
|
src_libeis,
|
|
include_directories: [inc_src, inc_proto, inc_builddir],
|
|
c_args: ['-D_enable_tests_'],
|
|
dependencies: [dep_unittest, dep_libutil]))
|
|
|
|
if build_oeffis
|
|
test('unit-tests-oeffis',
|
|
executable('unit-tests-oeffis',
|
|
'unit-tests.c',
|
|
src_liboeffis,
|
|
include_directories: [inc_src, inc_builddir],
|
|
c_args: ['-D_enable_tests_'],
|
|
dependencies: deps_liboeffis + [dep_unittest]))
|
|
|
|
env = environment()
|
|
env.set('LD_LIBRARY_PATH', meson.project_build_root())
|
|
pymod = import('python')
|
|
pymod.find_installation('python3', modules: ['pytest', 'attr', 'dbusmock'])
|
|
pytest = find_program('pytest-3', 'pytest')
|
|
test('pytest', pytest,
|
|
args: ['--verbose', '--log-level=DEBUG'],
|
|
suite: 'python',
|
|
workdir: meson.current_source_dir(),
|
|
env: env,
|
|
)
|
|
endif
|
|
|
|
lib_eierpecken = static_library('eierpecken',
|
|
'eierpecken.h',
|
|
'eierpecken.c',
|
|
include_directories: [inc_src, inc_builddir],
|
|
dependencies: [munit, dep_libutil, dep_libei, dep_libeis],
|
|
)
|
|
|
|
test('eierpecken',
|
|
executable('eierpecken',
|
|
'test-ei-device.c',
|
|
'test-ei-seat.c',
|
|
'test-ei.c',
|
|
'test-eis.c',
|
|
'test-main.c',
|
|
link_with: lib_eierpecken,
|
|
include_directories: [inc_builddir],
|
|
dependencies: [dep_unittest, dep_libei, dep_libeis]))
|
|
|
|
valgrind = find_program('valgrind', required : false)
|
|
if valgrind.found()
|
|
add_test_setup('valgrind',
|
|
exe_wrapper : [ valgrind,
|
|
'--leak-check=full',
|
|
'--gen-suppressions=all',
|
|
'--error-exitcode=3' ],
|
|
exclude_suites: ['python'], # we don't want to valgrind python tests
|
|
timeout_multiplier : 100)
|
|
else
|
|
message('valgrind not found, disabling valgrind test suite')
|
|
endif
|
|
|
|
# build-test only
|
|
executable('test-build-libei',
|
|
'buildtest.c',
|
|
dependencies : [dep_libei],
|
|
include_directories : [inc_src],
|
|
c_args : ['-Werror', '-DINCLUDE_LIBEI=1'],
|
|
install : false)
|
|
|
|
executable('test-build-libeis',
|
|
'buildtest.c',
|
|
dependencies : [dep_libeis],
|
|
include_directories : [inc_src],
|
|
c_args : ['-Werror', '-DINCLUDE_LIBEIS=1'],
|
|
install : false)
|
|
|
|
if add_languages('cpp', required: false)
|
|
executable('test-build-cxx',
|
|
'buildtest.cc',
|
|
dependencies: [dep_libei, dep_libeis],
|
|
include_directories: [inc_src],
|
|
install: false)
|
|
endif
|