| Issue |
177832
|
| Summary |
BUG: `tests.cindex.test_enums.TestEnums.test_all_variants` of clang python bindings fails for v22.1.0-rc1
|
| Labels |
clang
|
| Assignees |
|
| Reporter |
h-vetinari
|
While building out LLVM v22.1.0-rc1 in conda-forge, I'm running into a test failure in https://github.com/conda-forge/clangdev-feedstock/pull/430 when running the tests for the clang python bindings on linux-64 (after installing all the relevant components):
```
cd clang/bindings/python
python -m unittest discover -v
```
The error looks as follows
```
[...]
test_type_spelling (tests.cindex.test_type.TestType)
Ensure Type.spelling works. ... ok
test_typekind_spelling (tests.cindex.test_type.TestType)
Ensure TypeKind.spelling works. ... ok
======================================================================
ERROR: test_all_variants (tests.cindex.test_enums.TestEnums)
Check that all libclang enum values are also defined in cindex.py
----------------------------------------------------------------------
Traceback (most recent call last):
File "$SRC_DIR/clang/bindings/python/tests/cindex/test_enums.py", line 63, in test_all_variants
tu = TranslationUnit.from_source(indexheader, ["-x", "c++"])
File "$PREFIX/lib/python3.10/site-packages/clang/cindex.py", line 3430, in from_source
raise TranslationUnitLoadError("Error parsing translation unit.")
clang.cindex.TranslationUnitLoadError: Error parsing translation unit.
----------------------------------------------------------------------
Ran 174 tests in 0.493s
FAILED (errors=1)
```
CC @DeinAlptraum, as you seem to be contributing [regularly](https://github.com/llvm/llvm-project/commits/main/clang/bindings/python/tests/cindex/test_enums.py) to the test module in question (there are some recent changes on main by you after v22 branched that look unrelated at first glance; happy to backport patches downstream though if necessary; also, the [translation unit](https://github.com/llvm/llvm-project/blob/llvmorg-22.1.0-rc1/clang/bindings/python/tests/cindex/test_enums.py) in question hasn't had any recent changes AFAICT).
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs