[pypy-svn] r75297 - in pypy/build/bot2/pypybuildbot: . test

fijal at codespeak.net fijal at codespeak.net
Sat Jun 12 06:06:31 CEST 2010


Author: fijal
Date: Sat Jun 12 06:06:29 2010
New Revision: 75297

Modified:
   pypy/build/bot2/pypybuildbot/builds.py
   pypy/build/bot2/pypybuildbot/test/test_builds.py
Log:
A test and a fix


Modified: pypy/build/bot2/pypybuildbot/builds.py
==============================================================================
--- pypy/build/bot2/pypybuildbot/builds.py	(original)
+++ pypy/build/bot2/pypybuildbot/builds.py	Sat Jun 12 06:06:29 2010
@@ -25,7 +25,8 @@
         masterdest = os.path.join(masterdest, branch)
         if not os.path.exists(masterdest):
             os.makedirs(masterdest)
-        masterdest = os.path.join(masterdest, self.basename)
+        basename = WithProperties(self.basename).render(properties)
+        masterdest = os.path.join(masterdest, basename)
         self.masterdest = masterdest
         transfer.FileUpload.start(self)
 

Modified: pypy/build/bot2/pypybuildbot/test/test_builds.py
==============================================================================
--- pypy/build/bot2/pypybuildbot/test/test_builds.py	(original)
+++ pypy/build/bot2/pypybuildbot/test/test_builds.py	Sat Jun 12 06:06:29 2010
@@ -5,6 +5,8 @@
     def __getitem__(self, item):
         if item == 'branch':
             return None
+        if item == 'got_revision':
+            return 123
     
     def render(self, x):
         return x
@@ -48,7 +50,7 @@
 def test_pypy_upload():
     pth = py.test.ensuretemp('buildbot')
     inst = builds.PyPyUpload(slavesrc='slavesrc', masterdest=str(pth.join('mstr')),
-                             basename='base', workdir='.',
+                             basename='base-%(got_revision)s', workdir='.',
                              blocksize=100)
     factory, kw = inst.factory
     rebuilt = factory(**kw)
@@ -57,3 +59,4 @@
     rebuilt.runCommand = lambda *args: FakeDeferred()
     rebuilt.start()
     assert pth.join('mstr').check(dir=True)
+    assert rebuilt.masterdest == str(pth.join('mstr', 'trunk', 'base-123'))



More information about the Pypy-commit mailing list