Debian Codegraph @

testsuite/gdk/meson.build

raw ◀ ▶
Source reconstructed at patch state 2 of 3 — not the installed (fully patched) source.
3 Debian patches touch this file
1 testexecdir = join_paths(installed_test_bindir, 'gdk')
2 testdatadir = join_paths(installed_test_datadir, 'gdk')
3
4 clipboard_client = executable('clipboard-client',
5 sources: ['clipboard-client.c'],
6 include_directories: [confinc],
7 c_args: common_cflags,
8 dependencies: [ libgtk_dep ],
9 install: get_option('install-tests'),
10 install_dir: testexecdir
11 )
12
13 tests = [
14 { 'name': 'array' },
15 { 'name': 'cairo' },
16 { 'name': 'clipboard', 'parallel': false, 'suites': 'flaky' },
17 { 'name': 'contentformats' },
18 { 'name': 'contentserializer' },
19 { 'name': 'cursor' },
20 { 'name': 'displaymanager' },
21 { 'name': 'glcontext' },
22 { 'name': 'keysyms' },
23 { 'name': 'rectangle' },
24 { 'name': 'rgba' },
25 { 'name': 'seat' },
26 { 'name': 'texture-threads' },
27 { 'name': 'toplevellayout' },
28 { 'name': 'popuplayout' },
29 ]
30
31 if x11_enabled
32 tests += [
33 { 'name': 'display' },
34 { 'name': 'encoding' },
35 ]
36 endif
37
38 if os_linux
39 tests += [
40 { 'name': 'dmabuf-support',
41 'sources': [ 'udmabuf.c' ],
42 # This needs to pass on upstream Gitlab-CI, but cannot be guaranteed
43 # to work on developer machines or downstream build environments
44 'suites': [ 'needs-udmabuf' ],
45 },
46 { 'name': 'colorstate',
47 'sources': [ 'udmabuf.c' ],
48 },
49 ]
50 else
51 tests += [
52 { 'name': 'colorstate' }
53 ]
54 endif
55
56 foreach t : tests
57 test_name = t.get('name')
58 test_exe = executable(test_name,
59 sources: [ '@[email protected]'.format(test_name) ] + t.get('sources', []),
60 c_args: common_cflags,
61 dependencies: libgtk_dep,
62 install: get_option('install-tests'),
63 install_dir: testexecdir,
64 )
65
66 suites = ['gdk'] + t.get('suites', [])
67
68 test(test_name, test_exe,
69 args: [ '--tap', '-k' ],
70 protocol: 'tap',
71 is_parallel: t.get('parallel', false),
72 env: [
73 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
74 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
75 'DBUS_SESSION_BUS_ADDRESS=',
76 ],
77 suite: suites,
78 )
79 endforeach
80
81 internal_tests = [
82 { 'name': 'colorstate-internal' },
83 { 'name': 'dihedral' },
84 { 'name': 'image' },
85 { 'name': 'memorytexture', 'sources': [ 'gdktestutils.c' ] },
86 { 'name': 'mipmap', 'sources': [ 'gdktestutils.c' ] },
87 { 'name': 'texture' },
88 { 'name': 'gltexture' },
89 { 'name': 'subsurface' },
90 { 'name': 'memoryformat' },
91 ]
92
93 internal_test_executables = []
94
95 if os_linux
96 internal_tests += { 'name': 'dmabufformats' }
97 internal_tests += { 'name': 'dmabuftexture', 'suites': 'failing' }
98
99 internal_test_executables += { 'name': 'waylandsocket' }
100 endif
101
102 foreach t : internal_tests
103 test_name = t.get('name')
104 test_exe = executable(test_name,
105 sources: [ '@[email protected]'.format(test_name) ] + t.get('sources', []),
106 c_args: common_cflags + ['-DGTK_COMPILATION'],
107 dependencies: libgtk_static_dep,
108 install: get_option('install-tests'),
109 install_dir: testexecdir,
110 )
111
112 suites = ['gdk'] + t.get('suites', [])
113
114 if host_machine.endian() == 'big' and t.get('name') == 'gltexture'
115 suites += 'failing'
116 endif
117
118 test(test_name, test_exe,
119 args: [ '--tap', '-k' ],
120 protocol: 'tap',
121 env: [
122 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
123 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
124 'DBUS_SESSION_BUS_ADDRESS=',
125 ],
126 suite: suites,
127 )
128 endforeach
129
130 test_executables = {}
131 foreach t : internal_test_executables
132 test_name = t.get('name')
133 test_executable = executable(test_name,
134 sources: [ '@[email protected]'.format(test_name) ] + t.get('sources', []),
135 c_args: common_cflags + ['-DGTK_COMPILATION'],
136 dependencies: libgtk_static_dep,
137 install: false,
138 )
139 test_executables += {test_name: test_executable}
140 endforeach
141
142
143 if get_option('install-tests')
144 foreach t : tests
145 test_name = t.get('name')
146 suites = t.get('suites', [])
147
148 if suites.contains('flaky') or suites.contains('failing')
149 continue
150 endif
151
152 test_cdata = configuration_data()
153 test_cdata.set('testexecdir', testexecdir)
154 test_cdata.set('test', test_name)
155 configure_file(input: 'gdk.test.in',
156 output: '@[email protected]'.format(test_name),
157 configuration: test_cdata,
158 install: true,
159 install_dir: testdatadir,
160 )
161 endforeach
162
163 install_subdir('clipboard-data', install_dir: testexecdir)
164 install_subdir('image-data', install_dir: testexecdir)
165 endif