[pypy-svn] pypy default: make this test file working again (more or less)
antocuni
commits-noreply at bitbucket.org
Fri Feb 18 13:54:31 CET 2011
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch:
Changeset: r42150:d989053c409f
Date: 2011-02-17 11:46 +0100
http://bitbucket.org/pypy/pypy/changeset/d989053c409f/
Log: make this test file working again (more or less)
diff --git a/pypy/module/pypyjit/test/test_pypy_c_new.py b/pypy/module/pypyjit/test/test_pypy_c_new.py
--- a/pypy/module/pypyjit/test/test_pypy_c_new.py
+++ b/pypy/module/pypyjit/test/test_pypy_c_new.py
@@ -1,8 +1,6 @@
-
import py, sys, re
-py.test.skip("in-progress?")
import subprocess
-import disassembler
+from lib_pypy import disassembler
from pypy.tool.udir import udir
from pypy.tool import logparser
@@ -11,6 +9,13 @@
class BaseTestPyPyC(object):
def setup_class(cls):
+ from pypy.conftest import option
+ from pypy.module.pypyjit.test.test_pypy_c import has_info
+ if option.pypy_c is None:
+ py.test.skip("pass --pypy!")
+ if not has_info(option.pypy_c, 'translation.jit'):
+ py.test.skip("must give a pypy-c with the jit enabled")
+ cls.pypy_c = option.pypy_c
cls.tmpdir = udir.join('test-pypy-jit')
cls.tmpdir.ensure(dir=True)
@@ -46,7 +51,7 @@
f.write(str(py.code.Source(func)) + "\n")
f.write("print %s()\n" % func.func_name)
logfile = self.filepath.new(ext='.log')
- pipe = subprocess.Popen([sys.executable, str(self.filepath)],
+ pipe = subprocess.Popen([self.pypy_c, str(self.filepath)],
stdout=subprocess.PIPE, stderr=subprocess.PIPE,
env={'PYPYLOG': "jit-log-opt,jit-summary:" + str(logfile)})
pipe.wait()
@@ -74,6 +79,7 @@
assert len(res['name']) == 6
def test_full(self):
+ py.test.skip('in-progress')
def f():
i = 0
while i < 1003:
More information about the Pypy-commit
mailing list