Add support for running the VMTest stage multiple times.
BUG=chromium:358343
TEST=Example trybot run with 20 runs of VMTest.
Change-Id: I46f1a8dad926ad1282d8c236abac4a7774595a5c
Reviewed-on: https://chromium-review.googlesource.com/196705
Reviewed-by: Yu-Ju Hong <yjhong@chromium.org>
Tested-by: David James <davidjames@chromium.org>
Commit-Queue: David James <davidjames@chromium.org>
diff --git a/scripts/cbuildbot.py b/scripts/cbuildbot.py
index 25ab8e7..770eddd 100644
--- a/scripts/cbuildbot.py
+++ b/scripts/cbuildbot.py
@@ -490,8 +490,16 @@
stage_list = []
if builder_run.options.chrome_sdk and config.chrome_sdk:
stage_list.append([stages.ChromeSDKStage, board])
+
+ if config.vm_test_runs > 1:
+ # Run the VMTests multiple times to see if they fail.
+ stage_list += [
+ [stages.RepeatStage, config.vm_test_runs, stages.VMTestStage, board]]
+ else:
+ # Give the VMTests one retry attempt in case failures are flaky.
+ stage_list += [[stages.RetryStage, 1, stages.VMTestStage, board]]
+
stage_list += [
- [stages.RetryStage, 1, stages.VMTestStage, board],
[stages.SignerTestStage, board, archive_stage],
[stages.SignerResultsStage, board, archive_stage],
[stages.PaygenStage, board, archive_stage],