[Lldb-commits] [libcxx] [lldb] [lldb][CMake] Add single target that runs libc++ tests (PR #110856)

Michael Buch via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 3 05:09:12 PDT 2024


https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/110856

>From ee28f91822ca449b7b4bb84293cae2aee6803da4 Mon Sep 17 00:00:00 2001
From: Michael Buch <michaelbuch12 at gmail.com>
Date: Wed, 2 Oct 2024 15:44:28 +0100
Subject: [PATCH 1/4] [lldb][CMake] Add single target that runs libc++ tests

---
 lldb/test/CMakeLists.txt | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/lldb/test/CMakeLists.txt b/lldb/test/CMakeLists.txt
index 5ac474736eb63d..656f9a1727b316 100644
--- a/lldb/test/CMakeLists.txt
+++ b/lldb/test/CMakeLists.txt
@@ -267,6 +267,21 @@ add_lit_testsuite(check-lldb "Running lldb lit test suite"
     lldb-shell-test-deps
     lldb-unit-test-deps)
 
+# This target covers all targets that are tied to implementation details
+# of libc++, intended to be run by the libc++ pre-merge CI.
+add_lit_testsuite(check-lldb-libcxx-integration "Running lldb libc++ support test suite"
+  ${CMAKE_CURRENT_BINARY_DIR}
+  EXCLUDE_FROM_CHECK_ALL
+  DEPENDS
+    check-lldb-api-functionalities-data-formatter-data-formatter-stl-libcxx
+    check-lldb-api-functionalities-data-formatter-data-formatter-stl-generic
+    check-lldb-api-functionalities-data-formatter-data-formatter-stl-libcxx-simulators
+    check-lldb-api-commands-expression-import-std-module
+    check-lldb-api-lang-cpp-std-function-step-into-callable
+    check-lldb-api-lang-cpp-std-function-recognizer
+    check-lldb-api-lang-cpp-std-invoke-recognizer
+)
+
 if(LLDB_BUILT_STANDALONE)
   # This has to happen *AFTER* add_lit_testsuite.
   if (EXISTS ${LLVM_MAIN_SRC_DIR}/utils/llvm-lit)

>From 8aea28660f43b35b9c804c585bc0d83a174e4b23 Mon Sep 17 00:00:00 2001
From: Michael Buch <michaelbuch12 at gmail.com>
Date: Wed, 2 Oct 2024 19:41:35 +0100
Subject: [PATCH 2/4] fixup! adjust the libc++ pre-merge CI to run the new
 target

---
 libcxx/utils/ci/run-buildbot | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot
index 229963b38f52b3..5fb1a31995f7ce 100755
--- a/libcxx/utils/ci/run-buildbot
+++ b/libcxx/utils/ci/run-buildbot
@@ -371,13 +371,7 @@ bootstrapping-build)
           -DLLVM_LIT_ARGS="-sv --xunit-xml-output test-results.xml --timeout=1500 --time-tests"
 
     echo "+++ Running the LLDB libc++ data formatter tests"
-    ${NINJA} -vC "${BUILD_DIR}" check-lldb-api-functionalities-data-formatter-data-formatter-stl-libcxx \
-                                check-lldb-api-functionalities-data-formatter-data-formatter-stl-generic \
-                                check-lldb-api-functionalities-data-formatter-data-formatter-stl-libcxx-simulators \
-                                check-lldb-api-commands-expression-import-std-module \
-                                check-lldb-api-lang-cpp-std-function-step-into-callable \
-                                check-lldb-api-lang-cpp-std-function-recognizer \
-                                check-lldb-api-lang-cpp-std-invoke-recognizer
+    ${NINJA} -vC "${BUILD_DIR}" check-lldb-libcxx-integration
 
 
     echo "--- Running the libc++ and libc++abi tests"

>From 87fadf140195d18298b66e34b2a73d05c88413f0 Mon Sep 17 00:00:00 2001
From: Michael Buch <michaelbuch12 at gmail.com>
Date: Thu, 3 Oct 2024 11:58:15 +0100
Subject: [PATCH 3/4] fixup! don't add current build directory to target

