From a39db2df3ff41fd8d2502daa600b7563f39b1ff5 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 6 Oct 2024 13:19:02 -0400 Subject: Check all sources in clang-format test --- test/meson.build | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'test') 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 -- cgit v1.2.1