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),
|
|
|
|
)
|
|
|
|
|
|
|
|
test_alloc_exe = executable(
|
|
|
|
'test-alloc',
|
|
|
|
files('test_alloc.c'),
|
|
|
|
dependencies: mock_liftoff,
|
|
|
|
)
|
|
|
|
|
2019-09-13 18:47:00 +02:00
|
|
|
alloc_tests = [
|
|
|
|
'basic',
|
2019-09-13 21:35:23 +02:00
|
|
|
'simple-1x',
|
|
|
|
'simple-1x-fail',
|
|
|
|
'simple-3x',
|
2019-09-13 21:53:15 +02:00
|
|
|
'zpos-3x',
|
2019-09-14 20:00:14 +02:00
|
|
|
'zpos-3x-intersect-fail',
|
2019-09-14 11:59:37 +02:00
|
|
|
'zpos-3x-intersect-partial',
|
2019-09-15 16:08:32 +02:00
|
|
|
'zpos-3x-disjoint-partial',
|
2019-09-15 22:51:12 +02:00
|
|
|
'zpos-3x-disjoint',
|
2019-09-14 11:59:37 +02:00
|
|
|
'zpos-4x-intersect-partial',
|
2019-09-15 22:51:12 +02:00
|
|
|
'zpos-4x-disjoint',
|
2019-09-15 22:48:10 +02:00
|
|
|
'zpos-4x-disjoint-alt',
|
2019-09-14 20:05:14 +02:00
|
|
|
'zpos-4x-domino-fail',
|
2019-09-15 16:08:32 +02:00
|
|
|
'zpos-4x-domino-partial',
|
2019-10-11 12:03:30 +02:00
|
|
|
'composition-3x',
|
|
|
|
'composition-3x-fail',
|
|
|
|
'composition-3x-partial',
|
2019-09-13 18:47:00 +02:00
|
|
|
]
|
|
|
|
|
|
|
|
foreach name : alloc_tests
|
|
|
|
test(
|
|
|
|
'alloc@' + name,
|
|
|
|
test_alloc_exe,
|
|
|
|
args: [name],
|
|
|
|
)
|
|
|
|
endforeach
|