diff options
| author | Raphael Isemann <teemperor@gmail.com> | 2019-09-01 09:12:37 +0000 |
|---|---|---|
| committer | Raphael Isemann <teemperor@gmail.com> | 2019-09-01 09:12:37 +0000 |
| commit | 29872606d220420d53fde7cc5e3bea15f8da62e7 (patch) | |
| tree | 47d7a82ccea48a6dd10a2d8ecb6b3c3127724131 /lldb/packages/Python/lldbsuite/test/expression_command/import-std-module | |
| parent | adfdcb9c2652aeee585b9005fd6c67be06af8ea9 (diff) | |
| download | bcm5719-llvm-29872606d220420d53fde7cc5e3bea15f8da62e7.tar.gz bcm5719-llvm-29872606d220420d53fde7cc5e3bea15f8da62e7.zip | |
[lldb] Restructure test folders to match LLDB command hierarchy
Summary:
As discussed on lldb-dev, this patch moves some LLDB tests into a hierarchy that more closely
resembles the commands we use in the LLDB interpreter. This patch should only move tests
that use the command interpreter and shouldn't touch any tests that primarily test the SB API.
Reviewers: #lldb, jfb, JDevlieghere
Reviewed By: #lldb, JDevlieghere
Subscribers: dexonsmith, arphaman, JDevlieghere, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D67033
llvm-svn: 370605
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/expression_command/import-std-module')
69 files changed, 0 insertions, 1169 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/basic/Makefile b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/basic/Makefile deleted file mode 100644 index 01718d86aa7..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/basic/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -LEVEL = ../../../make -USE_LIBCPP := 1 -CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS) -CXX_SOURCES := main.cpp -include $(LEVEL)/Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/basic/TestImportStdModule.py b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/basic/TestImportStdModule.py deleted file mode 100644 index 19e02ca84c9..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/basic/TestImportStdModule.py +++ /dev/null @@ -1,56 +0,0 @@ -""" -Test importing the 'std' C++ module and evaluate expressions with it. -""" - -from lldbsuite.test.decorators import * -from lldbsuite.test.lldbtest import * -from lldbsuite.test import lldbutil - - -class ImportStdModule(TestBase): - - mydir = TestBase.compute_mydir(__file__) - - # FIXME: This should work on more setups, so remove these - # skipIf's in the future. - @add_test_categories(["libc++"]) - @skipIf(compiler=no_match("clang")) - @skipIf(oslist=no_match(["linux"])) - @skipIf(debug_info=no_match(["dwarf"])) - def test(self): - self.build() - - lldbutil.run_to_source_breakpoint(self, - "// Set break point at this line.", lldb.SBFileSpec("main.cpp")) - - # Activate importing of std module. - self.runCmd("settings set target.import-std-module true") - # Calling some normal std functions that return non-template types. - self.expect("expr std::abs(-42)", substrs=['(int) $0 = 42']) - self.expect("expr std::div(2, 1).quot", substrs=['(int) $1 = 2']) - # Using types from std. - self.expect("expr (std::size_t)33U", substrs=['(size_t) $2 = 33']) - # Calling templated functions that return non-template types. - self.expect("expr char char_a = 'b'; char char_b = 'a'; std::swap(char_a, char_b); char_a", - substrs=["(char) $3 = 'a'"]) - - # FIXME: This should work on more setups, so remove these - # skipIf's in the future. - @add_test_categories(["libc++"]) - @skipIf(compiler=no_match("clang")) - @skipIf(oslist=no_match(["linux"])) - @skipIf(debug_info=no_match(["dwarf"])) - def test_non_cpp_language(self): - self.build() - - lldbutil.run_to_source_breakpoint(self, - "// Set break point at this line.", lldb.SBFileSpec("main.cpp")) - - # Activate importing of std module. - self.runCmd("settings set target.import-std-module true") - # These languages don't support C++ modules, so they shouldn't - # be able to evaluate the expression. - self.expect("expr -l C -- std::abs(-42)", error=True) - self.expect("expr -l C99 -- std::abs(-42)", error=True) - self.expect("expr -l C11 -- std::abs(-42)", error=True) - self.expect("expr -l ObjC -- std::abs(-42)", error=True) diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/basic/main.cpp b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/basic/main.cpp deleted file mode 100644 index 2f6d078daa3..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/basic/main.cpp +++ /dev/null @@ -1,7 +0,0 @@ -// We need to import any std module. It doesn't matter which one. -#include <iostream> - -int main(int argc, char **argv) { - std::cout << "Test" << std::endl; - return 0; // Set break point at this line. -} diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/conflicts/Makefile b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/conflicts/Makefile deleted file mode 100644 index 01718d86aa7..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/conflicts/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -LEVEL = ../../../make -USE_LIBCPP := 1 -CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS) -CXX_SOURCES := main.cpp -include $(LEVEL)/Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/conflicts/TestStdModuleWithConflicts.py b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/conflicts/TestStdModuleWithConflicts.py deleted file mode 100644 index 2abaece27fe..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/conflicts/TestStdModuleWithConflicts.py +++ /dev/null @@ -1,36 +0,0 @@ -""" -Test importing the 'std' C++ module and check if we can handle -prioritizing the conflicting functions from debug info and std -module. - -See also import-std-module/basic/TestImportStdModule.py for -the same test on a 'clean' code base without conflicts. -""" - -from lldbsuite.test.decorators import * -from lldbsuite.test.lldbtest import * -from lldbsuite.test import lldbutil - - -class TestImportStdModuleConflicts(TestBase): - - mydir = TestBase.compute_mydir(__file__) - - # FIXME: This should work on more setups, so remove these - # skipIf's in the future. - @add_test_categories(["libc++"]) - @skipIf(compiler=no_match("clang")) - @skipIf(oslist=no_match(["linux"])) - @skipIf(debug_info=no_match(["dwarf"])) - def test(self): - self.build() - - lldbutil.run_to_source_breakpoint(self, - "// Set break point at this line.", lldb.SBFileSpec("main.cpp")) - - self.runCmd("settings set target.import-std-module true") - self.expect("expr std::abs(-42)", substrs=['(int) $0 = 42']) - self.expect("expr std::div(2, 1).quot", substrs=['(int) $1 = 2']) - self.expect("expr (std::size_t)33U", substrs=['(size_t) $2 = 33']) - self.expect("expr char char_a = 'b'; char char_b = 'a'; std::swap(char_a, char_b); char_a", - substrs=["(char) $3 = 'a'"]) diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/conflicts/main.cpp b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/conflicts/main.cpp deleted file mode 100644 index e49b862a36c..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/conflicts/main.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include <cstdlib> -#include <utility> - -int main(int argc, char **argv) { - std::size_t f = argc; - f = std::abs(argc); - f = std::div(argc * 2, argc).quot; - std::swap(f, f); - return f; // Set break point at this line. -} diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/deque-basic/Makefile b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/deque-basic/Makefile deleted file mode 100644 index 01718d86aa7..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/deque-basic/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -LEVEL = ../../../make -USE_LIBCPP := 1 -CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS) -CXX_SOURCES := main.cpp -include $(LEVEL)/Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/deque-basic/TestBasicDeque.py b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/deque-basic/TestBasicDeque.py deleted file mode 100644 index 0ede19e8350..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/deque-basic/TestBasicDeque.py +++ /dev/null @@ -1,41 +0,0 @@ -""" -Test basic std::list functionality. -""" - -from lldbsuite.test.decorators import * -from lldbsuite.test.lldbtest import * -from lldbsuite.test import lldbutil - -class TestBasicDeque(TestBase): - - mydir = TestBase.compute_mydir(__file__) - - # FIXME: This should work on more setups, so remove these - # skipIf's in the future. - @add_test_categories(["libc++"]) - @skipIf(compiler=no_match("clang")) - @skipIf(oslist=no_match(["linux"])) - @skipIf(debug_info=no_match(["dwarf"])) - def test(self): - self.build() - - lldbutil.run_to_source_breakpoint(self, - "// Set break point at this line.", lldb.SBFileSpec("main.cpp")) - - self.runCmd("settings set target.import-std-module true") - - self.expect("expr (size_t)a.size()", substrs=['(size_t) $0 = 3']) - self.expect("expr (int)a.front()", substrs=['(int) $1 = 3']) - self.expect("expr (int)a.back()", substrs=['(int) $2 = 2']) - - self.expect("expr std::sort(a.begin(), a.end())") - self.expect("expr (int)a.front()", substrs=['(int) $3 = 1']) - self.expect("expr (int)a.back()", substrs=['(int) $4 = 3']) - - self.expect("expr std::reverse(a.begin(), a.end())") - self.expect("expr (int)a.front()", substrs=['(int) $5 = 3']) - self.expect("expr (int)a.back()", substrs=['(int) $6 = 1']) - - self.expect("expr (int)(*a.begin())", substrs=['(int) $7 = 3']) - self.expect("expr (int)(*a.rbegin())", substrs=['(int) $8 = 1']) - diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/deque-basic/main.cpp b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/deque-basic/main.cpp deleted file mode 100644 index 5bed55674bf..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/deque-basic/main.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include <deque> - -int main(int argc, char **argv) { - std::deque<int> a = {3, 1, 2}; - return 0; // Set break point at this line. -} diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/deque-dbg-info-content/Makefile b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/deque-dbg-info-content/Makefile deleted file mode 100644 index 01718d86aa7..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/deque-dbg-info-content/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -LEVEL = ../../../make -USE_LIBCPP := 1 -CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS) -CXX_SOURCES := main.cpp -include $(LEVEL)/Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/deque-dbg-info-content/TestDbgInfoContentDeque.py b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/deque-dbg-info-content/TestDbgInfoContentDeque.py deleted file mode 100644 index eeea34819dd..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/deque-dbg-info-content/TestDbgInfoContentDeque.py +++ /dev/null @@ -1,37 +0,0 @@ -""" -Test std::deque functionality with a decl from dbg info as content. -""" - -from lldbsuite.test.decorators import * -from lldbsuite.test.lldbtest import * -from lldbsuite.test import lldbutil - -class TestDbgInfoContentDeque(TestBase): - - mydir = TestBase.compute_mydir(__file__) - - # FIXME: This should work on more setups, so remove these - # skipIf's in the future. - @add_test_categories(["libc++"]) - @skipIf(compiler=no_match("clang")) - @skipIf(oslist=no_match(["linux"])) - @skipIf(debug_info=no_match(["dwarf"])) - def test(self): - self.build() - - lldbutil.run_to_source_breakpoint(self, - "// Set break point at this line.", lldb.SBFileSpec("main.cpp")) - - self.runCmd("settings set target.import-std-module true") - - self.expect("expr (size_t)a.size()", substrs=['(size_t) $0 = 3']) - self.expect("expr (int)a.front().a", substrs=['(int) $1 = 3']) - self.expect("expr (int)a.back().a", substrs=['(int) $2 = 2']) - - self.expect("expr std::reverse(a.begin(), a.end())") - self.expect("expr (int)a.front().a", substrs=['(int) $3 = 2']) - self.expect("expr (int)a.back().a", substrs=['(int) $4 = 3']) - - self.expect("expr (int)(a.begin()->a)", substrs=['(int) $5 = 2']) - self.expect("expr (int)(a.rbegin()->a)", substrs=['(int) $6 = 3']) - diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/deque-dbg-info-content/main.cpp b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/deque-dbg-info-content/main.cpp deleted file mode 100644 index f8fd1fb2dd9..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/deque-dbg-info-content/main.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include <deque> - -struct Foo { - int a; -}; - -int main(int argc, char **argv) { - std::deque<Foo> a = {{3}, {1}, {2}}; - return 0; // Set break point at this line. -} diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/forward_list-basic/Makefile b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/forward_list-basic/Makefile deleted file mode 100644 index 01718d86aa7..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/forward_list-basic/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -LEVEL = ../../../make -USE_LIBCPP := 1 -CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS) -CXX_SOURCES := main.cpp -include $(LEVEL)/Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/forward_list-basic/TestBasicForwardList.py b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/forward_list-basic/TestBasicForwardList.py deleted file mode 100644 index 528d555e0af..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/forward_list-basic/TestBasicForwardList.py +++ /dev/null @@ -1,34 +0,0 @@ -""" -Test basic std::forward_list functionality. -""" - -from lldbsuite.test.decorators import * -from lldbsuite.test.lldbtest import * -from lldbsuite.test import lldbutil - -class TestBasicForwardList(TestBase): - - mydir = TestBase.compute_mydir(__file__) - - # FIXME: This should work on more setups, so remove these - # skipIf's in the future. - @add_test_categories(["libc++"]) - @skipIf(compiler=no_match("clang")) - @skipIf(oslist=no_match(["linux"])) - @skipIf(debug_info=no_match(["dwarf"])) - def test(self): - self.build() - - lldbutil.run_to_source_breakpoint(self, - "// Set break point at this line.", lldb.SBFileSpec("main.cpp")) - - self.runCmd("settings set target.import-std-module true") - - self.expect("expr (size_t)std::distance(a.begin(), a.end())", substrs=['(size_t) $0 = 3']) - self.expect("expr (int)a.front()", substrs=['(int) $1 = 3']) - - self.expect("expr a.sort()") - self.expect("expr (int)a.front()", substrs=['(int) $2 = 1']) - - self.expect("expr (int)(*a.begin())", substrs=['(int) $3 = 1']) - diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/forward_list-basic/main.cpp b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/forward_list-basic/main.cpp deleted file mode 100644 index 4f5e30f0629..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/forward_list-basic/main.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include <forward_list> - -int main(int argc, char **argv) { - std::forward_list<int> a = {3, 1, 2}; - return 0; // Set break point at this line. -} diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/forward_list-dbg-info-content/Makefile b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/forward_list-dbg-info-content/Makefile deleted file mode 100644 index 01718d86aa7..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/forward_list-dbg-info-content/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -LEVEL = ../../../make -USE_LIBCPP := 1 -CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS) -CXX_SOURCES := main.cpp -include $(LEVEL)/Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/forward_list-dbg-info-content/TestDbgInfoContentForwardList.py b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/forward_list-dbg-info-content/TestDbgInfoContentForwardList.py deleted file mode 100644 index a2fc5598930..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/forward_list-dbg-info-content/TestDbgInfoContentForwardList.py +++ /dev/null @@ -1,31 +0,0 @@ -""" -Test std::forward_list functionality with a decl from debug info as content. -""" - -from lldbsuite.test.decorators import * -from lldbsuite.test.lldbtest import * -from lldbsuite.test import lldbutil - -class TestDbgInfoContentForwardList(TestBase): - - mydir = TestBase.compute_mydir(__file__) - - # FIXME: This should work on more setups, so remove these - # skipIf's in the future. - @add_test_categories(["libc++"]) - @skipIf(compiler=no_match("clang")) - @skipIf(oslist=no_match(["linux"])) - @skipIf(debug_info=no_match(["dwarf"])) - def test(self): - self.build() - - lldbutil.run_to_source_breakpoint(self, - "// Set break point at this line.", lldb.SBFileSpec("main.cpp")) - - self.runCmd("settings set target.import-std-module true") - - self.expect("expr (size_t)std::distance(a.begin(), a.end())", substrs=['(size_t) $0 = 3']) - self.expect("expr (int)a.front().a", substrs=['(int) $1 = 3']) - - self.expect("expr (int)(a.begin()->a)", substrs=['(int) $2 = 3']) - diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/forward_list-dbg-info-content/main.cpp b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/forward_list-dbg-info-content/main.cpp deleted file mode 100644 index b1ffc4b24cd..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/forward_list-dbg-info-content/main.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include <forward_list> - -struct Foo { - int a; -}; - -int main(int argc, char **argv) { - std::forward_list<Foo> a = {{3}, {1}, {2}}; - return 0; // Set break point at this line. -} diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/list-basic/Makefile b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/list-basic/Makefile deleted file mode 100644 index 01718d86aa7..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/list-basic/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -LEVEL = ../../../make -USE_LIBCPP := 1 -CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS) -CXX_SOURCES := main.cpp -include $(LEVEL)/Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/list-basic/TestBasicList.py b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/list-basic/TestBasicList.py deleted file mode 100644 index 154c8ed7bd0..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/list-basic/TestBasicList.py +++ /dev/null @@ -1,41 +0,0 @@ -""" -Test basic std::list functionality. -""" - -from lldbsuite.test.decorators import * -from lldbsuite.test.lldbtest import * -from lldbsuite.test import lldbutil - -class TestBasicList(TestBase): - - mydir = TestBase.compute_mydir(__file__) - - # FIXME: This should work on more setups, so remove these - # skipIf's in the future. - @add_test_categories(["libc++"]) - @skipIf(compiler=no_match("clang")) - @skipIf(oslist=no_match(["linux"])) - @skipIf(debug_info=no_match(["dwarf"])) - def test(self): - self.build() - - lldbutil.run_to_source_breakpoint(self, - "// Set break point at this line.", lldb.SBFileSpec("main.cpp")) - - self.runCmd("settings set target.import-std-module true") - - self.expect("expr (size_t)a.size()", substrs=['(size_t) $0 = 3']) - self.expect("expr (int)a.front()", substrs=['(int) $1 = 3']) - self.expect("expr (int)a.back()", substrs=['(int) $2 = 2']) - - self.expect("expr a.sort()") - self.expect("expr (int)a.front()", substrs=['(int) $3 = 1']) - self.expect("expr (int)a.back()", substrs=['(int) $4 = 3']) - - self.expect("expr std::reverse(a.begin(), a.end())") - self.expect("expr (int)a.front()", substrs=['(int) $5 = 3']) - self.expect("expr (int)a.back()", substrs=['(int) $6 = 1']) - - self.expect("expr (int)(*a.begin())", substrs=['(int) $7 = 3']) - self.expect("expr (int)(*a.rbegin())", substrs=['(int) $8 = 1']) - diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/list-basic/main.cpp b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/list-basic/main.cpp deleted file mode 100644 index e54719a02fb..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/list-basic/main.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include <list> - -int main(int argc, char **argv) { - std::list<int> a = {3, 1, 2}; - return 0; // Set break point at this line. -} diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/list-dbg-info-content/Makefile b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/list-dbg-info-content/Makefile deleted file mode 100644 index 01718d86aa7..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/list-dbg-info-content/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -LEVEL = ../../../make -USE_LIBCPP := 1 -CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS) -CXX_SOURCES := main.cpp -include $(LEVEL)/Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/list-dbg-info-content/TestDbgInfoContentList.py b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/list-dbg-info-content/TestDbgInfoContentList.py deleted file mode 100644 index 713ec1abb85..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/list-dbg-info-content/TestDbgInfoContentList.py +++ /dev/null @@ -1,38 +0,0 @@ -""" -Test basic std::list functionality but with a declaration from -the debug info (the Foo struct) as content. -""" - -from lldbsuite.test.decorators import * -from lldbsuite.test.lldbtest import * -from lldbsuite.test import lldbutil - -class TestDbgInfoContentList(TestBase): - - mydir = TestBase.compute_mydir(__file__) - - # FIXME: This should work on more setups, so remove these - # skipIf's in the future. - @add_test_categories(["libc++"]) - @skipIf(compiler=no_match("clang")) - @skipIf(oslist=no_match(["linux"])) - @skipIf(debug_info=no_match(["dwarf"])) - def test(self): - self.build() - - lldbutil.run_to_source_breakpoint(self, - "// Set break point at this line.", lldb.SBFileSpec("main.cpp")) - - self.runCmd("settings set target.import-std-module true") - - self.expect("expr (size_t)a.size()", substrs=['(size_t) $0 = 3']) - self.expect("expr (int)a.front().a", substrs=['(int) $1 = 3']) - self.expect("expr (int)a.back().a", substrs=['(int) $2 = 2']) - - self.expect("expr std::reverse(a.begin(), a.end())") - self.expect("expr (int)a.front().a", substrs=['(int) $3 = 2']) - self.expect("expr (int)a.back().a", substrs=['(int) $4 = 3']) - - self.expect("expr (int)(a.begin()->a)", substrs=['(int) $5 = 2']) - self.expect("expr (int)(a.rbegin()->a)", substrs=['(int) $6 = 3']) - diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/list-dbg-info-content/main.cpp b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/list-dbg-info-content/main.cpp deleted file mode 100644 index 3cfb35f8c6b..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/list-dbg-info-content/main.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include <list> - -struct Foo { - int a; -}; - -int main(int argc, char **argv) { - std::list<Foo> a = {{3}, {1}, {2}}; - return 0; // Set break point at this line. -} diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/no-std-module/Makefile b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/no-std-module/Makefile deleted file mode 100644 index 01718d86aa7..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/no-std-module/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -LEVEL = ../../../make -USE_LIBCPP := 1 -CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS) -CXX_SOURCES := main.cpp -include $(LEVEL)/Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/no-std-module/TestMissingStdModule.py b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/no-std-module/TestMissingStdModule.py deleted file mode 100644 index f4d3d1fd492..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/no-std-module/TestMissingStdModule.py +++ /dev/null @@ -1,40 +0,0 @@ -""" -Test that importing the std module on a compile unit -that doesn't use the std module will not break LLDB. - -It's not really specified at the moment what kind of -error we should report back to the user in this -situation. Currently Clang will just complain that -the std module doesn't exist or can't be loaded. -""" - -from lldbsuite.test.decorators import * -from lldbsuite.test.lldbtest import * -from lldbsuite.test import lldbutil - - -class STLTestCase(TestBase): - - mydir = TestBase.compute_mydir(__file__) - - # FIXME: This should work on more setups, so remove these - # skipIf's in the future. - @add_test_categories(["libc++"]) - @skipIf(compiler=no_match("clang")) - @skipIf(oslist=no_match(["linux"])) - @skipIf(debug_info=no_match(["dwarf"])) - def test(self): - self.build() - - lldbutil.run_to_source_breakpoint(self, - "// Set break point at this line.", lldb.SBFileSpec("main.cpp")) - - # Activate importing of std module. - self.runCmd("settings set target.import-std-module true") - - # Run some commands that should all fail without our std module. - self.expect("expr std::abs(-42)", error=True) - self.expect("expr std::div(2, 1).quot", error=True) - self.expect("expr (std::size_t)33U", error=True) - self.expect("expr char a = 'b'; char b = 'a'; std::swap(a, b); a", - error=True) diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/no-std-module/main.cpp b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/no-std-module/main.cpp deleted file mode 100644 index c93e9d0ec8a..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/no-std-module/main.cpp +++ /dev/null @@ -1,5 +0,0 @@ -// We don't import any std module here. - -int main(int argc, char **argv) { - return 0; // Set break point at this line. -} diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/queue/Makefile b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/queue/Makefile deleted file mode 100644 index 01718d86aa7..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/queue/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -LEVEL = ../../../make -USE_LIBCPP := 1 -CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS) -CXX_SOURCES := main.cpp -include $(LEVEL)/Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/queue/TestQueue.py b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/queue/TestQueue.py deleted file mode 100644 index aad1b11719b..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/queue/TestQueue.py +++ /dev/null @@ -1,47 +0,0 @@ -""" -Tests std::queue functionality. -""" - -from lldbsuite.test.decorators import * -from lldbsuite.test.lldbtest import * -from lldbsuite.test import lldbutil - -class TestQueue(TestBase): - - mydir = TestBase.compute_mydir(__file__) - - # FIXME: This should work on more setups, so remove these - # skipIf's in the future. - @add_test_categories(["libc++"]) - @skipIf(compiler=no_match("clang")) - @skipIf(oslist=no_match(["linux"])) - @skipIf(debug_info=no_match(["dwarf"])) - def test(self): - self.build() - - lldbutil.run_to_source_breakpoint(self, - "// Set break point at this line.", lldb.SBFileSpec("main.cpp")) - - self.runCmd("settings set target.import-std-module true") - - # Test std::queue functionality with a std::deque. - self.expect("expr q_deque.pop()") - self.expect("expr q_deque.push({4})") - self.expect("expr (size_t)q_deque.size()", substrs=['(size_t) $0 = 1']) - self.expect("expr (int)q_deque.front().i", substrs=['(int) $1 = 4']) - self.expect("expr (int)q_deque.back().i", substrs=['(int) $2 = 4']) - self.expect("expr q_deque.empty()", substrs=['(bool) $3 = false']) - self.expect("expr q_deque.pop()") - self.expect("expr q_deque.emplace(5)") - self.expect("expr (int)q_deque.front().i", substrs=['(int) $4 = 5']) - - # Test std::queue functionality with a std::list. - self.expect("expr q_list.pop()") - self.expect("expr q_list.push({4})") - self.expect("expr (size_t)q_list.size()", substrs=['(size_t) $5 = 1']) - self.expect("expr (int)q_list.front().i", substrs=['(int) $6 = 4']) - self.expect("expr (int)q_list.back().i", substrs=['(int) $7 = 4']) - self.expect("expr q_list.empty()", substrs=['(bool) $8 = false']) - self.expect("expr q_list.pop()") - self.expect("expr q_list.emplace(5)") - self.expect("expr (int)q_list.front().i", substrs=['(int) $9 = 5']) diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/queue/main.cpp b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/queue/main.cpp deleted file mode 100644 index 66e8f02c273..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/queue/main.cpp +++ /dev/null @@ -1,16 +0,0 @@ -#include <deque> -#include <list> -#include <queue> - -struct C { - // Constructor for testing emplace. - C(int i) : i(i) {}; - int i; -}; - -int main(int argc, char **argv) { - // std::deque is the default container. - std::queue<C> q_deque({{1}}); - std::queue<C, std::list<C>> q_list({{1}}); - return 0; // Set break point at this line. -} diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/shared_ptr-dbg-info-content/Makefile b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/shared_ptr-dbg-info-content/Makefile deleted file mode 100644 index 01718d86aa7..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/shared_ptr-dbg-info-content/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -LEVEL = ../../../make -USE_LIBCPP := 1 -CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS) -CXX_SOURCES := main.cpp -include $(LEVEL)/Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/shared_ptr-dbg-info-content/TestSharedPtrDbgInfoContent.py b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/shared_ptr-dbg-info-content/TestSharedPtrDbgInfoContent.py deleted file mode 100644 index 028798f72f3..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/shared_ptr-dbg-info-content/TestSharedPtrDbgInfoContent.py +++ /dev/null @@ -1,33 +0,0 @@ -""" -Test std::shared_ptr functionality with a class from debug info as content. -""" - -from lldbsuite.test.decorators import * -from lldbsuite.test.lldbtest import * -from lldbsuite.test import lldbutil - -class TestSharedPtrDbgInfoContent(TestBase): - - mydir = TestBase.compute_mydir(__file__) - - # FIXME: This should work on more setups, so remove these - # skipIf's in the future. - @add_test_categories(["libc++"]) - @skipIf(compiler=no_match("clang")) - @skipIf(oslist=no_match(["linux"])) - @skipIf(debug_info=no_match(["dwarf"])) - def test(self): - self.build() - - lldbutil.run_to_source_breakpoint(self, - "// Set break point at this line.", lldb.SBFileSpec("main.cpp")) - - self.runCmd("settings set target.import-std-module true") - - self.expect("expr (int)s->a", substrs=['(int) $0 = 3']) - self.expect("expr (int)(s->a = 5)", substrs=['(int) $1 = 5']) - self.expect("expr (int)s->a", substrs=['(int) $2 = 5']) - self.expect("expr (bool)s", substrs=['(bool) $3 = true']) - self.expect("expr s.reset()") - self.expect("expr (bool)s", substrs=['(bool) $4 = false']) - diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/shared_ptr-dbg-info-content/main.cpp b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/shared_ptr-dbg-info-content/main.cpp deleted file mode 100644 index 73664f1c83a..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/shared_ptr-dbg-info-content/main.cpp +++ /dev/null @@ -1,11 +0,0 @@ -#include <memory> - -struct Foo { - int a; -}; - -int main(int argc, char **argv) { - std::shared_ptr<Foo> s(new Foo); - s->a = 3; - return s->a; // Set break point at this line. -} diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/shared_ptr/Makefile b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/shared_ptr/Makefile deleted file mode 100644 index 01718d86aa7..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/shared_ptr/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -LEVEL = ../../../make -USE_LIBCPP := 1 -CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS) -CXX_SOURCES := main.cpp -include $(LEVEL)/Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/shared_ptr/TestSharedPtr.py b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/shared_ptr/TestSharedPtr.py deleted file mode 100644 index 6f1e7b12d1f..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/shared_ptr/TestSharedPtr.py +++ /dev/null @@ -1,33 +0,0 @@ -""" -Test basic std::shared_ptr functionality. -""" - -from lldbsuite.test.decorators import * -from lldbsuite.test.lldbtest import * -from lldbsuite.test import lldbutil - -class TestSharedPtr(TestBase): - - mydir = TestBase.compute_mydir(__file__) - - # FIXME: This should work on more setups, so remove these - # skipIf's in the future. - @add_test_categories(["libc++"]) - @skipIf(compiler=no_match("clang")) - @skipIf(oslist=no_match(["linux"])) - @skipIf(debug_info=no_match(["dwarf"])) - def test(self): - self.build() - - lldbutil.run_to_source_breakpoint(self, - "// Set break point at this line.", lldb.SBFileSpec("main.cpp")) - - self.runCmd("settings set target.import-std-module true") - - self.expect("expr (int)*s", substrs=['(int) $0 = 3']) - self.expect("expr (int)(*s = 5)", substrs=['(int) $1 = 5']) - self.expect("expr (int)*s", substrs=['(int) $2 = 5']) - self.expect("expr (bool)s", substrs=['(bool) $3 = true']) - self.expect("expr s.reset()") - self.expect("expr (bool)s", substrs=['(bool) $4 = false']) - diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/shared_ptr/main.cpp b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/shared_ptr/main.cpp deleted file mode 100644 index cb81754087f..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/shared_ptr/main.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include <memory> - -int main(int argc, char **argv) { - std::shared_ptr<int> s(new int); - *s = 3; - return *s; // Set break point at this line. -} diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/stack/Makefile b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/stack/Makefile deleted file mode 100644 index 01718d86aa7..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/stack/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -LEVEL = ../../../make -USE_LIBCPP := 1 -CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS) -CXX_SOURCES := main.cpp -include $(LEVEL)/Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/stack/TestStack.py b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/stack/TestStack.py deleted file mode 100644 index 1c2e5da54ed..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/stack/TestStack.py +++ /dev/null @@ -1,49 +0,0 @@ -""" -Tests std::stack functionality. -""" - -from lldbsuite.test.decorators import * -from lldbsuite.test.lldbtest import * -from lldbsuite.test import lldbutil - -class TestStack(TestBase): - - mydir = TestBase.compute_mydir(__file__) - - # FIXME: This should work on more setups, so remove these - # skipIf's in the future. - @add_test_categories(["libc++"]) - @skipIf(compiler=no_match("clang")) - @skipIf(oslist=no_match(["linux"])) - @skipIf(debug_info=no_match(["dwarf"])) - def test(self): - self.build() - - lldbutil.run_to_source_breakpoint(self, - "// Set break point at this line.", lldb.SBFileSpec("main.cpp")) - - self.runCmd("settings set target.import-std-module true") - - # Test std::stack functionality with a std::deque. - self.expect("expr s_deque.pop()") - self.expect("expr s_deque.push({4})") - self.expect("expr (size_t)s_deque.size()", substrs=['(size_t) $0 = 3']) - self.expect("expr (int)s_deque.top().i", substrs=['(int) $1 = 4']) - self.expect("expr s_deque.emplace(5)") - self.expect("expr (int)s_deque.top().i", substrs=['(int) $2 = 5']) - - # Test std::stack functionality with a std::vector. - self.expect("expr s_vector.pop()") - self.expect("expr s_vector.push({4})") - self.expect("expr (size_t)s_vector.size()", substrs=['(size_t) $3 = 3']) - self.expect("expr (int)s_vector.top().i", substrs=['(int) $4 = 4']) - self.expect("expr s_vector.emplace(5)") - self.expect("expr (int)s_vector.top().i", substrs=['(int) $5 = 5']) - - # Test std::stack functionality with a std::list. - self.expect("expr s_list.pop()") - self.expect("expr s_list.push({4})") - self.expect("expr (size_t)s_list.size()", substrs=['(size_t) $6 = 3']) - self.expect("expr (int)s_list.top().i", substrs=['(int) $7 = 4']) - self.expect("expr s_list.emplace(5)") - self.expect("expr (int)s_list.top().i", substrs=['(int) $8 = 5']) diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/stack/main.cpp b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/stack/main.cpp deleted file mode 100644 index 0ce94990733..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/stack/main.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include <list> -#include <stack> -#include <vector> - -struct C { - // Constructor for testing emplace. - C(int i) : i(i) {}; - int i; -}; - -int main(int argc, char **argv) { - // std::deque is the default container. - std::stack<C> s_deque({{1}, {2}, {3}}); - std::stack<C, std::vector<C>> s_vector({{1}, {2}, {3}}); - std::stack<C, std::list<C>> s_list({{1}, {2}, {3}}); - return 0; // Set break point at this line. -} diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/Makefile b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/Makefile deleted file mode 100644 index e04d73ea487..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -LEVEL = ../../../make -# We don't have any standard include directories, so we can't -# parse the test_common.h header we usually inject as it includes -# system headers. -NO_TEST_COMMON_H := 1 - -CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS) -CXXFLAGS += -I $(SRCDIR)/root/usr/include/c++/include/ -I $(SRCDIR)/root/usr/include/ -nostdinc -nostdinc++ -nostdlib++ -CXX_SOURCES := main.cpp -include $(LEVEL)/Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/TestStdModuleSysroot.py b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/TestStdModuleSysroot.py deleted file mode 100644 index dfd90e80e45..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/TestStdModuleSysroot.py +++ /dev/null @@ -1,34 +0,0 @@ -""" -Test that we respect the sysroot when building the std module. -""" - -from lldbsuite.test.decorators import * -from lldbsuite.test.lldbtest import * -from lldbsuite.test import lldbutil -import os - -class ImportStdModule(TestBase): - - mydir = TestBase.compute_mydir(__file__) - - # FIXME: This should work on more setups, so remove these - # skipIf's in the future. - @skipIf(compiler=no_match("clang")) - @skipIf(oslist=no_match(["linux"])) - @skipIf(debug_info=no_match(["dwarf"])) - def test(self): - self.build() - - sysroot = os.path.join(os.getcwd(), "root") - - # Set the sysroot. - self.runCmd("platform select --sysroot '" + sysroot + "' host", CURRENT_EXECUTABLE_SET) - - lldbutil.run_to_source_breakpoint(self, - "// Set break point at this line.", lldb.SBFileSpec("main.cpp")) - - self.runCmd("settings set target.import-std-module true") - - # Call our custom function in our sysroot std module. - # If this gives us the correct result, then we used the sysroot. - self.expect("expr std::myabs(-42)", substrs=['(int) $0 = 42']) diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/main.cpp b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/main.cpp deleted file mode 100644 index 2fbc76b9a76..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/main.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include <algorithm> - -int main(int argc, char **argv) { - libc_struct s; - return 0; // Set break point at this line. -} diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/root/usr/include/c++/include/algorithm b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/root/usr/include/c++/include/algorithm deleted file mode 100644 index e8cbcca8e84..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/root/usr/include/c++/include/algorithm +++ /dev/null @@ -1,7 +0,0 @@ -#include "libc_header.h" - -namespace std { - int myabs(int i) { - return i < 0 ? -i : i; - } -} diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/root/usr/include/c++/include/module.modulemap b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/root/usr/include/c++/include/module.modulemap deleted file mode 100644 index 0eb48492a65..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/root/usr/include/c++/include/module.modulemap +++ /dev/null @@ -1,3 +0,0 @@ -module std { - module "algorithm" { header "algorithm" export * } -} diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/root/usr/include/libc_header.h b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/root/usr/include/libc_header.h deleted file mode 100644 index 47525c9db34..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/root/usr/include/libc_header.h +++ /dev/null @@ -1 +0,0 @@ -struct libc_struct {}; diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/unique_ptr-dbg-info-content/Makefile b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/unique_ptr-dbg-info-content/Makefile deleted file mode 100644 index 01718d86aa7..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/unique_ptr-dbg-info-content/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -LEVEL = ../../../make -USE_LIBCPP := 1 -CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS) -CXX_SOURCES := main.cpp -include $(LEVEL)/Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/unique_ptr-dbg-info-content/TestUniquePtrDbgInfoContent.py b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/unique_ptr-dbg-info-content/TestUniquePtrDbgInfoContent.py deleted file mode 100644 index c321d8022e1..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/unique_ptr-dbg-info-content/TestUniquePtrDbgInfoContent.py +++ /dev/null @@ -1,33 +0,0 @@ -""" -Test std::unique_ptr functionality with a decl from debug info as content. -""" - -from lldbsuite.test.decorators import * -from lldbsuite.test.lldbtest import * -from lldbsuite.test import lldbutil - -class TestUniquePtrDbgInfoContent(TestBase): - - mydir = TestBase.compute_mydir(__file__) - - # FIXME: This should work on more setups, so remove these - # skipIf's in the future. - @add_test_categories(["libc++"]) - @skipIf(compiler=no_match("clang")) - @skipIf(oslist=no_match(["linux"])) - @skipIf(debug_info=no_match(["dwarf"])) - def test(self): - self.build() - - lldbutil.run_to_source_breakpoint(self, - "// Set break point at this line.", lldb.SBFileSpec("main.cpp")) - - self.runCmd("settings set target.import-std-module true") - - self.expect("expr (int)s->a", substrs=['(int) $0 = 3']) - self.expect("expr (int)(s->a = 5)", substrs=['(int) $1 = 5']) - self.expect("expr (int)s->a", substrs=['(int) $2 = 5']) - self.expect("expr (bool)s", substrs=['(bool) $3 = true']) - self.expect("expr s.reset()") - self.expect("expr (bool)s", substrs=['(bool) $4 = false']) - diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/unique_ptr-dbg-info-content/main.cpp b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/unique_ptr-dbg-info-content/main.cpp deleted file mode 100644 index 73664f1c83a..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/unique_ptr-dbg-info-content/main.cpp +++ /dev/null @@ -1,11 +0,0 @@ -#include <memory> - -struct Foo { - int a; -}; - -int main(int argc, char **argv) { - std::shared_ptr<Foo> s(new Foo); - s->a = 3; - return s->a; // Set break point at this line. -} diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/unique_ptr/Makefile b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/unique_ptr/Makefile deleted file mode 100644 index 01718d86aa7..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/unique_ptr/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -LEVEL = ../../../make -USE_LIBCPP := 1 -CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS) -CXX_SOURCES := main.cpp -include $(LEVEL)/Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/unique_ptr/TestUniquePtr.py b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/unique_ptr/TestUniquePtr.py deleted file mode 100644 index 295ec512327..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/unique_ptr/TestUniquePtr.py +++ /dev/null @@ -1,33 +0,0 @@ -""" -Test basic std::unique_ptr functionality. -""" - -from lldbsuite.test.decorators import * -from lldbsuite.test.lldbtest import * -from lldbsuite.test import lldbutil - -class TestUniquePtr(TestBase): - - mydir = TestBase.compute_mydir(__file__) - - # FIXME: This should work on more setups, so remove these - # skipIf's in the future. - @add_test_categories(["libc++"]) - @skipIf(compiler=no_match("clang")) - @skipIf(oslist=no_match(["linux"])) - @skipIf(debug_info=no_match(["dwarf"])) - def test(self): - self.build() - - lldbutil.run_to_source_breakpoint(self, - "// Set break point at this line.", lldb.SBFileSpec("main.cpp")) - - self.runCmd("settings set target.import-std-module true") - - self.expect("expr (int)*s", substrs=['(int) $0 = 3']) - self.expect("expr (int)(*s = 5)", substrs=['(int) $1 = 5']) - self.expect("expr (int)*s", substrs=['(int) $2 = 5']) - self.expect("expr (bool)s", substrs=['(bool) $3 = true']) - self.expect("expr s.reset()") - self.expect("expr (bool)s", substrs=['(bool) $4 = false']) - diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/unique_ptr/main.cpp b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/unique_ptr/main.cpp deleted file mode 100644 index cb81754087f..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/unique_ptr/main.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include <memory> - -int main(int argc, char **argv) { - std::shared_ptr<int> s(new int); - *s = 3; - return *s; // Set break point at this line. -} diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-basic/Makefile b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-basic/Makefile deleted file mode 100644 index 01718d86aa7..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-basic/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -LEVEL = ../../../make -USE_LIBCPP := 1 -CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS) -CXX_SOURCES := main.cpp -include $(LEVEL)/Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-basic/TestBasicVector.py b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-basic/TestBasicVector.py deleted file mode 100644 index deaf8f0cb75..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-basic/TestBasicVector.py +++ /dev/null @@ -1,57 +0,0 @@ -""" -Test basic std::vector functionality. -""" - -from lldbsuite.test.decorators import * -from lldbsuite.test.lldbtest import * -from lldbsuite.test import lldbutil - -class TestBasicVector(TestBase): - - mydir = TestBase.compute_mydir(__file__) - - # FIXME: This should work on more setups, so remove these - # skipIf's in the future. - @add_test_categories(["libc++"]) - @skipIf(compiler=no_match("clang")) - @skipIf(oslist=no_match(["linux"])) - @skipIf(debug_info=no_match(["dwarf"])) - def test(self): - self.build() - - lldbutil.run_to_source_breakpoint(self, - "// Set break point at this line.", lldb.SBFileSpec("main.cpp")) - - self.runCmd("settings set target.import-std-module true") - - self.expect("expr (size_t)a.size()", substrs=['(size_t) $0 = 3']) - self.expect("expr (int)a.front()", substrs=['(int) $1 = 3']) - self.expect("expr (int)a[1]", substrs=['(int) $2 = 1']) - self.expect("expr (int)a.back()", substrs=['(int) $3 = 2']) - - self.expect("expr std::sort(a.begin(), a.end())") - self.expect("expr (int)a.front()", substrs=['(int) $4 = 1']) - self.expect("expr (int)a[1]", substrs=['(int) $5 = 2']) - self.expect("expr (int)a.back()", substrs=['(int) $6 = 3']) - - self.expect("expr std::reverse(a.begin(), a.end())") - self.expect("expr (int)a.front()", substrs=['(int) $7 = 3']) - self.expect("expr (int)a[1]", substrs=['(int) $8 = 2']) - self.expect("expr (int)a.back()", substrs=['(int) $9 = 1']) - - self.expect("expr (int)(*a.begin())", substrs=['(int) $10 = 3']) - self.expect("expr (int)(*a.rbegin())", substrs=['(int) $11 = 1']) - - self.expect("expr a.pop_back()") - self.expect("expr (int)a.back()", substrs=['(int) $12 = 2']) - self.expect("expr (size_t)a.size()", substrs=['(size_t) $13 = 2']) - - self.expect("expr (int)a.at(0)", substrs=['(int) $14 = 3']) - - self.expect("expr a.push_back(4)") - self.expect("expr (int)a.back()", substrs=['(int) $15 = 4']) - self.expect("expr (size_t)a.size()", substrs=['(size_t) $16 = 3']) - - self.expect("expr a.emplace_back(5)") - self.expect("expr (int)a.back()", substrs=['(int) $17 = 5']) - self.expect("expr (size_t)a.size()", substrs=['(size_t) $18 = 4']) diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-basic/main.cpp b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-basic/main.cpp deleted file mode 100644 index edf130d4748..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-basic/main.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include <vector> - -int main(int argc, char **argv) { - std::vector<int> a = {3, 1, 2}; - return 0; // Set break point at this line. -} diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-bool/Makefile b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-bool/Makefile deleted file mode 100644 index 01718d86aa7..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-bool/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -LEVEL = ../../../make -USE_LIBCPP := 1 -CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS) -CXX_SOURCES := main.cpp -include $(LEVEL)/Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-bool/TestBoolVector.py b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-bool/TestBoolVector.py deleted file mode 100644 index 0ab52695faf..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-bool/TestBoolVector.py +++ /dev/null @@ -1,34 +0,0 @@ -""" -Test basic std::vector<bool> functionality. -""" - -from lldbsuite.test.decorators import * -from lldbsuite.test.lldbtest import * -from lldbsuite.test import lldbutil - -class TestBoolVector(TestBase): - - mydir = TestBase.compute_mydir(__file__) - - # FIXME: This should work on more setups, so remove these - # skipIf's in the future. - @add_test_categories(["libc++"]) - @skipIf(compiler=no_match("clang")) - @skipIf(oslist=no_match(["linux"])) - @skipIf(debug_info=no_match(["dwarf"])) - def test(self): - self.build() - - lldbutil.run_to_source_breakpoint(self, - "// Set break point at this line.", lldb.SBFileSpec("main.cpp")) - - self.runCmd("settings set target.import-std-module true") - - self.expect("expr (size_t)a.size()", substrs=['(size_t) $0 = 4']) - self.expect("expr (bool)a.front()", substrs=['(bool) $1 = false']) - self.expect("expr (bool)a[1]", substrs=['(bool) $2 = true']) - self.expect("expr (bool)a.back()", substrs=['(bool) $3 = true']) - - self.expect("expr (bool)(*a.begin())", substrs=['(bool) $4 = false']) - self.expect("expr (bool)(*a.rbegin())", substrs=['(bool) $5 = true']) - diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-bool/main.cpp b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-bool/main.cpp deleted file mode 100644 index 9554401cf50..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-bool/main.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include <vector> - -int main(int argc, char **argv) { - std::vector<bool> a = {0, 1, 0, 1}; - return 0; // Set break point at this line. -} diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-dbg-info-content/Makefile b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-dbg-info-content/Makefile deleted file mode 100644 index 01718d86aa7..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-dbg-info-content/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -LEVEL = ../../../make -USE_LIBCPP := 1 -CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS) -CXX_SOURCES := main.cpp -include $(LEVEL)/Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-dbg-info-content/TestDbgInfoContentVector.py b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-dbg-info-content/TestDbgInfoContentVector.py deleted file mode 100644 index c89265f2cd3..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-dbg-info-content/TestDbgInfoContentVector.py +++ /dev/null @@ -1,47 +0,0 @@ -""" -Test basic std::vector functionality but with a declaration from -the debug info (the Foo struct) as content. -""" - -from lldbsuite.test.decorators import * -from lldbsuite.test.lldbtest import * -from lldbsuite.test import lldbutil - -class TestDbgInfoContentVector(TestBase): - - mydir = TestBase.compute_mydir(__file__) - - # FIXME: This should work on more setups, so remove these - # skipIf's in the future. - @add_test_categories(["libc++"]) - @skipIf(compiler=no_match("clang")) - @skipIf(oslist=no_match(["linux"])) - @skipIf(debug_info=no_match(["dwarf"])) - def test(self): - self.build() - - lldbutil.run_to_source_breakpoint(self, - "// Set break point at this line.", lldb.SBFileSpec("main.cpp")) - - self.runCmd("settings set target.import-std-module true") - - self.expect("expr (size_t)a.size()", substrs=['(size_t) $0 = 3']) - self.expect("expr (int)a.front().a", substrs=['(int) $1 = 3']) - self.expect("expr (int)a[1].a", substrs=['(int) $2 = 1']) - self.expect("expr (int)a.back().a", substrs=['(int) $3 = 2']) - - self.expect("expr std::reverse(a.begin(), a.end())") - self.expect("expr (int)a.front().a", substrs=['(int) $4 = 2']) - - self.expect("expr (int)(a.begin()->a)", substrs=['(int) $5 = 2']) - self.expect("expr (int)(a.rbegin()->a)", substrs=['(int) $6 = 3']) - - self.expect("expr a.pop_back()") - self.expect("expr (int)a.back().a", substrs=['(int) $7 = 1']) - self.expect("expr (size_t)a.size()", substrs=['(size_t) $8 = 2']) - - self.expect("expr (int)a.at(0).a", substrs=['(int) $9 = 2']) - - self.expect("expr a.push_back({4})") - self.expect("expr (int)a.back().a", substrs=['(int) $10 = 4']) - self.expect("expr (size_t)a.size()", substrs=['(size_t) $11 = 3']) diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-dbg-info-content/main.cpp b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-dbg-info-content/main.cpp deleted file mode 100644 index 24c3fec75d2..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-dbg-info-content/main.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include <vector> - -struct Foo { - int a; -}; - -int main(int argc, char **argv) { - std::vector<Foo> a = {{3}, {1}, {2}}; - return 0; // Set break point at this line. -} diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-of-vectors/Makefile b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-of-vectors/Makefile deleted file mode 100644 index 01718d86aa7..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-of-vectors/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -LEVEL = ../../../make -USE_LIBCPP := 1 -CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS) -CXX_SOURCES := main.cpp -include $(LEVEL)/Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-of-vectors/TestVectorOfVectors.py b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-of-vectors/TestVectorOfVectors.py deleted file mode 100644 index 2b82e1a039a..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-of-vectors/TestVectorOfVectors.py +++ /dev/null @@ -1,30 +0,0 @@ -""" -Test std::vector functionality when it's contents are vectors. -""" - -from lldbsuite.test.decorators import * -from lldbsuite.test.lldbtest import * -from lldbsuite.test import lldbutil - -class TestVectorOfVectors(TestBase): - - mydir = TestBase.compute_mydir(__file__) - - # FIXME: This should work on more setups, so remove these - # skipIf's in the future. - @add_test_categories(["libc++"]) - @skipIf(compiler=no_match("clang")) - @skipIf(oslist=no_match(["linux"])) - @skipIf(debug_info=no_match(["dwarf"])) - def test(self): - self.build() - - lldbutil.run_to_source_breakpoint(self, - "// Set break point at this line.", lldb.SBFileSpec("main.cpp")) - - self.runCmd("settings set target.import-std-module true") - - self.expect("expr (size_t)a.size()", substrs=['(size_t) $0 = 2']) - self.expect("expr (int)a.front().front()", substrs=['(int) $1 = 1']) - self.expect("expr (int)a[1][1]", substrs=['(int) $2 = 2']) - self.expect("expr (int)a.back().at(0)", substrs=['(int) $3 = 3']) diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-of-vectors/main.cpp b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-of-vectors/main.cpp deleted file mode 100644 index b5ada909e43..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-of-vectors/main.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include <vector> - -int main(int argc, char **argv) { - std::vector<std::vector<int> > a = {{1, 2, 3}, {3, 2, 1}}; - return 0; // Set break point at this line. -} diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/weak_ptr-dbg-info-content/Makefile b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/weak_ptr-dbg-info-content/Makefile deleted file mode 100644 index 01718d86aa7..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/weak_ptr-dbg-info-content/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -LEVEL = ../../../make -USE_LIBCPP := 1 -CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS) -CXX_SOURCES := main.cpp -include $(LEVEL)/Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/weak_ptr-dbg-info-content/TestDbgInfoContentWeakPtr.py b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/weak_ptr-dbg-info-content/TestDbgInfoContentWeakPtr.py deleted file mode 100644 index 0acd54e803c..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/weak_ptr-dbg-info-content/TestDbgInfoContentWeakPtr.py +++ /dev/null @@ -1,33 +0,0 @@ -""" -Test std::weak_ptr functionality with a decl from debug info as content. -""" - -from lldbsuite.test.decorators import * -from lldbsuite.test.lldbtest import * -from lldbsuite.test import lldbutil - -class TestDbgInfoContentWeakPtr(TestBase): - - mydir = TestBase.compute_mydir(__file__) - - # FIXME: This should work on more setups, so remove these - # skipIf's in the future. - @add_test_categories(["libc++"]) - @skipIf(compiler=no_match("clang")) - @skipIf(oslist=no_match(["linux"])) - @skipIf(debug_info=no_match(["dwarf"])) - def test(self): - self.build() - - lldbutil.run_to_source_breakpoint(self, - "// Set break point at this line.", lldb.SBFileSpec("main.cpp")) - - self.runCmd("settings set target.import-std-module true") - - self.expect("expr (int)w.lock()->a", substrs=['(int) $0 = 3']) - self.expect("expr (int)(w.lock()->a = 5)", substrs=['(int) $1 = 5']) - self.expect("expr (int)w.lock()->a", substrs=['(int) $2 = 5']) - self.expect("expr w.use_count()", substrs=['(long) $3 = 1']) - self.expect("expr w.reset()") - self.expect("expr w.use_count()", substrs=['(long) $4 = 0']) - diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/weak_ptr-dbg-info-content/main.cpp b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/weak_ptr-dbg-info-content/main.cpp deleted file mode 100644 index d2c5a6258a5..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/weak_ptr-dbg-info-content/main.cpp +++ /dev/null @@ -1,12 +0,0 @@ -#include <memory> - -struct Foo { - int a; -}; - -int main(int argc, char **argv) { - std::shared_ptr<Foo> s(new Foo); - s->a = 3; - std::weak_ptr<Foo> w = s; - return s->a; // Set break point at this line. -} diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/weak_ptr/Makefile b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/weak_ptr/Makefile deleted file mode 100644 index 01718d86aa7..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/weak_ptr/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -LEVEL = ../../../make -USE_LIBCPP := 1 -CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS) -CXX_SOURCES := main.cpp -include $(LEVEL)/Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/weak_ptr/TestWeakPtr.py b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/weak_ptr/TestWeakPtr.py deleted file mode 100644 index 6b8b9ceb7aa..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/weak_ptr/TestWeakPtr.py +++ /dev/null @@ -1,33 +0,0 @@ -""" -Test basic std::weak_ptr functionality. -""" - -from lldbsuite.test.decorators import * -from lldbsuite.test.lldbtest import * -from lldbsuite.test import lldbutil - -class TestSharedPtr(TestBase): - - mydir = TestBase.compute_mydir(__file__) - - # FIXME: This should work on more setups, so remove these - # skipIf's in the future. - @add_test_categories(["libc++"]) - @skipIf(compiler=no_match("clang")) - @skipIf(oslist=no_match(["linux"])) - @skipIf(debug_info=no_match(["dwarf"])) - def test(self): - self.build() - - lldbutil.run_to_source_breakpoint(self, - "// Set break point at this line.", lldb.SBFileSpec("main.cpp")) - - self.runCmd("settings set target.import-std-module true") - - self.expect("expr (int)*w.lock()", substrs=['(int) $0 = 3']) - self.expect("expr (int)(*w.lock() = 5)", substrs=['(int) $1 = 5']) - self.expect("expr (int)*w.lock()", substrs=['(int) $2 = 5']) - self.expect("expr w.use_count()", substrs=['(long) $3 = 1']) - self.expect("expr w.reset()") - self.expect("expr w.use_count()", substrs=['(long) $4 = 0']) - diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/weak_ptr/main.cpp b/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/weak_ptr/main.cpp deleted file mode 100644 index 13479eb9496..00000000000 --- a/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/weak_ptr/main.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include <memory> - -int main(int argc, char **argv) { - std::shared_ptr<int> s(new int); - *s = 3; - std::weak_ptr<int> w = s; - return *s; // Set break point at this line. -} |

