[pypy-commit] pypy default: Try to make the test pass on Win32
arigo
noreply at buildbot.pypy.org
Sun Oct 27 18:17:28 CET 2013
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r67642:83885c43b10d
Date: 2013-10-27 18:16 +0100
http://bitbucket.org/pypy/pypy/changeset/83885c43b10d/
Log: Try to make the test pass on Win32
diff --git a/pypy/module/pypyjit/test_pypy_c/test_00_model.py b/pypy/module/pypyjit/test_pypy_c/test_00_model.py
--- a/pypy/module/pypyjit/test_pypy_c/test_00_model.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_00_model.py
@@ -25,7 +25,8 @@
def setup_method(self, meth):
self.filepath = self.tmpdir.join(meth.im_func.func_name + '.py')
- def run(self, func_or_src, args=[], import_site=False, **jitopts):
+ def run(self, func_or_src, args=[], import_site=False,
+ discard_stdout_before_last_line=False, **jitopts):
jitopts.setdefault('threshold', 200)
src = py.code.Source(func_or_src)
if isinstance(func_or_src, types.FunctionType):
@@ -70,6 +71,9 @@
stderr = ''
assert not stderr
#
+ if discard_stdout_before_last_line:
+ stdout = stdout.splitlines(True)[-1]
+ #
# parse the JIT log
rawlog = logparser.parse_log_file(str(logfile))
rawtraces = logparser.extract_category(rawlog, 'jit-log-opt-')
diff --git a/pypy/module/pypyjit/test_pypy_c/test_ffi.py b/pypy/module/pypyjit/test_pypy_c/test_ffi.py
--- a/pypy/module/pypyjit/test_pypy_c/test_ffi.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_ffi.py
@@ -269,7 +269,8 @@
n += 1
return n
- log = self.run(main, [], import_site=True)
+ log = self.run(main, [], import_site=True,
+ discard_stdout_before_last_line=True) # <- for Win32
assert log.result == 10000
loop, = log.loops_by_id('cfficall')
assert loop.match_by_id('cfficall', """
More information about the pypy-commit
mailing list