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

Unified Diff: master/skia_master_scripts/skia_build_step.py

Issue 313203003: on CompareGMs failure, show link to most recent results on this builder (Closed) Base URL: https://skia.googlesource.com/buildbot.git@master
Patch Set: now displayed as a clickable link next to buildstep name Created 6 years, 6 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 | « master/skia_master_scripts/factory.py ('k') | site_config/global_variables.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: master/skia_master_scripts/skia_build_step.py
diff --git a/master/skia_master_scripts/skia_build_step.py b/master/skia_master_scripts/skia_build_step.py
index 7749bea0353bf4a1c731c756a252266eb6eba55d..0efbccd08850ffa26c2e66587f18fb83dcbe61b6 100644
--- a/master/skia_master_scripts/skia_build_step.py
+++ b/master/skia_master_scripts/skia_build_step.py
@@ -56,23 +56,33 @@ class SkiaBuildStep(retcode_command.ReturnCodeCommand):
def commandComplete(self, cmd):
""" Override of BuildStep's commandComplete method which allows us to parse
build properties from the output of this step. """
- if (cmd.rc not in (0, retcode_command.ReturnCodeCommand.RETCODE_WARNINGS)
- and self._exception_on_failure):
- raise Exception('Command marked exception_on_failure failed.')
- if self._get_props_from_stdout and cmd.rc == 0:
+
+ # We make a best effort to parse the properties out of stdout, whether
+ # the command succeeded or failed. If the command succeeded, we
+ # definitely expect the property to be found in stdout--if not, raise
+ # an exception.
+ if self._get_props_from_stdout:
log = cmd.logs['stdio']
stdout = ''.join(log.getChunks([STDOUT], onlyText=True))
self._changed_props = {}
for prop, regex in self._get_props_from_stdout.iteritems():
matches = re.search(regex, stdout)
if not matches:
- raise Exception('Unable to parse %s from stdout.' % prop)
+ if cmd.rc == 0:
+ raise Exception('Unable to parse %s from stdout.' % prop)
+ continue
groups = matches.groups()
if len(groups) != 1:
- raise Exception('Multiple matches for "%s"' % regex)
+ if cmd.rc == 0:
+ raise Exception('Multiple matches for "%s"' % regex)
+ continue
prop_value = groups[0]
self.setProperty(prop, prop_value, ''.join(self.description))
self._changed_props[prop] = prop_value
+
+ if (cmd.rc not in (0, retcode_command.ReturnCodeCommand.RETCODE_WARNINGS)
+ and self._exception_on_failure):
+ raise Exception('Command marked exception_on_failure failed.')
retcode_command.ReturnCodeCommand.commandComplete(self, cmd)
def getText(self, cmd, results):
« no previous file with comments | « master/skia_master_scripts/factory.py ('k') | site_config/global_variables.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698