Fix MI notification test case on Linux.
authorHafiz Abid Qadeer <hafiz_abid@mentor.com>
Mon, 9 Feb 2015 18:14:01 +0000 (18:14 +0000)
committerHafiz Abid Qadeer <hafiz_abid@mentor.com>
Mon, 9 Feb 2015 18:14:01 +0000 (18:14 +0000)
This test case was checking for a specific stop reason which is different on
Linux. This caused the test to fail. It now only checks for stoppped. Also added
some more steps to run to main so that we dont pass when application has run to
completion.

llvm-svn: 228584

lldb/test/tools/lldb-mi/TestMiNotification.py

index 3c05f20..47cda28 100644 (file)
@@ -63,7 +63,14 @@ class MiNotificationTestCase(lldbmi_testcase.MiTestCaseBase):
         self.expect("\^done")
 
         # Test that *stopped is printed
-        self.expect("\*stopped,reason=\"signal-received\",signal=\"17\",stopped-threads=\"all\"")
+        self.expect("\*stopped.*")
+        
+        # Run to main to make sure we have not exited the application
+        self.runCmd("-break-insert -f main")
+        self.expect("\^done,bkpt={number=\"1\"")
+        self.runCmd("-exec-continue")
+        self.expect("\^running")
+        self.expect("\*stopped,reason=\"breakpoint-hit\"")
 
     @lldbmi_test
     @expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")