tests: enable CI for both GLES2 and GLES3 variants

Signed-off-by: Konstantin <ria.freelander@gmail.com>
This commit is contained in:
Konstantin 2023-10-04 20:55:45 +03:00 committed by Emma Anholt
parent ee107cd491
commit 6fa9da0431
3 changed files with 97 additions and 103 deletions

View File

@ -12,40 +12,28 @@ if get_option('xvfb')
if xcb_dep.found() and xcb_image_dep.found() and xcb_util_dep.found() and get_option('xvfb') and get_option('xephyr') and build_glamor if xcb_dep.found() and xcb_image_dep.found() and xcb_util_dep.found() and get_option('xvfb') and get_option('xephyr') and build_glamor
bug1354 = executable('bug1354', 'bug1354.c', dependencies: [xcb_dep, xcb_image_dep, xcb_util_dep]) bug1354 = executable('bug1354', 'bug1354.c', dependencies: [xcb_dep, xcb_image_dep, xcb_util_dep])
test('bug1354-gl', foreach testsuite: [
['-gl', ':201', ':200'],
['-gles2', ':199', ':198'],
['-gles3', ':203', ':202']
]
test('bug1354' + testsuite[0],
simple_xinit, simple_xinit,
args: [simple_xinit.full_path(), args: [simple_xinit.full_path(),
bug1354.full_path(), bug1354.full_path(),
'-t',':201','-r',':200', '-t', testsuite[1],'-r', testsuite[2],
'----', '----',
xephyr_server.full_path(), xephyr_server.full_path(),
'-glamor', '-glamor',
'-schedMax', '2000', '-schedMax', '2000',
':201', testsuite[1],
'--', '--',
xvfb_args, xvfb_args,
':200' testsuite[2]
], ],
suite: 'xephyr-glamor', suite: 'xephyr-glamor' + testsuite[0],
timeout: 300,
)
test('bug1354-gles',
simple_xinit,
args: [simple_xinit.full_path(),
bug1354.full_path(),
'-t',':199','-r',':198',
'----',
xephyr_server.full_path(),
'-glamor_gles2',
'-schedMax', '2000',
':199',
'--',
xvfb_args,
':198'
],
env: gles20_env,
suite: 'xephyr-glamor-gles2',
timeout: 300, timeout: 300,
) )
endforeach
endif endif
endif endif

View File

