diff options
author | Michal Gorny <mgorny@gentoo.org> | 2018-10-11 11:58:14 +0000 |
---|---|---|
committer | Michal Gorny <mgorny@gentoo.org> | 2018-10-11 11:58:14 +0000 |
commit | cdd23f221d84123272f380151e09358376541405 (patch) | |
tree | 80d066ddc712581025315c572516c60d47fa44c0 | |
parent | c37d16140a8e2ba36929a5b11b53d5477460b96c (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: 344241
-rw-r--r-- | clang/CMakeLists.txt | 1 | ||||
-rw-r--r-- | clang/bindings/python/tests/CMakeLists.txt | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt index 61fd913a2a53..84984f75b5f8 100644 --- a/clang/CMakeLists.txt +++ b/clang/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/clang/bindings/python/tests/CMakeLists.txt b/clang/bindings/python/tests/CMakeLists.txt new file mode 100644 index 000000000000..66758a3f2aac --- /dev/null +++ b/clang/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=$<TARGET_FILE_DIR:libclang> ${PYTHON_EXECUTABLE} -m unittest discover + DEPENDS libclang + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/..) +add_dependencies(check-all check-clang-python) |