From de9746cdfeb4488d9eff5ed24a0bb82624365096 Mon Sep 17 00:00:00 2001 From: Erick Velez Date: Thu, 19 Mar 2026 10:19:04 -0700 Subject: [PATCH] [clang-doc] Add individual target for unit tests (#185695) --- clang-tools-extra/test/CMakeLists.txt | 8 +------- clang-tools-extra/test/Unit/CMakeLists.txt | 12 ++++++++++++ 2 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 clang-tools-extra/test/Unit/CMakeLists.txt diff --git a/clang-tools-extra/test/CMakeLists.txt b/clang-tools-extra/test/CMakeLists.txt index 78447e7a00db..97c7a66cd69f 100644 --- a/clang-tools-extra/test/CMakeLists.txt +++ b/clang-tools-extra/test/CMakeLists.txt @@ -21,13 +21,6 @@ configure_lit_site_cfg( ${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py ) -configure_lit_site_cfg( - ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.py.in - ${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg.py - MAIN_CONFIG - ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.cfg.py - ) - set(CLANG_TOOLS_TEST_DEPS # For the clang-doc tests that emit bitcode files. llvm-bcanalyzer @@ -91,3 +84,4 @@ add_lit_testsuites(CLANG-EXTRA ${CMAKE_CURRENT_SOURCE_DIR} ) add_subdirectory(clang-doc) +add_subdirectory(Unit) diff --git a/clang-tools-extra/test/Unit/CMakeLists.txt b/clang-tools-extra/test/Unit/CMakeLists.txt new file mode 100644 index 000000000000..cd1c9ff7a473 --- /dev/null +++ b/clang-tools-extra/test/Unit/CMakeLists.txt @@ -0,0 +1,12 @@ +configure_lit_site_cfg( + ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in + ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py + MAIN_CONFIG + ${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py + ) + +add_lit_testsuite(check-clang-doc-unit "Running clang-doc unit tests" + ${CMAKE_CURRENT_BINARY_DIR} + EXCLUDE_FROM_CHECK_ALL + ARGS --filter=ClangDocTests + )