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

Unified Diff: scripts/slave/annotated_run.py

Issue 24311004: Use always_run v can_fail_build (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: rebase Created 7 years, 3 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 | scripts/slave/recipe_api.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/annotated_run.py
diff --git a/scripts/slave/annotated_run.py b/scripts/slave/annotated_run.py
index e8840a870206d70d382ebf76466ca3510417934d..c5e218b88e29ff153113346953506a676636fdd4 100755
--- a/scripts/slave/annotated_run.py
+++ b/scripts/slave/annotated_run.py
@@ -176,6 +176,7 @@ class StepData(object):
self._step = step
self._presentation = StepPresentation()
+ self.abort_reason = None
@property
def step(self):
@@ -285,8 +286,11 @@ def step_callback(step, step_history, placeholders, test_data_item):
call_placeholders(step_result, placeholders, test_data_item)
- if followup_fn:
- followup_fn(step_result)
+ try:
+ if followup_fn:
+ followup_fn(step_result)
+ except recipe_api.RecipeAbort as e:
+ step_result.abort_reason = str(e)
step_result.presentation.finalize(annotator_step)
return step_result
@@ -422,6 +426,11 @@ def run_steps(stream, build_properties, factory_properties,
# pylint: disable=W0212
step_result._step['~followup_annotations'] = lines
+ if step_result.abort_reason:
+ stream.emit('Aborted: %s' % step_result.abort_reason)
+ test_data = {} # Dump the rest of the test data
+ break
+
# TODO(iannucci): Pull this failure calculation into callback.
failed = annotator.update_build_failure(failed, step_result.retcode, **step)
« no previous file with comments | « no previous file | scripts/slave/recipe_api.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698