Author: Armin Rigo <ar...@tunes.org>
Branch: 
Changeset: r1500:237031079adc
Date: 2014-04-04 17:34 +0200
http://bitbucket.org/cffi/cffi/changeset/237031079adc/

Log:    Issue #145: don't run any test modifying stdout/stderr on any non-
        Linux platform, as it seems to only work reliably with the glibc.

diff --git a/c/test_c.py b/c/test_c.py
--- a/c/test_c.py
+++ b/c/test_c.py
@@ -1102,7 +1102,7 @@
 def test_read_variable():
     ## FIXME: this test assumes glibc specific behavior, it's not compliant 
with C standard
     ## https://bugs.pypy.org/issue1643
-    if sys.platform == 'win32' or sys.platform == 'darwin' or 
sys.platform.startswith('freebsd'):
+    if not sys.platform.startswith("linux"):
         py.test.skip("untested")
     BVoidP = new_pointer_type(new_void_type())
     ll = find_and_load_library('c')
@@ -1112,7 +1112,7 @@
 def test_read_variable_as_unknown_length_array():
     ## FIXME: this test assumes glibc specific behavior, it's not compliant 
with C standard
     ## https://bugs.pypy.org/issue1643
-    if sys.platform == 'win32' or sys.platform == 'darwin' or 
sys.platform.startswith('freebsd'):
+    if not sys.platform.startswith("linux"):
         py.test.skip("untested")
     BCharP = new_pointer_type(new_primitive_type("char"))
     BArray = new_array_type(BCharP, None)
@@ -1124,7 +1124,7 @@
 def test_write_variable():
     ## FIXME: this test assumes glibc specific behavior, it's not compliant 
with C standard
     ## https://bugs.pypy.org/issue1643
-    if sys.platform == 'win32' or sys.platform == 'darwin' or 
sys.platform.startswith('freebsd'):
+    if not sys.platform.startswith("linux"):
         py.test.skip("untested")
     BVoidP = new_pointer_type(new_void_type())
     ll = find_and_load_library('c')
diff --git a/testing/test_verify.py b/testing/test_verify.py
--- a/testing/test_verify.py
+++ b/testing/test_verify.py
@@ -1470,8 +1470,8 @@
     assert func() == 42
 
 def test_FILE_stored_in_stdout():
-    if sys.platform == 'win32':
-        py.test.skip("MSVC: cannot assign to stdout")
+    if not sys.platform.startswith('linux'):
+        py.test.skip("likely, we cannot assign to stdout")
     ffi = FFI()
     ffi.cdef("int printf(const char *, ...); FILE *setstdout(FILE *);")
     lib = ffi.verify("""
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to