[pypy-commit] cffi default: Try to fix the tests on OS/X, mainly by skipping the ABI tests that
arigo
noreply at buildbot.pypy.org
Sun Aug 12 13:07:24 CEST 2012
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r806:1949f6785f8c
Date: 2012-08-12 13:07 +0200
http://bitbucket.org/cffi/cffi/changeset/1949f6785f8c/
Log: Try to fix the tests on OS/X, mainly by skipping the ABI tests that
depend on the 'stdout' and 'stderr' symbols being present (under
this name) in the libc.
diff --git a/testing/test_function.py b/testing/test_function.py
--- a/testing/test_function.py
+++ b/testing/test_function.py
@@ -107,8 +107,8 @@
assert res == 'hello\n world\n'
def test_fputs(self):
- if sys.platform == 'win32':
- py.test.skip("no 'stderr'")
+ if not sys.platform.startswith('linux'):
+ py.test.skip("probably no symbol 'stdout' in the lib")
ffi = FFI(backend=self.Backend())
ffi.cdef("""
int fputs(const char *, void *);
@@ -141,8 +141,10 @@
res = fd.getvalue()
if sys.platform == 'win32':
NIL = "00000000"
+ elif sys.platform.startswith('linux'):
+ NIL = "(nil)"
else:
- NIL = "(nil)"
+ NIL = "0x0" # OS/X at least
assert res == ("hello with no arguments\n"
"hello, world!\n"
"hello, world2!\n"
@@ -225,8 +227,8 @@
assert res == 5
def test_write_variable(self):
- if sys.platform == 'win32':
- py.test.skip("no 'stdout'")
+ if not sys.platform.startswith('linux'):
+ py.test.skip("probably no symbol 'stdout' in the lib")
ffi = FFI(backend=self.Backend())
ffi.cdef("""
int puts(const char *);
More information about the pypy-commit
mailing list