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

pedronis at codespeak.net pedronis at codespeak.net
Tue Oct 7 11:47:29 CEST 2008


Author: pedronis
Date: Tue Oct  7 11:47:28 2008
New Revision: 58701

Added:
   pypy/build/bot2/pypybuildbot/test/test_steps.py   (contents, props changed)
Modified:
   pypy/build/bot2/pypybuildbot/steps.py
Log:
white-boxy wrt buildbot test and fix



Modified: pypy/build/bot2/pypybuildbot/steps.py
==============================================================================
--- pypy/build/bot2/pypybuildbot/steps.py	(original)
+++ pypy/build/bot2/pypybuildbot/steps.py	Tue Oct  7 11:47:28 2008
@@ -43,9 +43,11 @@
     def __init__(self, translationArgs, targetArgs,
                  workdir="build/pypy/translator/goal",
                  *a, **kw):
+        kw['translationArgs'] = translationArgs
+        kw['targetArgs'] = targetArgs
+        shell.ShellCommand.__init__(self, workdir, *a, **kw)
         self.command = (self.command + translationArgs +
                         [self.translationTarget] + targetArgs)
-        shell.ShellCommand.__init__(self, workdir, *a, **kw)
 
 
 # ________________________________________________________________
@@ -97,7 +99,7 @@
 
         setup_steps(platform, self)
 
-        self.addStep(Translate(translationArgs=["-O0"], targetArgs=["-no-allworkingmodules"]))
+        self.addStep(Translate(["-O0"], ["-no-allworkingmodules"]))
 
         self.addStep(shell.ShellCommand(
             description="lib-python test",

Added: pypy/build/bot2/pypybuildbot/test/test_steps.py
==============================================================================
--- (empty file)
+++ pypy/build/bot2/pypybuildbot/test/test_steps.py	Tue Oct  7 11:47:28 2008
@@ -0,0 +1,15 @@
+from pypybuildbot import steps
+
+
+def test_Translate():
+    expected = ['translate.py', '--batch', '-O0',
+                'targetpypystandalone', '--no-allworkingmodules']
+
+    translateInst = steps.Translate(['-O0'], ['--no-allworkingmodules'])
+
+    assert translateInst.command[-len(expected):] == expected
+    
+    translateFactory, kw = translateInst.factory
+    rebuiltTranslate = translateFactory(**kw)
+                
+    assert rebuiltTranslate.command[-len(expected):] == expected



More information about the Pypy-commit mailing list