+
+ if env.ADDRESS_SANITIZER:
+ # For now we cannot run with leak detection
+ no_leak_check = "ASAN_OPTIONS=detect_leaks=0"
+ env.CORE_COMMAND = no_leak_check + " " + env.CORE_COMMAND
+
+ # We need to have the subunit filter and formatter preload
+ # libasan otherwise the tests fail at startup.
+ #
+ # Also, we do not care about leaks in python
+
+ asan_envs = no_leak_check + " LD_PRELOAD=" + libasan + ' '
+ env.FILTER_OPTIONS = asan_envs + env.FILTER_OPTIONS
+ env.SUBUNIT_FORMATTER = asan_envs + env.SUBUNIT_FORMATTER
+