diff options
| author | Enrico Granata <egranata@apple.com> | 2015-01-21 22:51:59 +0000 |
|---|---|---|
| committer | Enrico Granata <egranata@apple.com> | 2015-01-21 22:51:59 +0000 |
| commit | e24b8a03b967ffd3f605520ded9663a8e953c231 (patch) | |
| tree | b78f8fd9fe9fa34353aee35104e3a287cb8c1b21 | |
| parent | 9e13af7ac377f682d55b3bb3edd3471d247cbd36 (diff) | |
| download | bcm5719-llvm-e24b8a03b967ffd3f605520ded9663a8e953c231.tar.gz bcm5719-llvm-e24b8a03b967ffd3f605520ded9663a8e953c231.zip | |
Speed these tests up quite significantly by using the SB API instead of running the "continue" command at each step
The reason why one mechanism is so much faster than the other (as in, ~10 seconds vs. ~1 minute) is quite baffling to me at the moment, but these are not process handling tests, so do what's faster
llvm-svn: 226730
6 files changed, 26 insertions, 52 deletions
diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/Makefile b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/Makefile index f2f2b3f2fb8..d473b144a8a 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/Makefile +++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/Makefile @@ -3,6 +3,3 @@ LEVEL = ../../../../../make CXX_SOURCES := main.cpp include $(LEVEL)/Makefile.rules - -CXXFLAGS += -stdlib=libc++ -O0 -LDFLAGS += -stdlib=libc++
\ No newline at end of file diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py index 542abaf318d..4807cb926d8 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py @@ -34,7 +34,7 @@ class LibcxxMapDataFormatterTestCase(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) @@ -56,14 +56,12 @@ class LibcxxMapDataFormatterTestCase(TestBase): self.addTearDownHook(cleanup) self.expect('image list', substrs = self.getLibcPlusPlusLibs()) - - self.runCmd("frame variable ii --show-types") 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=2', @@ -74,7 +72,7 @@ class LibcxxMapDataFormatterTestCase(TestBase): 'first = 1', 'second = 1']) - self.runCmd("continue"); + lldbutil.continue_to_breakpoint(self.process(), bkpt) self.expect('frame variable ii', substrs = ['size=4', @@ -85,7 +83,7 @@ class LibcxxMapDataFormatterTestCase(TestBase): 'first = 3', 'second = 1']) - self.runCmd("continue"); + lldbutil.continue_to_breakpoint(self.process(), bkpt) self.expect("frame variable ii", substrs = ['size=8', @@ -129,8 +127,6 @@ class LibcxxMapDataFormatterTestCase(TestBase): self.expect('frame variable ii', substrs = ['size=0', '{}']) - - self.runCmd("frame variable si --show-types") self.expect('frame variable si', substrs = ['size=0', @@ -144,7 +140,7 @@ class LibcxxMapDataFormatterTestCase(TestBase): 'first = \"zero\"', 'second = 0']) - self.runCmd("continue"); + lldbutil.continue_to_breakpoint(self.process(), bkpt) self.expect("frame variable si", substrs = ['size=4', @@ -192,20 +188,19 @@ class LibcxxMapDataFormatterTestCase(TestBase): #self.expect("expression si[0]", matching=False, error=True, # substrs = ['first = ', 'zero']) - self.runCmd("continue"); + lldbutil.continue_to_breakpoint(self.process(), bkpt) self.expect('frame variable si', substrs = ['size=0', '{}']) - self.runCmd("continue"); - self.runCmd("frame variable is --show-types") + lldbutil.continue_to_breakpoint(self.process(), bkpt) self.expect('frame variable is', substrs = ['size=0', '{}']) - self.runCmd("continue"); + lldbutil.continue_to_breakpoint(self.process(), bkpt) self.expect("frame variable is", substrs = ['size=4', @@ -253,20 +248,19 @@ class LibcxxMapDataFormatterTestCase(TestBase): #self.expect("expression is[0]", matching=False, error=True, # substrs = ['first = ', 'goofy']) - self.runCmd("continue"); + lldbutil.continue_to_breakpoint(self.process(), bkpt) self.expect('frame variable is', substrs = ['size=0', '{}']) - self.runCmd("continue"); - self.runCmd("frame variable ss --show-types") + lldbutil.continue_to_breakpoint(self.process(), bkpt) 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=3', @@ -307,7 +301,7 @@ class LibcxxMapDataFormatterTestCase(TestBase): #self.expect("expression ss[3]", matching=False, error=True, # substrs = ['gatto']) - self.runCmd("continue"); + lldbutil.continue_to_breakpoint(self.process(), bkpt) self.expect('frame variable ss', substrs = ['size=0', diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/main.cpp b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/main.cpp index 6e40b43d810..6247ca8b241 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/main.cpp +++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/main.cpp @@ -1,8 +1,4 @@ #include <string> -#ifdef _LIBCPP_INLINE_VISIBILITY -#undef _LIBCPP_INLINE_VISIBILITY -#endif -#define _LIBCPP_INLINE_VISIBILITY #include <map> #define intint_map std::map<int, int> diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/Makefile b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/Makefile index e681e094da4..d473b144a8a 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/Makefile +++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/Makefile @@ -3,6 +3,3 @@ LEVEL = ../../../../../make CXX_SOURCES := main.cpp include $(LEVEL)/Makefile.rules - -CXXFLAGS += -stdlib=libc++ -O0 -std=c++11 -LDFLAGS += -stdlib=libc++
\ No newline at end of file diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/TestDataFormatterLibccMultiMap.py b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/TestDataFormatterLibccMultiMap.py index 9cdf8073aee..39d948cd731 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/TestDataFormatterLibccMultiMap.py +++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/TestDataFormatterLibccMultiMap.py @@ -34,7 +34,7 @@ class LibcxxMultiMapDataFormatterTestCase(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) @@ -56,14 +56,12 @@ class LibcxxMultiMapDataFormatterTestCase(TestBase): self.addTearDownHook(cleanup) self.expect('image list', substrs = self.getLibcPlusPlusLibs()) - - self.runCmd("frame variable ii --show-types") 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=2', @@ -74,7 +72,7 @@ class LibcxxMultiMapDataFormatterTestCase(TestBase): 'first = 1', 'second = 1']) - self.runCmd("continue"); + lldbutil.continue_to_breakpoint(self.process(), bkpt) self.expect('frame variable ii', substrs = ['size=4', @@ -85,7 +83,7 @@ class LibcxxMultiMapDataFormatterTestCase(TestBase): 'first = 3', 'second = 1']) - self.runCmd("continue"); + lldbutil.continue_to_breakpoint(self.process(), bkpt) self.expect("frame variable ii", substrs = ['size=8', @@ -124,19 +122,17 @@ class LibcxxMultiMapDataFormatterTestCase(TestBase): #self.expect("expression ii[8]", matching=False, error=True, # substrs = ['1234567']) - self.runCmd("continue"); + lldbutil.continue_to_breakpoint(self.process(), bkpt) self.expect('frame variable ii', substrs = ['size=0', '{}']) - - self.runCmd("frame variable si --show-types") self.expect('frame variable si', substrs = ['size=0', '{}']) - self.runCmd("continue"); + lldbutil.continue_to_breakpoint(self.process(), bkpt) self.expect('frame variable si', substrs = ['size=1', @@ -144,7 +140,7 @@ class LibcxxMultiMapDataFormatterTestCase(TestBase): 'first = \"zero\"', 'second = 0']) - self.runCmd("continue"); + lldbutil.continue_to_breakpoint(self.process(), bkpt) self.expect("frame variable si", substrs = ['size=4', @@ -192,20 +188,19 @@ class LibcxxMultiMapDataFormatterTestCase(TestBase): #self.expect("expression si[0]", matching=False, error=True, # substrs = ['first = ', 'zero']) - self.runCmd("continue"); + lldbutil.continue_to_breakpoint(self.process(), bkpt) self.expect('frame variable si', substrs = ['size=0', '{}']) - self.runCmd("continue"); - self.runCmd("frame variable is --show-types") + lldbutil.continue_to_breakpoint(self.process(), bkpt) self.expect('frame variable is', substrs = ['size=0', '{}']) - self.runCmd("continue"); + lldbutil.continue_to_breakpoint(self.process(), bkpt) self.expect("frame variable is", substrs = ['size=4', @@ -253,20 +248,19 @@ class LibcxxMultiMapDataFormatterTestCase(TestBase): #self.expect("expression is[0]", matching=False, error=True, # substrs = ['first = ', 'goofy']) - self.runCmd("continue"); + lldbutil.continue_to_breakpoint(self.process(), bkpt) self.expect('frame variable is', substrs = ['size=0', '{}']) - self.runCmd("continue"); - self.runCmd("frame variable ss --show-types") + lldbutil.continue_to_breakpoint(self.process(), bkpt) 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=3', @@ -307,7 +301,7 @@ class LibcxxMultiMapDataFormatterTestCase(TestBase): #self.expect("expression ss[3]", matching=False, error=True, # substrs = ['gatto']) - self.runCmd("continue"); + lldbutil.continue_to_breakpoint(self.process(), bkpt) self.expect('frame variable ss', substrs = ['size=0', diff --git a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/main.cpp b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/main.cpp index f1a6e2ab4a7..e8385994125 100644 --- a/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/main.cpp +++ b/lldb/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/main.cpp @@ -1,8 +1,4 @@ #include <string> -#ifdef _LIBCPP_INLINE_VISIBILITY -#undef _LIBCPP_INLINE_VISIBILITY -#endif -#define _LIBCPP_INLINE_VISIBILITY #include <map> #define intint_map std::multimap<int, int> |

