Skip to content

Commit

Permalink
Buildbot interrupts master-side source steps. Fixes #2356
Browse files Browse the repository at this point in the history
  • Loading branch information
srinupiits committed Aug 1, 2013
1 parent afae17b commit 3e74115
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions master/buildbot/process/buildstep.py
Expand Up @@ -785,6 +785,7 @@ def addURL(self, name, url):
self.step_status.addURL(name, url)

def runCommand(self, c):
self.cmd = c
c.buildslave = self.buildslave
d = c.run(self, self.remote)
return d
Expand Down
11 changes: 10 additions & 1 deletion master/buildbot/test/unit/test_process_buildstep.py
Expand Up @@ -21,7 +21,7 @@
from buildbot.process import buildstep
from buildbot.process.buildstep import regex_log_evaluator
from buildbot.status.results import FAILURE, SUCCESS, WARNINGS, EXCEPTION
from buildbot.test.fake import fakebuild, remotecommand
from buildbot.test.fake import fakebuild, remotecommand, slave
from buildbot.test.util import config, steps, compat
from buildbot.util.eventual import eventually

Expand Down Expand Up @@ -138,6 +138,15 @@ def test_setProperty(self):
bs.setProperty("x", "abc", "test", runtime=True)
props.setProperty.assert_called_with("x", "abc", "test", runtime=True)

def test_runCommand(self):
bs = buildstep.BuildStep()
bs.buildslave = slave.FakeSlave()
bs.remote = 'dummy'
cmd = buildstep.RemoteShellCommand("build", ["echo", "hello"], user=None)
cmd.run = lambda self, remote : SUCCESS
bs.runCommand(cmd)
self.assertEqual(bs.cmd, cmd)

def test_hideStepIf_False(self):
self._setupWaterfallTest(False, False)
return self.runStep()
Expand Down

0 comments on commit 3e74115

Please sign in to comment.