[libc-commits] [libc] 17a2434 - [libc] Introduce a target named libc-unit-tests to run just the unit tests.
Siva Chandra Reddy via libc-commits
libc-commits at lists.llvm.org
Thu Feb 23 18:53:44 PST 2023
Author: Siva Chandra Reddy
Date: 2023-02-24T02:53:36Z
New Revision: 17a2434bd66e7fab1a587236f7ed402c2f258b3d
URL: https://github.com/llvm/llvm-project/commit/17a2434bd66e7fab1a587236f7ed402c2f258b3d
DIFF: https://github.com/llvm/llvm-project/commit/17a2434bd66e7fab1a587236f7ed402c2f258b3d.diff
LOG: [libc] Introduce a target named libc-unit-tests to run just the unit tests.
The target "check-libc" now runs all enabled tests which, depending on
the build mode, includes the unit tests, the integration tests and the api
test.
Reviewed By: jhuber6
Differential Revision: https://reviews.llvm.org/D144663
Added:
Modified:
libc/cmake/modules/LLVMLibCTestRules.cmake
libc/test/CMakeLists.txt
libc/test/integration/CMakeLists.txt
libc/test/src/CMakeLists.txt
Removed:
################################################################################
diff --git a/libc/cmake/modules/LLVMLibCTestRules.cmake b/libc/cmake/modules/LLVMLibCTestRules.cmake
index c2b34bb1226f..dc983319b645 100644
--- a/libc/cmake/modules/LLVMLibCTestRules.cmake
+++ b/libc/cmake/modules/LLVMLibCTestRules.cmake
@@ -300,7 +300,7 @@ endfunction(add_libc_unittest)
function(add_libc_testsuite suite_name)
add_custom_target(${suite_name})
- add_dependencies(check-llvmlibc ${suite_name})
+ add_dependencies(libc-unit-tests ${suite_name})
endfunction(add_libc_testsuite)
function(add_libc_exhaustive_testsuite suite_name)
diff --git a/libc/test/CMakeLists.txt b/libc/test/CMakeLists.txt
index 717b9330339a..b9b76b602a85 100644
--- a/libc/test/CMakeLists.txt
+++ b/libc/test/CMakeLists.txt
@@ -12,8 +12,8 @@ add_header_library(
)
add_custom_target(check-libc)
-add_custom_target(check-llvmlibc)
-add_dependencies(check-libc check-llvmlibc)
+add_custom_target(libc-unit-tests)
+add_dependencies(check-libc libc-unit-tests)
add_custom_target(exhaustive-check-libc)
add_custom_target(libc-long-running-tests)
diff --git a/libc/test/integration/CMakeLists.txt b/libc/test/integration/CMakeLists.txt
index f891ed3fede9..058c7e85ecef 100644
--- a/libc/test/integration/CMakeLists.txt
+++ b/libc/test/integration/CMakeLists.txt
@@ -1,4 +1,5 @@
add_custom_target(libc-integration-tests)
+add_dependencies(check-libc libc-integration-tests)
function(add_libc_integration_test_suite name)
add_custom_target(${name})
diff --git a/libc/test/src/CMakeLists.txt b/libc/test/src/CMakeLists.txt
index bf992ce2a8c2..2fe409ce6c0f 100644
--- a/libc/test/src/CMakeLists.txt
+++ b/libc/test/src/CMakeLists.txt
@@ -97,6 +97,8 @@ add_custom_command(
)
add_custom_target(libc-api-test)
+add_dependencies(check-libc libc-api-test)
+
set(
allocator_entrypoints
libc.src.stdlib.malloc
More information about the libc-commits
mailing list