[libc] Switch check-libc from CTest to lit#193798
Open
Conversation
Renamed check-libc-lit to check-libc, replacing the old CTest-driven target. Dependencies now use -build targets (e.g. libc-hermetic-tests-build) so that check-libc only builds test executables and delegates execution to lit.
Contributor
Author
|
Hi Michael! This is an attempt to re-land the lit configs. I plan to do this tomorrow morning my time so that I can watch it, if you're OK with the reland. |
Member
|
@llvm/pr-subscribers-libc Author: Jeff Bailey (kaladron) ChangesRenamed check-libc-lit to check-libc, replacing the old CTest-driven target. Dependencies now use -build targets (e.g. libc-hermetic-tests-build) so that check-libc only builds test executables and delegates execution to lit. Full diff: https://github.com/llvm/llvm-project/pull/193798.diff 3 Files Affected:
diff --git a/libc/test/CMakeLists.txt b/libc/test/CMakeLists.txt
index dcfae50790c2e..5c45467453354 100644
--- a/libc/test/CMakeLists.txt
+++ b/libc/test/CMakeLists.txt
@@ -1,11 +1,6 @@
-add_custom_target(check-libc)
add_custom_target(libc-unit-tests)
add_custom_target(libc-hermetic-tests)
-if (TARGET check-hdrgen)
- add_dependencies(check-libc check-hdrgen)
-endif()
-
add_custom_target(exhaustive-check-libc)
add_custom_target(libc-long-running-tests)
@@ -31,18 +26,20 @@ configure_lit_site_cfg(
"CMAKE_CROSSCOMPILING_EMULATOR"
)
-add_lit_testsuite(check-libc-lit
+add_lit_testsuite(check-libc
"Running libc tests via lit"
${LIBC_BUILD_DIR}/test
)
+if (TARGET check-hdrgen)
+ add_dependencies(check-libc check-hdrgen)
+endif()
+
if(LIBC_ENABLE_UNITTESTS AND NOT LIBC_TEST_HERMETIC_TEST_ONLY)
- add_dependencies(check-libc libc-unit-tests)
- add_dependencies(check-libc-lit libc-unit-tests-build)
+ add_dependencies(check-libc libc-unit-tests-build)
endif()
if(LIBC_ENABLE_HERMETIC_TESTS AND NOT LIBC_TEST_UNIT_TEST_ONLY)
- add_dependencies(check-libc libc-hermetic-tests)
- add_dependencies(check-libc-lit libc-hermetic-tests-build)
+ add_dependencies(check-libc libc-hermetic-tests-build)
endif()
add_subdirectory(UnitTest)
diff --git a/libc/test/include/CMakeLists.txt b/libc/test/include/CMakeLists.txt
index 1d5bc3d8da2c8..dc044a5848e7c 100644
--- a/libc/test/include/CMakeLists.txt
+++ b/libc/test/include/CMakeLists.txt
@@ -1,6 +1,5 @@
add_custom_target(libc_include_tests)
-add_dependencies(check-libc libc_include_tests)
-add_dependencies(check-libc-lit libc_include_tests-build)
+add_dependencies(check-libc libc_include_tests-build)
add_libc_test(
assert_test
diff --git a/libc/test/integration/CMakeLists.txt b/libc/test/integration/CMakeLists.txt
index 4c9970cf364eb..0eb8bc38c4bf7 100644
--- a/libc/test/integration/CMakeLists.txt
+++ b/libc/test/integration/CMakeLists.txt
@@ -1,6 +1,5 @@
add_custom_target(libc-integration-tests)
-add_dependencies(check-libc libc-integration-tests)
-add_dependencies(check-libc-lit libc-integration-tests-build)
+add_dependencies(check-libc libc-integration-tests-build)
function(add_libc_integration_test_suite name)
add_custom_target(${name})
|
Contributor
Author
|
(also, depends on #193797 landing) |
michaelrj-google
approved these changes
Apr 23, 2026
Contributor
michaelrj-google
left a comment
There was a problem hiding this comment.
LGTM, hopefully this one sticks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Renamed check-libc-lit to check-libc, replacing the old CTest-driven target. Dependencies now use -build targets (e.g. libc-hermetic-tests-build) so that check-libc only builds test executables and delegates execution to lit.