summaryrefslogtreecommitdiff
path: root/testsuite/gdk/meson.build
blob: 05f035139361cb2c4e15c8feaeb293b58408638f (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
clipboard_client = executable('clipboard-client',
  sources: ['clipboard-client.c'],
  include_directories: [confinc],
  c_args: common_cflags,
  dependencies: [ libgtk_dep ],
  install: false,
)

tests = [
  { 'name': 'array' },
  { 'name': 'cairo' },
  { 'name': 'clipboard', 'parallel': false, },
  { 'name': 'contentformats' },
  { 'name': 'contentserializer' },
  { 'name': 'cursor' },
  { 'name': 'display' },
  { 'name': 'displaymanager' },
  { 'name': 'encoding' },
  { 'name': 'glcontext' },
  { 'name': 'gltexture' },
  { 'name': 'keysyms' },
  { 'name': 'memorytexture' },
  { 'name': 'rectangle' },
  { 'name': 'rgba' },
  { 'name': 'seat' },
  { 'name': 'texture-threads' },
]

foreach t : tests
  test_name = t.get('name')
  test_exe = executable(test_name,
    sources: '@0@.c'.format(test_name),
    c_args: common_cflags,
    dependencies: libgtk_dep,
    install: false,
  )

  suites = ['gdk'] + t.get('suites', [])

  test(test_name, test_exe,
    args: [ '--tap', '-k' ],
    protocol: 'tap',
    is_parallel: t.get('parallel', false),
    env: [
      'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
      'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
      'DBUS_SESSION_BUS_ADDRESS=',
    ],
    suite: suites,
  )
endforeach

internal_tests = [
  'image',
  'texture',
]

foreach t : internal_tests
  test_exe = executable(t, '@0@.c'.format(t),
    c_args: common_cflags,
    dependencies: libgtk_static_dep,
    install: false,
  )

  test(t, test_exe,
    args: [ '--tap', '-k' ],
    protocol: 'tap',
    env: [
      'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
      'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
      'DBUS_SESSION_BUS_ADDRESS=',
    ],
    suite: 'gdk',
  )
endforeach