mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-04-15 12:50:38 +00:00
[libc++] Add a new target check-cxx-deps to build dependencies of the test suite
When running the tests through `lit` directly instead of through `check-cxx`, it is required to manually build the `cxx` (and often `cxx_experimental`) targets. Instead of having to do that manually, this commit adds a new target `check-cxx-deps` that does that for you.
This commit is contained in:
parent
af5e83f569
commit
3fbc9c7b51
@ -25,11 +25,14 @@ Usage
|
|||||||
-----
|
-----
|
||||||
|
|
||||||
After building libc++, you can run parts of the libc++ test suite by simply
|
After building libc++, you can run parts of the libc++ test suite by simply
|
||||||
running ``llvm-lit`` on a specified test or directory. For example:
|
running ``llvm-lit`` on a specified test or directory. If you're unsure
|
||||||
|
whether the required libraries have been built, you can use the
|
||||||
|
`check-cxx-deps` target. For example:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
$ cd <monorepo-root>
|
$ cd <monorepo-root>
|
||||||
|
$ make -C <build> check-cxx-deps # If you want to make sure the targets get rebuilt
|
||||||
$ <build>/bin/llvm-lit -sv libcxx/test/std/re # Run all of the std::regex tests
|
$ <build>/bin/llvm-lit -sv libcxx/test/std/re # Run all of the std::regex tests
|
||||||
$ <build>/bin/llvm-lit -sv libcxx/test/std/depr/depr.c.headers/stdlib_h.pass.cpp # Run a single test
|
$ <build>/bin/llvm-lit -sv libcxx/test/std/depr/depr.c.headers/stdlib_h.pass.cpp # Run a single test
|
||||||
$ <build>/bin/llvm-lit -sv libcxx/test/std/atomics libcxx/test/std/threads # Test std::thread and std::atomic
|
$ <build>/bin/llvm-lit -sv libcxx/test/std/atomics libcxx/test/std/threads # Test std::thread and std::atomic
|
||||||
|
@ -109,10 +109,14 @@ if (LIBCXX_INCLUDE_TESTS)
|
|||||||
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
|
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg)
|
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg)
|
||||||
|
|
||||||
|
add_custom_target(check-cxx-deps
|
||||||
|
DEPENDS cxx ${LIBCXX_TEST_DEPS}
|
||||||
|
COMMENT "Builds dependencies required to run the test suite.")
|
||||||
|
|
||||||
add_lit_testsuite(check-cxx
|
add_lit_testsuite(check-cxx
|
||||||
"Running libcxx tests"
|
"Running libcxx tests"
|
||||||
${CMAKE_CURRENT_BINARY_DIR}
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
DEPENDS cxx ${LIBCXX_TEST_DEPS})
|
DEPENDS check-cxx-deps)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (LIBCXX_GENERATE_COVERAGE)
|
if (LIBCXX_GENERATE_COVERAGE)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user