diff --git a/BaseTools/Plugin/HostBasedUnitTestRunner/HostBasedUnitTestRunner.py b/BaseTools/Plugin/HostBasedUnitTestRunner/HostBasedUnitTestRunner.py index b7ed863203af..c39dae236c9b 100644 --- a/BaseTools/Plugin/HostBasedUnitTestRunner/HostBasedUnitTestRunner.py +++ b/BaseTools/Plugin/HostBasedUnitTestRunner/HostBasedUnitTestRunner.py @@ -52,6 +52,12 @@ def do_post_build(self, thebuilder): failure_count = 0 + # Do not catch exceptions in gtest so they are handled by address sanitizer + shell_env.set_shell_var('GTEST_CATCH_EXCEPTIONS', '0') + + # Disable address sanitizer memory leak detection + shell_env.set_shell_var('ASAN_OPTIONS', 'detect_leaks=0') + # Set up the reporting type for Cmocka. shell_env.set_shell_var('CMOCKA_MESSAGE_OUTPUT', 'xml')