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: [
simple_xinit, ['-gl', ':201', ':200'],
args: [simple_xinit.full_path(), ['-gles2', ':199', ':198'],
bug1354.full_path(), ['-gles3', ':203', ':202']
'-t',':201','-r',':200', ]
'----', test('bug1354' + testsuite[0],
xephyr_server.full_path(), simple_xinit,
'-glamor', args: [simple_xinit.full_path(),
'-schedMax', '2000', bug1354.full_path(),
':201', '-t', testsuite[1],'-r', testsuite[2],
'--', '----',
xvfb_args, xephyr_server.full_path(),
':200' '-glamor',
], '-schedMax', '2000',
suite: 'xephyr-glamor', testsuite[1],
timeout: 300, '--',
) xvfb_args,
test('bug1354-gles', testsuite[2]
simple_xinit, ],
args: [simple_xinit.full_path(), suite: 'xephyr-glamor' + testsuite[0],
bug1354.full_path(), timeout: 300,
'-t',':199','-r',':198', )
'----', endforeach
xephyr_server.full_path(),
'-glamor_gles2',
'-schedMax', '2000',
':199',
'--',
xvfb_args,
':198'
],
env: gles20_env,
suite: 'xephyr-glamor-gles2',
timeout: 300,
)
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,76 +106,47 @@ if get_option('xvfb')
endif endif
if get_option('xephyr') and build_glamor if get_option('xephyr') and build_glamor
test('XTS', foreach testsuite : ['','-gles2','-gles3']
find_program('scripts/xephyr-glamor-piglit.sh'), test_env = piglit_env
env: piglit_env, if(testsuite == '-gles2')
timeout: 1200, test_env = gles20_env
suite: 'xephyr-glamor', endif
) test('XTS',
test('XTS', find_program('scripts/xephyr-glamor' + testsuite + '-piglit.sh'),
find_program('scripts/xephyr-glamor-gles2-piglit.sh'), env: piglit_env,
env: gles20_env, timeout: 1200,
timeout: 1200, suite: 'xephyr-glamor' + testsuite,
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
test(rctest[0], foreach rctest : testsuite[0]
simple_xinit, test(rctest[0],
args: [simple_xinit.full_path(), simple_xinit,
rendercheck.path(), args: [simple_xinit.full_path(),
rctest[1].split(' '), rendercheck.path(),
'----', rctest[1].split(' '),
xephyr_server.full_path(), '----',
'-glamor', xephyr_server.full_path(),
'-glamor-skip-present', '-glamor' + testsuite[1],
'-schedMax', '2000', '-glamor-skip-present',
'--', '-schedMax', '2000',
xvfb_args, '--',
], xvfb_args,
suite: 'xephyr-glamor', ],
timeout: 300, env: testsuite[2],
) suite: 'xephyr-glamor' + testsuite[3],
endforeach should_fail: testsuite[4],
foreach rctest: rendercheck_tests_gles2_success timeout: 300,
test(rctest[0], )
simple_xinit, endforeach
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