# 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
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"
-
set +e
-eval $RUN_CMD
+vulkaninfo | tee /tmp/version.txt | grep \"Mesa $MESA_VERSION\(\s\|$\)\"
if [ $? -ne 0 ]; then
printf "%s\n" "Found $(cat /tmp/version.txt), expected $MESA_VERSION"
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; $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"
+/vkd3d-proton-tests/x64/bin/d3d12 > $RESULTS/vkd3d-proton.log
+
+if [ $? != 0 ]; then
+ quiet print_red printf "%s\n" "Failed, see vkd3d-proton.log!"
+
+ # 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
+ 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"
+ fi
-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"
+ exit 1
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