diff --git a/.gitlab-ci/vkd3d-runner.sh b/.gitlab-ci/vkd3d-runner.sh index acf4708d3d7..e17135dae02 100755 --- a/.gitlab-ci/vkd3d-runner.sh +++ b/.gitlab-ci/vkd3d-runner.sh @@ -46,11 +46,21 @@ fi # 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") + +if [ "${VKD3D_FORCE_ASAN:-0}" -eq 1 ]; then + export LD_PRELOAD="libasan.so.8:$INSTALL/lib/libdlclose-skip.so" + export ASAN_OPTIONS="malloc_fill_byte=1" +fi + if ! vulkaninfo | grep driverInfo | tee /tmp/version.txt | grep -qF "Mesa $MESA_VERSION"; then printf "%s\n" "Found $(cat /tmp/version.txt), expected $MESA_VERSION" exit 1 fi +if [ "${VKD3D_FORCE_ASAN:-0}" -eq 1 ]; then + unset LD_PRELOAD +fi + # Gather the list expected failures EXPECTATIONFILE="$RESULTS_DIR/$GPU_VERSION-vkd3d-fails.txt" if [ -f "$INSTALL/$GPU_VERSION-vkd3d-fails.txt" ]; then @@ -94,6 +104,11 @@ fi printf "%s\n" "Running vkd3d-proton testsuite..." +if [ "${VKD3D_FORCE_ASAN:-0}" -eq 1 ]; then + export LD_PRELOAD="libasan.so.8:$INSTALL/lib/libdlclose-skip.so" + export LD_LIBRARY_PATH="/vkd3d-proton-tests/libs/d3d12:/vkd3d-proton-tests/libs/d3d12core:${LD_LIBRARY_PATH}" +fi + LOGFILE="$RESULTS_DIR/vkd3d-proton-log.txt" TEST_LOGS="/test-logs" pushd /vkd3d-proton-tests