aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2016-05-16 17:32:43 +0100
committerYao Qi <yao.qi@linaro.org>2016-05-16 17:32:43 +0100
commit155b7f573bf6a9fffcb00108ab7a5fc12ed2f727 (patch)
treea95a3fd4f5c7e8fed3057fe3da9857db0a03d92c /gdb
parent71de341392d18d7951b5a00fe68b6309e2dfbb47 (diff)
downloadgdb-155b7f573bf6a9fffcb00108ab7a5fc12ed2f727.zip
gdb-155b7f573bf6a9fffcb00108ab7a5fc12ed2f727.tar.gz
gdb-155b7f573bf6a9fffcb00108ab7a5fc12ed2f727.tar.bz2
Match shell_prompt # in batch-preserve-term-settings.exp
batch-preserve-term-settings.exp fails if the shell prompt isn't $. It is # in our testing env. In fact, the shell prompt can be anything. The perfect solution would be "set_board_info shell_prompt" in the host board file, and use board_info shell_prompt in batch-preserve-term-settings.exp. This is a little bit overkill to me, and we still need to figure out the different prompts on different shells. I also tried to start shell with the prompt preset, but there is not unique way to set shell prompt in different shells, so I give up. It is reasonably simple to match either $ or # for the shell prompt, and we can easily extend it to match other char, like >. gdb/testsuite: 2016-05-16 Yao Qi <yao.qi@linaro.org> * gdb.base/batch-preserve-term-settings.exp: Remove variable shell_prompt. Update shell_prompt_re.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.base/batch-preserve-term-settings.exp3
2 files changed, 6 insertions, 2 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 04a6450..c5ec756 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2016-05-16 Yao Qi <yao.qi@linaro.org>
+
+ * gdb.base/batch-preserve-term-settings.exp: Remove variable
+ shell_prompt. Update shell_prompt_re.
+
2016-05-12 Doug Evans <dje@google.com>
PR symtab/19999
diff --git a/gdb/testsuite/gdb.base/batch-preserve-term-settings.exp b/gdb/testsuite/gdb.base/batch-preserve-term-settings.exp
index c925e88..a2de2c0 100644
--- a/gdb/testsuite/gdb.base/batch-preserve-term-settings.exp
+++ b/gdb/testsuite/gdb.base/batch-preserve-term-settings.exp
@@ -28,8 +28,7 @@ if [is_remote host] {
}
# The shell's prompt.
-set shell_prompt "$ "
-set shell_prompt_re [string_to_regexp $shell_prompt]
+set shell_prompt_re "\[$#\] "
# Spawn shell. Returns true on success, false otherwise.