diff options
author | Pavel Labath <labath@google.com> | 2017-04-05 20:34:26 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2017-04-05 20:34:26 +0000 |
commit | 46f1d4a12ceef8177dcc4b09295925e75ae6eb0a (patch) | |
tree | 95dd8efe414f219bd70158fc8ab820ec689f89a6 /lldb/packages/Python/lldbsuite/test | |
parent | 894c147104fad62c2fd33b977207d3640a7ce8a8 (diff) | |
download | bcm5719-llvm-46f1d4a12ceef8177dcc4b09295925e75ae6eb0a.tar.gz bcm5719-llvm-46f1d4a12ceef8177dcc4b09295925e75ae6eb0a.zip |
Annotate some more libc++ tests with the new category
This makes sure we are able to run them properly on android.
llvm-svn: 299588
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
3 files changed, 20 insertions, 29 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py index 8a08d38975c..97dcc90397c 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py @@ -17,10 +17,12 @@ class LibcxxUnorderedDataFormatterTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipIfWindows # libc++ not ported to Windows yet - @skipIf(compiler="gcc") + def setUp(self): + TestBase.setUp(self) + ns = 'ndk' if lldbplatformutil.target_is_android() else '' + self.namespace = 'std::__' + ns + '1' + def test_with_run_command(self): - """Test that that file and class static variables display correctly.""" self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) @@ -29,9 +31,6 @@ class LibcxxUnorderedDataFormatterTestCase(TestBase): self.runCmd("run", RUN_SUCCEEDED) - lldbutil.skip_if_library_missing( - self, self.target(), lldbutil.PrintableRegex("libc\+\+")) - # The stop reason of the thread should be breakpoint. self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT, substrs=['stopped', @@ -51,30 +50,30 @@ class LibcxxUnorderedDataFormatterTestCase(TestBase): # Execute the cleanup function during test case tear down. self.addTearDownHook(cleanup) - self.expect('image list', substrs=self.getLibcPlusPlusLibs()) - + ns = self.namespace self.look_for_content_and_continue( - "map", ['size=5 {', 'hello', 'world', 'this', 'is', 'me']) + "map", ['%s::unordered_map' % + ns, 'size=5 {', 'hello', 'world', 'this', 'is', 'me']) self.look_for_content_and_continue( - "mmap", ['size=6 {', 'first = 3', 'second = "this"', - 'first = 2', 'second = "hello"']) + "mmap", ['%s::unordered_multimap' % ns, 'size=6 {', 'first = 3', 'second = "this"', + 'first = 2', 'second = "hello"']) self.look_for_content_and_continue( - "iset", ['size=5 {', '\[\d\] = 5', '\[\d\] = 3', '\[\d\] = 2']) + "iset", ['%s::unordered_set' % + ns, 'size=5 {', '\[\d\] = 5', '\[\d\] = 3', '\[\d\] = 2']) self.look_for_content_and_continue( - "sset", ['size=5 {', '\[\d\] = "is"', '\[\d\] = "world"', - '\[\d\] = "hello"']) + "sset", ['%s::unordered_set' % ns, 'size=5 {', '\[\d\] = "is"', '\[\d\] = "world"', + '\[\d\] = "hello"']) self.look_for_content_and_continue( - "imset", ['size=6 {', '(\[\d\] = 3(\\n|.)+){3}', - '\[\d\] = 2', '\[\d\] = 1']) + "imset", ['%s::unordered_multiset' % ns, 'size=6 {', '(\[\d\] = 3(\\n|.)+){3}', + '\[\d\] = 2', '\[\d\] = 1']) self.look_for_content_and_continue( - "smset", - ['size=5 {', '(\[\d\] = "is"(\\n|.)+){2}', - '(\[\d\] = "world"(\\n|.)+){2}']) + "smset", ['%s::unordered_multiset' % ns, 'size=5 {', '(\[\d\] = "is"(\\n|.)+){2}', + '(\[\d\] = "world"(\\n|.)+){2}']) def look_for_content_and_continue(self, var_name, patterns): self.expect(("frame variable %s" % var_name), patterns=patterns) diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py index 43d5ad4f103..a7a00068383 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py @@ -23,16 +23,12 @@ class LibcxxVBoolDataFormatterTestCase(TestBase): # Find the line number to break at. self.line = line_number('main.cpp', '// Set break point at this line.') - @skipIf(compiler="gcc") - @skipIfWindows # libc++ not ported to Windows. + @add_test_categories(["libc++"]) def test_with_run_command(self): """Test that that file and class static variables display correctly.""" self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) - lldbutil.skip_if_library_missing( - self, self.target(), lldbutil.PrintableRegex("libc\+\+")) - lldbutil.run_break_set_by_file_and_line( self, "main.cpp", self.line, num_expected_locations=-1) diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py index 719ed730050..9e226a100a1 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py @@ -17,16 +17,12 @@ class LibcxxVectorDataFormatterTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) - @skipIf(compiler="gcc") - @skipIfWindows # libc++ not ported to Windows yet + @add_test_categories(["libc++"]) def test_with_run_command(self): """Test that that file and class static variables display correctly.""" self.build() self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) - lldbutil.skip_if_library_missing( - self, self.target(), lldbutil.PrintableRegex("libc\+\+")) - bkpt = self.target().FindBreakpointByID( lldbutil.run_break_set_by_source_regexp( self, "break here")) |