This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Match shell_prompt # in batch-preserve-term-settings.exp
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>, gdb-patches at sourceware dot org
- Date: Wed, 18 May 2016 12:27:20 +0100
- Subject: Re: [PATCH] Match shell_prompt # in batch-preserve-term-settings.exp
- Authentication-results: sourceware.org; auth=none
- References: <1462877837-31075-1-git-send-email-yao dot qi at linaro dot org>
On 05/10/2016 11:57 AM, Yao Qi wrote:
> 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.
Yeah, I think that'd be overkill. Anyone running tests with a custom
prompt can just not do that.
> It is reasonably simple to match either $ or # for the shell prompt, and
> we can easily extend it to match other char, like >.
Excepting "#" is reasonable, since it'll be the usual prompt if
you run the shell as root.
Thanks,
Pedro Alves