Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Phil Muldoon <pmuldoon@redhat.com>
To: Matt Rice <ratmice@gmail.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch] python prompt additions at first prompt.
Date: Tue, 02 Aug 2011 09:07:00 -0000	[thread overview]
Message-ID: <m3sjpk2ncb.fsf@redhat.com> (raw)
In-Reply-To: <CACTLOFpSrDwvoCXyYp9sXzCE2Ki1odBHVZS7ko7iChtegUtdww@mail.gmail.com>	(Matt Rice's message of "Mon, 1 Aug 2011 10:43:51 -0700")

Matt Rice <ratmice@gmail.com> writes:

> On Mon, Aug 1, 2011 at 7:13 AM, Phil Muldoon <pmuldoon@redhat.com> wrote:

> Think it was the quoting of $gdb_prompt which had me foiled.
>
> 2011-08-01  Matt Rice  <ratmice@gmail.com>
>
>         * gdb.python/py-prompt.exp: New file.

Thanks.

> +++ b/gdb/testsuite/gdb.python/py-prompt.exp
> @@ -0,0 +1,60 @@
> +# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
> +

This is a new file, so we just need 2011.  

Also, the other prompt tests are in python.exp, so this standalone test
is kind of an anomaly.  What do you think about combining the python.exp
prompt tests into this test file?  If you think that is ok, then you can
just submit another consolidation patch after this one has been approved
and checked in.


> +set GDBFLAGS [concat $GDBFLAGS " -ex \"python def foo(x): return \'(Foo) \'\""]
> +set GDBFLAGS [concat $GDBFLAGS " -ex \"python gdb.prompt_hook = foo\""]
> +
> +set tmp_gdbflags $GDBFLAGS
> +set saved_gdb_prompt $gdb_prompt
> +
> +global gdb_prompt
> +set gdb_prompt "\[(\]Foo\[)\]"
> +
> +
> +# The following tests are strange in that we are testing the first prompt
> +# gdb_start will fail/timeout if does not receive the '(foo) ' prompt.
> +# otherwise no 'passing' test is performed.
> +set GDBFLAGS [concat $tmp_gdbflags " -ex \"set editing on\""]
> +gdb_start
> +gdb_exit

While this does test the prompt at startup, without a PASS/FAIL how can
we track if it has regressed?  I think it will just timeout, which is
not optimal.

If Tom (or any other maintainer) is ok with it, I guess I am too.  If
there is a method to utilise a formal PASS/FAIL into the test I would
prefer that.

Thanks again for doing this.

Cheers

Phil


  reply	other threads:[~2011-08-02  9:07 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-30 22:20 Matt Rice
2011-08-01  9:51 ` Phil Muldoon
2011-08-01 14:08   ` Matt Rice
2011-08-01 14:13     ` Phil Muldoon
2011-08-01 17:44       ` Matt Rice
2011-08-02  9:07         ` Phil Muldoon [this message]
2011-08-02 17:59           ` Matt Rice
2011-08-02 20:37             ` Phil Muldoon
2011-08-03 18:08 ` Tom Tromey
2011-08-09  0:20   ` Matt Rice
2011-08-09  0:25     ` Matt Rice
2011-08-10 15:21     ` Tom Tromey
2011-08-11 12:03       ` Matt Rice
2011-08-12 13:10         ` Matt Rice
2011-08-12 14:44           ` Pedro Alves
2011-08-12 15:07             ` Matt Rice
2011-08-29 16:23               ` Matt Rice
2011-08-29 16:39                 ` Pedro Alves
2011-09-02 14:31                 ` Pedro Alves
2011-09-02 21:41                   ` Matt Rice

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=m3sjpk2ncb.fsf@redhat.com \
    --to=pmuldoon@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=ratmice@gmail.com \
    /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