Skip to content

Commit

Permalink
Add asan flag to run_tests.py (#28082)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdero committed Aug 13, 2021
1 parent 057c49c commit 41ca6d4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions testing/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,8 @@ def main():
help='Generate coverage reports for each unit test framework run.')
parser.add_argument('--engine-capture-core-dump', dest='engine_capture_core_dump', action='store_true',
default=False, help='Capture core dumps from crashes of engine tests.')
parser.add_argument('--asan-options', dest='asan_options', action='store', type=str, default='',
help='Runtime AddressSanitizer flags to use if built wth asan (example: "verbosity=1:detect_leaks=0')

args = parser.parse_args()

Expand All @@ -557,6 +559,9 @@ def main():
if args.type != 'java':
assert os.path.exists(build_dir), 'Build variant directory %s does not exist!' % build_dir

if args.asan_options:
os.environ['ASAN_OPTIONS'] = args.asan_options

engine_filter = args.engine_filter.split(',') if args.engine_filter else None
if 'engine' in types:
RunCCTests(build_dir, engine_filter, args.coverage, args.engine_capture_core_dump)
Expand Down

0 comments on commit 41ca6d4

Please sign in to comment.