summaryrefslogtreecommitdiff
path: root/tests/network/meson.build
blob: e09ec5cab48b378f15c404c783305bc3d6c3f61c (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
46
47
48
49
50


includes = [top_inc, include_directories('../../panels/network', 'nm-utils')]
cflags = [
  '-DTEST_SRCDIR="@0@"'.format(meson.current_source_dir()),
  '-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_WITH_GLIB',
  '-DNETWORKMANAGER_COMPILATION_TEST',
  '-DTEST_NM_SERVICE="@0@"'.format(join_paths(meson.source_root(), 'tests', 'network', 'nm-utils', 'test-networkmanager-service.py')),
]

exe = executable(
  'test-network-panel',
  ['test-network-panel.c', 'cc-test-window.c', 'nm-utils/nm-test-utils-impl.c'],
  include_directories : includes + [common_inc],
         dependencies : common_deps + network_manager_deps + [libtestshell_dep],
            link_with : [network_panel_lib],
               c_args : cflags
)

envs = [
  'G_MESSAGES_DEBUG=all',
          'BUILDDIR=' + meson.current_build_dir(),
      'TOP_BUILDDIR=' + meson.build_root(),
# Disable ATK, this should not be required but it caused CI failures -- 2018-12-07
      'NO_AT_BRIDGE=1',
      'GTK_A11Y=none',
]

test(
  'test-network-panel',
  find_program('test-network-panel.py'),
      env : envs,
  timeout : 60
)

exe = executable(
  'test-wifi-panel-text',
  ['test-wifi-text.c'],
  include_directories : includes + [common_inc],
  dependencies : common_deps + network_manager_deps + [libtestshell_dep],
  link_with : [network_panel_lib],
  c_args : cflags,
)

test(
  'test-wif-panel-text',
  exe,
  env : envs,
  timeout : 60
)