libliftoff/test/meson.build
Simon Ser fccdebfd6e
test: introduce structured alloc tests
This is a new kind of tests defined by a static structure. The structure
contains the layers and planes to setup as well as the expected result.
2019-09-13 19:47:00 +03:00

36 lines
770 B
Meson

test_inc = include_directories('include')
# This mock library will replace libdrm
mock_drm_lib = shared_library(
'drm',
files('libdrm_mock.c'),
include_directories: [test_inc],
dependencies: drm.partial_dependency(compile_args: true),
soversion: drm.version().split('.')[0], # TODO: get it from the real dep
)
mock_liftoff = declare_dependency(
link_with: [mock_drm_lib, liftoff_lib],
include_directories: [liftoff_inc, test_inc],
dependencies: drm.partial_dependency(compile_args: true),
)
test_alloc_exe = executable(
'test-alloc',
files('test_alloc.c'),
dependencies: mock_liftoff,
)
alloc_tests = [
'basic',
'primary-nomatch',
'primary-match',
]
foreach name : alloc_tests
test(
'alloc@' + name,
test_alloc_exe,
args: [name],
)
endforeach