[pypy-commit] buildbot default: extend Translated build factory to prepend a prefix to the commands executed

bivab noreply at buildbot.pypy.org
Tue Sep 4 10:40:38 CEST 2012


Author: David Schneider <david.schneider at picle.org>
Branch: 
Changeset: r677:5eb3e566e589
Date: 2012-09-04 10:34 +0200
http://bitbucket.org/pypy/buildbot/changeset/5eb3e566e589/

Log:	extend Translated build factory to prepend a prefix to the commands
	executed

diff --git a/bot2/pypybuildbot/builds.py b/bot2/pypybuildbot/builds.py
--- a/bot2/pypybuildbot/builds.py
+++ b/bot2/pypybuildbot/builds.py
@@ -267,15 +267,19 @@
 
 
 class Translated(factory.BuildFactory):
+    prefix = []
 
     def __init__(self, platform='linux',
                  translationArgs=['-O2'], targetArgs=[],
                  app_tests=False,
                  interpreter='pypy',
                  lib_python=False,
-                 pypyjit=False
+                 pypyjit=False,
+                 **kwargs
                  ):
         factory.BuildFactory.__init__(self)
+        if 'prefix' in kwargs:
+           self.prefix = kwargs['prefix'].split()
 
         setup_steps(platform, self)
 
@@ -287,7 +291,7 @@
                 app_tests = []
             self.addStep(PytestCmd(
                 description="app-level (-A) test",
-                command=["python", "testrunner/runner.py",
+                command=self.prefix + ["python", "testrunner/runner.py",
                          "--logfile=pytest-A.log",
                          "--config=pypy/pytest-A.cfg",
                          "--root=pypy", "--timeout=1800"
@@ -299,7 +303,7 @@
         if lib_python:
             self.addStep(PytestCmd(
                 description="lib-python test",
-                command=["python", "pypy/test_all.py",
+                command=self.prefix + ["python", "pypy/test_all.py",
                          "--pypy=pypy/translator/goal/pypy-c",
                          "--resultlog=cpython.log", "lib-python"],
                 logfiles={'pytestLog': 'cpython.log'}))
@@ -310,7 +314,7 @@
             # "old" test_pypy_c
             self.addStep(PytestCmd(
                 description="pypyjit tests",
-                command=["python", "pypy/test_all.py",
+                command=self.prefix + ["python", "pypy/test_all.py",
                          "--pypy=pypy/translator/goal/pypy-c",
                          "--resultlog=pypyjit.log",
                          "pypy/module/pypyjit/test"],
@@ -323,7 +327,7 @@
                 cmd = 'pypy/translator/goal/pypy-c'
             self.addStep(PytestCmd(
                 description="pypyjit tests",
-                command=[cmd, "pypy/test_all.py",
+                command=self.prefix + [cmd, "pypy/test_all.py",
                          "--resultlog=pypyjit_new.log",
                          "pypy/module/pypyjit/test_pypy_c"],
                 logfiles={'pytestLog': 'pypyjit_new.log'}))
@@ -342,7 +346,7 @@
         name = 'pypy-c-' + kind + '-%(final_file_name)s-' + platform
         self.addStep(ShellCmd(
             description="compress pypy-c",
-            command=["python", "pypy/tool/release/package.py",
+            command=self.prefix + ["python", "pypy/tool/release/package.py",
                      ".", WithProperties(name), 'pypy',
                      '.'],
             workdir='build'))


More information about the pypy-commit mailing list