Esempio n. 1
0
def masterConfig(bigfilename):
    c = {}
    from buildbot.config import BuilderConfig
    from buildbot.process.factory import BuildFactory
    from buildbot.plugins import steps, schedulers

    c['schedulers'] = [
        schedulers.ForceScheduler(name="force", builderNames=["testy"])
    ]

    f = BuildFactory()
    # do a bunch of transfer to exercise the protocol
    f.addStep(steps.StringDownload("filecontent", workerdest="dir/file1.txt"))
    f.addStep(steps.StringDownload("filecontent2", workerdest="dir/file2.txt"))
    # create 8 MB file
    with open(bigfilename, 'w') as o:
        buf = "xxxxxxxx" * 1024
        for i in range(1000):
            o.write(buf)
    f.addStep(
        steps.FileDownload(mastersrc=bigfilename, workerdest="bigfile.txt"))
    f.addStep(
        steps.FileUpload(workersrc="dir/file2.txt", masterdest="master.txt"))
    f.addStep(
        steps.FileDownload(mastersrc="master.txt", workerdest="dir/file3.txt"))
    f.addStep(steps.DirectoryUpload(workersrc="dir", masterdest="dir"))
    c['builders'] = [
        BuilderConfig(name="testy", workernames=["local1"], factory=f)
    ]
    return c
Esempio n. 2
0
def masterConfig():
    c = {}
    from buildbot.config import BuilderConfig
    from buildbot.process.factory import BuildFactory
    from buildbot.plugins import steps, schedulers

    c['schedulers'] = [
        schedulers.ForceScheduler(
            name="force",
            builderNames=["testy"])]

    f = BuildFactory()
    # do a bunch of transfer to exercise the protocol
    f.addStep(steps.StringDownload("filecontent", workerdest="dir/file1.txt"))
    f.addStep(steps.StringDownload("filecontent2", workerdest="dir/file2.txt"))
    f.addStep(
        steps.FileUpload(workersrc="dir/file2.txt", masterdest="master.txt"))
    f.addStep(
        steps.FileDownload(mastersrc="master.txt", workerdest="dir/file3.txt"))
    f.addStep(steps.DirectoryUpload(workersrc="dir", masterdest="dir"))
    c['builders'] = [
        BuilderConfig(name="testy",
                      workernames=["local1"],
                      factory=f)
    ]
    return c
Esempio n. 3
0
    def __init__(self):
        ZcashBaseFactory.__init__(self)

        self.addSteps([
            sh('make', 'cov'),
            steps.DirectoryUpload(
                workersrc="./zcash-gtest.coverage",
                masterdest=util.Interpolate("{{ buildbot_coverage_dir }}/%(prop:buildnumber)s-zcash-gtest.coverage"),
                url=util.Interpolate("https://{{ buildbot_host }}/code-coverage/%(prop:buildnumber)s-zcash-gtest.coverage")
            ),
            steps.DirectoryUpload(
                workersrc="./test_bitcoin.coverage",
                masterdest=util.Interpolate("{{ buildbot_coverage_dir }}/%(prop:buildnumber)s-test_zcash.coverage"),
                url=util.Interpolate("https://{{ buildbot_host }}/code-coverage/%(prop:buildnumber)s-test_zcash.coverage")
            ),
            steps.DirectoryUpload(
                workersrc="./total.coverage",
                masterdest=util.Interpolate("{{ buildbot_coverage_dir }}/%(prop:buildnumber)s-total.coverage"),
                url=util.Interpolate("https://{{ buildbot_host }}/code-coverage/%(prop:buildnumber)s-total.coverage")
            ),
            steps.MasterShellCommand("chmod -R 755 {{ buildbot_coverage_dir }}"),
        ])
Esempio n. 4
0
 def get_non_existing_directory_upload_config(self):
     from buildbot.plugins import steps
     step = steps.DirectoryUpload(workersrc="dir/noexist_path", masterdest="master_dest")
     return self.get_config_single_step(step)