| 1 |
clipboard_client = executable('clipboard-client', |
| 2 |
sources: ['clipboard-client.c'], |
| 3 |
include_directories: [confinc], |
| 4 |
c_args: common_cflags, |
| 5 |
dependencies: [ libgtk_dep ], |
| 6 |
install: false, |
| 7 |
) |
| 8 |
|
| 9 |
tests = [ |
| 10 |
{ 'name': 'array' }, |
| 11 |
{ 'name': 'cairo' }, |
| 12 |
{ 'name': 'clipboard', 'parallel': false, 'suites': 'flaky' }, |
| 13 |
{ 'name': 'contentformats' }, |
| 14 |
{ 'name': 'contentserializer' }, |
| 15 |
{ 'name': 'cursor' }, |
| 16 |
{ 'name': 'displaymanager' }, |
| 17 |
{ 'name': 'glcontext' }, |
| 18 |
{ 'name': 'keysyms' }, |
| 19 |
{ 'name': 'rectangle' }, |
| 20 |
{ 'name': 'rgba' }, |
| 21 |
{ 'name': 'seat' }, |
| 22 |
{ 'name': 'texture-threads' }, |
| 23 |
{ 'name': 'toplevellayout' }, |
| 24 |
{ 'name': 'popuplayout' }, |
| 25 |
] |
| 26 |
|
| 27 |
if x11_enabled |
| 28 |
tests += [ |
| 29 |
{ 'name': 'display' }, |
| 30 |
{ 'name': 'encoding' }, |
| 31 |
] |
| 32 |
endif |
| 33 |
|
| 34 |
if os_linux |
| 35 |
tests += [ |
| 36 |
{ 'name': 'dmabuf-support', |
| 37 |
'sources': [ 'udmabuf.c' ], |
| 38 |
# This needs to pass on upstream Gitlab-CI, but cannot be guaranteed |
| 39 |
# to work on developer machines or downstream build environments |
| 40 |
'suites': [ 'needs-udmabuf' ], |
| 41 |
}, |
| 42 |
{ 'name': 'colorstate', |
| 43 |
'sources': [ 'udmabuf.c' ], |
| 44 |
}, |
| 45 |
] |
| 46 |
else |
| 47 |
tests += [ |
| 48 |
{ 'name': 'colorstate' } |
| 49 |
] |
| 50 |
endif |
| 51 |
|
| 52 |
foreach t : tests |
| 53 |
test_name = t.get('name') |
| 54 |
test_exe = executable(test_name, |
| 55 |
sources: [ '@[email protected]'.format(test_name) ] + t.get('sources', []), |
| 56 |
c_args: common_cflags, |
| 57 |
dependencies: libgtk_dep, |
| 58 |
install: false, |
| 59 |
) |
| 60 |
|
| 61 |
suites = ['gdk'] + t.get('suites', []) |
| 62 |
|
| 63 |
test(test_name, test_exe, |
| 64 |
args: [ '--tap', '-k' ], |
| 65 |
protocol: 'tap', |
| 66 |
is_parallel: t.get('parallel', false), |
| 67 |
env: [ |
| 68 |
'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()), |
| 69 |
'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()), |
| 70 |
'DBUS_SESSION_BUS_ADDRESS=', |
| 71 |
], |
| 72 |
suite: suites, |
| 73 |
) |
| 74 |
endforeach |
| 75 |
|
| 76 |
internal_tests = [ |
| 77 |
{ 'name': 'colorstate-internal' }, |
| 78 |
{ 'name': 'dihedral' }, |
| 79 |
{ 'name': 'image' }, |
| 80 |
{ 'name': 'memorytexture', 'sources': [ 'gdktestutils.c' ] }, |
| 81 |
{ 'name': 'mipmap', 'sources': [ 'gdktestutils.c' ] }, |
| 82 |
{ 'name': 'texture' }, |
| 83 |
{ 'name': 'gltexture' }, |
| 84 |
{ 'name': 'subsurface' }, |
| 85 |
{ 'name': 'memoryformat' }, |
| 86 |
] |
| 87 |
|
| 88 |
internal_test_executables = [] |
| 89 |
|
| 90 |
if os_linux |
| 91 |
internal_tests += { 'name': 'dmabufformats' } |
| 92 |
internal_tests += { 'name': 'dmabuftexture', 'suites': 'failing' } |
| 93 |
|
| 94 |
internal_test_executables += { 'name': 'waylandsocket' } |
| 95 |
endif |
| 96 |
|
| 97 |
foreach t : internal_tests |
| 98 |
test_name = t.get('name') |
| 99 |
test_exe = executable(test_name, |
| 100 |
sources: [ '@[email protected]'.format(test_name) ] + t.get('sources', []), |
| 101 |
c_args: common_cflags + ['-DGTK_COMPILATION'], |
| 102 |
dependencies: libgtk_static_dep, |
| 103 |
install: false, |
| 104 |
) |
| 105 |
|
| 106 |
suites = ['gdk'] + t.get('suites', []) |
| 107 |
|
| 108 |
test(test_name, test_exe, |
| 109 |
args: [ '--tap', '-k' ], |
| 110 |
protocol: 'tap', |
| 111 |
env: [ |
| 112 |
'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()), |
| 113 |
'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()), |
| 114 |
'DBUS_SESSION_BUS_ADDRESS=', |
| 115 |
], |
| 116 |
suite: suites, |
| 117 |
) |
| 118 |
endforeach |
| 119 |
|
| 120 |
test_executables = {} |
| 121 |
foreach t : internal_test_executables |
| 122 |
test_name = t.get('name') |
| 123 |
test_executable = executable(test_name, |
| 124 |
sources: [ '@[email protected]'.format(test_name) ] + t.get('sources', []), |
| 125 |
c_args: common_cflags + ['-DGTK_COMPILATION'], |
| 126 |
dependencies: libgtk_static_dep, |
| 127 |
install: false, |
| 128 |
) |
| 129 |
test_executables += {test_name: test_executable} |
| 130 |
endforeach |