recipes: Switch to RecipeTestingOptions
Also roll http://fxrev.dev/604733.
Bug: 552
Change-Id: I8a89bef08794573575ef0ab8fa186af46b7ae873
Reviewed-on: https://pigweed-review.googlesource.com/c/infra/recipes/+/68220
Reviewed-by: Oliver Newman <olivernewman@google.com>
Commit-Queue: Rob Mohr <mohrr@google.com>
diff --git a/infra/config/recipes.cfg b/infra/config/recipes.cfg
index ba89c9a..915802a 100644
--- a/infra/config/recipes.cfg
+++ b/infra/config/recipes.cfg
@@ -21,7 +21,7 @@
"deps": {
"fuchsia": {
"branch": "refs/heads/main",
- "revision": "00ae93ad05a0d356d421ed829dd8127565069bee",
+ "revision": "2b3e5e2f0f19bcf9b629de9647a13ee95574ec69",
"url": "https://fuchsia.googlesource.com/infra/recipes"
},
"recipe_engine": {
diff --git a/recipes/recipes.proto b/recipes/recipes.proto
index a0f3973..2f40bba 100644
--- a/recipes/recipes.proto
+++ b/recipes/recipes.proto
@@ -16,6 +16,28 @@
package recipes.pigweed.recipes;
+message Project {
+ // Name of the project, e.g., "pigweed".
+ string name = 1;
+
+ // Include tryjobs with result_visibility COMMENT_LEVEL_RESTRICTED.
+ bool include_restricted = 2;
+
+ // Include tryjobs with result_visibility COMMENT_LEVEL_FULL.
+ bool include_unrestricted = 3;
+
+ // Name of the CQ file. Defaults to "commit-queue.cfg".
+ string cq_config_name = 4;
+}
+
+message RecipeTestingOptions {
+ // List of projects to use when searching for tryjobs.
+ repeated Project projects = 1;
+
+ // Launch tryjobs through Buildbucket API instead of led.
+ bool use_buildbucket = 2;
+}
+
message InputProperties {
// Exit after unit tests complete.
bool unittest_only = 1;
@@ -28,4 +50,6 @@
// LUCI projects to scan for tryjobs.
repeated string projects = 4;
+
+ RecipeTestingOptions recipe_testing_options = 5;
}
diff --git a/recipes/recipes.py b/recipes/recipes.py
index 2c5148c..0f4764c 100644
--- a/recipes/recipes.py
+++ b/recipes/recipes.py
@@ -106,8 +106,6 @@
def RunSteps(api, props):
api.checkout()
- api.recipe_testing.projects = tuple(props.projects) or ('pigweed',)
-
with api.step.defer_results():
api.recipe_testing.run_lint(
api.checkout.root,
@@ -119,8 +117,7 @@
api.recipe_testing.run_tests(
api.checkout.root,
SELFTEST_CL,
- include_public=props.include_public,
- include_private=props.include_private,
+ props.recipe_testing_options,
)
@@ -134,9 +131,8 @@
yield (
api.status_check.test('cq_try')
- + properties(
- unittest_only=False, include_public=True, include_private=False
- )
+ + properties(unittest_only=False)
+ + api.recipe_testing.config((api.recipe_testing.project('pigweed'),))
+ api.checkout.try_test_data()
+ api.commit_queue.test_data('pigweed', COMMIT_QUEUE_CFG)
+ api.recipe_testing.affected_recipes_data(['none'])