Trees | Indices | Help |
|
---|
|
1 # This file is part of Buildbot. Buildbot is free software: you can 2 # redistribute it and/or modify it under the terms of the GNU General Public 3 # License as published by the Free Software Foundation, version 2. 4 # 5 # This program is distributed in the hope that it will be useful, but WITHOUT 6 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 # details. 9 # 10 # You should have received a copy of the GNU General Public License along with 11 # this program; if not, write to the Free Software Foundation, Inc., 51 12 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 # 14 # Copyright Buildbot Team Members 15 16 17 from twisted.internet import reactor 18 from buildbot.process.buildstep import BuildStep, LoggingBuildStep 19 from buildbot.process.buildstep import LoggedRemoteCommand 20 from buildbot.status.builder import SUCCESS, FAILURE 21 22 # these classes are used internally by buildbot unit tests 2325 """I am a dummy no-op step, which runs entirely on the master, and simply 26 waits 5 seconds before finishing with SUCCESS 27 """ 28 29 haltOnFailure = True 30 flunkOnFailure = True 31 name = "dummy" 325634 """ 35 @type timeout: int 36 @param timeout: the number of seconds to delay before completing 37 """ 38 BuildStep.__init__(self, **kwargs) 39 self.addFactoryArguments(timeout=timeout) 40 self.timeout = timeout 41 self.timer = None4244 self.step_status.setText(["delay", "%s secs" % self.timeout]) 45 self.timer = reactor.callLater(self.timeout, self.done)4648 if self.timer: 49 self.timer.cancel() 50 self.timer = None 51 self.step_status.setText(["delay", "interrupted"]) 52 self.finished(FAILURE)5358 """I am a dummy no-op step that 'runs' master-side and finishes (with a 59 FAILURE status) after 5 seconds.""" 60 61 name = "failing dummy" 626964 self.step_status.setText(["boom", "%s secs" % self.timeout]) 65 self.timer = reactor.callLater(self.timeout, self.done)6671 """I am a dummy no-op step that runs on the remote side and 72 simply waits 5 seconds before completing with success. 73 See L{buildbot.slave.commands.DummyCommand} 74 """ 75 76 haltOnFailure = True 77 flunkOnFailure = True 78 name = "remote dummy" 799781 """ 82 @type timeout: int 83 @param timeout: the number of seconds to delay 84 """ 85 LoggingBuildStep.__init__(self, **kwargs) 86 self.addFactoryArguments(timeout=timeout) 87 self.timeout = timeout 88 self.description = ["remote", "delay", "%s secs" % timeout]8991 return self.description9294 args = {'timeout': self.timeout} 95 cmd = LoggedRemoteCommand("dummy", args) 96 self.startCommand(cmd)99 """I start a command on the slave that waits for the unit test to 100 tell it when to finish. 101 """ 102 103 name = "wait"116105 LoggingBuildStep.__init__(self, **kwargs) 106 self.addFactoryArguments(handle=handle) 107 self.handle = handle108 111113 args = {'handle': (self.handle, self.build.reason)} 114 cmd = LoggedRemoteCommand("dummy.wait", args) 115 self.startCommand(cmd)
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sun Dec 19 18:26:54 2010 | http://epydoc.sourceforge.net |