From db1ac43683fc23c0e1a1b2bd5715114dde0380a0 Mon Sep 17 00:00:00 2001 From: Yao Qi Date: Fri, 24 May 2013 09:57:12 +0000 Subject: gdb/testsuite/ * gdb.base/range-stepping.exp: Skip the rest of tests if the test fails. * lib/range-stepping-support.exp (exec_cmd_expect_vCont_count): Return 0 if the test passes, otherwise return 1. --- gdb/testsuite/lib/range-stepping-support.exp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gdb/testsuite/lib') diff --git a/gdb/testsuite/lib/range-stepping-support.exp b/gdb/testsuite/lib/range-stepping-support.exp index d849665..ab38b11 100644 --- a/gdb/testsuite/lib/range-stepping-support.exp +++ b/gdb/testsuite/lib/range-stepping-support.exp @@ -14,7 +14,8 @@ # along with this program. If not, see . # Execute command CMD and check that GDB sends the expected number of -# vCont;s and vCont;r packets. +# vCont;s and vCont;r packets. Returns 0 if the test passes, +# otherwise returns 1. proc exec_cmd_expect_vCont_count { cmd exp_vCont_s exp_vCont_r } { global gdb_prompt @@ -24,6 +25,7 @@ proc exec_cmd_expect_vCont_count { cmd exp_vCont_s exp_vCont_r } { set test "${cmd}: vCont;s=${exp_vCont_s} vCont;r=${exp_vCont_r}" set r_counter 0 set s_counter 0 + set ret 1 gdb_test_multiple $cmd $test { -re "vCont;s\[^\r\n\]*Packet received: T\[\[:xdigit:\]\]\[\[:xdigit:\]\]" { incr s_counter @@ -40,6 +42,7 @@ proc exec_cmd_expect_vCont_count { cmd exp_vCont_s exp_vCont_r } { -re "$gdb_prompt $" { if { $r_counter == ${exp_vCont_r} && $s_counter == ${exp_vCont_s} } { pass $test + set ret 0 } else { fail $test } @@ -47,4 +50,5 @@ proc exec_cmd_expect_vCont_count { cmd exp_vCont_s exp_vCont_r } { } gdb_test_no_output "set debug remote 0" "" + return $ret } -- cgit v1.1