Skip to content

Commit

Permalink
Add failing test to shell step that requires renderable workdir
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitali Lovich committed Jun 28, 2015
1 parent 39b0142 commit f2f3c42
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions master/buildbot/test/unit/test_steps_shell.py
Expand Up @@ -397,6 +397,21 @@ def test_run_property(self):
self.expectLogfile('property changes', r"res: u'abcdef'")
return self.runStep()

def test_renderable_workdir(self):
self.setupStep(
shell.SetPropertyFromCommand(property="res", command="cmd", workdir=properties.Interpolate('wkdir')))
self.expectCommands(
ExpectShell(workdir='wkdir', usePTY='slave-config',
command="cmd")
+ ExpectShell.log('stdio', stdout='\n\nabcdef\n')
+ 0
)
self.expectOutcome(result=SUCCESS,
state_string="property 'res' set")
self.expectProperty("res", "abcdef") # note: stripped
self.expectLogfile('property changes', r"res: u'abcdef'")
return self.runStep()

def test_run_property_no_strip(self):
self.setupStep(shell.SetPropertyFromCommand(property="res", command="cmd",
strip=False))
Expand Down

0 comments on commit f2f3c42

Please sign in to comment.