[Lldb-commits] [lldb] r299588 - Annotate some more libc++ tests with the new category
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Wed Apr 5 13:34:27 PDT 2017
Author: labath
Date: Wed Apr 5 15:34:26 2017
New Revision: 299588
URL: http://llvm.org/viewvc/llvm-project?rev=299588&view=rev
Log:
Annotate some more libc++ tests with the new category
This makes sure we are able to run them properly on android.
Modified:
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py
lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py
Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py?rev=299588&r1=299587&r2=299588&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py Wed Apr 5 15:34:26 2017
@@ -17,10 +17,12 @@ class LibcxxUnorderedDataFormatterTestCa
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 LibcxxUnorderedDataFormatterTestCa
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 LibcxxUnorderedDataFormatterTestCa
# 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)
Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py?rev=299588&r1=299587&r2=299588&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py Wed Apr 5 15:34:26 2017
@@ -23,16 +23,12 @@ class LibcxxVBoolDataFormatterTestCase(T
# 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)
Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py?rev=299588&r1=299587&r2=299588&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py Wed Apr 5 15:34:26 2017
@@ -17,16 +17,12 @@ class LibcxxVectorDataFormatterTestCase(
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"))
More information about the lldb-commits
mailing list