aboutsummaryrefslogtreecommitdiff
path: root/clang/bindings
diff options
context:
space:
mode:
authorMichal Gorny <mgorny@gentoo.org>2018-10-11 16:32:54 +0000
committerMichal Gorny <mgorny@gentoo.org>2018-10-11 16:32:54 +0000
commit61adf8aeb4cb5521f774e2ede1e8f90f452f3816 (patch)
tree1fe2b4d0b5db2af78fc1a368c554009aaf3258e2 /clang/bindings
parent3910c7b832419c85dd9a28e3965886e57add97a9 (diff)
[tests] Include Python binding tests in CMake rules
Add a new CMake rule check-clang-python to run the Python bindings' test suite, and include it in check-all. Differential Revision: https://reviews.llvm.org/D52840 llvm-svn: 344258
Diffstat (limited to 'clang/bindings')
-rw-r--r--clang/bindings/python/tests/CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/bindings/python/tests/CMakeLists.txt b/clang/bindings/python/tests/CMakeLists.txt
new file mode 100644
index 000000000000..860db4e997d7
--- /dev/null
+++ b/clang/bindings/python/tests/CMakeLists.txt
@@ -0,0 +1,8 @@
+# Test target to run Python test suite from main build.
+
+add_custom_target(check-clang-python
+ COMMAND CLANG_LIBRARY_PATH=$<TARGET_FILE_DIR:libclang> ${PYTHON_EXECUTABLE} -m unittest discover
+ DEPENDS libclang
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/..)
+
+set_property(GLOBAL APPEND PROPERTY LLVM_ADDITIONAL_TEST_TARGETS check-clang-python)