Beispiel #1
0
 def test_mode_full_copy(self):
     self.setup_step(
         darcs.Darcs(repourl='http://localhost/darcs',
                     mode='full', method='copy'))
     self.expect_commands(
         ExpectShell(workdir='wkdir',
                     command=['darcs', '--version'])
         .exit(0),
         ExpectStat(file='wkdir/.buildbot-patched', log_environ=True)
         .exit(1),
         ExpectRmdir(dir='wkdir', log_environ=True, timeout=1200)
         .exit(0),
         ExpectStat(file='source/_darcs', log_environ=True)
         .exit(0),
         ExpectShell(workdir='source',
                     command=['darcs', 'pull', '--all', '--verbose'])
         .exit(0),
         ExpectCpdir(fromdir='source', todir='build', log_environ=True, timeout=1200)
         .exit(0),
         ExpectShell(workdir='build',
                     command=['darcs', 'changes', '--max-count=1'])
         .stdout('Tue Aug 20 09:18:41 IST 2013 [email protected]')
         .exit(0)
     )
     self.expect_outcome(result=SUCCESS)
     self.expect_property(
         'got_revision', 'Tue Aug 20 09:18:41 IST 2013 [email protected]', 'Darcs')
     return self.run_step()
Beispiel #2
0
 def test_failure(self):
     self.setup_step(worker.CopyDirectory(src="s", dest="d"))
     self.expect_commands(
         ExpectCpdir(fromdir='s', todir='d', timeout=120).exit(1))
     self.expect_outcome(result=FAILURE,
                         state_string="Copying s to d failed. (failure)")
     return self.run_step()
Beispiel #3
0
 def test_maxTime(self):
     self.setup_step(worker.CopyDirectory(src="s", dest="d", maxTime=10))
     self.expect_commands(
         ExpectCpdir(fromdir='s', todir='d', max_time=10,
                     timeout=120).exit(0))
     self.expect_outcome(result=SUCCESS, state_string="Copied s to d")
     return self.run_step()
Beispiel #4
0
 def test_render(self):
     self.setup_step(
         worker.CopyDirectory(src=properties.Property("x"),
                              dest=properties.Property("y")))
     self.properties.setProperty('x', 'XXX', 'here')
     self.properties.setProperty('y', 'YYY', 'here')
     self.expect_commands(
         ExpectCpdir(fromdir='XXX', todir='YYY', timeout=120).exit(0))
     self.expect_outcome(result=SUCCESS, state_string="Copied XXX to YYY")
     return self.run_step()
Beispiel #5
0
 def test_mode_full_copy(self):
     self.setup_step(
         bzr.Bzr(repourl='http://bzr.squid-cache.org/bzr/squid3/trunk',
                 mode='full',
                 method='copy'))
     self.expect_commands(
         ExpectShell(workdir='wkdir', command=['bzr', '--version']).exit(0),
         ExpectStat(file='wkdir/.buildbot-patched',
                    log_environ=True).exit(1),
         ExpectRmdir(dir='build', log_environ=True).exit(0),
         ExpectStat(file='source/.bzr', log_environ=True).exit(0),
         ExpectShell(workdir='source', command=['bzr', 'update']).exit(0),
         ExpectCpdir(fromdir='source', log_environ=True,
                     todir='build').exit(0),
         ExpectShell(workdir='source',
                     command=[
                         'bzr', 'version-info', '--custom',
                         "--template='{revno}"
                     ]).stdout('100').exit(0))
     self.expect_outcome(result=SUCCESS)
     self.expect_property('got_revision', '100', 'Bzr')
     return self.run_step()
Beispiel #6
0
    def test_mode_full_copy(self):
        self.setup_step(
            mtn.Monotone(repourl='mtn://localhost/monotone',
                         mode='full',
                         method='copy',
                         branch='master'))

        self.expect_commands(
            ExpectShell(workdir='wkdir',
                        command=['mtn',
                                 '--version']).stdout(self.MTN_VER).exit(0),
            ExpectStat(file='db.mtn', log_environ=True).exit(0),
            ExpectShell(workdir='.',
                        command=['mtn', 'db', 'info', '--db',
                                 'db.mtn']).stdout('').exit(0),
            ExpectShell(workdir='.',
                        command=[
                            'mtn', 'pull', 'mtn://localhost/monotone?master',
                            '--db', 'db.mtn', '--ticker=dot'
                        ]).exit(0),
            ExpectRmdir(dir='wkdir', log_environ=True, timeout=1200).exit(0),
            ExpectStat(file='source/_MTN', log_environ=True).exit(0),
            ExpectShell(workdir='source',
                        command=[
                            'mtn', 'update', '--revision', 'h:master',
                            '--branch', 'master'
                        ]).exit(0),
            ExpectCpdir(fromdir='source',
                        todir='build',
                        log_environ=True,
                        timeout=1200).exit(0),
            ExpectShell(workdir='build',
                        command=['mtn', 'automate', 'select',
                                 'w:']).stdout(self.REVID).exit(0))
        self.expect_outcome(result=SUCCESS)
        self.expect_property('got_revision', self.REVID, 'Monotone')
        return self.run_step()