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

Unified Diff: scripts/slave/recipe_modules/filter/api.py

Issue 448343002: Makes filter step continue on if error (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: add hello step Created 6 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 | « no previous file | scripts/slave/recipe_modules/filter/example.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/recipe_modules/filter/api.py
diff --git a/scripts/slave/recipe_modules/filter/api.py b/scripts/slave/recipe_modules/filter/api.py
index 65c8c482334541f488179b0677712b59f1d6a928..fe6a6d83b723268c1fe36fa3a0a19215a92de7c6 100644
--- a/scripts/slave/recipe_modules/filter/api.py
+++ b/scripts/slave/recipe_modules/filter/api.py
@@ -75,14 +75,23 @@ class FilterApi(recipe_api.RecipeApi):
kwargs.setdefault('env', {})
kwargs['env'].update(self.m.chromium.c.gyp_env.as_jsonish())
- step_result = self.m.python('analyze',
- self.m.path['checkout'].join('build', 'gyp_chromium'),
- args=['--analyzer2',
- self.m.json.input(analyze_input),
- self.m.json.output()],
- step_test_data=lambda: self.m.json.test_api.output(
- test_output),
- **kwargs)
+ try:
+ step_result = self.m.python('analyze',
+ self.m.path['checkout'].join('build', 'gyp_chromium'),
+ args=['--analyzer2',
+ self.m.json.input(analyze_input),
+ self.m.json.output()],
+ step_test_data=lambda: self.m.json.test_api.output(
+ test_output),
+ **kwargs)
+ except self.m.step.StepFailure as f:
+ # Continue on if there is an error executing python. Most likely runhooks
+ # will fail too, but errors there are more well understood than here.
+ self._result = True
+ step_result = f.result
+ step_result.presentation.status = 'WARNING'
+ return
+
if 'error' in step_result.json.output:
self._result = True
step_result.presentation.step_text = 'Error: ' + \
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/filter/example.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698