[pypy-svn] r20999 - in pypy/dist/pypy/translator: asm/ppcgen c/test

mwh at codespeak.net mwh at codespeak.net
Sat Dec 10 14:34:14 CET 2005


Author: mwh
Date: Sat Dec 10 14:34:13 2005
New Revision: 20999

Modified:
   pypy/dist/pypy/translator/asm/ppcgen/_ppcgen.c
   pypy/dist/pypy/translator/c/test/test_boehm.py
Log:
remove this strange hack. now the test is skipped (as before) but if the skip
is commented out the test can be run in the regular way.


Modified: pypy/dist/pypy/translator/asm/ppcgen/_ppcgen.c
==============================================================================
--- pypy/dist/pypy/translator/asm/ppcgen/_ppcgen.c	(original)
+++ pypy/dist/pypy/translator/asm/ppcgen/_ppcgen.c	Sat Dec 10 14:34:13 2005
@@ -121,6 +121,10 @@
 	{0, 0}
 };
 
+#if !defined(MAP_ANON) && defined(__APPLE__)
+#define MAP_ANON 0x1000
+#endif
+
 PyMODINIT_FUNC
 init_ppcgen(void)
 {

Modified: pypy/dist/pypy/translator/c/test/test_boehm.py
==============================================================================
--- pypy/dist/pypy/translator/c/test/test_boehm.py	(original)
+++ pypy/dist/pypy/translator/c/test/test_boehm.py	Sat Dec 10 14:34:13 2005
@@ -1,9 +1,11 @@
 import py
-test_src = """
 from pypy.translator.translator import TranslationContext
 from pypy.translator.tool.cbuild import skip_missing_compiler
 from pypy.translator.c.genc import CExtModuleBuilder
 
+py.test.skip("boehm test is fragile wrt. the number of dynamically loaded libs")
+
+
 def getcompiled(func):
     from pypy.translator.c.gc import BoehmGcPolicy
     t = TranslationContext(simplifying=True)
@@ -67,28 +69,3 @@
     res = fn() #does not crash
     res = fn() #does not crash
     assert 0 <= res <= 42 # 42 cannot be guaranteed
-
-def run_test(fn):
-    fn()
-    channel.send("ok")
-
-run_test(test_malloc_a_lot)
-run_test(test__del__)
-"""
-
-
-def test_boehm():
-    import py
-    py.test.skip("boehm test is fragile wrt. the number of dynamically loaded libs")
-    from  pypy.translator.tool import cbuild
-    if not cbuild.check_boehm_presence():
-        py.test.skip("no boehm gc on this machine")
-    gw = py.execnet.PopenGateway()
-    chan = gw.remote_exec(py.code.Source(test_src))
-    res = chan.receive()
-    assert res == "ok"
-    res = chan.receive()
-    assert res == "ok"
-    chan.close()
-
-



More information about the Pypy-commit mailing list