Kokoro: Disable ASAN for debug mac builds

This is an attempt to speed up build times and avoid the flaky timeouts we're seeing with the LLVM debug builds.

Bug: b/147355576
Change-Id: I8dc83dd40a570849d02fe95822de534f0faae595
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/39956
Tested-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
diff --git a/tests/kokoro/macos/continuous.sh b/tests/kokoro/macos/continuous.sh
index 1b0011d..4233aec 100755
--- a/tests/kokoro/macos/continuous.sh
+++ b/tests/kokoro/macos/continuous.sh
@@ -15,7 +15,14 @@
   REACTOR_BACKEND="LLVM"
 fi
 
-cmake .. "-DASAN=ON" "-DCMAKE_BUILD_TYPE=${BUILD_TYPE}" "-DREACTOR_BACKEND=${REACTOR_BACKEND}" "-DREACTOR_VERIFY_LLVM_IR=1"
+# Disable ASAN checks for debug builds to work around Kokoro timeouts that
+# affect llvm-debug builds. See b/147355576 for more information.
+ASAN="ON"
+if [[ "${BUILD_TYPE}" == "Debug" ]]; then
+  ASAN="OFF"
+fi
+
+cmake .. "-DASAN=${ASAN}" "-DCMAKE_BUILD_TYPE=${BUILD_TYPE}" "-DREACTOR_BACKEND=${REACTOR_BACKEND}" "-DREACTOR_VERIFY_LLVM_IR=1"
 make -j$(sysctl -n hw.logicalcpu)
 
 # Run unit tests