[Lldb-commits] [lldb] r236822 - Add MiExitTestCase.test_lldbmi_q that checks reduction of quit (MI)

Ilia K ki.stfu at gmail.com
Fri May 8 03:42:12 PDT 2015


Author: ki.stfu
Date: Fri May  8 05:42:11 2015
New Revision: 236822

URL: http://llvm.org/viewvc/llvm-project?rev=236822&view=rev
Log:
Add MiExitTestCase.test_lldbmi_q that checks reduction of quit (MI)


Modified:
    lldb/trunk/test/tools/lldb-mi/TestMiExit.py

Modified: lldb/trunk/test/tools/lldb-mi/TestMiExit.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/TestMiExit.py?rev=236822&r1=236821&r2=236822&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-mi/TestMiExit.py (original)
+++ lldb/trunk/test/tools/lldb-mi/TestMiExit.py Fri May  8 05:42:11 2015
@@ -59,5 +59,29 @@ class MiExitTestCase(lldbmi_testcase.MiT
         import pexpect
         self.expect(pexpect.EOF)
 
+    @lldbmi_test
+    @expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
+    @skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races
+    def test_lldbmi_q(self):
+        """Test that 'q' exits immediately."""
+
+        self.spawnLldbMi(args = None)
+
+        # Load executable
+        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
+        self.expect("\^done")
+
+        # Run to main
+        self.runCmd("-break-insert -f main")
+        self.expect("\^done,bkpt={number=\"1\"")
+        self.runCmd("-exec-run")
+        self.expect("\^running")
+        self.expect("\*stopped,reason=\"breakpoint-hit\"")
+
+        # Test q: try to exit and check that program is finished
+        self.runCmd("q")
+        import pexpect
+        self.expect(pexpect.EOF)
+
 if __name__ == '__main__':
     unittest2.main()





More information about the lldb-commits mailing list