summaryrefslogtreecommitdiffstats
path: root/lldb/test/macosx
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2010-08-25 22:52:45 +0000
committerJohnny Chen <johnny.chen@apple.com>2010-08-25 22:52:45 +0000
commitf3c59231b32d0faac4d59bff2e73d7bf652f6bfd (patch)
tree426be24094186152ee0d473438538a4b434737c5 /lldb/test/macosx
parent75ff0534973ae5768ef955b56434a007dfc58abf (diff)
downloadbcm5719-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.py16
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")
OpenPOWER on IntegriCloud