[Lldb-commits] [lldb] r155518 - /lldb/branches/lldb-platform-work/test/functionalities/inferior-changed/TestInferiorChanged.py

Johnny Chen johnny.chen at apple.com
Tue Apr 24 18:07:58 PDT 2012


Author: johnny
Date: Tue Apr 24 20:07:57 2012
New Revision: 155518

URL: http://llvm.org/viewvc/llvm-project?rev=155518&view=rev
Log:
Thisn test case uses lldb to run an inferior which is expected to crash the first time.
The second time (after the file is modified), it is not expected to crash.

For remote-macosx, we will add a new "file target" command to prod the lldb-platform that
a newly built executable is ready.

Alos add an expected failure decorator for remote-macosx only.

Modified:
    lldb/branches/lldb-platform-work/test/functionalities/inferior-changed/TestInferiorChanged.py

Modified: lldb/branches/lldb-platform-work/test/functionalities/inferior-changed/TestInferiorChanged.py
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/lldb-platform-work/test/functionalities/inferior-changed/TestInferiorChanged.py?rev=155518&r1=155517&r2=155518&view=diff
==============================================================================
--- lldb/branches/lldb-platform-work/test/functionalities/inferior-changed/TestInferiorChanged.py (original)
+++ lldb/branches/lldb-platform-work/test/functionalities/inferior-changed/TestInferiorChanged.py Tue Apr 24 20:07:57 2012
@@ -10,6 +10,8 @@
     mydir = os.path.join("functionalities", "inferior-changed")
 
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
+    # rdar://problem/11314533
+    @unittest2.expectedFailure
     def test_inferior_crashing_dsym(self):
         """Test lldb reloads the inferior after it was changed during the session."""
         self.buildDsym()
@@ -20,6 +22,8 @@
         self.setTearDownCleanup(dictionary=d)
         self.inferior_not_crashing()
 
+    # rdar://problem/11314533
+    @unittest2.expectedFailure
     def test_inferior_crashing_dwarf(self):
         """Test lldb reloads the inferior after it was changed during the session."""
         self.buildDwarf()
@@ -39,8 +43,8 @@
 
     def inferior_crashing(self):
         """Inferior crashes upon launching; lldb should catch the event and stop."""
-        exe = os.path.join(os.getcwd(), "a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+        self.exe = os.path.join(os.getcwd(), "a.out")
+        self.runCmd("file " + self.exe, CURRENT_EXECUTABLE_SET)
 
         self.runCmd("run", RUN_SUCCEEDED)
 
@@ -57,6 +61,9 @@
     def inferior_not_crashing(self):
         """Test lldb reloads the inferior after it was changed during the session."""
         self.runCmd("process kill")
+        # Prod the lldb-platform that we have a newly built inferior ready.
+        if lldb.lldbtest_remote_sandbox:
+            self.runCmd("file " + self.exe, CURRENT_EXECUTABLE_SET)
         self.runCmd("run", RUN_SUCCEEDED)
         self.runCmd("process status")
 





More information about the lldb-commits mailing list