about summary refs log tree commit diff
path: root/libnm-core/tests/meson.build
diff options
context:
space:
mode:
authorSebastien Bacher <seb128@ubuntu.com>2020-01-13 16:10:30 +0100
committerSebastien Bacher <seb128@ubuntu.com>2020-01-13 16:31:40 +0100
commit5a09f7759860f4f2a9bb01471ca8099cd705bc10 (patch)
tree3a9cffc9622d53c9196771a1c7924bceb754f118 /libnm-core/tests/meson.build
parent25691220fd27093630cf244e219b2f4f1f4e749e (diff)
parentca847639aab94434daed120c874e1100c3d75dcf (diff)
Merge remote-tracking branch 'salsa/debian/master'
Diffstat (limited to 'libnm-core/tests/meson.build')
-rw-r--r--libnm-core/tests/meson.build33
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,