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.""" |
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: |
(...skipping 26 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 |