diff options
Diffstat (limited to 'libnm-core/tests/meson.build')
| -rw-r--r-- | libnm-core/tests/meson.build | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/libnm-core/tests/meson.build b/libnm-core/tests/meson.build index 1afb9c4b..292eeaa0 100644 --- a/libnm-core/tests/meson.build +++ b/libnm-core/tests/meson.build @@ -9,14 +9,24 @@ enum_types = 'nm-core-tests-enum-types' -enum = gnome.mkenums( +enum_sources = gnome.mkenums_simple( enum_types, sources: 'test-general-enums.h', identifier_prefix: nm_id_prefix, - c_template: enum_types + '.c.template', - h_template: enum_types + '.h.template', ) +deps = [ + libnm_core_dep, + libnm_core_nm_default_dep, +] + +c_flags = [ + '-DNETWORKMANAGER_COMPILATION_TEST', + '-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIBNM_CORE', +] + +test_cert_dir = join_paths(meson.current_source_dir(), 'certs') + test_units = [ 'test-compare', 'test-crypto', @@ -27,22 +37,15 @@ test_units = [ 'test-settings-defaults', ] -test_cert_dir = join_paths(meson.current_source_dir(), 'certs') - foreach test_unit: test_units exe = executable( 'libnm-core-' + test_unit, - [test_unit + '.c'] + enum, - dependencies: [ - libnm_core_dep, - libnm_systemd_shared_no_logging_dep, - ], - c_args: [ - '-DNETWORKMANAGER_COMPILATION_TEST', - '-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIBNM_CORE', - ], - link_with: libnm_core, + [test_unit + '.c'] + enum_sources, + dependencies: deps, + c_args: c_flags, + link_with: libnm_systemd_logging_stub, ) + test( 'libnm-core/' + test_unit, test_script, |