[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 15:18:59 PDT 2024


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

>From 288acdfef1126c5652bac126c80f4d36df5e40b2 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/6] [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 788451ce6b354821f3254d782db0c6659f778fb4 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/6] 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 44f6a0d19b4a59abaaccf8edb0f6d8cf5b9bb176 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/6] 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 546a646cd2d0134378901916c9d8083d15302dbf 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/6] 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)

>From d103b23ac7623c48f8b68bf3af3c598619df2406 Mon Sep 17 00:00:00 2001
From: Michael Buch <michaelbuch12 at gmail.com>
Date: Thu, 3 Oct 2024 13:33:47 +0100
Subject: [PATCH 5/6] fixup! add libc++ simulators to libc++ test category

---
 .../data-formatter-stl/libcxx-simulators/categories              | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/categories

diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/categories b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/categories
new file mode 100644
index 00000000000000..686cb6015d2e51
--- /dev/null
+++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/categories
@@ -0,0 +1 @@
+libc++

>From 91002ca4028aa77989df06409b173eeed2b339fc Mon Sep 17 00:00:00 2001
From: Michael Buch <michaelbuch12 at gmail.com>
Date: Thu, 3 Oct 2024 15:22:43 +0100
Subject: [PATCH 6/6] fixup! remove libcxx-simulators from the libc++ category

---
 .../data-formatter-stl/libcxx-simulators/categories              | 1 -
 1 file changed, 1 deletion(-)
 delete mode 100644 lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/categories

diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/categories b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/categories
deleted file mode 100644
index 686cb6015d2e51..00000000000000
--- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/categories
+++ /dev/null
@@ -1 +0,0 @@
-libc++



More information about the lldb-commits mailing list