Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test failures on openSUSE Python 3.7 #60

Closed
jayvdb opened this issue Oct 20, 2019 · 4 comments
Closed

Test failures on openSUSE Python 3.7 #60

jayvdb opened this issue Oct 20, 2019 · 4 comments

Comments

@jayvdb
Copy link
Contributor

jayvdb commented Oct 20, 2019

I am trying to package this for openSUSE Python 3.7, and almost have it passing all tests, only a few remaining issues, which could be my fault, or stuff fixed since 2.2.2 release, or needed enhancements.

[   23s] test_uint_minus_one (test_types_values.ConstantsTest) ... expected failure
[   23s] test_unicode (test_types_values.ConstantsTest)
[   23s] unicode conversion test from unittest in clang ... 'stddef.h' file not found
[   23s] Source code has some error. Please fix.
[   23s] 'stddef.h' file not found
[   23s] ERROR
[   23s] test_unicode_cpp11 (test_types_values.ConstantsTest)
[   23s] unicode conversion test from unittest in clang ... 'stddef.h' file not found
[   23s] Source code has some error. Please fix.
[   23s] 'stddef.h' file not found
[   23s] ERROR
[   23s] test_unicode_wchar (test_types_values.ConstantsTest)
[   23s] unicode conversion test from unittest in clang ... 'stddef.h' file not found
[   23s] Source code has some error. Please fix.
[   23s] 'stddef.h' file not found
[   23s] expected failure
[   23s] test_var (test_types_values.ConstantsTest)
[   23s] Basic POD test variable declaration' ... ok
[   23s] test_var_decl_and_scope (test_types_values.ConstantsTest) ... ok
[   23s] test_wchar (test_types_values.ConstantsTest) ... ok
[   23s] 
[   23s] ======================================================================
[   23s] ERROR: test_unicode (test_types_values.ConstantsTest)
[   23s] unicode conversion test from unittest in clang
[   23s] ----------------------------------------------------------------------
[   23s] Traceback (most recent call last):
[   23s]   File "/home/abuild/rpmbuild/BUILD/ctypeslib-2.2.2/test/test_types_values.py", line 83, in test_unicode
[   23s]     self.gen('test/data/test-strings.cpp', ['-x', 'c++'])
[   23s]   File "/home/abuild/rpmbuild/BUILD/ctypeslib-2.2.2/test/util.py", line 141, in gen
[   23s]     gen = self._gen(ofi, fname, flags)
[   23s]   File "/home/abuild/rpmbuild/BUILD/ctypeslib-2.2.2/test/util.py", line 129, in _gen
[   23s]     self.parser.parse(fname)
[   23s]   File "/home/abuild/rpmbuild/BUILD/ctypeslib-2.2.2/ctypeslib/codegen/clangparser.py", line 120, in parse
[   23s]     self.startElement(node)
[   23s]   File "/home/abuild/rpmbuild/BUILD/ctypeslib-2.2.2/ctypeslib/codegen/clangparser.py", line 159, in startElement
[   23s]     stop_recurse = self.parse_cursor(node)
[   23s]   File "/home/abuild/rpmbuild/BUILD/ctypeslib-2.2.2/ctypeslib/codegen/clangparser.py", line 273, in parse_cursor
[   23s]     return self.cursorkind_handler.parse_cursor(cursor)
[   23s]   File "/home/abuild/rpmbuild/BUILD/ctypeslib-2.2.2/ctypeslib/codegen/cursorhandler.py", line 37, in parse_cursor
[   23s]     return mth(cursor)
[   23s]   File "/home/abuild/rpmbuild/BUILD/ctypeslib-2.2.2/ctypeslib/codegen/util.py", line 119, in fn
[   23s]     return func(*args, **kwargs)
[   23s]   File "/home/abuild/rpmbuild/BUILD/ctypeslib-2.2.2/ctypeslib/codegen/cursorhandler.py", line 249, in VAR_DECL
[   23s]     init_value = self._VAR_DECL_value(cursor, _type)
[   23s]   File "/home/abuild/rpmbuild/BUILD/ctypeslib-2.2.2/ctypeslib/codegen/cursorhandler.py", line 299, in _VAR_DECL_value
[   23s]     list(cursor.get_children()))
[   23s]   File "/home/abuild/rpmbuild/BUILD/ctypeslib-2.2.2/ctypeslib/codegen/cursorhandler.py", line 352, in _get_var_decl_init_value
[   23s]     _tmp = self._get_var_decl_init_value_single(_ctype, child)
[   23s]   File "/home/abuild/rpmbuild/BUILD/ctypeslib-2.2.2/ctypeslib/codegen/cursorhandler.py", line 385, in _get_var_decl_init_value_single
[   23s]     child.get_children())
[   23s]   File "/home/abuild/rpmbuild/BUILD/ctypeslib-2.2.2/ctypeslib/codegen/cursorhandler.py", line 352, in _get_var_decl_init_value
[   23s]     _tmp = self._get_var_decl_init_value_single(_ctype, child)
[   23s]   File "/home/abuild/rpmbuild/BUILD/ctypeslib-2.2.2/ctypeslib/codegen/cursorhandler.py", line 394, in _get_var_decl_init_value_single
[   23s]     _v = self.parse_cursor(child)
[   23s]   File "/home/abuild/rpmbuild/BUILD/ctypeslib-2.2.2/ctypeslib/codegen/cursorhandler.py", line 37, in parse_cursor
[   23s]     return mth(cursor)
[   23s]   File "/home/abuild/rpmbuild/BUILD/ctypeslib-2.2.2/ctypeslib/codegen/util.py", line 119, in fn
[   23s]     return func(*args, **kwargs)
[   23s]   File "/home/abuild/rpmbuild/BUILD/ctypeslib-2.2.2/ctypeslib/codegen/cursorhandler.py", line 463, in _literal_handling
[   23s]     str([str(t.spelling) for t in tokens]))
[   23s]   File "/home/abuild/rpmbuild/BUILD/ctypeslib-2.2.2/ctypeslib/codegen/cursorhandler.py", line 463, in <listcomp>
[   23s]     str([str(t.spelling) for t in tokens]))
[   23s]   File "/usr/lib/python3.7/site-packages/clang/cindex.py", line 3294, in spelling
[   23s]     return conf.lib.clang_getTokenSpelling(self._tu, self)
[   23s]   File "/usr/lib/python3.7/site-packages/clang/cindex.py", line 230, in from_result
[   23s]     return conf.lib.clang_getCString(res)
[   23s]   File "/usr/lib/python3.7/site-packages/clang/cindex.py", line 105, in to_python_string
[   23s]     return x.value
[   23s]   File "/usr/lib/python3.7/site-packages/clang/cindex.py", line 90, in value
[   23s]     return super(c_char_p, self).value.decode("utf8")
[   23s] UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc0 in position 1: invalid start byte
[   23s] 
[   23s] ======================================================================
[   23s] ERROR: test_unicode_cpp11 (test_types_values.ConstantsTest)
[   23s] unicode conversion test from unittest in clang
[   23s] ----------------------------------------------------------------------
[   23s] Traceback (most recent call last):
[   23s]   File "/home/abuild/rpmbuild/BUILD/ctypeslib-2.2.2/test/test_types_values.py", line 103, in test_unicode_cpp11
[   23s]     self.gen('test/data/test-strings.cpp', ['-x', 'c++', '--std=c++11'])
[   23s]   File "/home/abuild/rpmbuild/BUILD/ctypeslib-2.2.2/test/util.py", line 141, in gen
[   23s]     gen = self._gen(ofi, fname, flags)
[   23s]   File "/home/abuild/rpmbuild/BUILD/ctypeslib-2.2.2/test/util.py", line 129, in _gen
[   23s]     self.parser.parse(fname)
[   23s]   File "/home/abuild/rpmbuild/BUILD/ctypeslib-2.2.2/ctypeslib/codegen/clangparser.py", line 120, in parse
[   23s]     self.startElement(node)
[   23s]   File "/home/abuild/rpmbuild/BUILD/ctypeslib-2.2.2/ctypeslib/codegen/clangparser.py", line 159, in startElement
[   23s]     stop_recurse = self.parse_cursor(node)
[   23s]   File "/home/abuild/rpmbuild/BUILD/ctypeslib-2.2.2/ctypeslib/codegen/clangparser.py", line 273, in parse_cursor
[   23s]     return self.cursorkind_handler.parse_cursor(cursor)
[   23s]   File "/home/abuild/rpmbuild/BUILD/ctypeslib-2.2.2/ctypeslib/codegen/cursorhandler.py", line 37, in parse_cursor
[   23s]     return mth(cursor)
[   23s]   File "/home/abuild/rpmbuild/BUILD/ctypeslib-2.2.2/ctypeslib/codegen/util.py", line 119, in fn
[   23s]     return func(*args, **kwargs)
[   23s]   File "/home/abuild/rpmbuild/BUILD/ctypeslib-2.2.2/ctypeslib/codegen/cursorhandler.py", line 249, in VAR_DECL
[   23s]     init_value = self._VAR_DECL_value(cursor, _type)
[   23s]   File "/home/abuild/rpmbuild/BUILD/ctypeslib-2.2.2/ctypeslib/codegen/cursorhandler.py", line 299, in _VAR_DECL_value
[   23s]     list(cursor.get_children()))
[   23s]   File "/home/abuild/rpmbuild/BUILD/ctypeslib-2.2.2/ctypeslib/codegen/cursorhandler.py", line 352, in _get_var_decl_init_value
[   23s]     _tmp = self._get_var_decl_init_value_single(_ctype, child)
[   23s]   File "/home/abuild/rpmbuild/BUILD/ctypeslib-2.2.2/ctypeslib/codegen/cursorhandler.py", line 385, in _get_var_decl_init_value_single
[   23s]     child.get_children())
[   23s]   File "/home/abuild/rpmbuild/BUILD/ctypeslib-2.2.2/ctypeslib/codegen/cursorhandler.py", line 352, in _get_var_decl_init_value
[   23s]     _tmp = self._get_var_decl_init_value_single(_ctype, child)
[   23s]   File "/home/abuild/rpmbuild/BUILD/ctypeslib-2.2.2/ctypeslib/codegen/cursorhandler.py", line 394, in _get_var_decl_init_value_single
[   23s]     _v = self.parse_cursor(child)
[   23s]   File "/home/abuild/rpmbuild/BUILD/ctypeslib-2.2.2/ctypeslib/codegen/cursorhandler.py", line 37, in parse_cursor
[   23s]     return mth(cursor)
[   23s]   File "/home/abuild/rpmbuild/BUILD/ctypeslib-2.2.2/ctypeslib/codegen/util.py", line 119, in fn
[   23s]     return func(*args, **kwargs)
[   23s]   File "/home/abuild/rpmbuild/BUILD/ctypeslib-2.2.2/ctypeslib/codegen/cursorhandler.py", line 463, in _literal_handling
[   23s]     str([str(t.spelling) for t in tokens]))
[   23s]   File "/home/abuild/rpmbuild/BUILD/ctypeslib-2.2.2/ctypeslib/codegen/cursorhandler.py", line 463, in <listcomp>
[   23s]     str([str(t.spelling) for t in tokens]))
[   23s]   File "/usr/lib/python3.7/site-packages/clang/cindex.py", line 3294, in spelling
[   23s]     return conf.lib.clang_getTokenSpelling(self._tu, self)
[   23s]   File "/usr/lib/python3.7/site-packages/clang/cindex.py", line 230, in from_result
[   23s]     return conf.lib.clang_getCString(res)
[   23s]   File "/usr/lib/python3.7/site-packages/clang/cindex.py", line 105, in to_python_string
[   23s]     return x.value
[   23s]   File "/usr/lib/python3.7/site-packages/clang/cindex.py", line 90, in value
[   23s]     return super(c_char_p, self).value.decode("utf8")
[   23s] UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc0 in position 1: invalid start byte
[   23s] 
[   23s] ======================================================================
[   23s] FAIL: test_variable (test_clang2py.ArgumentTypeKind)
[   23s] run clang2py -k d test/data/test-strings.cpp
[   23s] ----------------------------------------------------------------------
[   23s] Traceback (most recent call last):
[   23s]   File "/home/abuild/rpmbuild/BUILD/ctypeslib-2.2.2/test/test_clang2py.py", line 109, in test_variable
[   23s]     self.assertEqual(p.returncode, 0)
[   23s] AssertionError: 1 != 0
[   23s] 
[   23s] ----------------------------------------------------------------------
[   23s] Ran 79 tests in 8.790s
[   23s] 
[   23s] FAILED (failures=1, errors=2, skipped=4, expected failures=5)
[   23s] Test failed: <unittest.runner.TextTestResult run=79 errors=2 failures=1>
[   23s] error: Test failed: <unittest.runner.TextTestResult run=79 errors=2 failures=1>
@jayvdb jayvdb changed the title Test failures on openSUSE Test failures on openSUSE Python 3.7 Oct 20, 2019
@jayvdb
Copy link
Contributor Author

jayvdb commented Oct 20, 2019

I notice these errors are also occurring on CI, so it looks like I am off the hook
https://travis-ci.org/trolldbois/ctypeslib/jobs/465816222

@trolldbois
Copy link
Owner

This test should pass now. Can you check ?

@jayvdb
Copy link
Contributor Author

jayvdb commented Feb 17, 2021

I dont have Python 3.7 handy any more - now using Python 3.8.

I think it would be appropriate to add Python 3.8 to CI, as it is latest stable

@trolldbois
Copy link
Owner

ok, I moved the CI to py38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants