From 953a3df779e3bb899d7745e33df43ddf1bacedb2 Mon Sep 17 00:00:00 2001 From: Enrico Granata Date: Thu, 22 Jan 2015 20:53:04 +0000 Subject: [PATCH] Replace more runCmd('continue') with process control API. llvm-svn: 226860 --- .../libcxx/multiset/TestDataFormatterLibcxxMultiSet.py | 16 ++++++++-------- .../libcxx/set/TestDataFormatterLibcxxSet.py | 16 ++++++++-------- .../libcxx/vector/TestDataFormatterLibcxxVector.py | 16 ++++++++-------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/TestDataFormatterLibcxxMultiSet.py b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/TestDataFormatterLibcxxMultiSet.py index 84f1eb8..ff8bd90 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/TestDataFormatterLibcxxMultiSet.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/TestDataFormatterLibcxxMultiSet.py @@ -34,7 +34,7 @@ class LibcxxMultiSetDataFormatterTestCase(TestBase): """Test that that file and class static variables display correctly.""" self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) - lldbutil.run_break_set_by_source_regexp (self, "Set break point at this line.") + bkpt = self.target().FindBreakpointByID(lldbutil.run_break_set_by_source_regexp (self, "Set break point at this line.")) self.runCmd("run", RUN_SUCCEEDED) @@ -58,24 +58,24 @@ class LibcxxMultiSetDataFormatterTestCase(TestBase): self.expect('image list', substrs = self.getLibcPlusPlusLibs()) self.expect("frame variable ii",substrs = ["size=0","{}"]) - self.runCmd("continue") + lldbutil.continue_to_breakpoint(self.process(), bkpt) self.expect("frame variable ii",substrs = ["size=6","[0] = 0","[1] = 1", "[2] = 2", "[3] = 3", "[4] = 4", "[5] = 5"]) - self.runCmd("continue") + lldbutil.continue_to_breakpoint(self.process(), bkpt) self.expect("frame variable ii",substrs = ["size=7","[2] = 2", "[3] = 3", "[6] = 6"]) self.expect("p ii",substrs = ["size=7","[2] = 2", "[3] = 3", "[6] = 6"]) self.expect("frame variable ii[2]",substrs = [" = 2"]) - self.runCmd("continue") + lldbutil.continue_to_breakpoint(self.process(), bkpt) self.expect("frame variable ii",substrs = ["size=0","{}"]) - self.runCmd("continue") + lldbutil.continue_to_breakpoint(self.process(), bkpt) self.expect("frame variable ii",substrs = ["size=0","{}"]) self.expect("frame variable ss",substrs = ["size=0","{}"]) - self.runCmd("continue") + lldbutil.continue_to_breakpoint(self.process(), bkpt) self.expect("frame variable ss",substrs = ["size=2",'[0] = "a"','[1] = "a very long string is right here"']) - self.runCmd("continue") + lldbutil.continue_to_breakpoint(self.process(), bkpt) self.expect("frame variable ss",substrs = ["size=4",'[2] = "b"','[3] = "c"','[0] = "a"','[1] = "a very long string is right here"']) self.expect("p ss",substrs = ["size=4",'[2] = "b"','[3] = "c"','[0] = "a"','[1] = "a very long string is right here"']) self.expect("frame variable ss[2]",substrs = [' = "b"']) - self.runCmd("continue") + lldbutil.continue_to_breakpoint(self.process(), bkpt) self.expect("frame variable ss",substrs = ["size=3",'[0] = "a"','[1] = "a very long string is right here"','[2] = "c"']) if __name__ == '__main__': diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/TestDataFormatterLibcxxSet.py b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/TestDataFormatterLibcxxSet.py index 7c2b77e..045eb70 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/TestDataFormatterLibcxxSet.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/TestDataFormatterLibcxxSet.py @@ -34,7 +34,7 @@ class LibcxxSetDataFormatterTestCase(TestBase): """Test that that file and class static variables display correctly.""" self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) - lldbutil.run_break_set_by_source_regexp (self, "Set break point at this line.") + bkpt = self.target().FindBreakpointByID(lldbutil.run_break_set_by_source_regexp (self, "Set break point at this line.")) self.runCmd("run", RUN_SUCCEEDED) @@ -58,24 +58,24 @@ class LibcxxSetDataFormatterTestCase(TestBase): self.expect('image list', substrs = self.getLibcPlusPlusLibs()) self.expect("frame variable ii",substrs = ["size=0","{}"]) - self.runCmd("continue") + lldbutil.continue_to_breakpoint(self.process(), bkpt) self.expect("frame variable ii",substrs = ["size=6","[0] = 0","[1] = 1", "[2] = 2", "[3] = 3", "[4] = 4", "[5] = 5"]) - self.runCmd("continue") + lldbutil.continue_to_breakpoint(self.process(), bkpt) self.expect("frame variable ii",substrs = ["size=7","[2] = 2", "[3] = 3", "[6] = 6"]) self.expect("frame variable ii[2]",substrs = [" = 2"]) self.expect("p ii",substrs = ["size=7","[2] = 2", "[3] = 3", "[6] = 6"]) - self.runCmd("continue") + lldbutil.continue_to_breakpoint(self.process(), bkpt) self.expect("frame variable ii",substrs = ["size=0","{}"]) - self.runCmd("continue") + lldbutil.continue_to_breakpoint(self.process(), bkpt) self.expect("frame variable ii",substrs = ["size=0","{}"]) self.expect("frame variable ss",substrs = ["size=0","{}"]) - self.runCmd("continue") + lldbutil.continue_to_breakpoint(self.process(), bkpt) self.expect("frame variable ss",substrs = ["size=2",'[0] = "a"','[1] = "a very long string is right here"']) - self.runCmd("continue") + lldbutil.continue_to_breakpoint(self.process(), bkpt) self.expect("frame variable ss",substrs = ["size=4",'[2] = "b"','[3] = "c"','[0] = "a"','[1] = "a very long string is right here"']) self.expect("p ss",substrs = ["size=4",'[2] = "b"','[3] = "c"','[0] = "a"','[1] = "a very long string is right here"']) self.expect("frame variable ss[2]",substrs = [' = "b"']) - self.runCmd("continue") + lldbutil.continue_to_breakpoint(self.process(), bkpt) self.expect("frame variable ss",substrs = ["size=3",'[0] = "a"','[1] = "a very long string is right here"','[2] = "c"']) if __name__ == '__main__': diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py index 37808b7..84c2cf8 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py @@ -34,7 +34,7 @@ class LibcxxVectorDataFormatterTestCase(TestBase): """Test that that file and class static variables display correctly.""" self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) - lldbutil.run_break_set_by_source_regexp (self, regexp="break here") + bkpt = self.target().FindBreakpointByID(lldbutil.run_break_set_by_source_regexp (self, "break here")) self.runCmd("run", RUN_SUCCEEDED) @@ -59,7 +59,7 @@ class LibcxxVectorDataFormatterTestCase(TestBase): self.expect("frame variable numbers", substrs = ['numbers = size=0']) - self.runCmd("continue") + lldbutil.continue_to_breakpoint(self.process(), bkpt) # first value added self.expect("frame variable numbers", @@ -68,7 +68,7 @@ class LibcxxVectorDataFormatterTestCase(TestBase): '}']) # add some more data - self.runCmd("continue"); + lldbutil.continue_to_breakpoint(self.process(), bkpt) self.expect("frame variable numbers", substrs = ['numbers = size=4', @@ -100,7 +100,7 @@ class LibcxxVectorDataFormatterTestCase(TestBase): self.runCmd("type summary delete int_vect") # add some more data - self.runCmd("continue"); + lldbutil.continue_to_breakpoint(self.process(), bkpt) self.expect("frame variable numbers", substrs = ['numbers = size=7', @@ -135,12 +135,12 @@ class LibcxxVectorDataFormatterTestCase(TestBase): substrs = ['1234']); # clear out the vector and see that we do the right thing once again - self.runCmd("continue") + lldbutil.continue_to_breakpoint(self.process(), bkpt) self.expect("frame variable numbers", substrs = ['numbers = size=0']) - self.runCmd("continue") + lldbutil.continue_to_breakpoint(self.process(), bkpt) # first value added self.expect("frame variable numbers", @@ -173,7 +173,7 @@ class LibcxxVectorDataFormatterTestCase(TestBase): 'is', 'smart']) - self.runCmd("continue") + lldbutil.continue_to_breakpoint(self.process(), bkpt) self.expect("frame variable strings", substrs = ['vector has 4 items']) @@ -184,7 +184,7 @@ class LibcxxVectorDataFormatterTestCase(TestBase): self.expect("frame variable strings[1]", substrs = ['is']); - self.runCmd("continue") + lldbutil.continue_to_breakpoint(self.process(), bkpt) self.expect("frame variable strings", substrs = ['vector has 0 items']) -- 2.7.4