summaryrefslogtreecommitdiff
path: root/libnm-util/tests/meson.build
blob: 5e8b84fa26608e3f92a1cc7184434d4855bd11aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
deps = [
  dbus_dep,
  dbus_glib_dep,
  libnm_util_dep,
  shared_nm_utils_base_dep,
]

cflags = common_cflags + [
  '-DNETWORKMANAGER_COMPILATION_TEST',
]

test = 'test-libnm-linking'

test_libnm_linking = executable(
  test,
  test + '.c',
  dependencies: deps + [libnm_dep],
  c_args: cflags,
)

test_units = [
  ['test-crypto', [libtest_crypto], []],
  ['test-general', [], [test_libnm_linking]],
  ['test-secrets', [], []],
  ['test-setting-8021x', [], []],
  ['test-setting-dcb', [], []],
  ['test-settings-defaults', [], []],
]

foreach test_unit: test_units
  exe = executable(
    'libnm-util-' + test_unit[0],
    test_unit[0] + '.c',
    dependencies: deps,
    c_args: cflags,
    link_with: test_unit[1],
    link_depends: test_unit[2],
  )

  test(
    'libnm-util/' + test_unit[0],
    test_script,
    args: test_args + [exe.full_path()],
  )
endforeach