summaryrefslogtreecommitdiff
path: root/tests/meson.build
blob: c895ed671e0d965199412501cd335879bc94b413 (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
51
52
53
54
55
if enable_gir and has_dbusmock
  integration_test = find_program('integration-test.py')

  envs = environment()
  envs.set ('top_builddir', meson.build_root())
  envs.set ('top_srcdir', meson.source_root())

  test_deps = [ gnomebt_priv_gir, ]

  python3 = find_program('python3')
  unittest_inspector = find_program('unittest_inspector.py')
  r = run_command(unittest_inspector, files('integration-test.py'))
  unit_tests = r.stdout().strip().split('\n')

  foreach ut: unit_tests
    ut_args = files('integration-test.py')
    ut_args += ut
    test(ut,
      python3,
      args: ut_args,
      env: envs,
      depends: test_deps
    )
  endforeach
endif

if not has_dbusmock
  test('integration-test-skipped',
    find_program('integration-test-skipped.sh'),
  )
endif

test_bluetooth_device = executable('test-bluetooth-device',
  'test-bluetooth-device.c',
  include_directories: lib_inc,
  dependencies: deps,
  c_args: cflags,
  link_with: libgnome_bluetooth,
)

test('test-bluetooth-device-test',
  test_bluetooth_device,
)

test_bluetooth_utils = executable('test-bluetooth-utils',
  [ 'test-bluetooth-utils.c', enum_sources ],
  include_directories: [ top_inc, lib_inc],
  dependencies: deps,
  c_args: cflags,
  link_with: libgnome_bluetooth,
)

test('test-bluetooth-device-utils',
  test_bluetooth_utils,
)