Test failure on hppa (PA-RISC)
From http://buildd.debian-ports.org/status/fetch.php?pkg=python-cffi&arch=hppa&ver=0.9.0-1&stamp=1425533217 0.9.0 fails tests on hppa:
============================= test session starts ==============================
platform linux2 -- Python 2.7.9 -- py-1.4.26 -- pytest-2.6.3
collected 1197 items
c/test_c.py .........s...............................................................................................................................s....................s..........................
testing/test_cdata.py .
testing/test_ctypes.py ..................s...............s.s.s.......s........................ssssss..s..s.............................ssssss.
testing/test_ffi_backend.py .................................................................................s...s.........................................s...........s........s..........s.s...s.
testing/test_function.py .....s...........ss..ss..ss
testing/test_model.py ............
testing/test_ownlib.py ..ss...
testing/test_parsing.py ..................s..
testing/test_platform.py ....
testing/test_unicode_literals.py ............
testing/test_verify.py ..................F...F.......s..........................................................s.................sF...........................F...s...s...
testing/test_verify2.py ..................F...F.......s..........................................................s.................sF...........................F...s...s...
testing/test_version.py .....
testing/test_vgen.py ..............................s..........................................................s.................s................................s...s...
testing/test_vgen2.py ..............................s..........................................................s.................s................................s...s...
testing/test_zdistutils.py ......................................
testing/test_zintegration.py .......
=================================== FAILURES ===================================
_______________________ test_all_integer_and_float_types _______________________
def test_all_integer_and_float_types():
typenames = []
for typename in all_primitive_types:
if (all_primitive_types[typename] == 'c' or
typename == '_Bool' or typename == 'long double'):
pass
else:
typenames.append(typename)
#
ffi = FFI()
ffi.cdef('\n'.join(["%s foo_%s(%s);" % (tp, tp.replace(' ', '_'), tp)
for tp in typenames]))
lib = ffi.verify('\n'.join(["%s foo_%s(%s x) { return (%s)(x+1); }" %
(tp, tp.replace(' ', '_'), tp, tp)
> for tp in typenames]))
testing/test_verify.py:258:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
testing/test_verify.py:28: in verify
*args, extra_compile_args=extra_compile_args, **kwds)
cffi/api.py:367: in verify
lib = self.verifier.load_library()
cffi/verifier.py:96: in load_library
self._compile_module()
cffi/verifier.py:192: in _compile_module
outputfilename = ffiplatform.compile(tmpdir, self.get_extension())
cffi/ffiplatform.py:28: in compile
outputfilename = _build(tmpdir, ext)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tmpdir = '/«PKGBUILDDIR»/testing/__pycache__'
ext = <distutils.extension.Extension instance at 0xf9878058>
def _build(tmpdir, ext):
# XXX compact but horrible :-(
from distutils.core import Distribution
import distutils.errors
#
dist = Distribution({'ext_modules': [ext]})
dist.parse_config_files()
options = dist.get_option_dict('build_ext')
options['force'] = ('ffiplatform', True)
options['build_lib'] = ('ffiplatform', tmpdir)
options['build_temp'] = ('ffiplatform', tmpdir)
#
try:
dist.run_command('build_ext')
except (distutils.errors.CompileError,
distutils.errors.LinkError) as e:
> raise VerificationError('%s: %s' % (e.__class__.__name__, e))
E VerificationError: CompileError: command 'hppa-linux-gnu-gcc' failed with exit status 1
cffi/ffiplatform.py:54: VerificationError
----------------------------- Captured stderr call -----------------------------
testing/__pycache__/_cffi__x1a992f88xe0dfa334.c: In function \u2018_cffi_f_foo_uint16_t\u2019:\ntesting/__pycache__/_cffi__x1a992f88xe0dfa334.c:92:5: error: conversion to \u2018uint16_t {aka short unsigned int}\u2019 from \u2018int\u2019 may alter its value [-Werror=conversion]\n (sizeof(type) == 1 ? (((type)-1) > 0 ? (type)_cffi_to_c_u8(o) \\\n ^\ntesting/__pycache__/_cffi__x1a992f88xe0dfa334.c:539:8: note: in expansion of macro \u2018_cffi_to_c_int\u2019\n x0 = _cffi_to_c_int(arg0, uint16_t);\n ^\ntesting/__pycache__/_cffi__x1a992f88xe0dfa334.c: In function \u2018_cffi_f_foo_uint8_t\u2019:\ntesting/__pycache__/_cffi__x1a992f88xe0dfa334.c:92:5: error: conversion to \u2018uint8_t {aka unsigned char}\u2019 from \u2018int\u2019 may alter its value [-Werror=conversion]\n (sizeof(type) == 1 ? (((type)-1) > 0 ? (type)_cffi_to_c_u8(o) \\\n ^\ntesting/__pycache__/_cffi__x1a992f88xe0dfa334.c:599:8: note: in expansion of macro \u2018_cffi_to_c_int\u2019\n x0 = _cffi_to_c_int(arg0, uint8_t);\n ^\ntesting/__pycache__/_cffi__x1a992f88xe0dfa334.c: In function \u2018_cffi_f_foo_unsigned_char\u2019:\ntesting/__pycache__/_cffi__x1a992f88xe0dfa334.c:92:5: error: conversion to \u2018unsigned char\u2019 from \u2018int\u2019 may alter its value [-Werror=conversion]\n (sizeof(type) == 1 ? (((type)-1) > 0 ? (type)_cffi_to_c_u8(o) \\\n ^\ntesting/__pycache__/_cffi__x1a992f88xe0dfa334.c:639:8: note: in expansion of macro \u2018_cffi_to_c_int\u2019\n x0 = _cffi_to_c_int(arg0, unsigned char);\n ^\ntesting/__pycache__/_cffi__x1a992f88xe0dfa334.c: In function \u2018_cffi_f_foo_unsigned_short\u2019:\ntesting/__pycache__/_cffi__x1a992f88xe0dfa334.c:92:5: error: conversion to \u2018short unsigned int\u2019 from \u2018int\u2019 may alter its value [-Werror=conversion]\n (sizeof(type) == 1 ? (((type)-1) > 0 ? (type)_cffi_to_c_u8(o) \\\n ^\ntesting/__pycache__/_cffi__x1a992f88xe0dfa334.c:719:8: note: in expansion of macro \u2018_cffi_to_c_int\u2019\n x0 = _cffi_to_c_int(arg0, unsigned short);\n ^\ncc1: all warnings being treated as errors
________________________ test_fn_unsigned_integer_types ________________________
def test_fn_unsigned_integer_types():
ffi = FFI()
lst = all_unsigned_integer_types(ffi)
cdefsrc = "\n".join(["%s somefn_%s(%s);" % (tp, tp.replace(' ', '_'), tp)
for tp in lst])
ffi.cdef(cdefsrc)
verifysrc = "\n".join(["%s somefn_%s(%s x) { return x; }" %
(tp, tp.replace(' ', '_'), tp) for tp in lst])
> lib = ffi.verify(verifysrc)
testing/test_verify.py:346:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
testing/test_verify.py:28: in verify
*args, extra_compile_args=extra_compile_args, **kwds)
cffi/api.py:367: in verify
lib = self.verifier.load_library()
cffi/verifier.py:96: in load_library
self._compile_module()
cffi/verifier.py:192: in _compile_module
outputfilename = ffiplatform.compile(tmpdir, self.get_extension())
cffi/ffiplatform.py:28: in compile
outputfilename = _build(tmpdir, ext)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tmpdir = '/«PKGBUILDDIR»/testing/__pycache__'
ext = <distutils.extension.Extension instance at 0xf9b63f80>
def _build(tmpdir, ext):
# XXX compact but horrible :-(
from distutils.core import Distribution
import distutils.errors
#
dist = Distribution({'ext_modules': [ext]})
dist.parse_config_files()
options = dist.get_option_dict('build_ext')
options['force'] = ('ffiplatform', True)
options['build_lib'] = ('ffiplatform', tmpdir)
options['build_temp'] = ('ffiplatform', tmpdir)
#
try:
dist.run_command('build_ext')
except (distutils.errors.CompileError,
distutils.errors.LinkError) as e:
> raise VerificationError('%s: %s' % (e.__class__.__name__, e))
E VerificationError: CompileError: command 'hppa-linux-gnu-gcc' failed with exit status 1
cffi/ffiplatform.py:54: VerificationError
----------------------------- Captured stderr call -----------------------------
testing/__pycache__/_cffi__x6b0c9c48xe5d68d0f.c: In function \u2018_cffi_f_somefn_uint16_t\u2019:\ntesting/__pycache__/_cffi__x6b0c9c48xe5d68d0f.c:92:5: error: conversion to \u2018uint16_t {aka short unsigned int}\u2019 from \u2018int\u2019 may alter its value [-Werror=conversion]\n (sizeof(type) == 1 ? (((type)-1) > 0 ? (type)_cffi_to_c_u8(o) \\\n ^\ntesting/__pycache__/_cffi__x6b0c9c48xe5d68d0f.c:266:8: note: in expansion of macro \u2018_cffi_to_c_int\u2019\n x0 = _cffi_to_c_int(arg0, uint16_t);\n ^\ntesting/__pycache__/_cffi__x6b0c9c48xe5d68d0f.c: In function \u2018_cffi_f_somefn_uint8_t\u2019:\ntesting/__pycache__/_cffi__x6b0c9c48xe5d68d0f.c:92:5: error: conversion to \u2018uint8_t {aka unsigned char}\u2019 from \u2018int\u2019 may alter its value [-Werror=conversion]\n (sizeof(type) == 1 ? (((type)-1) > 0 ? (type)_cffi_to_c_u8(o) \\\n ^\ntesting/__pycache__/_cffi__x6b0c9c48xe5d68d0f.c:326:8: note: in expansion of macro \u2018_cffi_to_c_int\u2019\n x0 = _cffi_to_c_int(arg0, uint8_t);\n ^\ntesting/__pycache__/_cffi__x6b0c9c48xe5d68d0f.c: In function \u2018_cffi_f_somefn_unsigned_char\u2019:\ntesting/__pycache__/_cffi__x6b0c9c48xe5d68d0f.c:92:5: error: conversion to \u2018unsigned char\u2019 from \u2018int\u2019 may alter its value [-Werror=conversion]\n (sizeof(type) == 1 ? (((type)-1) > 0 ? (type)_cffi_to_c_u8(o) \\\n ^\ntesting/__pycache__/_cffi__x6b0c9c48xe5d68d0f.c:366:8: note: in expansion of macro \u2018_cffi_to_c_int\u2019\n x0 = _cffi_to_c_int(arg0, unsigned char);\n ^\ntesting/__pycache__/_cffi__x6b0c9c48xe5d68d0f.c: In function \u2018_cffi_f_somefn_unsigned_short\u2019:\ntesting/__pycache__/_cffi__x6b0c9c48xe5d68d0f.c:92:5: error: conversion to \u2018short unsigned int\u2019 from \u2018int\u2019 may alter its value [-Werror=conversion]\n (sizeof(type) == 1 ? (((type)-1) > 0 ? (type)_cffi_to_c_u8(o) \\\n ^\ntesting/__pycache__/_cffi__x6b0c9c48xe5d68d0f.c:446:8: note: in expansion of macro \u2018_cffi_to_c_int\u2019\n x0 = _cffi_to_c_int(arg0, unsigned short);\n ^\ncc1: all warnings being treated as errors
____________________________ test_cannot_pass_float ____________________________
def test_cannot_pass_float():
for basetype in ['char', 'short', 'int', 'long', 'long long']:
for sign in ['signed', 'unsigned']:
type = '%s %s' % (sign, basetype)
ffi = FFI()
ffi.cdef("struct foo_s { %s x; };\n"
"int foo(%s);" % (type, type))
lib = ffi.verify("""
struct foo_s { %s x; };
int foo(%s arg) {
return !arg;
}
> """ % (type, type))
testing/test_verify.py:1468:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
testing/test_verify.py:28: in verify
*args, extra_compile_args=extra_compile_args, **kwds)
cffi/api.py:367: in verify
lib = self.verifier.load_library()
cffi/verifier.py:96: in load_library
self._compile_module()
cffi/verifier.py:192: in _compile_module
outputfilename = ffiplatform.compile(tmpdir, self.get_extension())
cffi/ffiplatform.py:28: in compile
outputfilename = _build(tmpdir, ext)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tmpdir = '/«PKGBUILDDIR»/testing/__pycache__'
ext = <distutils.extension.Extension instance at 0xfaa90828>
def _build(tmpdir, ext):
# XXX compact but horrible :-(
from distutils.core import Distribution
import distutils.errors
#
dist = Distribution({'ext_modules': [ext]})
dist.parse_config_files()
options = dist.get_option_dict('build_ext')
options['force'] = ('ffiplatform', True)
options['build_lib'] = ('ffiplatform', tmpdir)
options['build_temp'] = ('ffiplatform', tmpdir)
#
try:
dist.run_command('build_ext')
except (distutils.errors.CompileError,
distutils.errors.LinkError) as e:
> raise VerificationError('%s: %s' % (e.__class__.__name__, e))
E VerificationError: CompileError: command 'hppa-linux-gnu-gcc' failed with exit status 1
cffi/ffiplatform.py:54: VerificationError
----------------------------- Captured stderr call -----------------------------
testing/__pycache__/_cffi__x98589f21x8b53330b.c: In function \u2018_cffi_f_foo\u2019:\ntesting/__pycache__/_cffi__x98589f21x8b53330b.c:92:5: error: conversion to \u2018unsigned char\u2019 from \u2018int\u2019 may alter its value [-Werror=conversion]\n (sizeof(type) == 1 ? (((type)-1) > 0 ? (type)_cffi_to_c_u8(o) \\\n ^\ntesting/__pycache__/_cffi__x98589f21x8b53330b.c:220:8: note: in expansion of macro \u2018_cffi_to_c_int\u2019\n x0 = _cffi_to_c_int(arg0, unsigned char);\n ^\ncc1: all warnings being treated as errors
__________________________ test_various_calls_direct ___________________________
def test_various_calls_direct():
> _test_various_calls(force_libffi=False)
testing/test_verify.py:1974:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
testing/test_verify.py:1941: in _test_various_calls
""")
testing/test_verify.py:28: in verify
*args, extra_compile_args=extra_compile_args, **kwds)
cffi/api.py:367: in verify
lib = self.verifier.load_library()
cffi/verifier.py:96: in load_library
self._compile_module()
cffi/verifier.py:192: in _compile_module
outputfilename = ffiplatform.compile(tmpdir, self.get_extension())
cffi/ffiplatform.py:28: in compile
outputfilename = _build(tmpdir, ext)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tmpdir = '/«PKGBUILDDIR»/testing/__pycache__'
ext = <distutils.extension.Extension instance at 0xf9d1d760>
def _build(tmpdir, ext):
# XXX compact but horrible :-(
from distutils.core import Distribution
import distutils.errors
#
dist = Distribution({'ext_modules': [ext]})
dist.parse_config_files()
options = dist.get_option_dict('build_ext')
options['force'] = ('ffiplatform', True)
options['build_lib'] = ('ffiplatform', tmpdir)
options['build_temp'] = ('ffiplatform', tmpdir)
#
try:
dist.run_command('build_ext')
except (distutils.errors.CompileError,
distutils.errors.LinkError) as e:
> raise VerificationError('%s: %s' % (e.__class__.__name__, e))
E VerificationError: CompileError: command 'hppa-linux-gnu-gcc' failed with exit status 1
cffi/ffiplatform.py:54: VerificationError
----------------------------- Captured stderr call -----------------------------
testing/__pycache__/_cffi__x6f70f964x821955ff.c: In function \u2018_cffi_f_tf_bB\u2019:\ntesting/__pycache__/_cffi__x6f70f964x821955ff.c:92:5: error: conversion to \u2018unsigned char\u2019 from \u2018int\u2019 may alter its value [-Werror=conversion]\n (sizeof(type) == 1 ? (((type)-1) > 0 ? (type)_cffi_to_c_u8(o) \\\n ^\ntesting/__pycache__/_cffi__x6f70f964x821955ff.c:261:8: note: in expansion of macro \u2018_cffi_to_c_int\u2019\n x1 = _cffi_to_c_int(arg1, unsigned char);\n ^\ntesting/__pycache__/_cffi__x6f70f964x821955ff.c: In function \u2018_cffi_f_tf_bH\u2019:\ntesting/__pycache__/_cffi__x6f70f964x821955ff.c:92:5: error: conversion to \u2018short unsigned int\u2019 from \u2018int\u2019 may alter its value [-Werror=conversion]\n (sizeof(type) == 1 ? (((type)-1) > 0 ? (type)_cffi_to_c_u8(o) \\\n ^\ntesting/__pycache__/_cffi__x6f70f964x821955ff.c:321:8: note: in expansion of macro \u2018_cffi_to_c_int\u2019\n x1 = _cffi_to_c_int(arg1, unsigned short);\n ^\ncc1: all warnings being treated as errors
_______________________ test_all_integer_and_float_types _______________________
def test_all_integer_and_float_types():
typenames = []
for typename in all_primitive_types:
if (all_primitive_types[typename] == 'c' or
typename == '_Bool' or typename == 'long double'):
pass
else:
typenames.append(typename)
#
ffi = FFI()
ffi.cdef('\n'.join(["%s foo_%s(%s);" % (tp, tp.replace(' ', '_'), tp)
for tp in typenames]))
lib = ffi.verify('\n'.join(["%s foo_%s(%s x) { return (%s)(x+1); }" %
(tp, tp.replace(' ', '_'), tp, tp)
> for tp in typenames]))
testing/test_verify.py:258:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
testing/test_verify.py:28: in verify
*args, extra_compile_args=extra_compile_args, **kwds)
cffi/api.py:367: in verify
lib = self.verifier.load_library()
cffi/verifier.py:96: in load_library
self._compile_module()
cffi/verifier.py:192: in _compile_module
outputfilename = ffiplatform.compile(tmpdir, self.get_extension())
cffi/ffiplatform.py:28: in compile
outputfilename = _build(tmpdir, ext)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tmpdir = '/«PKGBUILDDIR»/testing/__pycache__'
ext = <distutils.extension.Extension instance at 0xf9af6378>
def _build(tmpdir, ext):
# XXX compact but horrible :-(
from distutils.core import Distribution
import distutils.errors
#
dist = Distribution({'ext_modules': [ext]})
dist.parse_config_files()
options = dist.get_option_dict('build_ext')
options['force'] = ('ffiplatform', True)
options['build_lib'] = ('ffiplatform', tmpdir)
options['build_temp'] = ('ffiplatform', tmpdir)
#
try:
dist.run_command('build_ext')
except (distutils.errors.CompileError,
distutils.errors.LinkError) as e:
> raise VerificationError('%s: %s' % (e.__class__.__name__, e))
E VerificationError: CompileError: command 'hppa-linux-gnu-gcc' failed with exit status 1
cffi/ffiplatform.py:54: VerificationError
----------------------------- Captured stderr call -----------------------------
testing/__pycache__/_cffi__x1a992f88xe0dfa334.c: In function \u2018_cffi_f_foo_uint16_t\u2019:\ntesting/__pycache__/_cffi__x1a992f88xe0dfa334.c:92:5: error: conversion to \u2018uint16_t {aka short unsigned int}\u2019 from \u2018int\u2019 may alter its value [-Werror=conversion]\n (sizeof(type) == 1 ? (((type)-1) > 0 ? (type)_cffi_to_c_u8(o) \\\n ^\ntesting/__pycache__/_cffi__x1a992f88xe0dfa334.c:539:8: note: in expansion of macro \u2018_cffi_to_c_int\u2019\n x0 = _cffi_to_c_int(arg0, uint16_t);\n ^\ntesting/__pycache__/_cffi__x1a992f88xe0dfa334.c: In function \u2018_cffi_f_foo_uint8_t\u2019:\ntesting/__pycache__/_cffi__x1a992f88xe0dfa334.c:92:5: error: conversion to \u2018uint8_t {aka unsigned char}\u2019 from \u2018int\u2019 may alter its value [-Werror=conversion]\n (sizeof(type) == 1 ? (((type)-1) > 0 ? (type)_cffi_to_c_u8(o) \\\n ^\ntesting/__pycache__/_cffi__x1a992f88xe0dfa334.c:599:8: note: in expansion of macro \u2018_cffi_to_c_int\u2019\n x0 = _cffi_to_c_int(arg0, uint8_t);\n ^\ntesting/__pycache__/_cffi__x1a992f88xe0dfa334.c: In function \u2018_cffi_f_foo_unsigned_char\u2019:\ntesting/__pycache__/_cffi__x1a992f88xe0dfa334.c:92:5: error: conversion to \u2018unsigned char\u2019 from \u2018int\u2019 may alter its value [-Werror=conversion]\n (sizeof(type) == 1 ? (((type)-1) > 0 ? (type)_cffi_to_c_u8(o) \\\n ^\ntesting/__pycache__/_cffi__x1a992f88xe0dfa334.c:639:8: note: in expansion of macro \u2018_cffi_to_c_int\u2019\n x0 = _cffi_to_c_int(arg0, unsigned char);\n ^\ntesting/__pycache__/_cffi__x1a992f88xe0dfa334.c: In function \u2018_cffi_f_foo_unsigned_short\u2019:\ntesting/__pycache__/_cffi__x1a992f88xe0dfa334.c:92:5: error: conversion to \u2018short unsigned int\u2019 from \u2018int\u2019 may alter its value [-Werror=conversion]\n (sizeof(type) == 1 ? (((type)-1) > 0 ? (type)_cffi_to_c_u8(o) \\\n ^\ntesting/__pycache__/_cffi__x1a992f88xe0dfa334.c:719:8: note: in expansion of macro \u2018_cffi_to_c_int\u2019\n x0 = _cffi_to_c_int(arg0, unsigned short);\n ^\ncc1: all warnings being treated as errors
________________________ test_fn_unsigned_integer_types ________________________
def test_fn_unsigned_integer_types():
ffi = FFI()
lst = all_unsigned_integer_types(ffi)
cdefsrc = "\n".join(["%s somefn_%s(%s);" % (tp, tp.replace(' ', '_'), tp)
for tp in lst])
ffi.cdef(cdefsrc)
verifysrc = "\n".join(["%s somefn_%s(%s x) { return x; }" %
(tp, tp.replace(' ', '_'), tp) for tp in lst])
> lib = ffi.verify(verifysrc)
testing/test_verify.py:346:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
testing/test_verify.py:28: in verify
*args, extra_compile_args=extra_compile_args, **kwds)
cffi/api.py:367: in verify
lib = self.verifier.load_library()
cffi/verifier.py:96: in load_library
self._compile_module()
cffi/verifier.py:192: in _compile_module
outputfilename = ffiplatform.compile(tmpdir, self.get_extension())
cffi/ffiplatform.py:28: in compile
outputfilename = _build(tmpdir, ext)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tmpdir = '/«PKGBUILDDIR»/testing/__pycache__'
ext = <distutils.extension.Extension instance at 0xf9eda968>
def _build(tmpdir, ext):
# XXX compact but horrible :-(
from distutils.core import Distribution
import distutils.errors
#
dist = Distribution({'ext_modules': [ext]})
dist.parse_config_files()
options = dist.get_option_dict('build_ext')
options['force'] = ('ffiplatform', True)
options['build_lib'] = ('ffiplatform', tmpdir)
options['build_temp'] = ('ffiplatform', tmpdir)
#
try:
dist.run_command('build_ext')
except (distutils.errors.CompileError,
distutils.errors.LinkError) as e:
> raise VerificationError('%s: %s' % (e.__class__.__name__, e))
E VerificationError: CompileError: command 'hppa-linux-gnu-gcc' failed with exit status 1
cffi/ffiplatform.py:54: VerificationError
----------------------------- Captured stderr call -----------------------------
testing/__pycache__/_cffi__x6b0c9c48xe5d68d0f.c: In function \u2018_cffi_f_somefn_uint16_t\u2019:\ntesting/__pycache__/_cffi__x6b0c9c48xe5d68d0f.c:92:5: error: conversion to \u2018uint16_t {aka short unsigned int}\u2019 from \u2018int\u2019 may alter its value [-Werror=conversion]\n (sizeof(type) == 1 ? (((type)-1) > 0 ? (type)_cffi_to_c_u8(o) \\\n ^\ntesting/__pycache__/_cffi__x6b0c9c48xe5d68d0f.c:266:8: note: in expansion of macro \u2018_cffi_to_c_int\u2019\n x0 = _cffi_to_c_int(arg0, uint16_t);\n ^\ntesting/__pycache__/_cffi__x6b0c9c48xe5d68d0f.c: In function \u2018_cffi_f_somefn_uint8_t\u2019:\ntesting/__pycache__/_cffi__x6b0c9c48xe5d68d0f.c:92:5: error: conversion to \u2018uint8_t {aka unsigned char}\u2019 from \u2018int\u2019 may alter its value [-Werror=conversion]\n (sizeof(type) == 1 ? (((type)-1) > 0 ? (type)_cffi_to_c_u8(o) \\\n ^\ntesting/__pycache__/_cffi__x6b0c9c48xe5d68d0f.c:326:8: note: in expansion of macro \u2018_cffi_to_c_int\u2019\n x0 = _cffi_to_c_int(arg0, uint8_t);\n ^\ntesting/__pycache__/_cffi__x6b0c9c48xe5d68d0f.c: In function \u2018_cffi_f_somefn_unsigned_char\u2019:\ntesting/__pycache__/_cffi__x6b0c9c48xe5d68d0f.c:92:5: error: conversion to \u2018unsigned char\u2019 from \u2018int\u2019 may alter its value [-Werror=conversion]\n (sizeof(type) == 1 ? (((type)-1) > 0 ? (type)_cffi_to_c_u8(o) \\\n ^\ntesting/__pycache__/_cffi__x6b0c9c48xe5d68d0f.c:366:8: note: in expansion of macro \u2018_cffi_to_c_int\u2019\n x0 = _cffi_to_c_int(arg0, unsigned char);\n ^\ntesting/__pycache__/_cffi__x6b0c9c48xe5d68d0f.c: In function \u2018_cffi_f_somefn_unsigned_short\u2019:\ntesting/__pycache__/_cffi__x6b0c9c48xe5d68d0f.c:92:5: error: conversion to \u2018short unsigned int\u2019 from \u2018int\u2019 may alter its value [-Werror=conversion]\n (sizeof(type) == 1 ? (((type)-1) > 0 ? (type)_cffi_to_c_u8(o) \\\n ^\ntesting/__pycache__/_cffi__x6b0c9c48xe5d68d0f.c:446:8: note: in expansion of macro \u2018_cffi_to_c_int\u2019\n x0 = _cffi_to_c_int(arg0, unsigned short);\n ^\ncc1: all warnings being treated as errors
____________________________ test_cannot_pass_float ____________________________
def test_cannot_pass_float():
for basetype in ['char', 'short', 'int', 'long', 'long long']:
for sign in ['signed', 'unsigned']:
type = '%s %s' % (sign, basetype)
ffi = FFI()
ffi.cdef("struct foo_s { %s x; };\n"
"int foo(%s);" % (type, type))
lib = ffi.verify("""
struct foo_s { %s x; };
int foo(%s arg) {
return !arg;
}
> """ % (type, type))
testing/test_verify.py:1468:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
testing/test_verify.py:28: in verify
*args, extra_compile_args=extra_compile_args, **kwds)
cffi/api.py:367: in verify
lib = self.verifier.load_library()
cffi/verifier.py:96: in load_library
self._compile_module()
cffi/verifier.py:192: in _compile_module
outputfilename = ffiplatform.compile(tmpdir, self.get_extension())
cffi/ffiplatform.py:28: in compile
outputfilename = _build(tmpdir, ext)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tmpdir = '/«PKGBUILDDIR»/testing/__pycache__'
ext = <distutils.extension.Extension instance at 0xf9c9d198>
def _build(tmpdir, ext):
# XXX compact but horrible :-(
from distutils.core import Distribution
import distutils.errors
#
dist = Distribution({'ext_modules': [ext]})
dist.parse_config_files()
options = dist.get_option_dict('build_ext')
options['force'] = ('ffiplatform', True)
options['build_lib'] = ('ffiplatform', tmpdir)
options['build_temp'] = ('ffiplatform', tmpdir)
#
try:
dist.run_command('build_ext')
except (distutils.errors.CompileError,
distutils.errors.LinkError) as e:
> raise VerificationError('%s: %s' % (e.__class__.__name__, e))
E VerificationError: CompileError: command 'hppa-linux-gnu-gcc' failed with exit status 1
cffi/ffiplatform.py:54: VerificationError
----------------------------- Captured stderr call -----------------------------
/«PKGBUILDDIR»/cffi/vengine_cpy.py:184: UserWarning: reimporting '_cffi__xba49e658xffbca8da' might overwrite older definitions\n % (self.verifier.get_module_name()))\ntesting/__pycache__/_cffi__x98589f21x8b53330b.c: In function \u2018_cffi_f_foo\u2019:\ntesting/__pycache__/_cffi__x98589f21x8b53330b.c:92:5: error: conversion to \u2018unsigned char\u2019 from \u2018int\u2019 may alter its value [-Werror=conversion]\n (sizeof(type) == 1 ? (((type)-1) > 0 ? (type)_cffi_to_c_u8(o) \\\n ^\ntesting/__pycache__/_cffi__x98589f21x8b53330b.c:220:8: note: in expansion of macro \u2018_cffi_to_c_int\u2019\n x0 = _cffi_to_c_int(arg0, unsigned char);\n ^\ncc1: all warnings being treated as errors
__________________________ test_various_calls_direct ___________________________
def test_various_calls_direct():
> _test_various_calls(force_libffi=False)
testing/test_verify.py:1974:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
testing/test_verify.py:1941: in _test_various_calls
""")
testing/test_verify.py:28: in verify
*args, extra_compile_args=extra_compile_args, **kwds)
cffi/api.py:367: in verify
lib = self.verifier.load_library()
cffi/verifier.py:96: in load_library
self._compile_module()
cffi/verifier.py:192: in _compile_module
outputfilename = ffiplatform.compile(tmpdir, self.get_extension())
cffi/ffiplatform.py:28: in compile
outputfilename = _build(tmpdir, ext)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tmpdir = '/«PKGBUILDDIR»/testing/__pycache__'
ext = <distutils.extension.Extension instance at 0xf9b9e648>
def _build(tmpdir, ext):
# XXX compact but horrible :-(
from distutils.core import Distribution
import distutils.errors
#
dist = Distribution({'ext_modules': [ext]})
dist.parse_config_files()
options = dist.get_option_dict('build_ext')
options['force'] = ('ffiplatform', True)
options['build_lib'] = ('ffiplatform', tmpdir)
options['build_temp'] = ('ffiplatform', tmpdir)
#
try:
dist.run_command('build_ext')
except (distutils.errors.CompileError,
distutils.errors.LinkError) as e:
> raise VerificationError('%s: %s' % (e.__class__.__name__, e))
E VerificationError: CompileError: command 'hppa-linux-gnu-gcc' failed with exit status 1
cffi/ffiplatform.py:54: VerificationError
----------------------------- Captured stderr call -----------------------------
testing/__pycache__/_cffi__x6f70f964x821955ff.c: In function \u2018_cffi_f_tf_bB\u2019:\ntesting/__pycache__/_cffi__x6f70f964x821955ff.c:92:5: error: conversion to \u2018unsigned char\u2019 from \u2018int\u2019 may alter its value [-Werror=conversion]\n (sizeof(type) == 1 ? (((type)-1) > 0 ? (type)_cffi_to_c_u8(o) \\\n ^\ntesting/__pycache__/_cffi__x6f70f964x821955ff.c:261:8: note: in expansion of macro \u2018_cffi_to_c_int\u2019\n x1 = _cffi_to_c_int(arg1, unsigned char);\n ^\ntesting/__pycache__/_cffi__x6f70f964x821955ff.c: In function \u2018_cffi_f_tf_bH\u2019:\ntesting/__pycache__/_cffi__x6f70f964x821955ff.c:92:5: error: conversion to \u2018short unsigned int\u2019 from \u2018int\u2019 may alter its value [-Werror=conversion]\n (sizeof(type) == 1 ? (((type)-1) > 0 ? (type)_cffi_to_c_u8(o) \\\n ^\ntesting/__pycache__/_cffi__x6f70f964x821955ff.c:321:8: note: in expansion of macro \u2018_cffi_to_c_int\u2019\n x1 = _cffi_to_c_int(arg1, unsigned short);\n ^\ncc1: all warnings being treated as errors
============= 8 failed, 1129 passed, 60 skipped in 816.83 seconds ==============
Edited by Stefano Rivera