2017-11-25 11:39:06 +01:00
|
|
|
subdir('config')
|
|
|
|
|
|
|
|
|
|
test_units = [
|
|
|
|
|
'test-general',
|
|
|
|
|
'test-general-with-expect',
|
|
|
|
|
'test-ip4-config',
|
|
|
|
|
'test-ip6-config',
|
|
|
|
|
'test-dcb',
|
|
|
|
|
'test-wired-defname',
|
|
|
|
|
'test-utils'
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
foreach test_unit: test_units
|
|
|
|
|
exe = executable(
|
2017-12-14 17:03:34 +01:00
|
|
|
test_unit,
|
2017-11-25 11:39:06 +01:00
|
|
|
test_unit + '.c',
|
2018-01-07 15:39:42 +01:00
|
|
|
dependencies: test_nm_dep
|
2017-11-25 11:39:06 +01:00
|
|
|
)
|
|
|
|
|
|
2018-04-11 10:49:33 +02:00
|
|
|
test(
|
2018-04-11 14:47:07 +02:00
|
|
|
'src/' + test_unit,
|
2018-04-11 10:49:33 +02:00
|
|
|
test_script,
|
|
|
|
|
args: test_args + [exe.full_path()]
|
|
|
|
|
)
|
2017-11-25 11:39:06 +01:00
|
|
|
endforeach
|
|
|
|
|
|
|
|
|
|
test_unit = 'test-systemd'
|
|
|
|
|
|
2018-01-02 13:37:06 +01:00
|
|
|
cflags = [
|
|
|
|
|
'-DNETWORKMANAGER_COMPILATION_TEST',
|
|
|
|
|
'-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_SYSTEMD',
|
|
|
|
|
]
|
2017-11-25 11:39:06 +01:00
|
|
|
|
|
|
|
|
exe = executable(
|
2017-12-14 17:03:34 +01:00
|
|
|
test_unit,
|
2018-05-30 13:19:07 +02:00
|
|
|
[test_unit + '.c'],
|
2018-01-07 15:39:42 +01:00
|
|
|
include_directories: src_inc,
|
|
|
|
|
dependencies: nm_core_dep,
|
2017-11-25 11:39:06 +01:00
|
|
|
c_args: cflags,
|
|
|
|
|
link_with: libsystemd_nm
|
|
|
|
|
)
|
|
|
|
|
|
2018-04-11 10:49:33 +02:00
|
|
|
test(
|
2018-04-11 14:47:07 +02:00
|
|
|
'src/' + test_unit,
|
2018-04-11 10:49:33 +02:00
|
|
|
test_script,
|
|
|
|
|
args: test_args + [exe.full_path()]
|
|
|
|
|
)
|