test.patch revision 4892
--- cffi-1.1.2/testing/cffi0/callback_in_thread.py 2015-06-09 03:04:07.000000000 -0700
+++ cffi-1.1.2/testing/cffi0/callback_in_thread.py 2015-08-11 10:56:22.822161292 -0700
@ffi.callback('int(*)(int,int)')
--- cffi-1.1.2/testing/cffi0/test_verify.py 2015-06-09 03:04:07.000000000 -0700
+++ cffi-1.1.2/testing/cffi0/test_verify.py 2015-08-12 14:17:18.300215250 -0700
extra_compile_args.append('-Qunused-arguments')
+ elif (sys.platform == 'sunos5'):
py.test.skip("needs GCC or Clang")
ffi.cdef(cdef)
+ if sys.platform == 'sunos5':
+ lib = ffi.verify(source, **kargs)
extra_compile_args.remove('-Wconversion')
+ if FFI().sizeof("long") == 8 and sys.platform != 'sunos5':
- if sys.platform == 'win32' and 'U' in hidden_value:
+ if sys.platform in ('win32', 'sunos5') and 'U' in hidden_value:
ffi.cdef("enum foo_e { AA, BB, ... };")
- if c2c and sys.platform == 'win32':
+ if c2c and sys.platform in ('win32', 'sunos5'):
ffi.cdef("enum foo_e { AA=%s };" % c1)
--- cffi-1.1.2/testing/cffi1/test_new_ffi_1.py 2015-06-09 03:04:07.000000000 -0700
+++ cffi-1.1.2/testing/cffi1/test_new_ffi_1.py 2015-08-12 15:18:12.105387245 -0700
DEFS = DEFS.replace('data[0]', 'data[1]') # not supported
+ elif sys.platform == "sunos5":
+ DEFS = DEFS.replace('data[0]', 'data[1]') # not supported
+ DEFS_PACKED.replace('/*here*/', '__attribute__((packed))'))
DEFS_PACKED.replace('/*here*/', '__attribute__((packed))'))
assert repr(ffi.cast("enum bar", -1)) == "<cdata 'enum bar' -1: CC1>"
- assert repr(ffi.cast("enum foq", -1)) == ( # enums are unsigned, if
- sys.platform == "win32") # (but not on msvc)
+ assert repr(ffi.cast("enum foq", -1)) == ( # enums are unsigned, if
+ sys.platform in ("win32", "sunos5")) # (but not on msvc or SS)
- if sys.platform == "win32":
+ if sys.platform in ("win32", "sunos5"):
py.test.skip("enums are not unsigned")
s = ffi.new("bfenum_t *")
s.f = 2
assert repr(p.a).startswith("<cdata 'int[2]' 0x")
- if sys.platform == "win32":
+ if sys.platform in ("win32", "sunos5"):
py.test.skip("array of length 0 not supported")
--- cffi-1.1.2/testing/cffi1/test_recompiler.py 2015-06-09 03:04:10.000000000 -0700
+++ cffi-1.1.2/testing/cffi1/test_recompiler.py 2015-08-11 11:08:16.757848317 -0700
kwds.setdefault('undef_macros', ['NDEBUG'])
ffi.set_source(module_name, source)
kwds.setdefault('source_extension', '.cpp')
--- cffi-1.1.2/testing/cffi1/test_verify1.py 2015-06-09 03:04:07.000000000 -0700
+++ cffi-1.1.2/testing/cffi1/test_verify1.py 2015-08-12 15:02:07.774160223 -0700
extra_compile_args.append('-Qunused-arguments')
+ elif (sys.platform == 'sunos5'):
py.test.skip("needs GCC or Clang")
ffi.cdef(cdef)
+ if sys.platform == 'sunos5':
+ lib = ffi.verify(source, **kargs)
extra_compile_args.remove('-Wconversion')
+ if FFI().sizeof("long") == 8 and sys.platform != 'sunos5':
- if sys.platform == 'win32' and 'U' in hidden_value:
+ if sys.platform in ('win32', 'sunos5') and 'U' in hidden_value:
ffi.cdef("enum foo_e { AA, BB, ... };")
assert lib.AA == 0
assert ffi.sizeof("enum foo_e") == expected_size
- if sys.platform != 'win32':
+ if sys.platform not in ('win32', 'sunos5'):
assert int(ffi.cast("enum foo_e", -1)) == expected_minus1
- if c2c and sys.platform == 'win32':
+ if c2c and sys.platform in ('win32', 'sunos5'):
ffi.cdef("enum foo_e { AA };")
--- cffi-1.1.2/testing/cffi0/test_ownlib.py 2015-06-09 03:04:07.000000000 -0700
+++ cffi-1.1.2/testing/cffi0/test_ownlib.py 2015-08-12 13:55:21.239982926 -0700
from cffi.backend_ctypes import CTypesBackend
from testing.udir import udir
if sys.platform == 'win32':