[libc-commits] [PATCH] D68904: Add a high level target for libc unit tests called 'libc_unittests'.

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri Oct 11 22:48:47 PDT 2019


sivachandra created this revision.
sivachandra added a reviewer: jakehehrlich.
Herald added subscribers: libc-commits, mgorny.
Herald added a project: libc-project.

All other unittest suites will be dependencies of this target. This
gives us a clean way to run all the unit tests, and just the unit tests,
in a single step on a buildbot builder. When we add other kind of tests,
we can add a highlevel target for them as well.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D68904

Files:
  libc/cmake/modules/LLVMLibCRules.cmake
  libc/src/string/CMakeLists.txt


Index: libc/src/string/CMakeLists.txt
===================================================================
--- libc/src/string/CMakeLists.txt
+++ libc/src/string/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_custom_target(libc_string_unittests)
+add_libc_unittest_suite(libc_string_unittests)
 
 add_subdirectory(strcpy)
 add_subdirectory(strcat)
Index: libc/cmake/modules/LLVMLibCRules.cmake
===================================================================
--- libc/cmake/modules/LLVMLibCRules.cmake
+++ libc/cmake/modules/LLVMLibCRules.cmake
@@ -278,3 +278,10 @@
     )
   endif()
 endfunction(add_libc_unittest)
+
+add_custom_target(libc_unittests)
+
+function(add_libc_unittest_suite target_name)
+  add_custom_target(${target_name})
+  add_dependencies(libc_unittests ${target_name})
+endfunction(add_libc_unittest_suite)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68904.224728.patch
Type: text/x-patch
Size: 819 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20191012/28feafd0/attachment-0001.bin>


More information about the libc-commits mailing list