Skip to content
Snippets Groups Projects
Commit b58337cd authored by Johnny Chen's avatar Johnny Chen
Browse files

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
parent c544e7c0
No related branches found
No related tags found
No related merge requests found
...@@ -22,11 +22,25 @@ class AppleTypesTestCase(TestBase): ...@@ -22,11 +22,25 @@ class AppleTypesTestCase(TestBase):
self.skipTest("clang compiler only test") self.skipTest("clang compiler only test")
self.buildDefault() 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.""" """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) target = self.dbg.CreateTarget(exe)
self.assertTrue(target, VALID_TARGET) self.assertTrue(target, VALID_TARGET)
...@@ -60,6 +74,11 @@ class AppleTypesTestCase(TestBase): ...@@ -60,6 +74,11 @@ class AppleTypesTestCase(TestBase):
self.assertTrue(apple_types_sub_section) self.assertTrue(apple_types_sub_section)
print "__apple_types sub-section:", 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__': if __name__ == '__main__':
import atexit import atexit
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment