From: Michal Gorny Date: Thu, 11 Oct 2018 11:58:14 +0000 (+0000) Subject: [tests] Include Python binding tests in CMake rules X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0f0140520db5ffd69ce824e68230550f92e96f62;p=clang [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@344241 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 61fd913a2a..84984f75b5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -502,6 +502,7 @@ if( CLANG_INCLUDE_TESTS ) ) endif() add_subdirectory(utils/perf-training) + add_subdirectory(bindings/python/tests) endif() option(CLANG_INCLUDE_DOCS "Generate build targets for the Clang docs." diff --git a/bindings/python/tests/CMakeLists.txt b/bindings/python/tests/CMakeLists.txt new file mode 100644 index 0000000000..66758a3f2a --- /dev/null +++ b/bindings/python/tests/CMakeLists.txt @@ -0,0 +1,7 @@ +# Test target to run Python test suite from main build. + +add_custom_target(check-clang-python + COMMAND CLANG_LIBRARY_PATH=$ ${PYTHON_EXECUTABLE} -m unittest discover + DEPENDS libclang + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/..) +add_dependencies(check-all check-clang-python)