[clang] [llvm] [clang][python][test] Move python binding tests to lit framework (PR #148802)

Zequan Wu via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 15 15:48:58 PDT 2025


ZequanWu wrote:

Hi, it might be the cause of a build failure on our bot:
```
 ======================================================================
 ERROR: test_typekind_spelling (cindex.test_type.TestType)
 Ensure TypeKind.spelling works.
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/Volumes/Work/s/w/ir/cache/builder/src/third_party/llvm/clang/bindings/python/clang/cindex.py", line 4370, in get_cindex_library
     library = cdll.LoadLibrary(self.get_filename())
   File "/Volumes/Work/s/w/ir/cache/osx_sdk/XCode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/ctypes/__init__.py", line 444, in LoadLibrary
     return self._dlltype(name)
   File "/Volumes/Work/s/w/ir/cache/osx_sdk/XCode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/ctypes/__init__.py", line 366, in __init__
     self._handle = _dlopen(self._name, mode)
 OSError: dlopen(/Volumes/Work/s/w/ir/cache/builder/src/third_party/llvm-bootstrap/lib/libclang.dylib, 0x0006): tried: '/Volumes/Work/s/w/ir/cache/builder/src/third_party/llvm-bootstrap/lib/libclang.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Volumes/Work/s/w/ir/cache/builder/src/third_party/llvm-bootstrap/lib/libclang.dylib' (no such file), '/Volumes/Work/s/w/ir/cache/builder/src/third_party/llvm-bootstrap/lib/libclang.dylib' (no such file)
 
 During handling of the above exception, another exception occurred:
 
 Traceback (most recent call last):
   File "/Volumes/Work/s/w/ir/cache/builder/src/third_party/llvm/clang/test/bindings/python/tests/cindex/test_type.py", line 194, in test_typekind_spelling
     tu = get_tu("int a;")
   File "/Volumes/Work/s/w/ir/cache/builder/src/third_party/llvm/clang/test/bindings/python/tests/cindex/util.py", line 30, in get_tu
     return TranslationUnit.from_source(name, args, unsaved_files=[(name, source)])
   File "/Volumes/Work/s/w/ir/cache/builder/src/third_party/llvm/clang/bindings/python/clang/cindex.py", line 3316, in from_source
     index = Index.create()
   File "/Volumes/Work/s/w/ir/cache/builder/src/third_party/llvm/clang/bindings/python/clang/cindex.py", line 3188, in create
     return Index(conf.lib.clang_createIndex(excludeDecls, 0))
   File "/Volumes/Work/s/w/ir/cache/builder/src/third_party/llvm/clang/bindings/python/clang/cindex.py", line 250, in __get__
     value = self.wrapped(instance)
   File "/Volumes/Work/s/w/ir/cache/builder/src/third_party/llvm/clang/bindings/python/clang/cindex.py", line 4342, in lib
     lib = self.get_cindex_library()
   File "/Volumes/Work/s/w/ir/cache/builder/src/third_party/llvm/clang/bindings/python/clang/cindex.py", line 4377, in get_cindex_library
     raise LibclangError(msg)
 clang.cindex.LibclangError: dlopen(/Volumes/Work/s/w/ir/cache/builder/src/third_party/llvm-bootstrap/lib/libclang.dylib, 0x0006): tried: '/Volumes/Work/s/w/ir/cache/builder/src/third_party/llvm-bootstrap/lib/libclang.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Volumes/Work/s/w/ir/cache/builder/src/third_party/llvm-bootstrap/lib/libclang.dylib' (no such file), '/Volumes/Work/s/w/ir/cache/builder/src/third_party/llvm-bootstrap/lib/libclang.dylib' (no such file). To provide a path to libclang use Config.set_library_path() or Config.set_library_file().
 
 ----------------------------------------------------------------------
 Ran 165 tests in 0.064s
 
 FAILED (errors=157)
```

https://github.com/llvm/llvm-project/pull/148802


More information about the llvm-commits mailing list