[PATCH] D52840: Include Python binding tests in CMake rules
mgorny added a comment. Thanks for all your reports. I have filed https://reviews.llvm.org/D53326 to disable the tests on all three known-broken arches. Repository: rC Clang https://reviews.llvm.org/D52840 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D52840: Include Python binding tests in CMake rules
kparzysz added a comment. Hexagon clang builder has been failing since around the time of this commit as well: http://lab.llvm.org:8011/builders/clang-hexagon-elf/builds/20617/steps/ninja%20check%201/logs/stdio Repository: rC Clang https://reviews.llvm.org/D52840 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [PATCH] D52840: Include Python binding tests in CMake rules
Hi Michal, AArch64 bots are broken as well, logs are available at: http://lab.llvm.org:8011/builders/clang-cmake-aarch64-quick/builds/15717/steps/ninja%20check%201/logs/stdio Cheers, Yvan On Mon, 15 Oct 2018 at 20:39, Ulrich Weigand via Phabricator via cfe-commits wrote: > > uweigand added a comment. > > In https://reviews.llvm.org/D52840#1265615, @mgorny wrote: > > > The first one seems to indicate that your `libclang.so` is broken in > > release mode (optimization error?). The second one is correct (some of the > > tests test for errors, and apparently don't silence the messages). > > > Ok, thanks for the clarification on the second point. > > As to the first issue, it turned out to be more complicated. The wrong value > results from this call in CursorVisitor::Visit > > switch (Visitor(Cursor, Parent, ClientData)) { > > This is a callback routine passed in from the caller, which in the case of > the Python bindings means that an FFI closure is being called. > > Now, due to a historical quirk in the FFI ABI, return values of integral type > smaller than the register word size must be passed as the special "ffi_arg" > type when using FFI (either for calls or for closures). It seems the Python > 2.7 code that interfaces with FFI does not correctly respect this. As a > result, it seems that when the closure returns a 32-bit value, it is not > properly extended and the high bits of the return register contain garbage. > > But that violates our ABI, which requires extension to full register size. > And it seems the clang code, when built with optimization, does indeed rely > on that ABI guarantee. > > So there's a bug in Python (or depending on how you want to look at it, in > libffi -- that part of the interface has also long been under-documented > unfortunately), which hits on our platform. I'll see if I can do anything > about that, but for now we'll probably want to disable those tests on SystemZ. > > > Repository: > rC Clang > > https://reviews.llvm.org/D52840 > > > > ___ > cfe-commits mailing list > cfe-commits@lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D52840: Include Python binding tests in CMake rules
uweigand added a comment. In https://reviews.llvm.org/D52840#1265615, @mgorny wrote: > The first one seems to indicate that your `libclang.so` is broken in release > mode (optimization error?). The second one is correct (some of the tests test > for errors, and apparently don't silence the messages). Ok, thanks for the clarification on the second point. As to the first issue, it turned out to be more complicated. The wrong value results from this call in CursorVisitor::Visit switch (Visitor(Cursor, Parent, ClientData)) { This is a callback routine passed in from the caller, which in the case of the Python bindings means that an FFI closure is being called. Now, due to a historical quirk in the FFI ABI, return values of integral type smaller than the register word size must be passed as the special "ffi_arg" type when using FFI (either for calls or for closures). It seems the Python 2.7 code that interfaces with FFI does not correctly respect this. As a result, it seems that when the closure returns a 32-bit value, it is not properly extended and the high bits of the return register contain garbage. But that violates our ABI, which requires extension to full register size. And it seems the clang code, when built with optimization, does indeed rely on that ABI guarantee. So there's a bug in Python (or depending on how you want to look at it, in libffi -- that part of the interface has also long been under-documented unfortunately), which hits on our platform. I'll see if I can do anything about that, but for now we'll probably want to disable those tests on SystemZ. Repository: rC Clang https://reviews.llvm.org/D52840 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D52840: Include Python binding tests in CMake rules
mgorny added a comment. The first one seems to indicate that your `libclang.so` is broken in release mode (optimization error?). The second one is correct (some of the tests test for errors, and apparently don't silence the messages). Repository: rC Clang https://reviews.llvm.org/D52840 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D52840: Include Python binding tests in CMake rules
uweigand added a comment. This causes check-all to abort for me on SystemZ in Release mode (and never actually run the lit tests): [40/365] cd /home/uweigand/llvm/llvm-head/tools/clang/bindings/python && /usr/bin/cmake -E...BRARY_PATH=/home/uweigand/llvm/build/llvm-head/lib /usr/bin/python2.7 -m unittest discover FAILED: tools/clang/bindings/python/tests/CMakeFiles/check-clang-python cd /home/uweigand/llvm/llvm-head/tools/clang/bindings/python && /usr/bin/cmake -E env CLANG_LIBRARY_PATH=/home/uweigand/llvm/build/llvm-head/lib /usr/bin/python2.7 -m unittest discover Invalid CXChildVisitResult! UNREACHABLE executed at /home/uweigand/llvm/llvm-head/tools/clang/tools/libclang/CIndex.cpp:233! Child aborted When running in Debug mode I see instead: [165/536] cd /home/uweigand/llvm/llvm-head/tools/clang/bindings/python && /usr/bin/cmake -...PATH=/home/uweigand/llvm/build/llvm-head-debug/lib /usr/bin/python2.7 -m unittest discover ..LIBCLANG TOOLING ERROR: fixed-compilation-database: Error while opening fixed database: No such file or directory json-compilation-database: Error while opening JSON database: No such file or directory .. -- Ran 120 tests in 8.522s OK which apparently doesn't count as failure, but still doesn't look quite right to me. Is this some environment setup problem, or does this expose a real bug? It's certainly not good that running the remaining tests is completely aborted in Release mode ... Repository: rC Clang https://reviews.llvm.org/D52840 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D52840: Include Python binding tests in CMake rules
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=$ ${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() 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=$ ${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() ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D52840: Include Python binding tests in CMake rules
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. I'm not a CMake expert, but when I apply this patch locally, I'm able to run cmake to completion without errors, so LGTM! https://reviews.llvm.org/D52840 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D52840: Include Python binding tests in CMake rules
mgorny requested review of this revision. mgorny added a comment. Please review the new version, addressing the issue caught by buildbots. https://reviews.llvm.org/D52840 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D52840: Include Python binding tests in CMake rules
mgorny updated this revision to Diff 169219. mgorny added a comment. v3: one more correction for stand-alone 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=$ ${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() 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=$ ${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() ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D52840: Include Python binding tests in CMake rules
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=$ ${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() 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=$ ${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() ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [PATCH] D52840: Include Python binding tests in CMake rules
On Thu, Oct 11, 2018 at 8:23 AM Umann Kristóf via Phabricator via llvm-commits wrote: > > Szelethus added a comment. > > I'm afraid this may have broken many buildbots, I'm having issues building > from scratch. Can you please take a look? I've reverted in r344244. ~Aaron ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D52840: Include Python binding tests in CMake rules
Szelethus added a comment. I'm afraid this may have broken many buildbots, I'm having issues building from scratch. Can you please take a look? Repository: rL LLVM https://reviews.llvm.org/D52840 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D52840: Include Python binding tests in CMake rules
This revision was automatically updated to reflect the committed changes. Closed by commit rL344241: [tests] Include Python binding tests in CMake rules (authored by mgorny, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D52840?vs=168147=169194#toc Repository: rL LLVM https://reviews.llvm.org/D52840 Files: cfe/trunk/CMakeLists.txt cfe/trunk/bindings/python/tests/CMakeLists.txt Index: cfe/trunk/CMakeLists.txt === --- cfe/trunk/CMakeLists.txt +++ cfe/trunk/CMakeLists.txt @@ -502,6 +502,7 @@ ) endif() add_subdirectory(utils/perf-training) + add_subdirectory(bindings/python/tests) endif() option(CLANG_INCLUDE_DOCS "Generate build targets for the Clang docs." Index: cfe/trunk/bindings/python/tests/CMakeLists.txt === --- cfe/trunk/bindings/python/tests/CMakeLists.txt +++ cfe/trunk/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) Index: cfe/trunk/CMakeLists.txt === --- cfe/trunk/CMakeLists.txt +++ cfe/trunk/CMakeLists.txt @@ -502,6 +502,7 @@ ) endif() add_subdirectory(utils/perf-training) + add_subdirectory(bindings/python/tests) endif() option(CLANG_INCLUDE_DOCS "Generate build targets for the Clang docs." Index: cfe/trunk/bindings/python/tests/CMakeLists.txt === --- cfe/trunk/bindings/python/tests/CMakeLists.txt +++ cfe/trunk/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) ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D52840: Include Python binding tests in CMake rules
mgorny added a comment. Yes, I've tested it on Linux. I'll commit it once the dep is approved, and hopefully build bots will answer if they work across all platforms. Repository: rC Clang https://reviews.llvm.org/D52840 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D52840: Include Python binding tests in CMake rules
steveire accepted this revision. steveire added a comment. This revision is now accepted and ready to land. I didn't run it, but CMake-wise this looks fine. (I trust you did) I notice some tests use from tests.cindex.util import foo while others use from .util import foo You might want to make that consistent in a follow-up. Repository: rC Clang https://reviews.llvm.org/D52840 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D52840: Include Python binding tests in CMake rules
mgorny created this revision. mgorny added reviewers: jbcoe, arphaman, frutiger. Add a new CMake rule check-clang-python to run the Python bindings' test suite, and include it in check-all. Repository: rC Clang 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,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) Index: CMakeLists.txt === --- CMakeLists.txt +++ CMakeLists.txt @@ -502,6 +502,7 @@ ) endif() add_subdirectory(utils/perf-training) + add_subdirectory(bindings/python/tests) endif() option(CLANG_INCLUDE_DOCS "Generate build targets for the Clang docs." Index: bindings/python/tests/CMakeLists.txt === --- /dev/null +++ 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) Index: CMakeLists.txt === --- CMakeLists.txt +++ CMakeLists.txt @@ -502,6 +502,7 @@ ) endif() add_subdirectory(utils/perf-training) + add_subdirectory(bindings/python/tests) endif() option(CLANG_INCLUDE_DOCS "Generate build targets for the Clang docs." ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits