From: Pedro Alves <palves@redhat.com>
To: Andrew Burgess <andrew.burgess@embecosm.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 1/2] gdb/testsuite: New skip_tui_tests predicate.
Date: Tue, 19 May 2015 13:38:00 -0000 [thread overview]
Message-ID: <555B3CAA.6090505@redhat.com> (raw)
In-Reply-To: <cf3ced4168b00b3278db10716ebbd7960dd71fcc.1428011044.git.andrew.burgess@embecosm.com>
On 04/07/2015 09:08 AM, Andrew Burgess wrote:
> Add a new predicate procedure to the gdb.exp library 'skip_tui_tests',
> which returns true if the tui is not compiled into gdb.
>
> I've made use of this predicate in the gdb.base/tui-layout.exp test as
> an example.
>
> gdb/testsuite/ChangeLog:
>
> * lib/gdb.exp (skip_tui_tests): New proc.
> * gdb.base/tui-layout.exp: Check skip_tui_tests.
> ---
> gdb/testsuite/ChangeLog | 5 +++++
> gdb/testsuite/gdb.base/tui-layout.exp | 7 +++++++
> gdb/testsuite/lib/gdb.exp | 15 +++++++++++++++
> 3 files changed, 27 insertions(+)
>
> diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
> index e501b11..6abb62f 100644
> --- a/gdb/testsuite/ChangeLog
> +++ b/gdb/testsuite/ChangeLog
> @@ -1,3 +1,8 @@
> +2015-03-27 Andrew Burgess <andrew.burgess@embecosm.com>
> +
> + * lib/gdb.exp (skip_tui_tests): New proc.
> + * gdb.base/tui-layout.exp: Check skip_tui_tests.
> +
> 2015-03-25 Markus Metzger <markus.t.metzger@intel.com>
>
> * gdb.btrace/next.exp: Merged into step.exp.
> diff --git a/gdb/testsuite/gdb.base/tui-layout.exp b/gdb/testsuite/gdb.base/tui-layout.exp
> index 0dcf1ca..cac2bc9 100644
> --- a/gdb/testsuite/gdb.base/tui-layout.exp
> +++ b/gdb/testsuite/gdb.base/tui-layout.exp
> @@ -19,4 +19,11 @@ if { [prepare_for_testing ${testfile}.exp ${testfile} $srcfile] } {
> return -1
> }
>
> +if {[skip_tui_tests]} {
> + # TUI support is disabled. Check for error message.
> + gdb_test "layout asm" "Undefined command: \"layout\". Try \"help\"."
> + return
> +}
> +
> +# Just check the command does not cause gdb to crash.
> gdb_test "layout asm"
> diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
> index f274b64..5a59a48 100644
> --- a/gdb/testsuite/lib/gdb.exp
> +++ b/gdb/testsuite/lib/gdb.exp
> @@ -1688,6 +1688,21 @@ proc skip_shlib_tests {} {
> return 1
> }
>
> +# Return 1 if we should skip tui related tests.
> +
> +proc skip_tui_tests {} {
> + global gdb_prompt
> +
> + gdb_test_multiple "help layout" "verify tui support" {
> + -re "Undefined command: \"layout\".*$gdb_prompt $" {
> + return 1
> + }
> + -re "$gdb_prompt $" {}
Space instead of tab before {. Please put the closing } on its
own line:
-re "$gdb_prompt $" {
}
OK.
Thanks,
Pedro Alves
next prev parent reply other threads:[~2015-05-19 13:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-07 8:09 [PATCH 0/2] Command completion for 'layout' command Andrew Burgess
2015-04-07 8:09 ` [PATCH 1/2] gdb/testsuite: New skip_tui_tests predicate Andrew Burgess
2015-05-19 13:38 ` Pedro Alves [this message]
2015-04-07 8:09 ` [PATCH 2/2] gdb: Add completer for layout command Andrew Burgess
2015-05-19 13:38 ` Pedro Alves
2015-05-20 23:22 ` Andrew Burgess
2015-05-21 0:19 ` Keith Seitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=555B3CAA.6090505@redhat.com \
--to=palves@redhat.com \
--cc=andrew.burgess@embecosm.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).