-
Notifications
You must be signed in to change notification settings - Fork 14.4k
[lldb][test] Move std::initializer_list from libcxx to generic directory #147702
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Michael137
wants to merge
3
commits into
llvm:main
Choose a base branch
from
Michael137:lldb/consolidate-stl-tests-initializerlist
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[lldb][test] Move std::initializer_list from libcxx to generic directory #147702
Michael137
wants to merge
3
commits into
llvm:main
from
Michael137:lldb/consolidate-stl-tests-initializerlist
+17
−22
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@llvm/pr-subscribers-lldb Author: Michael Buch (Michael137) ChangesThis just moves the test from Split out from #146740 Full diff: https://github.com/llvm/llvm-project/pull/147702.diff 3 Files Affected:
diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/Makefile b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/initializer_list/Makefile
similarity index 50%
rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/Makefile
rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/initializer_list/Makefile
index 98af672c70fbe..99998b20bcb05 100644
--- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/Makefile
+++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/initializer_list/Makefile
@@ -1,6 +1,3 @@
CXX_SOURCES := main.cpp
-CXXFLAGS_EXTRAS := -std=c++11
-
-USE_LIBCPP := 1
include Makefile.rules
diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/TestInitializerList.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/initializer_list/TestDataFormatterStdInitializerList.py
similarity index 82%
rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/TestInitializerList.py
rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/initializer_list/TestDataFormatterStdInitializerList.py
index b8a1dd3569d77..133f8f7d56b68 100644
--- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/TestInitializerList.py
+++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/initializer_list/TestDataFormatterStdInitializerList.py
@@ -2,7 +2,6 @@
Test lldb data formatter subsystem.
"""
-
import re
import lldb
from lldbsuite.test.decorators import *
@@ -11,10 +10,7 @@
class InitializerListTestCase(TestBase):
- @add_test_categories(["libc++"])
- def test(self):
- """Test that that file and class static variables display correctly."""
- self.build()
+ def do_test(self):
self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
bkpt = self.target().FindBreakpointByID(
@@ -25,8 +21,6 @@ def test(self):
self.runCmd("run", RUN_SUCCEEDED)
- lldbutil.skip_if_library_missing(self, self.target(), re.compile(r"libc\+\+"))
-
# The stop reason of the thread should be breakpoint.
self.expect(
"thread list",
@@ -39,3 +33,8 @@ def test(self):
"frame variable ils",
substrs=['[4] = "surprise it is a long string!! yay!!"'],
)
+
+ @add_test_categories(["libc++"])
+ def test_libcxx(self):
+ self.build(dictionary={"USE_LIBCPP": 1})
+ self.do_test()
diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/initializer_list/main.cpp
similarity index 100%
rename from lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/main.cpp
rename to lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/initializer_list/main.cpp
|
✅ With the latest revision this PR passed the C/C++ code formatter. |
labath
approved these changes
Jul 9, 2025
This just moves the test from `libcxx` to `generic`. There are currently no `std::initializer_list` formatters for libstdc++ so I didn't add a test-case for it. Split out from llvm#146740
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This just moves the test from
libcxx
togeneric
. There are currently nostd::initializer_list
formatters for libstdc++ so I didn't add a test-case for it.Split out from #146740