diff options
| author | Johnny Chen <johnny.chen@apple.com> | 2012-04-03 01:07:24 +0000 |
|---|---|---|
| committer | Johnny Chen <johnny.chen@apple.com> | 2012-04-03 01:07:24 +0000 |
| commit | b58337cd45809b4ac10b1edcdd94a1b4198cce92 (patch) | |
| tree | 89d0a9e5ae808e35af620ddc707c7f1e71303979 | |
| parent | c544e7c0a7f5ecd8796ebce12d2e6356b8f6f720 (diff) | |
| download | bcm5719-llvm-b58337cd45809b4ac10b1edcdd94a1b4198cce92.tar.gz bcm5719-llvm-b58337cd45809b4ac10b1edcdd94a1b4198cce92.zip | |
Add a Test case to make sure that __apple_types section does get produced by dsymutil.
This is supposed to succeed even with rdar://problem/11166975.
llvm-svn: 153919
| -rw-r--r-- | lldb/test/macosx/debug-info/apple_types/TestAppleTypesIsProduced.py | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/lldb/test/macosx/debug-info/apple_types/TestAppleTypesIsProduced.py b/lldb/test/macosx/debug-info/apple_types/TestAppleTypesIsProduced.py index 930ee8a72f1..0e260e258f4 100644 --- a/lldb/test/macosx/debug-info/apple_types/TestAppleTypesIsProduced.py +++ b/lldb/test/macosx/debug-info/apple_types/TestAppleTypesIsProduced.py @@ -22,11 +22,25 @@ class AppleTypesTestCase(TestBase): self.skipTest("clang compiler only test") self.buildDefault() - self.apple_types() + self.apple_types(dot_o=True) - def apple_types(self): + @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") + def test_debug_info_for_apple_types_dsym(self): + """Test that __apple_types section does get produced by dsymutil. + This is supposed to succeed even with rdar://problem/11166975.""" + + if not self.getCompiler().endswith('clang'): + self.skipTest("clang compiler only test") + + self.buildDsym() + self.apple_types(dot_o=False) + + def apple_types(self, dot_o): """Test that __apple_types section does get produced by clang.""" - exe = os.path.join(os.getcwd(), "main.o") + if dot_o: + exe = os.path.join(os.getcwd(), "main.o") + else: + exe = os.path.join(os.getcwd(), "a.out.dSYM/Contents/Resources/DWARF/a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) @@ -60,6 +74,11 @@ class AppleTypesTestCase(TestBase): self.assertTrue(apple_types_sub_section) print "__apple_types sub-section:", apple_types_sub_section + # These other three all important subsections should also be present. + self.assertTrue(dwarf_section.FindSubSection("__apple_names") and + dwarf_section.FindSubSection("__apple_namespac") and + dwarf_section.FindSubSection("__apple_objc")) + if __name__ == '__main__': import atexit |

