diff options
author | Johnny Chen <johnny.chen@apple.com> | 2010-08-25 22:52:45 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2010-08-25 22:52:45 +0000 |
commit | f3c59231b32d0faac4d59bff2e73d7bf652f6bfd (patch) | |
tree | 426be24094186152ee0d473438538a4b434737c5 /lldb/test/macosx | |
parent | 75ff0534973ae5768ef955b56434a007dfc58abf (diff) | |
download | bcm5719-llvm-f3c59231b32d0faac4d59bff2e73d7bf652f6bfd.tar.gz bcm5719-llvm-f3c59231b32d0faac4d59bff2e73d7bf652f6bfd.zip |
Added logic to TestUniversal.py to exercise the python APIs:
o SBDebugger.GetCurrentTarget()
o SBTarget.GetProcess()
o SBProcess.GetAddressByteSize()
in order to make sure that, indeed, 64-bit, followed by 32-bit processes have
been launched.
Added invoke() method to TestBase to factor in the tracing logic in one place.
This method allows an object to call a method with no arg reflectively.
llvm-svn: 112102
Diffstat (limited to 'lldb/test/macosx')
-rw-r--r-- | lldb/test/macosx/universal/TestUniversal.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lldb/test/macosx/universal/TestUniversal.py b/lldb/test/macosx/universal/TestUniversal.py index b4982851dc7..df212c16ef6 100644 --- a/lldb/test/macosx/universal/TestUniversal.py +++ b/lldb/test/macosx/universal/TestUniversal.py @@ -26,6 +26,14 @@ class TestUniversal(TestBase): # We should be able to launch the x86_64 executable. self.runCmd("run", RUN_STOPPED) + + # Check whether we have a 64-bit process launched. + target = self.dbg.GetCurrentTarget() + process = target.GetProcess() + self.assertTrue(target.IsValid() and process.IsValid() and + self.invoke(process, 'GetAddressByteSize') == 8, + "64-bit process launched") + self.runCmd("continue") # Now specify i386 as the architecture for "testit". @@ -39,6 +47,14 @@ class TestUniversal(TestBase): # We should be able to launch the i386 executable as well. self.runCmd("run", RUN_STOPPED) + + # Check whether we have a 32-bit process launched. + target = self.dbg.GetCurrentTarget() + process = target.GetProcess() + self.assertTrue(target.IsValid() and process.IsValid() and + self.invoke(process, 'GetAddressByteSize') == 4, + "32-bit process launched") + self.runCmd("continue") |