mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-11-27 04:04:23 +08:00
ci: add VKD3D-Proton testsuite runner
Signed-off-by: Andres Gomez <agomez@igalia.com> Reviewed-by: Martin Peres <martin.peres@mupuf.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10870>
This commit is contained in:
parent
fb8a4d89a2
commit
44b085375c
@ -1149,6 +1149,15 @@ meson-mingw32-x86_64:
|
||||
- x86_test-gl
|
||||
- meson-clover-testing
|
||||
|
||||
.vkd3d-proton-test:
|
||||
artifacts:
|
||||
when: on_failure
|
||||
name: "mesa_${CI_JOB_NAME}"
|
||||
paths:
|
||||
- results/vkd3d-proton.log
|
||||
script:
|
||||
- install/vkd3d-proton/run.sh
|
||||
|
||||
.piglit-test:
|
||||
artifacts:
|
||||
when: on_failure
|
||||
|
@ -33,6 +33,7 @@ cp -Rp .gitlab-ci/fossils install/
|
||||
cp -Rp .gitlab-ci/fossilize-runner.sh install/
|
||||
cp -Rp .gitlab-ci/deqp-runner.sh install/
|
||||
cp -Rp .gitlab-ci/deqp-*.txt install/
|
||||
cp -Rp .gitlab-ci/vkd3d-proton install/
|
||||
find . -path \*/ci/\*.txt \
|
||||
-o -path \*/ci/\*traces\*.yml \
|
||||
| xargs -I '{}' cp -p '{}' install/
|
||||
|
74
.gitlab-ci/vkd3d-proton/run.sh
Executable file
74
.gitlab-ci/vkd3d-proton/run.sh
Executable file
@ -0,0 +1,74 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -ex
|
||||
|
||||
if [ "x$VK_DRIVER" = "x" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
INSTALL=$(realpath -s "$PWD"/install)
|
||||
|
||||
RESULTS=$(realpath -s "$PWD"/results)
|
||||
|
||||
# Set up the driver environment.
|
||||
# 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/"
|
||||
|
||||
|
||||
# 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')
|
||||
|
||||
# Set the Vulkan driver to use.
|
||||
export VK_ICD_FILENAMES="$INSTALL/share/vulkan/icd.d/${VK_DRIVER}_icd.x86_64.json"
|
||||
|
||||
# Set environment for Wine.
|
||||
export WINEDEBUG="-all"
|
||||
export WINEPREFIX="/vkd3d-proton-wine64"
|
||||
export WINEESYNC=1
|
||||
|
||||
SANITY_MESA_VERSION_CMD="vulkaninfo | tee /tmp/version.txt | grep \"Mesa $MESA_VERSION\(\s\|$\)\""
|
||||
|
||||
RUN_CMD="export LD_LIBRARY_PATH=$__LD_LIBRARY_PATH; $SANITY_MESA_VERSION_CMD"
|
||||
|
||||
set +e
|
||||
eval $RUN_CMD
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
printf "%s\n" "Found $(cat /tmp/version.txt), expected $MESA_VERSION"
|
||||
fi
|
||||
set -e
|
||||
|
||||
if [ -d "$RESULTS" ]; then
|
||||
cd "$RESULTS" && rm -rf ..?* .[!.]* * && cd -
|
||||
else
|
||||
mkdir "$RESULTS"
|
||||
fi
|
||||
|
||||
VKD3D_PROTON_TESTSUITE_CMD="wine /vkd3d-proton-tests/x64/bin/d3d12.exe >$RESULTS/vkd3d-proton.log 2>&1"
|
||||
|
||||
printf "Running vkd3d-proton testsuite...\n"
|
||||
RUN_CMD="export LD_LIBRARY_PATH=$__LD_LIBRARY_PATH; $VKD3D_PROTON_TESTSUITE_CMD"
|
||||
|
||||
set +e
|
||||
eval $RUN_CMD
|
||||
|
||||
VKD3D_PROTON_RESULTS="vkd3d-proton-${VKD3D_PROTON_RESULTS:-results}"
|
||||
RESULTSFILE="$RESULTS/$VKD3D_PROTON_RESULTS.txt"
|
||||
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"
|
||||
fi
|
||||
|
||||
if diff -q ".gitlab-ci/vkd3d-proton/$PIGLIT_RESULTS.txt.baseline" "$RESULTSFILE"; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
printf "Regressions found, see vkd3d-proton.log!\n"
|
||||
exit 1
|
Loading…
Reference in New Issue
Block a user