From 2e0c655bc6c500642a5042fc34c9acee1ee09fa8 Mon Sep 17 00:00:00 2001 From: Yves Gerey Date: Mon, 8 Oct 2018 21:59:25 +0200 Subject: [PATCH] [Sanitizers] Don't retry failed tests. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bug: webrtc:9849 Change-Id: I916c407b91e78934da8cf1be2de43c906549305a Reviewed-on: https://webrtc-review.googlesource.com/c/104720 Commit-Queue: Yves Gerey Reviewed-by: Patrik Höglund Cr-Commit-Position: refs/heads/master@{#25701} --- tools_webrtc/mb/mb.py | 17 +++++++++++------ tools_webrtc/mb/mb_unittest.py | 4 ++-- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/tools_webrtc/mb/mb.py b/tools_webrtc/mb/mb.py index 7f196bb733..485fceb858 100755 --- a/tools_webrtc/mb/mb.py +++ b/tools_webrtc/mb/mb.py @@ -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, diff --git a/tools_webrtc/mb/mb_unittest.py b/tools_webrtc/mb/mb_unittest.py index 09093c06ba..0e7173abb4 100755 --- a/tools_webrtc/mb/mb_unittest.py +++ b/tools_webrtc/mb/mb_unittest.py @@ -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',