[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 09:34:51 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rC344258: [tests] Include Python binding tests in CMake rules (authored by mgorny, committed by ).
Repository:
rC Clang
https://reviews.llvm.org/D52840
Files:
CMakeLists.txt
bindings/python/tests/CMakeLists.txt
Index: bindings/python/tests/CMakeLists.txt
===================================================================
--- bindings/python/tests/CMakeLists.txt
+++ 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,19 +485,22 @@
)
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
# and we know the total set of lit testsuites.
get_property(LLVM_LIT_TESTSUITES GLOBAL PROPERTY LLVM_LIT_TESTSUITES)
get_property(LLVM_LIT_PARAMS GLOBAL PROPERTY LLVM_LIT_PARAMS)
get_property(LLVM_LIT_DEPENDS GLOBAL PROPERTY LLVM_LIT_DEPENDS)
get_property(LLVM_LIT_EXTRA_ARGS GLOBAL PROPERTY LLVM_LIT_EXTRA_ARGS)
+ get_property(LLVM_ADDITIONAL_TEST_TARGETS
+ GLOBAL PROPERTY LLVM_ADDITIONAL_TEST_TARGETS)
add_lit_target(check-all
"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.169228.patch
Type: text/x-patch
Size: 1652 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181011/e8dbd2ff/attachment.bin>
More information about the cfe-commits
mailing list