Chromium Code Reviews| Index: appengine/findit/waterfall/identify_try_job_culprit_pipeline.py |
| diff --git a/appengine/findit/waterfall/identify_try_job_culprit_pipeline.py b/appengine/findit/waterfall/identify_try_job_culprit_pipeline.py |
| index eac4f40a5f5d551037250c8bbcc79303c0dcbe07..3f521b737c9273285eb75cf51391174f310ac11a 100644 |
| --- a/appengine/findit/waterfall/identify_try_job_culprit_pipeline.py |
| +++ b/appengine/findit/waterfall/identify_try_job_culprit_pipeline.py |
| @@ -168,13 +168,16 @@ class IdentifyTryJobCulpritPipeline(BasePipeline): |
| report.get('result', {})) |
| def _FindCulpritForEachTestFailure(self, blame_list, result): |
| - # For test failures, the try job will run against every revision, |
| - # so we need to traverse the result dict in chronological order to identify |
| - # the culprits for each failed step or test. |
| + # For test failures, we need to traverse the result dict in chronological |
| + # order to identify the culprits for each failed step or test. |
| + # The earliest revision that a test failed is the culprit. |
| culprit_map = {} |
| failed_revisions = [] |
| + test_results = result['report'].get('result') |
| + |
| for revision in blame_list: |
| - test_results = result['report'].get('result') |
| + if not test_results.get(revision): |
|
stgao
2016/05/04 21:40:18
How about let the recipe compute the culprits it f
chanli
2016/05/04 23:41:37
Done.
|
| + continue |
| for step, test_result in test_results[revision].iteritems(): |
| if (not test_result['valid'] or |