aboutsummaryrefslogtreecommitdiff
path: root/bindings/python
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
commit77a2b784ed4059c8e5fd957463557e8635ff72f8 (patch)
treed861264119e87135c598a8065e95d2879a21ae6e /bindings/python
parent17773010d45da014b85dfc547ad15f0cff9ca240 (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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@344258 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'bindings/python')
-rw-r--r--bindings/python/tests/CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/bindings/python/tests/CMakeLists.txt b/bindings/python/tests/CMakeLists.txt
new file mode 100644
index 0000000000..860db4e997
--- /dev/null
+++ b/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)