Skip to content

Commit

Permalink
[tests] Include Python binding tests in CMake rules
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mgorny committed Oct 11, 2018
1 parent c37d161 commit cdd23f2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions clang/CMakeLists.txt
Expand Up @@ -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."
Expand Down
7 changes: 7 additions & 0 deletions 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)

0 comments on commit cdd23f2

Please sign in to comment.