[pypy-svn] r68621 - pypy/trunk/pypy/translator/c/gcc/test
afa at codespeak.net
afa at codespeak.net
Mon Oct 19 12:01:29 CEST 2009
Author: afa
Date: Mon Oct 19 12:01:29 2009
New Revision: 68621
Modified:
pypy/trunk/pypy/translator/c/gcc/test/test_asmgcroot.py
Log:
Fix test_asmgccroot on win32:
os.popen closes the stderr of the spawned shell, which caused the subprocess to fail.
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 Oct 19 12:01:29 2009
@@ -55,7 +55,11 @@
def run(arg0, arg1):
lines = []
print >> sys.stderr, 'RUN: starting', exe_name
- g = os.popen('"%s" %d %d' % (exe_name, arg0, arg1), 'r')
+ if sys.platform == 'win32':
+ redirect = ' 2> NUL'
+ else:
+ redirect = ''
+ g = os.popen('"%s" %d %d%s' % (exe_name, arg0, arg1, redirect), 'r')
for line in g:
print >> sys.stderr, 'RUN:', line.rstrip()
lines.append(line)
@@ -92,6 +96,13 @@
f.writelines(lines)
f.close()
+ if sys.platform == 'win32':
+ def test_callback_with_collect(self):
+ py.test.skip("No libffi yet with mingw32")
+
+ def define_callback_with_collect(cls):
+ return lambda: 0
+
class TestAsmGCRootWithSemiSpaceGC(AbstractTestAsmGCRoot,
test_newgc.TestSemiSpaceGC):
# for the individual tests see
@@ -153,13 +164,6 @@
res = self.run('callback_simple')
assert res == 4900
- if sys.platform == 'win32':
- def test_callback_with_collect(self):
- py.test.skip("No libffi yet with mingw32")
-
- def define_callback_with_collect(cls):
- return lambda: 0
-
class TestAsmGCRootWithHybridTagged(AbstractTestAsmGCRoot,
test_newgc.TestHybridTaggedPointers):
More information about the Pypy-commit
mailing list