Add MiExitTestCase.test_lldbmi_q that checks reduction of quit (MI)

llvm-svn: 236822
This commit is contained in:
Ilia K 2015-05-08 10:42:11 +00:00
parent 39f915b8f4
commit f1796dc669
1 changed files with 24 additions and 0 deletions

View File

@ -59,5 +59,29 @@ class MiExitTestCase(lldbmi_testcase.MiTestCaseBase):
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()