Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Helper functions to print buildbot messages.""" | 5 """Helper functions to print buildbot messages.""" |
|
frankf
2013/07/08 19:13:43
Let's move this to build/android/buildbot. This co
gkanwar
2013/07/08 21:17:07
I'm not sure it actually makes sense to do this. T
| |
| 6 | 6 |
| 7 def PrintLink(label, url): | 7 def PrintLink(label, url): |
| 8 """Adds a link with name |label| linking to |url| to current buildbot step. | 8 """Adds a link with name |label| linking to |url| to current buildbot step. |
| 9 | 9 |
| 10 Args: | 10 Args: |
| 11 label: A string with the name of the label. | 11 label: A string with the name of the label. |
| 12 url: A string of the URL. | 12 url: A string of the URL. |
| 13 """ | 13 """ |
| 14 print '@@@STEP_LINK@%s@%s@@@' % (label, url) | 14 print '@@@STEP_LINK@%s@%s@@@' % (label, url) |
| 15 | 15 |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 37 print '@@@STEP_FAILURE@@@' | 37 print '@@@STEP_FAILURE@@@' |
| 38 | 38 |
| 39 | 39 |
| 40 def PrintWarning(): | 40 def PrintWarning(): |
| 41 """Marks the current step with a warning.""" | 41 """Marks the current step with a warning.""" |
| 42 print '@@@STEP_WARNINGS@@@' | 42 print '@@@STEP_WARNINGS@@@' |
| 43 | 43 |
| 44 | 44 |
| 45 def PrintNamedStep(step): | 45 def PrintNamedStep(step): |
| 46 print '@@@BUILD_STEP %s@@@' % step | 46 print '@@@BUILD_STEP %s@@@' % step |
| 47 | |
| 48 | |
| 49 def PrintStepResultIfNeeded(options, result): | |
| 50 if result: | |
| 51 if options.buildbot_step_failure: | |
| 52 PrintError() | |
| 53 else: | |
| 54 PrintWarning() | |
| OLD | NEW |