| # Copyright 2020 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| """Recipe for triggering CQ+2 on changes which meet submitability criteria and have opted in via Auto-Submit+1.""" |
| |
| from PB.recipes.fuchsia.gerrit_auto_submit import InputProperties |
| |
| DEPS = [ |
| "fuchsia/gerrit_auto_submit", |
| ] |
| |
| PROPERTIES = InputProperties |
| |
| |
| def RunSteps(api, props): |
| return api.gerrit_auto_submit( |
| opts=props.gerrit_auto_submit_options, |
| dry_run=props.dry_run, |
| ) |
| |
| |
| def GenTests(api): |
| yield ( |
| api.test("default") |
| + api.gerrit_auto_submit.options() |
| + api.gerrit_auto_submit.changes_query_test_data() |
| + api.gerrit_auto_submit.changes_submitted_together_test_data() |
| + api.gerrit_auto_submit.mergeable_test_data() |
| + api.gerrit_auto_submit.cq_success() |
| ) |