[llvm] 0e14973 - [NFC][LLVM-Tests] Specialize test suite for LLVM unit tests (#161442)

via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 1 13:06:21 PDT 2025


Author: Rahul Joshi
Date: 2025-10-01T13:06:16-07:00
New Revision: 0e14973f3cff922549b472aebc4c3b0dc1fc4d76

URL: https://github.com/llvm/llvm-project/commit/0e14973f3cff922549b472aebc4c3b0dc1fc4d76
DIFF: https://github.com/llvm/llvm-project/commit/0e14973f3cff922549b472aebc4c3b0dc1fc4d76.diff

LOG: [NFC][LLVM-Tests] Specialize test suite for LLVM unit tests (#161442)

Remove `UnitTests` from LLVM_TEST_DEPENDS_COMMON and create a
specialized lit suite for unit-tests and that depends only on
`UnitTests`.

Added: 
    llvm/test/Unit/CMakeLists.txt

Modified: 
    llvm/test/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/llvm/test/CMakeLists.txt b/llvm/test/CMakeLists.txt
index 4db7663045ecc..32c7c64451746 100644
--- a/llvm/test/CMakeLists.txt
+++ b/llvm/test/CMakeLists.txt
@@ -71,7 +71,6 @@ set(LLVM_TEST_DEPENDS
   ${LLVM_TEST_DEPENDS_COMMON}
   BugpointPasses
   LLVMWindowsDriver
-  UnitTests
   bugpoint
   llc
   lli
@@ -270,10 +269,11 @@ add_lit_testsuites(LLVM ${CMAKE_CURRENT_SOURCE_DIR}
   ${exclude_from_check_all}
   DEPENDS ${LLVM_TEST_DEPENDS}
   FOLDER "Tests/Subdirectories"
-  SKIP "^FileCheck" "^TableGen"
+  SKIP "^FileCheck" "^TableGen" "^Unit"
   )
 add_subdirectory(FileCheck)
 add_subdirectory(TableGen)
+add_subdirectory(Unit)
 
 # Setup an alias for 'check-all'.
 add_custom_target(check)

diff  --git a/llvm/test/Unit/CMakeLists.txt b/llvm/test/Unit/CMakeLists.txt
new file mode 100644
index 0000000000000..6b0abe199673f
--- /dev/null
+++ b/llvm/test/Unit/CMakeLists.txt
@@ -0,0 +1,5 @@
+add_lit_testsuite(check-llvm-unit "Running lit suite for LLVM unit tests"
+  ${CMAKE_CURRENT_BINARY_DIR}
+  EXCLUDE_FROM_CHECK_ALL
+  DEPENDS UnitTests
+  )


        


More information about the llvm-commits mailing list