Chromium Code Reviews| Index: appengine/findit/waterfall/try_job_util.py |
| diff --git a/appengine/findit/waterfall/try_job_util.py b/appengine/findit/waterfall/try_job_util.py |
| index 3af3936746d06383d91c5590ff09b5e1e25899a4..4d55be2bfde8f4d50a9ce64f4602c0f7ca4ca801 100644 |
| --- a/appengine/findit/waterfall/try_job_util.py |
| +++ b/appengine/findit/waterfall/try_job_util.py |
| @@ -148,6 +148,19 @@ def _GetStepsAndTests(failed_steps): |
| return sorted(failed_steps_and_tests) |
| +def _RemovePlatformFromStepName(step_name): |
| + """Returns step name without platform. |
| + |
| + Args: |
| + step_name: Raw step name. Example: 'net_unittests on Windows-10'. |
| + |
| + Returns: |
| + Step name without platform or the string ' on '. Example: 'net_unittests'. |
| + """ |
| + separator = ' on ' |
| + return step_name.split(separator)[0] |
|
lijeffrey
2016/08/10 23:24:25
I believe step_name should always be 1 word, so yo
chanli
2016/08/11 20:47:06
The changes here and in handler_util are all tempo
|
| + |
| + |
| def GetSuspectedCLsWithFailures(heuristic_result): |
| """Generates a list of suspected CLs with failures. |
| @@ -176,13 +189,13 @@ def GetSuspectedCLsWithFailures(heuristic_result): |
| for test in failure['tests']: |
| for suspected_cl in test.get('suspected_cls', []): |
| suspected_cls_with_failures.append([ |
| - failure['step_name'], |
| + _RemovePlatformFromStepName(failure['step_name']), |
| suspected_cl['revision'], |
| test['test_name']]) |
| else: |
| for suspected_cl in failure['suspected_cls']: |
| suspected_cls_with_failures.append([ |
| - failure['step_name'], |
| + _RemovePlatformFromStepName(failure['step_name']), |
| suspected_cl['revision'], |
| None]) |