| OLD | NEW |
| 1 # -*- test-case-name: buildbot.test.test_steps -*- | 1 # -*- test-case-name: buildbot.test.test_steps -*- |
| 2 | 2 |
| 3 from zope.interface import implements | 3 from zope.interface import implements |
| 4 from twisted.internet import reactor, defer, error | 4 from twisted.internet import reactor, defer, error |
| 5 from twisted.protocols import basic | 5 from twisted.protocols import basic |
| 6 from twisted.spread import pb | 6 from twisted.spread import pb |
| 7 from twisted.python import log | 7 from twisted.python import log |
| 8 from twisted.python.failure import Failure | 8 from twisted.python.failure import Failure |
| 9 from twisted.web.util import formatFailure | 9 from twisted.web.util import formatFailure |
| 10 | 10 |
| (...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1068 # 'reason' can be a Failure, or text | 1068 # 'reason' can be a Failure, or text |
| 1069 self.addCompleteLog('interrupt', str(reason)) | 1069 self.addCompleteLog('interrupt', str(reason)) |
| 1070 d = self.cmd.interrupt(reason) | 1070 d = self.cmd.interrupt(reason) |
| 1071 return d | 1071 return d |
| 1072 | 1072 |
| 1073 def checkDisconnect(self, f): | 1073 def checkDisconnect(self, f): |
| 1074 f.trap(error.ConnectionLost) | 1074 f.trap(error.ConnectionLost) |
| 1075 self.step_status.setText(self.describe(True) + | 1075 self.step_status.setText(self.describe(True) + |
| 1076 ["failed", "slave", "lost"]) | 1076 ["failed", "slave", "lost"]) |
| 1077 self.step_status.setText2(["failed", "slave", "lost"]) | 1077 self.step_status.setText2(["failed", "slave", "lost"]) |
| 1078 return self.finished(FAILURE) | 1078 return self.finished(EXCEPTION) |
| 1079 | 1079 |
| 1080 # to refine the status output, override one or more of the following | 1080 # to refine the status output, override one or more of the following |
| 1081 # methods. Change as little as possible: start with the first ones on | 1081 # methods. Change as little as possible: start with the first ones on |
| 1082 # this list and only proceed further if you have to | 1082 # this list and only proceed further if you have to |
| 1083 # | 1083 # |
| 1084 # createSummary: add additional Logfiles with summarized results | 1084 # createSummary: add additional Logfiles with summarized results |
| 1085 # evaluateCommand: decides whether the step was successful or not | 1085 # evaluateCommand: decides whether the step was successful or not |
| 1086 # | 1086 # |
| 1087 # getText: create the final per-step text strings | 1087 # getText: create the final per-step text strings |
| 1088 # describeText2: create the strings added to the overall build status | 1088 # describeText2: create the strings added to the overall build status |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1160 # this is good enough for most steps, but it can be overridden to | 1160 # this is good enough for most steps, but it can be overridden to |
| 1161 # get more control over the displayed text | 1161 # get more control over the displayed text |
| 1162 self.step_status.setText(self.getText(cmd, results)) | 1162 self.step_status.setText(self.getText(cmd, results)) |
| 1163 self.step_status.setText2(self.maybeGetText2(cmd, results)) | 1163 self.step_status.setText2(self.maybeGetText2(cmd, results)) |
| 1164 | 1164 |
| 1165 # (WithProperties used to be available in this module) | 1165 # (WithProperties used to be available in this module) |
| 1166 from buildbot.process.properties import WithProperties | 1166 from buildbot.process.properties import WithProperties |
| 1167 _hush_pyflakes = [WithProperties] | 1167 _hush_pyflakes = [WithProperties] |
| 1168 del _hush_pyflakes | 1168 del _hush_pyflakes |
| 1169 | 1169 |
| OLD | NEW |