1 simple_xinit = executable(
4 include_directories: inc,
5 dependencies: [ xproto_dep ],
8 piglit_env = environment()
9 piglit_env.set('XSERVER_DIR', meson.project_source_root())
10 piglit_env.set('XSERVER_BUILDDIR', meson.project_build_root())
12 gles20_env = environment()
13 gles20_env.set('XSERVER_DIR', meson.project_source_root())
14 gles20_env.set('XSERVER_BUILDDIR', meson.project_build_root())
15 gles20_env.set('MESA_GLES_VERSION_OVERRIDE', '2.0')
17 some_ops = ' -o clear,src,dst,over,xor,disjointover'
18 gles2_working_formats = ' -f '+ ','.join(['a8',
32 rendercheck_tests_noblend = [
33 ['blend/All/a8r8g8b8', '-t blend -f a8r8g8b8'],
34 ['blend/All/x8r8g8b8', '-t blend -f a8r8g8b8,x8r8g8b8'],
35 ['blend/All/a2r10g10b10', '-t blend -f a8r8g8b8,a2r10g10b10'],
36 ['composite/Some/a8r8g8b8', '-t composite -f a8r8g8b8' + some_ops],
37 ['composite/Some/x8r8g8b8', '-t composite -f a8r8g8b8,x8r8g8b8' + some_ops],
38 ['composite/Some/a2r10g10b10', '-t composite -f a8r8g8b8,a2r10g10b10' + some_ops],
39 ['ca composite/Some/a8r8g8b8', '-t cacomposite -f a8r8g8b8' + some_ops],
40 ['ca composite/Some/x8r8g8b8', '-t cacomposite -f a8r8g8b8,x8r8g8b8' + some_ops],
41 ['ca composite/Some/a2r10g10b10', '-t cacomposite -f a8r8g8b8,a2r10g10b10' + some_ops],
43 ['bug7366', '-t bug7366'],
44 ['destination coordinates', '-t dcoords'],
45 ['source coordinates', '-t scoords'],
46 ['mask coordinates', '-t mcoords'],
47 ['translated source coordinates', '-t tscoords'],
48 ['translated mask coordinates', '-t tmcoords'],
49 ['triangles', '-t triangles'],
50 ['LibreOffice xRGB', '-t libreoffice_xrgb'],
51 ['GTK ARGB vs xBGR', '-t gtk_argb_xbgr'],
54 ['blend/Clear', '-t blend -o clear'],
55 ['blend/Src', '-t blend -o src'],
56 ['blend/Over', '-t blend -o over'],
58 #A8 test failing on GLES 2.0 llvmpipe before mesa 23.
60 ['ca composite/Some/a8', '-t cacomposite -f a8r8g8b8,a8' + some_ops],
62 #Exclude 15bpp for now due to GLES limitation (see glamor.c:470)
63 rendercheck_blend_gles2 = [
64 ['blend/Clear', '-t blend -o clear' + gles2_working_formats],
65 ['blend/Src', '-t blend -o src' + gles2_working_formats],
66 ['blend/Over', '-t blend -o over' + gles2_working_formats],
68 rendercheck_tests = rendercheck_blend + rendercheck_tests_noblend + rendercheck_a8
69 rendercheck_tests_gles2_success = rendercheck_blend_gles2 + rendercheck_tests_noblend
70 rendercheck_tests_gles3 = rendercheck_blend_gles2 + rendercheck_tests_noblend + rendercheck_a8
71 rendercheck = find_program('rendercheck', required:false)
75 xvfb_server.full_path(),
82 find_program('scripts/xvfb-piglit.sh'),
88 if rendercheck.found()
89 foreach rctest: rendercheck_tests
92 # Use full_path so people can copy and paste the
93 # command line from testlog.txt easily.
95 rendercheck.full_path(),
105 if get_option('xephyr') and build_glamor
106 foreach testsuite : ['','-gles2','-gles3']
107 test_env = piglit_env
108 if(testsuite == '-gles2')
109 test_env = gles20_env
112 find_program('scripts/xephyr-glamor' + testsuite + '-piglit.sh'),
115 suite: 'xephyr-glamor' + testsuite,
119 [rendercheck_tests, '', piglit_env, '', false],
120 [rendercheck_tests_gles2_success, '_gles2', gles20_env, '-gles2', false],
121 [rendercheck_a8, '_gles2', gles20_env, '-gles2', true],
122 [rendercheck_tests_gles3, '_gles2', piglit_env, '-gles3', false]
125 if rendercheck.found()
126 foreach testsuite : test_parameters
127 foreach rctest : testsuite[0]
130 args: [simple_xinit.full_path(),
131 rendercheck.full_path(),
132 rctest[1].split(' '),
134 xephyr_server.full_path(),
135 '-glamor' + testsuite[1],
136 '-glamor-skip-present',
142 suite: 'xephyr-glamor' + testsuite[3],
143 should_fail: testsuite[4],
154 xwayland_server.full_path(),
158 find_program('scripts/xwayland-piglit.sh'),
171 # Tests that require at least some DDX functions in order to fully link
172 # For now, requires xf86 ddx, could be adjusted to use another
191 unit_c_args = ['-DXORG_TESTS']
192 unit_includes = [inc, xorg_inc]
195 unit_sources += ['hashtabletest.c']
196 unit_c_args += ['-DRES_TESTS']
199 if meson.get_compiler('c').has_link_argument('-Wl,-wrap')
200 # LTO breaks with -Wl,-wrap on certain configurations
201 unit_c_args += ['-fno-lto']
203 'xi1/protocol-xchangedevicecontrol.c',
204 'xi2/protocol-common.c',
205 'xi2/protocol-xiqueryversion.c',
206 'xi2/protocol-xiquerydevice.c',
207 'xi2/protocol-xiselectevents.c',
208 'xi2/protocol-xigetselectedevents.c',
209 'xi2/protocol-xisetclientpointer.c',
210 'xi2/protocol-xigetclientpointer.c',
211 'xi2/protocol-xiquerypointer.c',
212 'xi2/protocol-xipassivegrabdevice.c',
213 'xi2/protocol-xiwarppointer.c',
214 'xi2/protocol-eventconvert.c',
217 unit_c_args += ['-DLDWRAP_TESTS']
218 unit_includes += [include_directories('xi1', 'xi2')]
220 '-Wl,-wrap,dixLookupWindow',
221 '-Wl,-wrap,dixLookupClient',
222 '-Wl,-wrap,WriteToClient',
223 '-Wl,-wrap,dixLookupWindow',
224 '-Wl,-wrap,XISetEventMask',
225 '-Wl,-wrap,AddResource',
226 '-Wl,-wrap,GrabButton',
230 message('ld -wrap required for xi1 & xi2 unit tests, skipping')
233 unit = executable('tests',
236 dependencies: [x11_dep, pixman_dep, randrproto_dep, inputproto_dep, libxcvt_dep],
237 include_directories: unit_includes,
239 link_with: xorg_link,