about summary refs log tree commit diff
path: root/libnm-core/tests/meson.build
diff options
context:
space:
mode:
authorIain Lane <iain@orangesquash.org.uk>2018-09-24 09:29:55 +0100
committerIain Lane <iain@orangesquash.org.uk>2018-09-24 09:29:55 +0100
commite152ec7bf4ba252ff9d3eb13eabd417b931dac9a (patch)
treec323cf856ee0bb8e44590670dd54c19653a55748 /libnm-core/tests/meson.build
parentee9c73a923909e23a649407be77e25235d769e25 (diff)
Import Upstream version 1.12.2
Diffstat (limited to 'libnm-core/tests/meson.build')
-rw-r--r--libnm-core/tests/meson.build49
1 files changed, 49 insertions, 0 deletions
diff --git a/libnm-core/tests/meson.build b/libnm-core/tests/meson.build
new file mode 100644
index 00000000..2eeadd88
--- /dev/null
+++ b/libnm-core/tests/meson.build
@@ -0,0 +1,49 @@
+# test-cert.p12 created with:
+#
+# openssl pkcs12 -export \
+# -in test_key_and_cert.pem \
+# -inkey test_key_and_cert.pem \
+# -certfile test_ca_cert.pem \
+# -name "test-pkcs12" \
+# -out test-cert.p12
+
+enum_types = 'nm-core-tests-enum-types'
+
+enum = gnome.mkenums(
+  enum_types,
+  sources: 'test-general-enums.h',
+  identifier_prefix: nm_id_prefix,
+  c_template: enum_types + '.c.template',
+  h_template: enum_types + '.h.template'
+)
+
+test_units = [
+  'test-compare',
+  'test-crypto',
+  'test-general',
+  'test-keyfile',
+  'test-secrets',
+  'test-setting',
+  '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: nm_core_dep,
+    c_args: [
+        '-DNETWORKMANAGER_COMPILATION_TEST',
+        '-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIBNM_CORE',
+      ] +
+      nm_build_cflags,
+    link_with: libnm_core
+  )
+  test(
+    'libnm-core/' + test_unit,
+    test_script,
+    args: test_args + [exe.full_path()]
+  )
+endforeach