Trees | Indices | Help |
|
---|
|
1 2 from twisted.internet import reactor 3 from buildbot.process.buildstep import BuildStep, LoggingBuildStep 4 from buildbot.process.buildstep import LoggedRemoteCommand 5 from buildbot.status.builder import SUCCESS, FAILURE 6 7 # these classes are used internally by buildbot unit tests 810 """I am a dummy no-op step, which runs entirely on the master, and simply 11 waits 5 seconds before finishing with SUCCESS 12 """ 13 14 haltOnFailure = True 15 flunkOnFailure = True 16 name = "dummy" 174119 """ 20 @type timeout: int 21 @param timeout: the number of seconds to delay before completing 22 """ 23 BuildStep.__init__(self, **kwargs) 24 self.addFactoryArguments(timeout=timeout) 25 self.timeout = timeout 26 self.timer = None2729 self.step_status.setText(["delay", "%s secs" % self.timeout]) 30 self.timer = reactor.callLater(self.timeout, self.done)3133 if self.timer: 34 self.timer.cancel() 35 self.timer = None 36 self.step_status.setText(["delay", "interrupted"]) 37 self.finished(FAILURE)3843 """I am a dummy no-op step that 'runs' master-side and finishes (with a 44 FAILURE status) after 5 seconds.""" 45 46 name = "failing dummy" 475449 self.step_status.setText(["boom", "%s secs" % self.timeout]) 50 self.timer = reactor.callLater(self.timeout, self.done)5156 """I am a dummy no-op step that runs on the remote side and 57 simply waits 5 seconds before completing with success. 58 See L{buildbot.slave.commands.DummyCommand} 59 """ 60 61 haltOnFailure = True 62 flunkOnFailure = True 63 name = "remote dummy" 648266 """ 67 @type timeout: int 68 @param timeout: the number of seconds to delay 69 """ 70 LoggingBuildStep.__init__(self, **kwargs) 71 self.addFactoryArguments(timeout=timeout) 72 self.timeout = timeout 73 self.description = ["remote", "delay", "%s secs" % timeout]7476 return self.description7779 args = {'timeout': self.timeout} 80 cmd = LoggedRemoteCommand("dummy", args) 81 self.startCommand(cmd)84 """I start a command on the slave that waits for the unit test to 85 tell it when to finish. 86 """ 87 88 name = "wait"10190 LoggingBuildStep.__init__(self, **kwargs) 91 self.addFactoryArguments(handle=handle) 92 self.handle = handle93 9698 args = {'handle': (self.handle, self.build.reason)} 99 cmd = LoggedRemoteCommand("dummy.wait", args) 100 self.startCommand(cmd)
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri Oct 29 10:00:49 2010 | http://epydoc.sourceforge.net |