2019-09-13 09:33:49 +02:00
|
|
|
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),
|
|
|
|
)
|
|
|
|
|
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',
|
2019-12-19 17:41:32 +01:00
|
|
|
'no-props',
|
2019-12-19 17:54:49 +01:00
|
|
|
'zero-fb-id',
|
2019-11-29 10:57:24 +01:00
|
|
|
'empty',
|
2019-10-14 17:19:06 +02:00
|
|
|
'simple-1x',
|
|
|
|
'simple-1x-fail',
|
|
|
|
'simple-3x',
|
|
|
|
'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',
|
2019-10-14 17:19:06 +02:00
|
|
|
],
|
2019-10-14 17:43:45 +02:00
|
|
|
'dynamic': [
|
|
|
|
'same',
|
|
|
|
'fb',
|
2019-11-24 13:25:59 +01:00
|
|
|
'add-layer',
|
|
|
|
'remove-layer',
|
2019-12-12 23:22:18 +01:00
|
|
|
'change-composition-layer',
|
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': [
|
|
|
|
'alpha',
|
|
|
|
],
|
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
|