2020-01-14 10:42:24 +01:00
|
|
|
# SPDX-License-Identifier: LGPL-2.1+
|
|
|
|
|
|
2017-11-25 11:39:06 +01:00
|
|
|
# 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
|
|
|
|
|
|
2017-12-16 14:59:37 +01:00
|
|
|
enum_types = 'nm-core-tests-enum-types'
|
|
|
|
|
|
2019-09-13 14:36:44 +02:00
|
|
|
enum_sources = gnome.mkenums_simple(
|
2017-12-16 14:59:37 +01:00
|
|
|
enum_types,
|
|
|
|
|
sources: 'test-general-enums.h',
|
|
|
|
|
identifier_prefix: nm_id_prefix,
|
2020-11-02 23:34:37 +01:00
|
|
|
body_prefix: '#include "nm-default.h"',
|
2017-11-25 11:39:06 +01:00
|
|
|
)
|
|
|
|
|
|
2019-09-09 23:04:31 +02:00
|
|
|
deps = [
|
2020-01-02 07:37:59 +01:00
|
|
|
libnm_keyfile_dep,
|
2019-09-09 23:04:31 +02:00
|
|
|
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')
|
|
|
|
|
|
2017-11-25 11:39:06 +01:00
|
|
|
test_units = [
|
|
|
|
|
'test-compare',
|
|
|
|
|
'test-crypto',
|
|
|
|
|
'test-general',
|
|
|
|
|
'test-keyfile',
|
|
|
|
|
'test-secrets',
|
|
|
|
|
'test-setting',
|
2018-10-18 12:50:20 +02:00
|
|
|
'test-settings-defaults',
|
2017-11-25 11:39:06 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
foreach test_unit: test_units
|
|
|
|
|
exe = executable(
|
2017-12-14 17:03:34 +01:00
|
|
|
'libnm-core-' + test_unit,
|
2019-09-09 23:04:31 +02:00
|
|
|
[test_unit + '.c'] + enum_sources,
|
2019-09-09 11:40:11 +02:00
|
|
|
dependencies: deps,
|
2019-09-09 23:04:31 +02:00
|
|
|
c_args: c_flags,
|
2019-09-09 11:40:11 +02:00
|
|
|
link_with: libnm_systemd_logging_stub,
|
2017-11-25 11:39:06 +01:00
|
|
|
)
|
2019-09-09 23:04:31 +02:00
|
|
|
|
2018-04-11 10:49:33 +02:00
|
|
|
test(
|
2018-04-11 14:47:07 +02:00
|
|
|
'libnm-core/' + test_unit,
|
2018-04-11 10:49:33 +02:00
|
|
|
test_script,
|
2018-10-18 12:50:20 +02:00
|
|
|
args: test_args + [exe.full_path()],
|
2019-02-22 08:38:54 +01:00
|
|
|
timeout: default_test_timeout,
|
2018-04-11 10:49:33 +02:00
|
|
|
)
|
2017-11-25 11:39:06 +01:00
|
|
|
endforeach
|