Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[libc] Switch check-libc from CTest to lit#193798

Open
kaladron wants to merge 1 commit intollvm:mainfrom
kaladron:lit-default
Open

[libc] Switch check-libc from CTest to lit#193798
kaladron wants to merge 1 commit intollvm:mainfrom
kaladron:lit-default

Conversation

@kaladron
Copy link
Copy Markdown
Contributor

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.

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.
@kaladron
Copy link
Copy Markdown
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.

@kaladron kaladron marked this pull request as ready for review April 23, 2026 17:15
@llvmbot llvmbot added the libc label Apr 23, 2026
@llvmbot
Copy link
Copy Markdown
Member

llvmbot commented Apr 23, 2026

@llvm/pr-subscribers-libc

Author: Jeff Bailey (kaladron)

Changes

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.


Full diff: https://github.com/llvm/llvm-project/pull/193798.diff

3 Files Affected:

  • (modified) libc/test/CMakeLists.txt (+7-10)
  • (modified) libc/test/include/CMakeLists.txt (+1-2)
  • (modified) libc/test/integration/CMakeLists.txt (+1-2)
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})

@kaladron
Copy link
Copy Markdown
Contributor Author

(also, depends on #193797 landing)

Copy link
Copy Markdown
Contributor

@michaelrj-google michaelrj-google left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, hopefully this one sticks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants