| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """Subclasses of various slave command classes.""" | 6 """Subclasses of various slave command classes.""" |
| 7 | 7 |
| 8 import copy | 8 import copy |
| 9 import os | 9 import os |
| 10 | 10 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 119 |
| 120 def getText(self, cmd, results): | 120 def getText(self, cmd, results): |
| 121 text_list = self.describe(True) | 121 text_list = self.describe(True) |
| 122 if self._result_text: | 122 if self._result_text: |
| 123 self._result_text.insert(0, '<div class="BuildResultInfo">') | 123 self._result_text.insert(0, '<div class="BuildResultInfo">') |
| 124 self._result_text.append('</div>') | 124 self._result_text.append('</div>') |
| 125 text_list = text_list + self._result_text | 125 text_list = text_list + self._result_text |
| 126 return text_list | 126 return text_list |
| 127 | 127 |
| 128 def evaluateCommand(self, cmd): | 128 def evaluateCommand(self, cmd): |
| 129 result = None | 129 shell_result = shell.ShellCommand.evaluateCommand(self, cmd) |
| 130 | 130 log_result = None |
| 131 # If the log processor provides an evaluateCommand method, call it. | |
| 132 if self._log_processor and 'evaluateCommand' in dir(self._log_processor): | 131 if self._log_processor and 'evaluateCommand' in dir(self._log_processor): |
| 133 result = self._log_processor.evaluateCommand(cmd) | 132 log_result = self._log_processor.evaluateCommand(cmd) |
| 134 | 133 if shell_result is builder.FAILURE or log_result is builder.FAILURE: |
| 135 if result is None or result is builder.SUCCESS: | 134 return builder.FAILURE |
| 136 # Report success of parent command. | 135 if shell_result is builder.WARNINGS or log_result is builder.WARNINGS: |
| 137 result = shell.ShellCommand.evaluateCommand(self, cmd) | 136 return builder.WARNINGS |
| 138 | 137 return builder.SUCCESS |
| 139 return result | |
| 140 | 138 |
| 141 def _CreateReportLinkIfNeccessary(self): | 139 def _CreateReportLinkIfNeccessary(self): |
| 142 if self._log_processor.ReportLink(): | 140 if self._log_processor.ReportLink(): |
| 143 self.addURL('results', "%s" % self._log_processor.ReportLink()) | 141 self.addURL('results', "%s" % self._log_processor.ReportLink()) |
| OLD | NEW |