aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2024-10-06 13:19:02 -0400
committerDavid Robillard <d@drobilla.net>2024-10-06 13:19:02 -0400
commita39db2df3ff41fd8d2502daa600b7563f39b1ff5 (patch)
treee4d55d73e96db0c0313d814dc859c9c6484e18ab
parenta71df41453f4cb0be273e9dd36000a8791ebde08 (diff)
downloadserd-a39db2df3ff41fd8d2502daa600b7563f39b1ff5.tar.gz
serd-a39db2df3ff41fd8d2502daa600b7563f39b1ff5.tar.bz2
serd-a39db2df3ff41fd8d2502daa600b7563f39b1ff5.zip
Check all sources in clang-format test
-rw-r--r--test/meson.build18
1 files changed, 12 insertions, 6 deletions
diff --git a/test/meson.build b/test/meson.build
index 34dd7415..5b234781 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -14,7 +14,7 @@ subdir('headers')
# Unit Tests #
##############
-unit_tests = [
+unit_test_names = [
'env',
'free_null',
'node',
@@ -25,12 +25,16 @@ unit_tests = [
'writer',
]
-foreach unit : unit_tests
+unit_test_sources = files('headers/test_headers.c')
+
+foreach name : unit_test_names
+ source = files('test_@0@.c'.format(name))
+ unit_test_sources += source
test(
- unit,
+ name,
executable(
- 'test_@0@'.format(unit),
- files('test_@0@.c'.format(unit)),
+ 'test_@0@'.format(name),
+ source,
c_args: c_suppressions,
dependencies: serd_dep,
),
@@ -328,6 +332,8 @@ python_script_paths = simple_script_paths + plot_script_paths
python_scripts = plot_scripts + simple_scripts
if get_option('lint')
+ all_sources = sources + unit_test_sources + files('../src/serdi.c')
+
# Check release metadata
if not meson.is_subproject()
autoship = find_program('autoship', required: false)
@@ -353,7 +359,7 @@ if get_option('lint')
test(
'format',
clang_format,
- args: ['--Werror', '--dry-run'] + c_headers + sources,
+ args: ['--Werror', '--dry-run'] + c_headers + all_sources,
suite: 'code',
)
endif