2011-05-20 Pedro Alves <pedro@codesourcery.com>
authorPedro Alves <palves@redhat.com>
Fri, 20 May 2011 17:52:54 +0000 (17:52 +0000)
committerPedro Alves <palves@redhat.com>
Fri, 20 May 2011 17:52:54 +0000 (17:52 +0000)
Cope with async mode.

gdb/testsuite/
* gdb.mi/mi-break.exp (test_breakpoint_commands): Split gdb_test
into gdb_test + mi_expect_stop.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.mi/mi-break.exp

index df51d61861d7fcf4bf9f1a50b147a4712cb841d9..c043204a88a1644e47e223b9efe79271b17979e7 100644 (file)
@@ -1,3 +1,11 @@
+2011-05-20  Pedro Alves  <pedro@codesourcery.com>
+
+       Cope with async mode.
+
+       gdb/testsuite/
+       * gdb.mi/mi-break.exp (test_breakpoint_commands): Split gdb_test
+       into gdb_test + mi_expect_stop.
+
 2011-05-20  Pedro Alves  <pedro@codesourcery.com>
 
        * gdb.mi/basics.c: Don't include stdio.h or unistd.h.
index b7977b7dd2146fe5f48ee9b6b70e7ab1e4f964e2..969cf4c4bc99104fc2578627c435f7289a483cea 100644 (file)
@@ -232,10 +232,19 @@ proc test_breakpoint_commands {} {
         "\\^done" \
         "breakpoint commands: set commands"
 
-    mi_send_resuming_command "exec-continue" "test hitting breakpoint with commands"
-    mi_gdb_test "" \
-        ".*\\\$1 = 0.*\\\$10 = 9.*\\*running.*\\*stopped,reason=\"exited-normally\".*" \
-        "test hitting breakpoint with commands"
+    mi_send_resuming_command "exec-continue" "breakpoint commands: continue"
+
+    set test "intermediate stop and continue"
+    gdb_expect {
+        -re ".*\\\$1 = 0.*\\\$10 = 9.*\\*running" {
+           pass $test
+       }
+        timeout {
+           fail $test
+        }
+    }
+
+    mi_expect_stop "exited-normally" "" "" "" "" "" "test hitting breakpoint with commands"
 }
 
 test_tbreak_creation_and_listing