2019-09-13 09:33:49 +02:00
|
|
|
# This mock library will replace libdrm
|
|
|
|
mock_drm_lib = shared_library(
|
|
|
|
'drm',
|
|
|
|
files('libdrm_mock.c'),
|
|
|
|
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],
|
2021-08-13 22:04:28 +02:00
|
|
|
include_directories: [liftoff_inc],
|
2019-09-13 09:33:49 +02:00
|
|
|
dependencies: drm.partial_dependency(compile_args: true),
|
|
|
|
)
|
|
|
|
|
2021-08-12 18:15:50 +02:00
|
|
|
test('check_ndebug', executable('check_ndebug', 'check_ndebug.c'))
|
|
|
|
|
2019-10-30 21:08:31 +01:00
|
|
|
bench_exe = executable(
|
|
|
|
'bench',
|
|
|
|
files('bench.c'),
|
|
|
|
dependencies: mock_liftoff,
|
|
|
|
)
|
|
|
|
|
2019-10-14 17:19:06 +02:00
|
|
|
tests = {
|
|
|
|
'alloc': [
|
|
|
|
'basic',
|
2020-05-26 20:08:12 +02:00
|
|
|
'no-props-fail',
|
|
|
|
'zero-fb-id-fail',
|
2022-01-31 14:05:58 +01:00
|
|
|
'composition-no-props',
|
2019-11-29 10:57:24 +01:00
|
|
|
'empty',
|
2019-10-14 17:19:06 +02:00
|
|
|
'simple-1x',
|
|
|
|
'simple-1x-fail',
|
|
|
|
'simple-3x',
|
2021-12-14 17:02:30 +01:00
|
|
|
'zpos-2x-fail',
|
2019-10-14 17:19:06 +02:00
|
|
|
'zpos-3x',
|
|
|
|
'zpos-3x-intersect-fail',
|
|
|
|
'zpos-3x-intersect-partial',
|
|
|
|
'zpos-3x-disjoint-partial',
|
|
|
|
'zpos-3x-disjoint',
|
|
|
|
'zpos-4x-intersect-partial',
|
|
|
|
'zpos-4x-disjoint',
|
|
|
|
'zpos-4x-disjoint-alt',
|
|
|
|
'zpos-4x-domino-fail',
|
|
|
|
'zpos-4x-domino-partial',
|
|
|
|
'composition-3x',
|
|
|
|
'composition-3x-fail',
|
|
|
|
'composition-3x-partial',
|
2019-12-13 11:36:09 +01:00
|
|
|
'composition-3x-force',
|
2021-12-14 17:13:49 +01:00
|
|
|
'zpos-2x-reverse',
|
2022-01-31 14:26:20 +01:00
|
|
|
'zpos-3x-zero-fb-id',
|
2019-10-14 17:19:06 +02:00
|
|
|
],
|
2019-10-14 17:43:45 +02:00
|
|
|
'dynamic': [
|
|
|
|
'same',
|
2020-12-05 11:53:56 +01:00
|
|
|
'change-fb',
|
2020-12-05 12:36:34 +01:00
|
|
|
'unset-fb',
|
|
|
|
'set-fb',
|
2019-11-24 13:25:59 +01:00
|
|
|
'add-layer',
|
|
|
|
'remove-layer',
|
2019-12-12 23:22:18 +01:00
|
|
|
'change-composition-layer',
|
2020-12-05 13:06:44 +01:00
|
|
|
'change-alpha',
|
|
|
|
'set-alpha-from-opaque',
|
|
|
|
'set-alpha-from-transparent',
|
|
|
|
'unset-alpha-to-opaque',
|
|
|
|
'unset-alpha-to-transparent',
|
2020-12-05 12:44:08 +01:00
|
|
|
'change-in-fence-fd',
|
2020-12-05 14:36:47 +01:00
|
|
|
'change-fb-damage-clips',
|
2019-10-14 17:43:45 +02:00
|
|
|
],
|
2019-10-30 20:41:25 +01:00
|
|
|
'priority': [
|
|
|
|
#'basic',
|
|
|
|
],
|
2020-05-22 17:44:41 +02:00
|
|
|
'prop': [
|
2020-05-26 21:30:31 +02:00
|
|
|
'default-alpha',
|
|
|
|
'default-rotation',
|
|
|
|
'ignore-alpha',
|
2020-12-05 18:52:52 +01:00
|
|
|
'immutable-zpos',
|
2021-09-30 14:54:33 +02:00
|
|
|
'unmatched',
|
2020-05-22 17:44:41 +02:00
|
|
|
],
|
2019-10-14 17:19:06 +02:00
|
|
|
}
|
2019-09-13 18:47:00 +02:00
|
|
|
|
2019-10-14 17:19:06 +02:00
|
|
|
foreach test_name, subtests : tests
|
|
|
|
test_exe = executable(
|
|
|
|
'test-' + test_name,
|
|
|
|
files('test_' + test_name + '.c'),
|
|
|
|
dependencies: mock_liftoff,
|
2019-09-13 18:47:00 +02:00
|
|
|
)
|
2019-10-14 17:19:06 +02:00
|
|
|
foreach subtest_name : subtests
|
|
|
|
test(
|
|
|
|
test_name + '@' + subtest_name,
|
|
|
|
test_exe,
|
|
|
|
args: [subtest_name],
|
|
|
|
)
|
|
|
|
endforeach
|
2019-09-13 18:47:00 +02:00
|
|
|
endforeach
|