[pypy-svn] r67827 - in pypy/trunk/pypy/translator/c: gcc/test test
afa at codespeak.net
afa at codespeak.net
Mon Sep 21 15:08:09 CEST 2009
Author: afa
Date: Mon Sep 21 15:08:09 2009
New Revision: 67827
Modified:
pypy/trunk/pypy/translator/c/gcc/test/test_asmgcroot.py
pypy/trunk/pypy/translator/c/gcc/test/test_thread.py
pypy/trunk/pypy/translator/c/test/test_standalone.py
Log:
Fix the new asmgccroot tests on Windows
Modified: pypy/trunk/pypy/translator/c/gcc/test/test_asmgcroot.py
==============================================================================
--- pypy/trunk/pypy/translator/c/gcc/test/test_asmgcroot.py (original)
+++ pypy/trunk/pypy/translator/c/gcc/test/test_asmgcroot.py Mon Sep 21 15:08:09 2009
@@ -6,10 +6,11 @@
from pypy.annotation.listdef import s_list_of_strings
from pypy import conftest
-if sys.platform == 'win32':
- if not ('mingw' in os.popen('gcc --version').read() and
- 'GNU' in os.popen('make --version').read()):
- py.test.skip("mingw32 and MSYS are required for asmgcc on Windows")
+def setup_module(module):
+ if sys.platform == 'win32':
+ if not ('mingw' in os.popen('gcc --version').read() and
+ 'GNU' in os.popen('make --version').read()):
+ py.test.skip("mingw32 and MSYS are required for asmgcc on Windows")
class AbstractTestAsmGCRoot:
# the asmgcroot gc transformer doesn't generate gc_reload_possibly_moved
@@ -126,3 +127,7 @@
c_fn = self.getcompiled(f)
assert c_fn() == 4900
+
+ if sys.platform == 'win32':
+ def test_callback_with_collect(self):
+ py.test.skip("No libffi yet with mingw32")
Modified: pypy/trunk/pypy/translator/c/gcc/test/test_thread.py
==============================================================================
--- pypy/trunk/pypy/translator/c/gcc/test/test_thread.py (original)
+++ pypy/trunk/pypy/translator/c/gcc/test/test_thread.py Mon Sep 21 15:08:09 2009
@@ -1,4 +1,18 @@
+import py
+import sys, os
from pypy.translator.c.test import test_standalone
+def setup_module(module):
+ if sys.platform == 'win32':
+ if not ('mingw' in os.popen('gcc --version').read() and
+ 'GNU' in os.popen('make --version').read()):
+ py.test.skip("mingw32 and MSYS are required for asmgcc on Windows")
+
class TestThreadedAsmGcc(test_standalone.TestThread):
gcrootfinder = 'asmgcc'
+
+ def setup_class(cls):
+ if sys.platform == 'win32':
+ from pypy.config.pypyoption import get_pypy_config
+ cls.config = get_pypy_config(translating=True)
+ cls.config.translation.cc = 'mingw32'
Modified: pypy/trunk/pypy/translator/c/test/test_standalone.py
==============================================================================
--- pypy/trunk/pypy/translator/c/test/test_standalone.py (original)
+++ pypy/trunk/pypy/translator/c/test/test_standalone.py Mon Sep 21 15:08:09 2009
@@ -288,9 +288,10 @@
class TestThread(object):
gcrootfinder = 'shadowstack'
+ config = None
def compile(self, entry_point):
- t = TranslationContext()
+ t = TranslationContext(self.config)
t.config.translation.gc = "semispace"
t.config.translation.gcrootfinder = self.gcrootfinder
t.config.translation.thread = True
More information about the Pypy-commit
mailing list