Chromium Code Reviews| 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. |