[pypy-svn] pypy default: (antocuni, arigo, rguillebert a bit)
arigo
commits-noreply at bitbucket.org
Tue Apr 26 17:38:19 CEST 2011
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r43635:c4d6beb47daa
Date: 2011-04-26 17:38 +0200
http://bitbucket.org/pypy/pypy/changeset/c4d6beb47daa/
Log: (antocuni, arigo, rguillebert a bit)
Un-(in-progress)-ify the test.
diff --git a/pypy/module/pypyjit/test_pypy_c/model.py b/pypy/module/pypyjit/test_pypy_c/model.py
--- a/pypy/module/pypyjit/test_pypy_c/model.py
+++ b/pypy/module/pypyjit/test_pypy_c/model.py
@@ -128,10 +128,13 @@
if op.name != 'debug_merge_point' or include_debug_merge_points:
yield op
- def allops(self, include_debug_merge_points=False):
+ def allops(self, include_debug_merge_points=False, opcode=None):
+ opcode_name = opcode
for chunk in self.flatten_chunks():
- for op in self._ops_for_chunk(chunk, include_debug_merge_points):
- yield op
+ opcode = chunk.getopcode()
+ if opcode_name is None or opcode.__class__.__name__ == opcode_name:
+ for op in self._ops_for_chunk(chunk, include_debug_merge_points):
+ yield op
def format_ops(self, id=None, **kwds):
if id is None:
diff --git a/pypy/module/pypyjit/test_pypy_c/test_pypy_c_new.py b/pypy/module/pypyjit/test_pypy_c/test_pypy_c_new.py
--- a/pypy/module/pypyjit/test_pypy_c/test_pypy_c_new.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_pypy_c_new.py
@@ -694,7 +694,6 @@
""")
def test_import_fast_path(self, tmpdir):
- py.test.skip('in-progress')
pkg = tmpdir.join('mypkg').ensure(dir=True)
pkg.join('__init__.py').write("")
pkg.join('mod.py').write(str(py.code.Source("""
@@ -710,7 +709,10 @@
#
log = self.run(main, [str(tmpdir), 300], threshold=200)
loop, = log.loops_by_filename(self.filepath)
- # XXX: check the loop
+ # this is a check for a slow-down that introduced a
+ # call_may_force(absolute_import_with_lock).
+ for opname in log.opnames(loop.allops(opcode="IMPORT_NAME")):
+ assert 'call' not in opname # no call-like opcode
def test_arraycopy_disappears(self):
def main(n):
More information about the Pypy-commit
mailing list