[pypy-commit] buildbot default: add a PyPyDownload step
bivab
noreply at buildbot.pypy.org
Mon Sep 10 13:47:46 CEST 2012
Author: David Schneider <david.schneider at picle.org>
Branch:
Changeset: r687:766dbb1a64c1
Date: 2012-09-07 20:21 +0200
http://bitbucket.org/pypy/buildbot/changeset/766dbb1a64c1/
Log: add a PyPyDownload step
Based to PyPyUpload it can download a nightly build. If a revision
is provided it tries to download the build based on got_revision
else it will try to download the latest one.
diff --git a/bot2/pypybuildbot/builds.py b/bot2/pypybuildbot/builds.py
--- a/bot2/pypybuildbot/builds.py
+++ b/bot2/pypybuildbot/builds.py
@@ -70,6 +70,32 @@
except OSError:
pass
+class PyPyDownload(transfer.FileDownload):
+ parms = transfer.FileDownload.parms + ['basename']
+
+ def start(self):
+
+ properties = self.build.getProperties()
+ branch = properties['branch']
+ revision = properties['revision']
+
+ if branch is None:
+ branch = 'trunk'
+ mastersrc = os.path.expanduser(self.mastersrc)
+
+ if branch.startswith('/'):
+ branch = branch[1:]
+ mastersrc = os.path.join(mastersrc, branch)
+ if revision is not None:
+ basename = WithProperties(self.basename).getRenderingFor(self.build)
+ else:
+ basename = self.basename.replace('%(final_file_name)s', 'latest')
+ assert '%' not in basename
+
+ self.mastersrc = os.path.join(mastersrc, basename)
+ #
+ transfer.FileDownload.start(self)
+
class NumpyStatusUpload(transfer.FileUpload):
def finished(self, *args, **kwds):
transfer.FileUpload.finished(self, *args, **kwds)
More information about the pypy-commit
mailing list