Rerun host_debug_unopt in Unopt builders
Test `host_debug_unopt` hit 6 flakes for Q2 2021, and we are re-running this test to improve engine tree.
Change-Id: I08ee645edb9622fa8aa73e82b2415fbf168940c4
Bug: https://github.com/flutter/flutter/issues/89059
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/17522
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Keyong Han <keyonghan@google.com>
diff --git a/recipes/engine_unopt.py b/recipes/engine_unopt.py
index a269fcb..5b7209c 100644
--- a/recipes/engine_unopt.py
+++ b/recipes/engine_unopt.py
@@ -16,6 +16,7 @@
'flutter/os_utils',
'flutter/osx_sdk',
'flutter/repo_util',
+ 'flutter/retry',
'fuchsia/goma',
'recipe_engine/buildbucket',
'recipe_engine/context',
@@ -61,7 +62,11 @@
args.extend(['--ios-variant', ios_out_dir])
if suppress_sanitizers:
args.extend(['--use-sanitizer-suppressions'])
- api.python('Host Tests for %s' % out_dir, script_path, args, venv=venv_path)
+
+ def run_test():
+ return api.python('Host Tests for %s' % out_dir, script_path, args, venv=venv_path)
+ # Rerun test step 3 times by default if failing.
+ api.retry.wrap(run_test)
def AnalyzeDartUI(api):