diff options
author | Greg Clayton <gclayton@apple.com> | 2014-11-03 22:58:38 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2014-11-03 22:58:38 +0000 |
commit | c91d49b5050eb5053a248392d9d135458c8295d6 (patch) | |
tree | b3648cac607dcfa4dee1bddeae968a5f67a2816c /lldb/test/python_api/target/TestTargetAPI.py | |
parent | 7acb67607bcdc6d419d4b9beb55f07d390ff582c (diff) | |
download | bcm5719-llvm-c91d49b5050eb5053a248392d9d135458c8295d6.tar.gz bcm5719-llvm-c91d49b5050eb5053a248392d9d135458c8295d6.zip |
Fixed a test suite error on MacOSX where people were using ".data" as the data section name for all file formats. Instead fix the test by finding the section by section type so the test is agnostic to the file format (and passes on MacOSX).
llvm-svn: 221196
Diffstat (limited to 'lldb/test/python_api/target/TestTargetAPI.py')
-rw-r--r-- | lldb/test/python_api/target/TestTargetAPI.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lldb/test/python_api/target/TestTargetAPI.py b/lldb/test/python_api/target/TestTargetAPI.py index d57305c8b6a..70551ee31c9 100644 --- a/lldb/test/python_api/target/TestTargetAPI.py +++ b/lldb/test/python_api/target/TestTargetAPI.py @@ -252,9 +252,17 @@ class TargetAPITestCase(TestBase): mod = target.GetModuleAtIndex(0) data_section = None for s in mod.sections: - if ".data" == s.name: + sect_type = s.GetSectionType() + if sect_type == lldb.eSectionTypeData: data_section = s break + elif sect_type == lldb.eSectionTypeContainer: + for i in range(s.GetNumSubSections()): + ss = s.GetSubSectionAtIndex(i) + sect_type = ss.GetSectionType() + if sect_type == lldb.eSectionTypeData: + data_section = ss + break self.assertIsNotNone(data_section) return data_section |