summaryrefslogtreecommitdiffstats
path: root/clang/bindings/python/tests/cindex/test_cdb.py
Commit message (Collapse)AuthorAgeFilesLines
* [clang][Tooling] Infer target and mode from argv[0] when using ↵Kadir Cetinkaya2019-06-261-6/+8
| | | | | | | | | | | | | | | | | | | | | JSONCompilationDatabase Summary: Wraps JSON compilation database with a target and mode adding database wrapper. So that driver can correctly figure out which toolchain to use. Note that clients that wants to make use of this target discovery mechanism needs to link in TargetsInfos and initialize them at startup. Reviewers: ilya-biryukov Subscribers: mgorny, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63755 llvm-svn: 364386
* [libclang][test] Suppress annoying 'LIBCLANG TOOLING ERROR' outputFangrui Song2019-04-031-0/+9
| | | | | | | | | | | check-all invokes check-clang-python which prints the annoying message: LIBCLANG TOOLING ERROR: fixed-compilation-database: Error while opening fixed database: No such file or directory json-compilation-database: Error while opening JSON database: No such file or directory Let's fix it now with os.dup os.dup2 trick. llvm-svn: 357562
* [python] Support PathLike filenames and directoriesMichal Gorny2018-11-101-0/+9
| | | | | | | | | | | | | | | Python 3.6 introduced a file system path protocol (PEP 519[1]). The standard library APIs accepting file system paths now accept path objects too. It could be useful to add this here as well for convenience. [1] https://www.python.org/dev/peps/pep-0519 Authored by: jstasiak (Jakub Stasiak) Differential Revision: https://reviews.llvm.org/D54120 llvm-svn: 346586
* [python] [tests] Remove cdb lookup failure testMichal Gorny2018-10-121-5/+0
| | | | | | | | | | Remove the test checking for compilation db lookup failure. Since r342228, JSONCompilationDatabasePlugin infers compile commands for missing files, therefore making the lookup always succeed. Differential Revision: https://reviews.llvm.org/D53202 llvm-svn: 344364
* [python] [tests] Support overriding library path via environmentMichal Gorny2018-10-111-0/+5
| | | | | | | | | | | | | | | | | Support a new CLANG_LIBRARY_PATH environment variable for the Python binding tests. This variable can be used to force the bindings to load libclang.* from a specific directory. I plan to use this when integrating Python binding tests with the CMake build system. Currently, those tests load libclang.so from default search paths, so I would have to rely on platform-specific mechanics such as LD_LIBRARY_PATH. Instead of copying the whole logic necessary to handle platform differences into yet another place, it's easier to just add a dedicated variable for this purpose. Differential Revision: https://reviews.llvm.org/D52806 llvm-svn: 344240
* [bindings] Fix most Python binding unittests on WindowsJonathan Coe2018-06-211-0/+2
| | | | | | | | | | | | | | | | | | Summary: This fixes all but one of the test cases for Windows. TestCDB will take more work to debug, as CompilationDatabase seems not to work correctly. Reviewers: bkramer, wanders, jbcoe Reviewed By: bkramer, jbcoe Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D47864 Patch written by ethanhs (Ethan) llvm-svn: 335282
* [python] [tests] Rewrite to use standard unittest moduleMichal Gorny2017-11-101-97/+99
| | | | | | | | | | | | | | | | | | | | | | | | | Rewrite the tests from using plain 'assert' mixed with some nosetests methods to the standard unittest module layout. Improve the code to use the most canonical assertion methods whenever possible. This has a few major advantages: - the code uses standard methods now, resulting in a reduced number of WTFs whenever someone with basic Python knowledge gets to read it, - completely unnecessary dependency on nosetests is removed since the standard library supplies all that is necessary for the tests to run, - the tests can be run via any test runner, including the one built-in in Python, - the failure output for most of the tests is improved from 'assertion x == y failed' to actually telling the values. Differential Revision: https://reviews.llvm.org/D39763 llvm-svn: 317897
* python binding: expose compile command filenameGuillaume Papin2016-03-071-5/+12
| | | | | | | | Reviewers: compnerd, skalinichev Differential Revision: http://reviews.llvm.org/D17278 llvm-svn: 262845
* [libclang/python] Add CompilationDatabase.getAllCompileCommands to the ↵Argyrios Kyrtzidis2013-12-201-0/+21
| | | | | | | | python bindings. Patch by Laszlo Nagy! llvm-svn: 197765
* [cindex.py] Make CompileCommand.arguments usage consistent with ↵Arnaud A. de Grandmaison2012-07-101-2/+2
| | | | | | | | CompileCommand.directory and the rest of the python binding Patch by David Röthlisberger llvm-svn: 159970
* [cindex.py] fix infinite iteration of compilation database CompileCommandsArnaud A. de Grandmaison2012-07-091-0/+8
| | | | | | Patch by David Röthlisberger llvm-svn: 159926
* [cindex.py] Fix commentsArnaud A. de Grandmaison2012-06-301-1/+1
| | | | llvm-svn: 159492
* [cindex.py] add CompilationDatabase supportArnaud A. de Grandmaison2012-06-301-0/+81
llvm-svn: 159485
OpenPOWER on IntegriCloud