[Sanitizers] Don't retry failed tests.

bug: webrtc:9849
Change-Id: I916c407b91e78934da8cf1be2de43c906549305a
Reviewed-on: https://webrtc-review.googlesource.com/c/104720
Commit-Queue: Yves Gerey <yvesg@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25701}
This commit is contained in:
Yves Gerey 2018-10-08 21:59:25 +02:00 committed by Commit Bot
parent b22f077a60
commit 2e0c655bc6
2 changed files with 13 additions and 8 deletions

View File

@ -833,6 +833,7 @@ class MetaBuildWrapper(object):
'../../testing/test_env.py',
]
must_retry = False
if test_type == 'script':
cmdline = ['../../' + self.ToSrcRelPath(isolate_map[target]['script'])]
elif is_android:
@ -874,12 +875,21 @@ class MetaBuildWrapper(object):
# so it can exit cleanly and report results, instead of being
# interrupted by swarming and not reporting anything.
'--timeout=%s' % timeout,
'--retry_failed=3',
]
if test_type == 'non_parallel_console_test_launcher':
# Still use the gtest-parallel-wrapper.py script since we need it to
# run tests on swarming, but don't execute tests in parallel.
cmdline.append('--workers=1')
must_retry = True
asan = 'is_asan=true' in vals['gn_args']
lsan = 'is_lsan=true' in vals['gn_args']
msan = 'is_msan=true' in vals['gn_args']
tsan = 'is_tsan=true' in vals['gn_args']
sanitizer = asan or lsan or msan or tsan
if must_retry and not sanitizer:
# Retry would hide most sanitizers detections.
cmdline.append('--retry_failed=3')
executable_prefix = '.\\' if self.platform == 'win32' else './'
executable_suffix = '.exe' if self.platform == 'win32' else ''
@ -887,11 +897,6 @@ class MetaBuildWrapper(object):
cmdline.append(executable)
asan = 'is_asan=true' in vals['gn_args']
lsan = 'is_lsan=true' in vals['gn_args']
msan = 'is_msan=true' in vals['gn_args']
tsan = 'is_tsan=true' in vals['gn_args']
cmdline.extend([
'--asan=%d' % asan,
'--lsan=%d' % lsan,

View File

@ -382,8 +382,8 @@ class UnitTest(unittest.TestCase):
'--output_dir=${ISOLATED_OUTDIR}/test_logs',
'--gtest_color=no',
'--timeout=500',
'--retry_failed=3',
'--workers=1',
'--retry_failed=3',
'./base_unittests',
'--asan=0',
'--lsan=0',
@ -502,8 +502,8 @@ class UnitTest(unittest.TestCase):
'--output_dir=${ISOLATED_OUTDIR}/test_logs',
'--gtest_color=no',
'--timeout=900',
'--retry_failed=3',
'--workers=1',
'--retry_failed=3',
'./base_unittests',
'--asan=0',
'--lsan=0',