summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.mi/mi-console.exp
diff options
context:
space:
mode:
authorBob Rossi <bob@brasko.net>2005-08-04 01:52:31 +0000
committerBob Rossi <bob@brasko.net>2005-08-04 01:52:31 +0000
commitecd3fd0f9d94eb0d6675090a4d9c6ce904817f20 (patch)
tree9c284564f3e2823ccd3606561b8ba3867d665f38 /gdb/testsuite/gdb.mi/mi-console.exp
parent1e035701d67ed8a8bc72ec9e393f2d984090a60c (diff)
downloadbinutils-gdb-ecd3fd0f9d94eb0d6675090a4d9c6ce904817f20.tar.gz
2005-08-02 Bob Rossi <bob@brasko.net>
* gdb.mi/mi-basics.exp: Tell mi_gdb_start to use a PTY for inferior. (test_setshow_inferior_tty): Add global mi_inferior_tty_name to scope. Change tests to inferior-tty-set/show. * gdb.mi/mi-console.exp: Tell mi_gdb_start to use a PTY for inferior. (47-exec-next): Use mi_gdb_test to get GDB and Inferior output. * gdb.mi/mi-syn-frame.exp: Tell mi_gdb_start to use a PTY for inferior. Use mi_gdb_test to get GDB and Inferior output. * lib/mi-support.exp (mi_inferior_spawn_id): Add inferior PTY descriptor. (mi_inferior_tty_name): Add inferior PTY file name. (mi_gdb_start): Add INFERIOR_PTY parameter. (mi_gdb_test): Add IPATTERN parameter.
Diffstat (limited to 'gdb/testsuite/gdb.mi/mi-console.exp')
-rw-r--r--gdb/testsuite/gdb.mi/mi-console.exp37
1 files changed, 5 insertions, 32 deletions
diff --git a/gdb/testsuite/gdb.mi/mi-console.exp b/gdb/testsuite/gdb.mi/mi-console.exp
index 2dbfc159377..84ae35fb5d4 100644
--- a/gdb/testsuite/gdb.mi/mi-console.exp
+++ b/gdb/testsuite/gdb.mi/mi-console.exp
@@ -36,7 +36,7 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
gdb_exit
-if [mi_gdb_start] {
+if [mi_gdb_start separate-inferior-tty] {
continue
}
@@ -54,37 +54,10 @@ mi_gdb_load ${binfile}
mi_run_to_main
# Next over the hello() call which will produce lots of output
-send_gdb "47-exec-next\n"
-gdb_expect {
- -re "47\\^running\r\n$mi_gdb_prompt" {
- pass "Started step over hello"
- }
- timeout {
- fail "Started step over hello (timeout)"
- }
-}
-
-if { ![target_info exists gdb,noinferiorio]} {
- gdb_expect {
- -re "@\"H\"\r\n.*@\"e\"\r\n.*@\"l\"\r\n.*@\"l\"\r\n.*@\"o\"\r\n.*@\" \"\r\n.*@\"\\\\\\\\\"\r\n.*@\"\\\\\"\"\r\n.*@\"!\"\r\n.*@\"\\\\r\"\r\n.*@\"\\\\n\"\r\n" {
- pass "Hello message"
- }
- -re "Hello" {
-
- # Probably a native system where GDB doesn't have direct #
- # control over the inferior console. # For this to work,
- # GDB would need to run the inferior process # under a PTY
- # and then use the even-loops ability to wait on #
- # multiple event sources to channel the output back
- # through the # MI.
-
- kfail "gdb/623" "Hello message"
- }
- timeout {
- fail "Hello message (timeout)"
- }
- }
-}
+mi_gdb_test "47-exec-next" \
+ "47\\^running" \
+ "Testing console output" \
+ "Hello \\\\\"!\[\r\n\]+"
gdb_expect {
-re "47\\*stopped.*$mi_gdb_prompt$" {