ci: fix the vkd3d-proton runner
authorAndres Gomez <agomez@igalia.com>
Mon, 31 May 2021 19:35:25 +0000 (22:35 +0300)
committerMarge Bot <eric+marge@anholt.net>
Wed, 2 Jun 2021 16:30:57 +0000 (16:30 +0000)
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/11087>

.gitlab-ci.yml
.gitlab-ci/vkd3d-proton/run.sh
src/amd/ci/vkd3d-proton-navy_flounder.txt

index a12b4d0..6fe88ed 100644 (file)
@@ -1158,7 +1158,7 @@ meson-mingw32-x86_64:
     paths:
       - results/vkd3d-proton.log
   script:
-    - install/vkd3d-proton/run.sh
+    - ./install/vkd3d-proton/run.sh
 
 .piglit-test:
   artifacts:
index bd5a2cc..0eeb6c2 100755 (executable)
@@ -29,6 +29,21 @@ 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
+    "$@"
+    set -x
+}
+
 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"
@@ -49,7 +64,7 @@ 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"
+quiet printf "%s\n" "Running vkd3d-proton testsuite..."
 RUN_CMD="export LD_LIBRARY_PATH=$__LD_LIBRARY_PATH; $VKD3D_PROTON_TESTSUITE_CMD"
 
 set +e
@@ -57,6 +72,7 @@ eval $RUN_CMD
 
 VKD3D_PROTON_RESULTS="vkd3d-proton-${VKD3D_PROTON_RESULTS:-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
@@ -66,9 +82,10 @@ 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
+if diff -q ".gitlab-ci/vkd3d-proton/$VKD3D_PROTON_RESULTS.txt.baseline" "$RESULTSFILE"; then
     exit 0
 fi
 
-printf "Regressions found, see vkd3d-proton.log!\n"
+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
index 88430fc..f10db93 100644 (file)
@@ -1,10 +1,10 @@
-d3d12:23926: Test failed: PSInvocations: Got 256, expected >= 1024.
-d3d12:30894: Test failed: Got 0xffffffff, expected 0xff9bc864 at (0, 0, 0).
-d3d12:37735: Test failed: Got 0xff00ff00, expected 0xffffffff at (0, 0, 0).
-d3d12:43170:test 7: Test failed: Failed to create reserved resource, hr 0x80070057.
-d3d12:43170:test 8: Test failed: Failed to create reserved resource, hr 0x80070057.
-d3d12:43973:Test 3: Test failed: Got color 0x00000000, expected 0xccb3804d.
-d3d12:46546:Test 12: Test failed: Inconsistent GPU timestamps.
-d3d12:46547:Test 12: Test failed: Inconsistent CPU timestamps.
-d3d12:46633:Test 12: Test failed: Failed to open heap from file mapping: hr #8007000e.
-d3d12:50060:Test 12: Test failed: Got hr 0x8007000e, expected 0.
+d3d12:23926: Test failed: PSInvocations: Got 256, expected >= 1024.\r
+d3d12:30894: Test failed: Got 0xffffffff, expected 0xff9bc864 at (0, 0, 0).\r
+d3d12:37735: Test failed: Got 0xff00ff00, expected 0xffffffff at (0, 0, 0).\r
+d3d12:43170:test 7: Test failed: Failed to create reserved resource, hr 0x80070057.\r
+d3d12:43170:test 8: Test failed: Failed to create reserved resource, hr 0x80070057.\r
+d3d12:43973:Test 3: Test failed: Got color 0x00000000, expected 0xccb3804d.\r
+d3d12:46546:Test 12: Test failed: Inconsistent GPU timestamps.\r
+d3d12:46547:Test 12: Test failed: Inconsistent CPU timestamps.\r
+d3d12:46633:Test 12: Test failed: Failed to open heap from file mapping: hr #8007000e.\r
+d3d12:50060:Test 12: Test failed: Got hr 0x8007000e, expected 0.\r