[Lldb-commits] [lldb] r111975 - in /lldb/trunk/test: lldbtest.py macosx/universal/TestUniversal.py
Johnny Chen
johnny.chen at apple.com
Tue Aug 24 15:07:56 PDT 2010
Author: johnny
Date: Tue Aug 24 17:07:56 2010
New Revision: 111975
URL: http://llvm.org/viewvc/llvm-project?rev=111975&view=rev
Log:
Added a test for launching a universal binary. Launch of i386 architecture
currently fails: rdar://problem/8349784.
Forgot to check in lldbtest.py in the previous commit r111958.
Added:
lldb/trunk/test/macosx/universal/TestUniversal.py
Modified:
lldb/trunk/test/lldbtest.py
Modified: lldb/trunk/test/lldbtest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbtest.py?rev=111975&r1=111974&r2=111975&view=diff
==============================================================================
--- lldb/trunk/test/lldbtest.py (original)
+++ lldb/trunk/test/lldbtest.py Tue Aug 24 17:07:56 2010
@@ -130,6 +130,8 @@
STOPPED_DUE_TO_STEP_IN = "Process state is stopped due to step in"
+DATA_TYPES_DISPLAYED_CORRECTLY = "Data type(s) displayed correctly"
+
VARIABLES_DISPLAYED_CORRECTLY = "Show specified variable(s) correctly"
#
Added: lldb/trunk/test/macosx/universal/TestUniversal.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/macosx/universal/TestUniversal.py?rev=111975&view=auto
==============================================================================
--- lldb/trunk/test/macosx/universal/TestUniversal.py (added)
+++ lldb/trunk/test/macosx/universal/TestUniversal.py Tue Aug 24 17:07:56 2010
@@ -0,0 +1,52 @@
+"""Test aspects of lldb commands on universal binaries."""
+
+import os, time
+import unittest2
+import lldb
+from lldbtest import *
+
+class TestUniversal(TestBase):
+
+ mydir = "macosx/universal"
+
+ @unittest2.expectedFailure
+ def test_process_launch_for_universal(self):
+ """Test process launch of a universal binary."""
+
+ # Note that "testit" is a universal binary.
+ exe = os.path.join(os.getcwd(), "testit")
+
+ # By default, x86_64 is assumed if no architecture is specified.
+ self.expect("file " + exe, CURRENT_EXECUTABLE_SET,
+ startstr = "Current executable set to ",
+ substrs = ["testit' (x86_64)."])
+
+ # Break inside the main.
+ self.expect("breakpoint set -f main.c -l 5", BREAKPOINT_CREATED,
+ startstr = "Breakpoint created: 1: file ='main.c', line = 5, locations = 1")
+
+ # We should be able to launch the x86_64 executable.
+ self.runCmd("run", RUN_STOPPED)
+ self.runCmd("continue")
+
+ # Now specify i386 as the architecture for "testit".
+ self.expect("file " + exe + " -a i386", CURRENT_EXECUTABLE_SET,
+ startstr = "Current executable set to ",
+ substrs = ["testit' (i386)."])
+
+ # Break inside the main.
+ self.expect("breakpoint set -f main.c -l 5", BREAKPOINT_CREATED,
+ startstr = "Breakpoint created: 1: file ='main.c', line = 5, locations = 1")
+
+ # We should be able to launch the i386 executable.
+ # Process launch for i386 architecture currently fails.
+ # rdar://problem/8349784
+ self.runCmd("run", RUN_STOPPED)
+ self.runCmd("continue")
+
+
+if __name__ == '__main__':
+ import atexit
+ lldb.SBDebugger.Initialize()
+ atexit.register(lambda: lldb.SBDebugger.Terminate())
+ unittest2.main()
More information about the lldb-commits
mailing list