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

fijal at codespeak.net fijal at codespeak.net
Sat Nov 8 12:52:59 CET 2008


Author: fijal
Date: Sat Nov  8 12:52:58 2008
New Revision: 59785

Modified:
   pypy/build/bot2/pypybuildbot/builds.py
   pypy/build/bot2/pypybuildbot/test/test_builds.py
Log:
completely revert last bunch of changes, will readd them one at a time


Modified: pypy/build/bot2/pypybuildbot/builds.py
==============================================================================
--- pypy/build/bot2/pypybuildbot/builds.py	(original)
+++ pypy/build/bot2/pypybuildbot/builds.py	Sat Nov  8 12:52:58 2008
@@ -1,7 +1,7 @@
 from buildbot.process import factory
 from buildbot.steps import source, shell
 from buildbot.status.builder import SUCCESS
-import os
+
 
 class ShellCmd(shell.ShellCommand):
     # our own version that can distinguish abort cases (rc == -1)
@@ -16,7 +16,7 @@
 
     def __init__(self, **kwds):
         shell.SetProperty.__init__(self, description="first-time",
-                                   property="first-time", **kwds)
+                                   property="first-time")
 
 
 class PosixFirstTime(FirstTime):
@@ -65,13 +65,13 @@
 
 def not_first_time(props):
     first_time = props.getProperty("first-time")
-    return not first_time
+    return not first_time 
 
-def setup_steps(platform, factory, workdir=None):
+def setup_steps(platform, factory):
     if platform == "win32":
-        first_time_check = WindowsFirstTime(workdir=workdir)
+        first_time_check = WindowsFirstTime()
     else:
-        first_time_check = PosixFirstTime(workdir=workdir)
+        first_time_check = PosixFirstTime()
 
     factory.addStep(first_time_check)
     factory.addStep(CondShellCommand(
@@ -79,10 +79,9 @@
         cond=not_first_time,
         command = ["python", "py/bin/py.svnwcrevert", 
                    "-p.buildbot-sourcedata", "."],
-        workdir=workdir,
         ))
     factory.addStep(source.SVN(baseURL="http://codespeak.net/svn/pypy/",
-                            defaultBranch="trunk", workdir=workdir))
+                            defaultBranch="trunk"))
 
 
 class PyPyOwnTestFactory(factory.BuildFactory):
@@ -143,14 +142,9 @@
 
 class PyPyTranslatedScratchboxTestFactory(factory.BuildFactory):
     def __init__(self, *a, **kw):
-        factory.BuildFactory.__init__(self, *a, **kw)
         platform = kw.pop('platform', 'linux')
+        factory.BuildFactory.__init__(self, *a, **kw)
+
         setup_steps(platform, self)
-        return
-        USERNAME = os.environ['HOME'].split(os.sep)[-1]
-        SCRATCHBOX_WORKDIR = ("/scratchbox/users/%s/home/%s/build" %
-                              (USERNAME, USERNAME))
-        setup_steps(platform, self, workdir=SCRATCHBOX_WORKDIR)
-        workdir = os.path.join(SCRATCHBOX_WORKDIR, 'pypy', 'translator', 'goal')
-        self.addStep(Translate(["--platform", "maemo", "-Omem"], [],
-                               workdir=workdir))
+
+        self.addStep(Translate(["--platform", "maemo", "-Omem"], []))

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 Nov  8 12:52:58 2008
@@ -1,5 +1,5 @@
 from pypybuildbot import builds
-import os, py
+
 
 def test_Translate():
     expected = ['translate.py', '--batch', '-O0',
@@ -13,11 +13,3 @@
     rebuiltTranslate = translateFactory(**kw)
                 
     assert rebuiltTranslate.command[-len(expected):] == expected
-
-def test_scratchbox():
-    factory = builds.PyPyTranslatedScratchboxTestFactory()
-    user = py.path.local(os.environ['HOME']).basename
-    for step in factory.steps:
-        assert step[1]['workdir'].startswith('/scratchbox/users/%s/home/%s' %
-                                             (user, user))
-



More information about the Pypy-commit mailing list