Skip to content

Commit

Permalink
correctly rmdir when a CVS dir is not updatable
Browse files Browse the repository at this point in the history
  • Loading branch information
djmitche committed May 19, 2012
1 parent 0375655 commit 2b2eba9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion master/buildbot/steps/source/cvs.py
Expand Up @@ -73,7 +73,7 @@ def incremental(self):
if updatable:
rv = yield self.doUpdate()
else:
rv = yield self.doCheckout(self.workdir)
rv = yield self.clobber()
defer.returnValue(rv)

@defer.inlineCallbacks
Expand Down
15 changes: 15 additions & 0 deletions master/buildbot/test/unit/test_steps_source_cvs.py
Expand Up @@ -169,6 +169,9 @@ def test_mode_full_copy_wrong_repo(self):
writer=ExpectRemoteRef(shell.StringFileWriter)))
+ Expect.behavior(uploadString('the-end-of-the-universe'))
+ 0,
Expect('rmdir', dict(dir='source',
logEnviron=True))
+ 0,
ExpectShell(workdir='',
command=['cvs',
'-d',
Expand Down Expand Up @@ -256,6 +259,9 @@ def test_mode_incremental_no_existing_repo(self):
slavesrc='Root', workdir='wkdir/CVS',
writer=ExpectRemoteRef(shell.StringFileWriter)))
+ 1,
Expect('rmdir', dict(dir='wkdir',
logEnviron=True))
+ 0,
ExpectShell(workdir='',
command=['cvs',
'-d',
Expand All @@ -281,6 +287,9 @@ def test_mode_incremental_wrong_repo(self):
writer=ExpectRemoteRef(shell.StringFileWriter)))
+ Expect.behavior(uploadString('the-end-of-the-universe'))
+ 0,
Expect('rmdir', dict(dir='wkdir',
logEnviron=True))
+ 0,
ExpectShell(workdir='',
command=['cvs',
'-d',
Expand Down Expand Up @@ -311,6 +320,9 @@ def test_mode_incremental_wrong_module(self):
writer=ExpectRemoteRef(shell.StringFileWriter)))
+ Expect.behavior(uploadString('the-end-of-the-universe'))
+ 0,
Expect('rmdir', dict(dir='wkdir',
logEnviron=True))
+ 0,
ExpectShell(workdir='',
command=['cvs',
'-d',
Expand Down Expand Up @@ -412,6 +424,9 @@ def test_mode_incremental_with_options(self):
slavesrc='Root', workdir='wkdir/CVS',
writer=ExpectRemoteRef(shell.StringFileWriter)))
+ 1,
Expect('rmdir', dict(dir='wkdir',
logEnviron=True))
+ 0,
ExpectShell(workdir='',
command=['cvs', '-q', '-d',
':pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot',
Expand Down

0 comments on commit 2b2eba9

Please sign in to comment.