---
 lldb/test/CMakeLists.txt | 1 -
 1 file changed, 1 deletion(-)

diff --git a/lldb/test/CMakeLists.txt b/lldb/test/CMakeLists.txt
index 656f9a1727b316..fc6d31ba264e82 100644
--- a/lldb/test/CMakeLists.txt
+++ b/lldb/test/CMakeLists.txt
@@ -270,7 +270,6 @@ add_lit_testsuite(check-lldb "Running lldb lit test suite"
 # This target covers all targets that are tied to implementation details
 # of libc++, intended to be run by the libc++ pre-merge CI.
 add_lit_testsuite(check-lldb-libcxx-integration "Running lldb libc++ support test suite"
-  ${CMAKE_CURRENT_BINARY_DIR}
   EXCLUDE_FROM_CHECK_ALL
   DEPENDS
     check-lldb-api-functionalities-data-formatter-data-formatter-stl-libcxx

>From 8d01cde0de68d0431491fc6edbd536f3f77f1f28 Mon Sep 17 00:00:00 2001
From: Michael Buch <michaelbuch12 at gmail.com>
Date: Thu, 3 Oct 2024 13:08:37 +0100
Subject: [PATCH 4/4] fixup! use dotest category instead of ninja target

---
 libcxx/utils/ci/run-buildbot |  3 +--
 lldb/test/CMakeLists.txt     | 14 --------------
 2 files changed, 1 insertion(+), 16 deletions(-)

diff --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot
index 5fb1a31995f7ce..7ec277e5062544 100755
--- a/libcxx/utils/ci/run-buildbot
+++ b/libcxx/utils/ci/run-buildbot
@@ -371,8 +371,7 @@ bootstrapping-build)
           -DLLVM_LIT_ARGS="-sv --xunit-xml-output test-results.xml --timeout=1500 --time-tests"
 
     echo "+++ Running the LLDB libc++ data formatter tests"
-    ${NINJA} -vC "${BUILD_DIR}" check-lldb-libcxx-integration
-
+    ${BUILD_DIR}/bin/llvm-lit -sv "--category libc++" "${MONOREPO_ROOT}/lldb/test/API"
 
     echo "--- Running the libc++ and libc++abi tests"
     ${NINJA} -vC "${BUILD_DIR}" check-runtimes
diff --git a/lldb/test/CMakeLists.txt b/lldb/test/CMakeLists.txt
index fc6d31ba264e82..5ac474736eb63d 100644
--- a/lldb/test/CMakeLists.txt
+++ b/lldb/test/CMakeLists.txt
@@ -267,20 +267,6 @@ add_lit_testsuite(check-lldb "Running lldb lit test suite"
     lldb-shell-test-deps
     lldb-unit-test-deps)
 
-# This target covers all targets that are tied to implementation details
-# of libc++, intended to be run by the libc++ pre-merge CI.
-add_lit_testsuite(check-lldb-libcxx-integration "Running lldb libc++ support test suite"
-  EXCLUDE_FROM_CHECK_ALL
-  DEPENDS
-    check-lldb-api-functionalities-data-formatter-data-formatter-stl-libcxx
-    check-lldb-api-functionalities-data-formatter-data-formatter-stl-generic
-    check-lldb-api-functionalities-data-formatter-data-formatter-stl-libcxx-simulators
-    check-lldb-api-commands-expression-import-std-module
-    check-lldb-api-lang-cpp-std-function-step-into-callable
-    check-lldb-api-lang-cpp-std-function-recognizer
-    check-lldb-api-lang-cpp-std-invoke-recognizer
-)
-
 if(LLDB_BUILT_STANDALONE)
   # This has to happen *AFTER* add_lit_testsuite.
   if (EXISTS ${LLVM_MAIN_SRC_DIR}/utils/llvm-lit)



More information about the lldb-commits mailing list