summaryrefslogtreecommitdiffstats
path: root/lldb/test/python_api/section/TestSectionAPI.py
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/test/python_api/section/TestSectionAPI.py')
-rwxr-xr-xlldb/test/python_api/section/TestSectionAPI.py35
1 files changed, 5 insertions, 30 deletions
diff --git a/lldb/test/python_api/section/TestSectionAPI.py b/lldb/test/python_api/section/TestSectionAPI.py
index 6c7b4f53ea7..10870a89f0a 100755
--- a/lldb/test/python_api/section/TestSectionAPI.py
+++ b/lldb/test/python_api/section/TestSectionAPI.py
@@ -9,40 +9,16 @@ class SectionAPITestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
- @skipUnlessDarwin
@python_api_test
- @dsym_test
- def test_get_target_byte_size_with_dsym(self):
- d = {'EXE': 'a.out'}
- self.buildDsym(dictionary=d)
- self.setTearDownCleanup(dictionary=d)
- target = self.create_simple_target('a.out')
-
- # find the .data section of the main module
- data_section = self.find_data_section(target)
-
- self.assertEquals(data_section.target_byte_size, 1)
-
- @python_api_test
- @dwarf_test
- def test_get_target_byte_size_with_dwarf(self):
+ def test_get_target_byte_size(self):
d = {'EXE': 'b.out'}
- self.buildDwarf(dictionary=d)
+ self.build(dictionary=d)
self.setTearDownCleanup(dictionary=d)
- target = self.create_simple_target('b.out')
-
- # find the .data section of the main module
- data_section = self.find_data_section(target)
-
- self.assertEquals(data_section.target_byte_size, 1)
-
- def create_simple_target(self, fn):
- exe = os.path.join(os.getcwd(), fn)
+ exe = os.path.join(os.getcwd(), 'b.out')
target = self.dbg.CreateTarget(exe)
self.assertTrue(target, VALID_TARGET)
- return target
- def find_data_section(self, target):
+ # find the .data section of the main module
mod = target.GetModuleAtIndex(0)
data_section = None
for s in mod.sections:
@@ -59,9 +35,8 @@ class SectionAPITestCase(TestBase):
break
self.assertIsNotNone(data_section)
- return data_section
+ self.assertEquals(data_section.target_byte_size, 1)
-
if __name__ == '__main__':
import atexit
lldb.SBDebugger.Initialize()
OpenPOWER on IntegriCloud