Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(192)

Unified Diff: scripts/slave/recipes/findit/chromium/test.py

Issue 1995153002: [Findit] Use build_parameter to pass tests(Recipe side). (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: make the change more generic for later possible changes. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/recipes/findit/chromium/test.py
diff --git a/scripts/slave/recipes/findit/chromium/test.py b/scripts/slave/recipes/findit/chromium/test.py
index 5df3c20073322ce45b1d3c2ea599cc0da01f47df..f32de0f2cd3d980f6cae2a32995b7aae4c11895c 100644
--- a/scripts/slave/recipes/findit/chromium/test.py
+++ b/scripts/slave/recipes/findit/chromium/test.py
@@ -13,6 +13,7 @@ from recipe_engine.recipe_api import Property
DEPS = [
'adb',
+ 'buildbucket',
'depot_tools/bot_update',
'chromium',
'chromium_android',
@@ -45,13 +46,9 @@ PROPERTIES = {
kind=str, help='The last known good revision.'),
'bad_revision': Property(
kind=str, help='The first known good revision.'),
- 'tests': Property(
- kind=Dict(value_type=list),
- help='The failed tests, the test name should be full name, e.g.: {'
- ' "browser_tests": ['
- ' "suite.test1", "suite.test2"'
- ' ]'
- '}'),
+ 'buildbucket': Property(
stgao 2016/05/20 18:53:46 How about keeping both "tests" and "buildbucket" o
chanli 2016/05/20 21:07:37 Good idea. Done.
+ help='The buildbucket property in which we can find build id.'
+ 'We need to use build id to get tests.'),
'use_analyze': Property(
kind=Single(bool, empty_val=False, required=False), default=True,
help='Use analyze to skip commits that do not affect tests.'),
@@ -188,7 +185,15 @@ def _get_reduced_test_dict(original_test_dict, failed_tests_dict):
def RunSteps(api, target_mastername, target_testername, good_revision,
- bad_revision, tests, use_analyze, suspected_revisions):
+ bad_revision, buildbucket, use_analyze, suspected_revisions):
lijeffrey 2016/05/20 20:47:55 nit: rename this buildbucket_data or something sim
chanli 2016/05/20 21:07:37 I'll leave it as is since this property is passed
+
+ buildbucket_json = json.loads(buildbucket)
+ build_id = buildbucket_json['build']['id']
+ get_build_result = api.buildbucket.get_build(build_id)
+ tests = json.loads(
+ get_build_result.stdout['build']['parameters_json']).get(
+ 'additional_parameters', {}).get('tests')
lijeffrey 2016/05/20 20:47:55 if you rename this to 'build_parameters' like Shuo
chanli 2016/05/20 21:07:38 Done.
+
assert tests, 'No failed tests were specified.'
# Figure out which builder configuration we should match for compile config.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698