[PATCH] D52840: Include Python binding tests in CMake rules
Michał Górny via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 11 08:23:03 PDT 2018
mgorny updated this revision to Diff 169218.
mgorny added a comment.
v2: fixed appending to check-all to make it compatible both with in-tree and standalone builds
https://reviews.llvm.org/D52840
Files:
CMakeLists.txt
bindings/python/tests/CMakeLists.txt
Index: bindings/python/tests/CMakeLists.txt
===================================================================
--- /dev/null
+++ 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)
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -485,6 +485,7 @@
)
endif()
add_subdirectory(test)
+ add_subdirectory(bindings/python/tests)
if(CLANG_BUILT_STANDALONE)
# Add a global check rule now that all subdirectories have been traversed
@@ -497,7 +498,7 @@
"Running all regression tests"
${LLVM_LIT_TESTSUITES}
PARAMS ${LLVM_LIT_PARAMS}
- DEPENDS ${LLVM_LIT_DEPENDS}
+ DEPENDS ${LLVM_LIT_DEPENDS} ${LLVM_ADDITIONAL_TEST_TARGETS}
ARGS ${LLVM_LIT_EXTRA_ARGS}
)
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52840.169218.patch
Type: text/x-patch
Size: 1164 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181011/717f9593/attachment.bin>
More information about the cfe-commits
mailing list