2024-08-18 12:22:07 +09:00
|
|
|
test_lib_sources = files(
|
2023-09-23 15:07:25 +01:00
|
|
|
'../src/common/buf.c',
|
|
|
|
|
'../src/common/mem.c',
|
2024-08-18 12:22:07 +09:00
|
|
|
'../src/common/string-helpers.c',
|
2023-09-23 15:07:25 +01:00
|
|
|
)
|
|
|
|
|
|
2024-08-18 12:22:07 +09:00
|
|
|
test_deps = [
|
|
|
|
|
dep_cmocka,
|
|
|
|
|
]
|
|
|
|
|
|
2023-09-23 15:07:25 +01:00
|
|
|
tests = [
|
|
|
|
|
'buf-simple',
|
|
|
|
|
]
|
|
|
|
|
|
2024-08-18 12:22:07 +09:00
|
|
|
if have_libyaml
|
|
|
|
|
test_lib_sources += [
|
|
|
|
|
'../src/common/yaml2xml.c',
|
|
|
|
|
]
|
|
|
|
|
test_deps += [
|
|
|
|
|
wlroots,
|
|
|
|
|
yaml,
|
|
|
|
|
]
|
|
|
|
|
tests += [
|
|
|
|
|
'yaml2xml',
|
|
|
|
|
]
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
test_lib = static_library(
|
|
|
|
|
'test_lib',
|
|
|
|
|
sources: test_lib_sources,
|
|
|
|
|
include_directories: [labwc_inc],
|
|
|
|
|
dependencies: test_deps
|
|
|
|
|
)
|
|
|
|
|
|
2023-09-23 15:07:25 +01:00
|
|
|
foreach t : tests
|
|
|
|
|
test(
|
|
|
|
|
'test_@0@'.format(t),
|
|
|
|
|
executable(
|
|
|
|
|
'test_@0@'.format(t),
|
|
|
|
|
sources: '@0@.c'.format(t),
|
|
|
|
|
include_directories: [labwc_inc],
|
|
|
|
|
link_with: [test_lib],
|
|
|
|
|
),
|
|
|
|
|
is_parallel: false,
|
|
|
|
|
)
|
|
|
|
|
endforeach
|