From 2d77c7f9c995811787da3d6cb4bbdfa188997ffd Mon Sep 17 00:00:00 2001 From: Guilherme Gallo Date: Tue, 19 Jul 2022 21:41:55 -0300 Subject: [PATCH] ci/skqp: Add an option to run all tests When the skqp is introduced to a new driver, the best practice is to run all available tests from skqp and classifying the failing/crashing/flaking ones. The default behavior of skqp is to run the tests from the commit where the skqp built, which may not be adequate for the target driver. Signed-off-by: Guilherme Gallo Part-of: --- .gitlab-ci/skqp-runner.sh | 65 +++++++++++++++++++++++++++++++++------ 1 file changed, 56 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci/skqp-runner.sh b/.gitlab-ci/skqp-runner.sh index 68aca2d3377..5f8199c2283 100755 --- a/.gitlab-ci/skqp-runner.sh +++ b/.gitlab-ci/skqp-runner.sh @@ -23,6 +23,10 @@ # SOFTWARE. +run_all_tests() { + rm "${SKQP_ASSETS_DIR}"/skqp/*.txt +} + copy_tests_files() ( # Copy either unit test or render test files from a specific driver given by # GPU VERSION variable. @@ -49,6 +53,20 @@ copy_tests_files() ( fi ) +resolve_tests_files() { + if [ -n "${RUN_ALL_TESTS}" ] + then + run_all_tests + return + fi + + SKQP_BACKEND=${1} + if ! copy_tests_files "${SKQP_BACKEND}" + then + echo "No override test file found for ${SKQP_BACKEND}. Using the default one." + fi +} + test_vk_backend() { if echo "${SKQP_BACKENDS}" | grep -qE 'vk' then @@ -78,8 +96,42 @@ setup_backends() { fi } +usage() { + cat <