From 6fa9da0431aeadfe1ba5a63fb25e665d65bca860 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Wed, 4 Oct 2023 20:55:45 +0300 Subject: [PATCH] tests: enable CI for both GLES2 and GLES3 variants Signed-off-by: Konstantin --- test/bugs/meson.build | 58 +++++------ test/meson.build | 108 ++++++++------------- test/scripts/xephyr-glamor-gles3-piglit.sh | 34 +++++++ 3 files changed, 97 insertions(+), 103 deletions(-) create mode 100755 test/scripts/xephyr-glamor-gles3-piglit.sh diff --git a/test/bugs/meson.build b/test/bugs/meson.build index 80eeb0750..9ffb26443 100644 --- a/test/bugs/meson.build +++ b/test/bugs/meson.build @@ -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 bug1354 = executable('bug1354', 'bug1354.c', dependencies: [xcb_dep, xcb_image_dep, xcb_util_dep]) - test('bug1354-gl', - simple_xinit, - args: [simple_xinit.full_path(), - bug1354.full_path(), - '-t',':201','-r',':200', - '----', - xephyr_server.full_path(), - '-glamor', - '-schedMax', '2000', - ':201', - '--', - xvfb_args, - ':200' - ], - suite: 'xephyr-glamor', - 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, - ) + foreach testsuite: [ + ['-gl', ':201', ':200'], + ['-gles2', ':199', ':198'], + ['-gles3', ':203', ':202'] + ] + test('bug1354' + testsuite[0], + simple_xinit, + args: [simple_xinit.full_path(), + bug1354.full_path(), + '-t', testsuite[1],'-r', testsuite[2], + '----', + xephyr_server.full_path(), + '-glamor', + '-schedMax', '2000', + testsuite[1], + '--', + xvfb_args, + testsuite[2] + ], + suite: 'xephyr-glamor' + testsuite[0], + timeout: 300, + ) + endforeach endif endif \ No newline at end of file diff --git a/test/meson.build b/test/meson.build index c28d3c386..7032f3003 100644 --- a/test/meson.build +++ b/test/meson.build @@ -70,6 +70,7 @@ rendercheck_tests_gles2_fail = [ ] rendercheck_tests = rendercheck_blend + rendercheck_tests_noblend + rendercheck_a8 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) if get_option('xvfb') @@ -105,76 +106,47 @@ if get_option('xvfb') endif if get_option('xephyr') and build_glamor - test('XTS', - find_program('scripts/xephyr-glamor-piglit.sh'), - env: piglit_env, - timeout: 1200, - suite: 'xephyr-glamor', - ) - test('XTS', - find_program('scripts/xephyr-glamor-gles2-piglit.sh'), - env: gles20_env, - timeout: 1200, - suite: 'xephyr-glamor-gles2', - ) + foreach testsuite : ['','-gles2','-gles3'] + test_env = piglit_env + if(testsuite == '-gles2') + test_env = gles20_env + endif + test('XTS', + find_program('scripts/xephyr-glamor' + testsuite + '-piglit.sh'), + env: piglit_env, + timeout: 1200, + suite: 'xephyr-glamor' + testsuite, + ) + 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() - foreach rctest: rendercheck_tests - test(rctest[0], - simple_xinit, - args: [simple_xinit.full_path(), - rendercheck.path(), - rctest[1].split(' '), - '----', - xephyr_server.full_path(), - '-glamor', - '-glamor-skip-present', - '-schedMax', '2000', - '--', - xvfb_args, - ], - suite: 'xephyr-glamor', - timeout: 300, - ) - 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, - ) + foreach testsuite : test_parameters + foreach rctest : testsuite[0] + test(rctest[0], + simple_xinit, + args: [simple_xinit.full_path(), + rendercheck.path(), + rctest[1].split(' '), + '----', + xephyr_server.full_path(), + '-glamor' + testsuite[1], + '-glamor-skip-present', + '-schedMax', '2000', + '--', + xvfb_args, + ], + env: testsuite[2], + suite: 'xephyr-glamor' + testsuite[3], + should_fail: testsuite[4], + timeout: 300, + ) + endforeach endforeach endif endif diff --git a/test/scripts/xephyr-glamor-gles3-piglit.sh b/test/scripts/xephyr-glamor-gles3-piglit.sh new file mode 100755 index 000000000..87b0a9b09 --- /dev/null +++ b/test/scripts/xephyr-glamor-gles3-piglit.sh @@ -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