aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.gdb/complaints.exp
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2010-05-26 18:31:25 +0000
committerMichael Snyder <msnyder@vmware.com>2010-05-26 18:31:25 +0000
commita127f7b4917bd9a4a1851451ae6f2c1a4af0a62a (patch)
tree35eef823814fe382e8c78351879128a6be3ac903 /gdb/testsuite/gdb.gdb/complaints.exp
parentdde08ee10924b57d4e1c80e40a6a1fe14c93dcb5 (diff)
downloadfsf-binutils-gdb-a127f7b4917bd9a4a1851451ae6f2c1a4af0a62a.zip
fsf-binutils-gdb-a127f7b4917bd9a4a1851451ae6f2c1a4af0a62a.tar.gz
fsf-binutils-gdb-a127f7b4917bd9a4a1851451ae6f2c1a4af0a62a.tar.bz2
2010-05-26 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
* gdb.gdb/complaints.exp: Replace send_gdb with gdb_test. * gdb.gdb/selftest.exp: Replace send_gdb with gdb_test. * gdb.gdb/xfullpath.exp: Replace send_gdb with gdb_test.
Diffstat (limited to 'gdb/testsuite/gdb.gdb/complaints.exp')
-rw-r--r--gdb/testsuite/gdb.gdb/complaints.exp73
1 files changed, 11 insertions, 62 deletions
diff --git a/gdb/testsuite/gdb.gdb/complaints.exp b/gdb/testsuite/gdb.gdb/complaints.exp
index b4afcb5..cc66e30 100644
--- a/gdb/testsuite/gdb.gdb/complaints.exp
+++ b/gdb/testsuite/gdb.gdb/complaints.exp
@@ -72,8 +72,7 @@ proc setup_test { executable } {
set timeout 600
set description "run until breakpoint at captured_command_loop"
- send_gdb "run -nw\n"
- gdb_expect {
+ gdb_test_multiple "run -nw" "$description" {
-re "Starting program.*Breakpoint \[0-9\]+,.*captured_command_loop .data.* at .*main.c:.*$gdb_prompt $" {
pass "$description"
}
@@ -92,9 +91,6 @@ proc setup_test { executable } {
verbose "Timeout is now $timeout seconds" 2
return -1
}
- timeout {
- fail "$description (timeout)"
- }
}
set timeout $oldtimeout
@@ -140,44 +136,23 @@ proc test_serial_complaints { } {
gdb_test_exact "call clear_complaints (&symfile_complaints, 1, 0)" "" "serial start"
# Prime the system
- send_gdb "call complaint (&symfile_complaints, \"serial line 1\")\n"
- gdb_expect {
- -re "During symbol reading...serial line 1...$gdb_prompt " {
+ gdb_test_multiple "call complaint (&symfile_complaints, \"serial line 1\")" "serial line 1" {
+ -re "During symbol reading...serial line 1...$gdb_prompt $" {
pass "serial line 1"
}
- "$gdb_prompt" {
- fail "serial line 1"
- }
- timeout {
- fail "serial line 1 (timeout)"
- }
}
# Add a second complaint, expect it
- send_gdb "call complaint (&symfile_complaints, \"serial line 2\")\n"
- gdb_expect {
+ gdb_test_multiple "call complaint (&symfile_complaints, \"serial line 2\")" "serial line 2" {
-re "serial line 2...$gdb_prompt " {
pass "serial line 2"
}
- "$gdb_prompt" {
- fail "serial line 2"
- }
- timeout {
- fail "serial line 2 (timeout)"
- }
}
- send_gdb "call clear_complaints (&symfile_complaints, 1, 0)\n"
- gdb_expect {
+ gdb_test_multiple "call clear_complaints (&symfile_complaints, 1, 0)" "serial end" {
-re "\r\n\r\n$gdb_prompt " {
pass "serial end"
}
- "$gdb_prompt" {
- fail "serial end"
- }
- timeout {
- fail "serial end (timeout)"
- }
}
return 0
@@ -192,44 +167,23 @@ proc test_short_complaints { } {
gdb_test_exact "call clear_complaints (&symfile_complaints, 1, 1)" "" "short start"
# Prime the system
- send_gdb "call complaint (&symfile_complaints, \"short line 1\")\n"
- gdb_expect {
+ gdb_test_multiple "call complaint (&symfile_complaints, \"short line 1\")" "short line 1" {
-re "short line 1...$gdb_prompt " {
pass "short line 1"
}
- "$gdb_prompt" {
- fail "short line 1"
- }
- timeout {
- fail "short line 1 (timeout)"
- }
}
# Add a second complaint, expect it
- send_gdb "call complaint (&symfile_complaints, \"short line 2\")\n"
- gdb_expect {
+ gdb_test_multiple "call complaint (&symfile_complaints, \"short line 2\")" "short line 2" {
-re "short line 2...$gdb_prompt " {
pass "short line 2"
}
- "$gdb_prompt" {
- fail "short line 2"
- }
- timeout {
- fail "short line 2 (timeout)"
- }
}
- send_gdb "call clear_complaints (&symfile_complaints, 1, 0)\n"
- gdb_expect {
+ gdb_test_multiple "call clear_complaints (&symfile_complaints, 1, 0)" "short end" {
-re "\r\n\r\n$gdb_prompt " {
pass "short end"
}
- "$gdb_prompt" {
- fail "short end"
- }
- timeout {
- fail "short end (timeout)"
- }
}
return 0
@@ -241,19 +195,14 @@ proc test_short_complaints { } {
proc test_empty_complaint { cmd msg } {
global gdb_prompt
- send_gdb $cmd
- gdb_expect {
- -re "\r\n\r\n$gdb_prompt " {
+ gdb_test_multiple $cmd $msg {
+ -re "\r\n\r\n$gdb_prompt $" {
fail $msg
}
- "\r\n$gdb_prompt" {
+ "\r\n$gdb_prompt $" {
pass $msg
}
- timeout {
- fail "$msg (timeout)"
- }
}
-
}
proc test_empty_complaints { } {