diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-04-02 09:30:07 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-04-02 09:30:07 +0000 |
commit | f54e142455cb3c9d1662dae7e096a32a47e5409b (patch) | |
tree | 440ecd46269f0eac25e349e1ed58f246490c5e26 /lib/mesa/.gitlab-ci/vkd3d-proton | |
parent | 36d8503c27530f68d655d3ef77a6eaa4dfd8ad65 (diff) |
Import Mesa 23.3.6
Diffstat (limited to 'lib/mesa/.gitlab-ci/vkd3d-proton')
-rwxr-xr-x | lib/mesa/.gitlab-ci/vkd3d-proton/run.sh | 80 |
1 files changed, 37 insertions, 43 deletions
diff --git a/lib/mesa/.gitlab-ci/vkd3d-proton/run.sh b/lib/mesa/.gitlab-ci/vkd3d-proton/run.sh index 61ffd2a32..fbe9f03bc 100755 --- a/lib/mesa/.gitlab-ci/vkd3d-proton/run.sh +++ b/lib/mesa/.gitlab-ci/vkd3d-proton/run.sh @@ -1,8 +1,9 @@ -#!/bin/sh +#!/usr/bin/env bash +# shellcheck disable=SC2035 # FIXME glob set -ex -if [ "x$VK_DRIVER" = "x" ]; then +if [[ -z "$VK_DRIVER" ]]; then exit 1 fi @@ -14,12 +15,12 @@ RESULTS=$(realpath -s "$PWD"/results) # Modifiying here directly LD_LIBRARY_PATH may cause problems when # using a command wrapper. Hence, we will just set it when running the # command. -export __LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$INSTALL/lib/:/vkd3d-proton-tests/x64/" +export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$INSTALL/lib/:/vkd3d-proton-tests/x64/" # Sanity check to ensure that our environment is sufficient to make our tests # run against the Mesa built by CI, rather than any installed distro version. -MESA_VERSION=$(cat "$INSTALL/VERSION" | sed 's/\./\\./g') +MESA_VERSION=$(sed 's/\./\\./g' "$INSTALL/VERSION") # Set the Vulkan driver to use. export VK_ICD_FILENAMES="$INSTALL/share/vulkan/icd.d/${VK_DRIVER}_icd.x86_64.json" @@ -29,14 +30,6 @@ export WINEDEBUG="-all" export WINEPREFIX="/vkd3d-proton-wine64" export WINEESYNC=1 -print_red() { - RED='\033[0;31m' - NC='\033[0m' # No Color - printf "${RED}" - "$@" - printf "${NC}" -} - # wrapper to supress +x to avoid spamming the log quiet() { set +x @@ -44,16 +37,9 @@ quiet() { set -x } -SANITY_MESA_VERSION_CMD="vulkaninfo | tee /tmp/version.txt | grep \"Mesa $MESA_VERSION\(\s\|$\)\"" - -HANG_DETECTION_CMD="/parallel-deqp-runner/build/bin/hang-detection" - -RUN_CMD="export LD_LIBRARY_PATH=$__LD_LIBRARY_PATH; $SANITY_MESA_VERSION_CMD" - set +e -eval $RUN_CMD - -if [ $? -ne 0 ]; then +if ! vulkaninfo | tee /tmp/version.txt | grep "\"Mesa $MESA_VERSION\(\s\|$\)\""; +then printf "%s\n" "Found $(cat /tmp/version.txt), expected $MESA_VERSION" fi set -e @@ -64,31 +50,39 @@ else mkdir "$RESULTS" fi -VKD3D_PROTON_TESTSUITE_CMD="/vkd3d-proton-tests/x64/bin/d3d12 >$RESULTS/vkd3d-proton.log" - quiet printf "%s\n" "Running vkd3d-proton testsuite..." -RUN_CMD="export LD_LIBRARY_PATH=$__LD_LIBRARY_PATH; $HANG_DETECTION_CMD $VKD3D_PROTON_TESTSUITE_CMD" set +e -eval $RUN_CMD - -VKD3D_PROTON_RESULTS="${VKD3D_PROTON_RESULTS:-vkd3d-proton-results}" -RESULTSFILE="$RESULTS/$VKD3D_PROTON_RESULTS.txt" -mkdir -p .gitlab-ci/vkd3d-proton -grep "Test failed" "$RESULTS"/vkd3d-proton.log > "$RESULTSFILE" - -if [ -f "$INSTALL/$VKD3D_PROTON_RESULTS.txt" ]; then - cp "$INSTALL/$VKD3D_PROTON_RESULTS.txt" \ - ".gitlab-ci/vkd3d-proton/$VKD3D_PROTON_RESULTS.txt.baseline" -else - touch ".gitlab-ci/vkd3d-proton/$VKD3D_PROTON_RESULTS.txt.baseline" +if ! /vkd3d-proton-tests/x64/bin/d3d12 > "$RESULTS/vkd3d-proton.log"; +then + # Check if the executable finished (ie. no segfault). + if ! grep "tests executed" "$RESULTS/vkd3d-proton.log" > /dev/null; then + error printf "%s\n" "Failed, see vkd3d-proton.log!" + exit 1 + fi + + # Collect all the failures + VKD3D_PROTON_RESULTS="${VKD3D_PROTON_RESULTS:-vkd3d-proton-results}" + RESULTSFILE="$RESULTS/$VKD3D_PROTON_RESULTS.txt" + mkdir -p .gitlab-ci/vkd3d-proton + grep "Test failed" "$RESULTS"/vkd3d-proton.log > "$RESULTSFILE" + + # Gather the list expected failures + if [ -f "$INSTALL/$VKD3D_PROTON_RESULTS.txt" ]; then + cp "$INSTALL/$VKD3D_PROTON_RESULTS.txt" \ + ".gitlab-ci/vkd3d-proton/$VKD3D_PROTON_RESULTS.txt.baseline" + else + touch ".gitlab-ci/vkd3d-proton/$VKD3D_PROTON_RESULTS.txt.baseline" + fi + + # Make sure that the failures found in this run match the current expectation + if ! diff -q ".gitlab-ci/vkd3d-proton/$VKD3D_PROTON_RESULTS.txt.baseline" "$RESULTSFILE"; then + error printf "%s\n" "Changes found, see vkd3d-proton.log!" + quiet diff --color=always -u ".gitlab-ci/vkd3d-proton/$VKD3D_PROTON_RESULTS.txt.baseline" "$RESULTSFILE" + exit 1 + fi fi -if diff -q ".gitlab-ci/vkd3d-proton/$VKD3D_PROTON_RESULTS.txt.baseline" "$RESULTSFILE"; then - echo "SUCCESS: No changes found!" - exit 0 -fi +printf "%s\n" "vkd3d-proton execution: SUCCESS" -quiet print_red printf "%s\n" "Changes found, see vkd3d-proton.log!" -quiet diff --color=always -u ".gitlab-ci/vkd3d-proton/$VKD3D_PROTON_RESULTS.txt.baseline" "$RESULTSFILE" -exit 1 +exit 0 |