diff options
author | Emma Anholt <emma@anholt.net> | 2021-10-11 16:27:25 -0700 |
---|---|---|
committer | Eric Engestrom <eric@engestrom.ch> | 2021-11-10 21:57:56 +0000 |
commit | f5e4a3ee15a08fc1e23bcd9e8c270b327dda80fb (patch) | |
tree | 3ced234fda317dfb18fda8552b361a3ed7a4fd97 /.gitlab-ci | |
parent | 3edcd42bea036565d771b32e84cb793e80c0b7e6 (diff) |
ci/deqp-runner: Use new deqp-runner's built-in renderer/version checks.
This is prettier in the log files, less shell code, and for non-suite mode
adds checking that the driver has the right git sha1. Also, no need for
suites to have a DEQP_VER to say which dEQP we should run for the renderer
check.
The version checks can help us make sure that GL version exposed doesn't
accidentally regress, and the ".*git" checks that we're using a git
version of Mesa rather than something that snuck in through distro
packages.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13372>
(cherry picked from commit b978688df642870a2a639e267552e6e6088aa48e)
Diffstat (limited to '.gitlab-ci')
-rwxr-xr-x | .gitlab-ci/deqp-runner.sh | 93 |
1 files changed, 26 insertions, 67 deletions
diff --git a/.gitlab-ci/deqp-runner.sh b/.gitlab-ci/deqp-runner.sh index e8aae9fd766..304b1abe724 100755 --- a/.gitlab-ci/deqp-runner.sh +++ b/.gitlab-ci/deqp-runner.sh @@ -12,8 +12,8 @@ DEQP_OPTIONS="$DEQP_OPTIONS --deqp-surface-type=${DEQP_SURFACE_TYPE:-pbuffer}" DEQP_OPTIONS="$DEQP_OPTIONS --deqp-gl-config-name=$DEQP_CONFIG" DEQP_OPTIONS="$DEQP_OPTIONS --deqp-visibility=hidden" -if [ -z "$DEQP_VER" ]; then - echo 'DEQP_VER must be set to something like "gles2", "gles31-khr" or "vk" for the test run' +if [ -z "$DEQP_VER" -a -z "$DEQP_SUITE" ]; then + echo 'DEQP_SUITE must be set to the name of your deqp-gpu_version.toml, or DEQP_VER must be set to something like "gles2", "gles31-khr" or "vk" for the test run' exit 1 fi @@ -45,26 +45,23 @@ mkdir -p $RESULTS HANG_DETECTION_CMD="" -# Generate test case list file. -if [ "$DEQP_VER" = "vk" ]; then - MUSTPASS=/deqp/mustpass/vk-$DEQP_VARIANT.txt - DEQP=/deqp/external/vulkancts/modules/vulkan/deqp-vk - HANG_DETECTION_CMD="/parallel-deqp-runner/build/bin/hang-detection" -elif [ "$DEQP_VER" = "gles2" -o "$DEQP_VER" = "gles3" -o "$DEQP_VER" = "gles31" -o "$DEQP_VER" = "egl" ]; then - MUSTPASS=/deqp/mustpass/$DEQP_VER-$DEQP_VARIANT.txt - DEQP=/deqp/modules/$DEQP_VER/deqp-$DEQP_VER - SUITE=dEQP -elif [ "$DEQP_VER" = "gles2-khr" -o "$DEQP_VER" = "gles3-khr" -o "$DEQP_VER" = "gles31-khr" -o "$DEQP_VER" = "gles32-khr" ]; then - MUSTPASS=/deqp/mustpass/$DEQP_VER-$DEQP_VARIANT.txt - DEQP=/deqp/external/openglcts/modules/glcts - SUITE=dEQP -else - MUSTPASS=/deqp/mustpass/$DEQP_VER-$DEQP_VARIANT.txt - DEQP=/deqp/external/openglcts/modules/glcts - SUITE=KHR -fi - if [ -z "$DEQP_SUITE" ]; then + # Generate test case list file. + if [ "$DEQP_VER" = "vk" ]; then + MUSTPASS=/deqp/mustpass/vk-$DEQP_VARIANT.txt + DEQP=/deqp/external/vulkancts/modules/vulkan/deqp-vk + HANG_DETECTION_CMD="/parallel-deqp-runner/build/bin/hang-detection" + elif [ "$DEQP_VER" = "gles2" -o "$DEQP_VER" = "gles3" -o "$DEQP_VER" = "gles31" -o "$DEQP_VER" = "egl" ]; then + MUSTPASS=/deqp/mustpass/$DEQP_VER-$DEQP_VARIANT.txt + DEQP=/deqp/modules/$DEQP_VER/deqp-$DEQP_VER + elif [ "$DEQP_VER" = "gles2-khr" -o "$DEQP_VER" = "gles3-khr" -o "$DEQP_VER" = "gles31-khr" -o "$DEQP_VER" = "gles32-khr" ]; then + MUSTPASS=/deqp/mustpass/$DEQP_VER-$DEQP_VARIANT.txt + DEQP=/deqp/external/openglcts/modules/glcts + else + MUSTPASS=/deqp/mustpass/$DEQP_VER-$DEQP_VARIANT.txt + DEQP=/deqp/external/openglcts/modules/glcts + fi + cp $MUSTPASS /tmp/case-list.txt # If the caselist is too long to run in a reasonable amount of time, let the job @@ -120,46 +117,6 @@ fi set +e -parse_renderer() { - RENDERER=`grep -A1 TestCaseResult.\*info.renderer $RESULTS/deqp-info.qpa | grep '<Text' | sed 's|.*<Text>||g' | sed 's|</Text>||g'` - VERSION=`grep -A1 TestCaseResult.\*info.version $RESULTS/deqp-info.qpa | grep '<Text' | sed 's|.*<Text>||g' | sed 's|</Text>||g'` - echo "Renderer: $RENDERER" - echo "Version: $VERSION " - - if ! echo $RENDERER | grep -q $DEQP_EXPECTED_RENDERER; then - echo "Expected GL_RENDERER $DEQP_EXPECTED_RENDERER" - exit 1 - fi -} - -check_renderer() { - if echo $DEQP_VER | grep -q egl; then - return - fi - echo "Capturing renderer info for GLES driver sanity checks" - # If you're having trouble loading your driver, uncommenting this may help - # debug. - # export EGL_LOG_LEVEL=debug - VERSION=`echo $DEQP_VER | cut -d '-' -f1 | tr '[a-z]' '[A-Z]'` - export LD_PRELOAD=$TEST_LD_PRELOAD - $DEQP $DEQP_OPTIONS --deqp-case=$SUITE-$VERSION.info.\* --deqp-log-filename=$RESULTS/deqp-info.qpa - export LD_PRELOAD= - parse_renderer -} - -check_vk_device_name() { - echo "Capturing device info for VK driver sanity checks" - export LD_PRELOAD=$TEST_LD_PRELOAD - $DEQP $DEQP_OPTIONS --deqp-case=dEQP-VK.info.device --deqp-log-filename=$RESULTS/deqp-info.qpa - export LD_PRELOAD= - DEVICENAME=`grep deviceName $RESULTS/deqp-info.qpa | sed 's|deviceName: ||g'` - echo "deviceName: $DEVICENAME" - if ! echo $DEVICENAME | grep -q "$DEQP_EXPECTED_RENDERER"; then - echo "Expected deviceName $DEQP_EXPECTED_RENDERER" - exit 1 - fi -} - report_load() { echo "System load: $(cut -d' ' -f1-3 < /proc/loadavg)" echo "# of CPU cores: $(cat /proc/cpuinfo | grep processor | wc -l)" @@ -188,11 +145,6 @@ if [ "$GALLIUM_DRIVER" = "virpipe" ]; then sleep 1 fi -if [ $DEQP_VER = vk ]; then - quiet check_vk_device_name -else - quiet check_renderer -fi RESULTS_CSV=$RESULTS/results.csv FAILURES_CSV=$RESULTS/failures.csv @@ -200,6 +152,13 @@ FAILURES_CSV=$RESULTS/failures.csv export LD_PRELOAD=$TEST_LD_PRELOAD if [ -z "$DEQP_SUITE" ]; then + if [ -n "$DEQP_EXPECTED_RENDERER" ]; then + export DEQP_RUNNER_OPTIONS="$DEQP_RUNNER_OPTIONS --renderer-check "$DEQP_EXPECTED_RENDERER"" + fi + if [ $DEQP_VER != vk -a $DEQP_VER != egl ]; then + export DEQP_RUNNER_OPTIONS="$DEQP_RUNNER_OPTIONS --version-check `cat $INSTALL/VERSION | sed 's/[() ]/./g'`" + fi + deqp-runner \ run \ --deqp $DEQP \ @@ -244,7 +203,7 @@ find $RESULTS -name \*.xml \ -quit $HANG_DETECTION_CMD deqp-runner junit \ - --testsuite $DEQP_VER \ + --testsuite dEQP \ --results $RESULTS/failures.csv \ --output $RESULTS/junit.xml \ --limit 50 \ |