[pypy-commit] buildbot default: pom pom pom

arigo pypy.commits at gmail.com
Sun Nov 13 10:42:07 EST 2016


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r1019:76e3df0ab876
Date: 2016-11-13 16:41 +0100
http://bitbucket.org/pypy/buildbot/changeset/76e3df0ab876/

Log:	pom pom pom

diff --git a/bot2/pypybuildbot/builds.py b/bot2/pypybuildbot/builds.py
--- a/bot2/pypybuildbot/builds.py
+++ b/bot2/pypybuildbot/builds.py
@@ -463,30 +463,37 @@
                 }))
 
     if pypyjit:
-        # kill this step when the transition to test_pypy_c_new has been
-        # completed
-        # "old" test_pypy_c
-        #factory.addStep(PytestCmd(
-        #    description="pypyjit tests",
-        #    command=prefix + ["python", "pypy/test_all.py",
-        #             "--pypy=pypy/goal/pypy-c",
-        #             "--resultlog=pypyjit.log",
-        #             "pypy/module/pypyjit/test"],
-        #    logfiles={'pytestLog': 'pypyjit.log'},
-        #    env={"TMPDIR": Interpolate('%(prop:target_tmpdir)s' + pytest),
-        #        }))
-        #
-        # "new" test_pypy_c
-        if platform == 'win32':
-            cmd = r'pypy\goal\pypy-c'
-        else:
-            cmd = 'pypy/goal/pypy-c'
+        # run test_pypy_c tests, which is a mess because it needs to be
+        # started differently on pypy2 or pypy3
         factory.addStep(PytestCmd(
             description="pypyjit tests",
-            command=prefix + ["python", "pypy/test_all.py",
-                     "--pypy=%s" % (cmd,),
-                     "--resultlog=pypyjit_new.log",
-                     "pypy/module/pypyjit/test_pypy_c"],
+            command=prefix + ["python", "-c", r"""
+import sys, subprocess
+
+if sys.platform == 'win32':
+    cmd = r'pypy\goal\pypy-c'
+else:
+    cmd = 'pypy/goal/pypy-c'
+
+g = subprocess.check_output([cmd, '-c', 'import sys;print(sys.version)'])
+if g.startswith('2.7'):
+    # PyPy 2: must run 'pypy-c py.test'
+    cmdline = [cmd, "pypy/test_all.py"]
+elif g.startswith('3'):
+    # PyPy 3: must run 'py.test --pypy=pypy-c'
+    cmdline = [sys.executable, "pypy/test_all.py", "--pypy=" + cmd]
+else:
+    raise Exception("pypy-c output: %r" % (data,))
+
+cmdline += ["--resultlog=pypyjit_new.log",
+            "pypy/module/pypyjit/test_pypy_c"]
+
+print("Running", cmdline)
+res = subprocess.call(cmdline)
+if res:
+    print("!!!!! error code ", res)
+    sys.exit(1)
+"""],
             logfiles={'pytestLog': 'pypyjit_new.log'},
             env={"TMPDIR": Interpolate('%(prop:target_tmpdir)s' + pytest),
                 }))


More information about the pypy-commit mailing list