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

Unified Diff: appengine/findit/waterfall/try_job_util.py

Issue 2232613002: Chop off platform name from step name (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Remove ' on ', simplification, and code review changes Created 4 years, 4 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 | « appengine/findit/waterfall/test/try_job_util_test.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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])
« no previous file with comments | « appengine/findit/waterfall/test/try_job_util_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698