@ -70,6 +70,7 @@ rendercheck_tests_gles2_fail = [
] ]
rendercheck_tests = rendercheck_blend + rendercheck_tests_noblend + rendercheck_a8 rendercheck_tests = rendercheck_blend + rendercheck_tests_noblend + rendercheck_a8
rendercheck_tests_gles2_success = rendercheck_blend_gles2 + rendercheck_tests_noblend rendercheck_tests_gles2_success = rendercheck_blend_gles2 + rendercheck_tests_noblend
rendercheck_tests_gles3 = rendercheck_blend_gles2 + rendercheck_tests_noblend + rendercheck_tests_gles2_fail
rendercheck = find_program('rendercheck', required:false) rendercheck = find_program('rendercheck', required:false)
if get_option('xvfb') if get_option('xvfb')
@ -105,21 +106,28 @@ if get_option('xvfb')
endif endif
if get_option('xephyr') and build_glamor if get_option('xephyr') and build_glamor
foreach testsuite : ['','-gles2','-gles3']
test_env = piglit_env
if(testsuite == '-gles2')
test_env = gles20_env
endif
test('XTS', test('XTS',
find_program('scripts/xephyr-glamor-piglit.sh'), find_program('scripts/xephyr-glamor' + testsuite + '-piglit.sh'),
env: piglit_env, env: piglit_env,
timeout: 1200, timeout: 1200,
suite: 'xephyr-glamor', suite: 'xephyr-glamor' + testsuite,
)
test('XTS',
find_program('scripts/xephyr-glamor-gles2-piglit.sh'),
env: gles20_env,
timeout: 1200,
suite: 'xephyr-glamor-gles2',
) )
endforeach
test_parameters = [
[rendercheck_tests, '', piglit_env, '', false],
[rendercheck_tests_gles2_success, '_gles2', gles20_env, '-gles2', false],
[rendercheck_tests_gles2_fail, '_gles2', gles20_env, '-gles2', true],
[rendercheck_tests_gles3, '_gles2', piglit_env, '-gles3', false]
]
if rendercheck.found() if rendercheck.found()
foreach rctest: rendercheck_tests foreach testsuite : test_parameters
foreach rctest : testsuite[0]
test(rctest[0], test(rctest[0],
simple_xinit, simple_xinit,
args: [simple_xinit.full_path(), args: [simple_xinit.full_path(),
@ -127,54 +135,18 @@ if get_option('xvfb')
rctest[1].split(' '), rctest[1].split(' '),
'----', '----',
xephyr_server.full_path(), xephyr_server.full_path(),
'-glamor', '-glamor' + testsuite[1],
'-glamor-skip-present', '-glamor-skip-present',
'-schedMax', '2000', '-schedMax', '2000',
'--', '--',
xvfb_args, xvfb_args,
], ],
suite: 'xephyr-glamor', env: testsuite[2],
suite: 'xephyr-glamor' + testsuite[3],
should_fail: testsuite[4],
timeout: 300, timeout: 300,
) )
endforeach endforeach
foreach rctest: rendercheck_tests_gles2_success
test(rctest[0],
simple_xinit,
args: [simple_xinit.full_path(),
rendercheck.path(),
rctest[1].split(' '),
'----',
xephyr_server.full_path(),
'-glamor_gles2',
'-glamor-skip-present',
'-schedMax', '2000',
'--',
xvfb_args,
],
env: gles20_env,
suite: 'xephyr-glamor-gles2',
timeout: 300,
)
endforeach
foreach rctest: rendercheck_tests_gles2_fail
test(rctest[0],
simple_xinit,
args: [simple_xinit.full_path(),
rendercheck.path(),
rctest[1].split(' '),
'----',
xephyr_server.full_path(),
'-glamor_gles2',
'-glamor-skip-present',
'-schedMax', '2000',
'--',
xvfb_args,
],
env: gles20_env,
suite: 'xephyr-glamor-gles2',
should_fail: true,
timeout: 300,
)
endforeach endforeach
endif endif
endif endif

View File

@ -0,0 +1,34 @@
#!/bin/sh
# this times out on Travis, because the tests take too long.
if test "x$TRAVIS_BUILD_DIR" != "x"; then
exit 77
fi
# Start a Xephyr server using glamor. Since the test environment is
# headless, we start an Xvfb first to host the Xephyr.
export PIGLIT_RESULTS_DIR=$XSERVER_BUILDDIR/test/piglit-results/xephyr-glamor-gles3
export SERVER_COMMAND="$XSERVER_BUILDDIR/hw/kdrive/ephyr/Xephyr \
-glamor_gles2 \
-glamor-skip-present \
-noreset \
-schedMax 2000 \
-screen 1280x1024"
# Tests that currently fail on llvmpipe on CI
PIGLIT_ARGS="$PIGLIT_ARGS -x xcleararea@6"
PIGLIT_ARGS="$PIGLIT_ARGS -x xcleararea@7"
PIGLIT_ARGS="$PIGLIT_ARGS -x xclearwindow@4"
PIGLIT_ARGS="$PIGLIT_ARGS -x xclearwindow@5"
PIGLIT_ARGS="$PIGLIT_ARGS -x xcopyarea@1"
PIGLIT_ARGS="$PIGLIT_ARGS -x xsetfontpath@1"
PIGLIT_ARGS="$PIGLIT_ARGS -x xsetfontpath@2"
export PIGLIT_ARGS
$XSERVER_BUILDDIR/test/simple-xinit \
$XSERVER_DIR/test/scripts/run-piglit.sh \
-- \
$XSERVER_BUILDDIR/hw/vfb/Xvfb \
-screen scrn 1280x1024x24