Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@gnat.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [RFA/testsuite/ada] Do not abort prematurely the test upon build failure
Date: Thu, 01 Apr 2004 06:18:00 -0000	[thread overview]
Message-ID: <20040401061828.GN888@gnat.com> (raw)
In-Reply-To: <20040401040241.GA14882@nevyn.them.org>

[-- Attachment #1: Type: text/plain, Size: 1337 bytes --]

> Unfortunately you didn't pick the best example... please do something
> like issuing one UNSUPPORTED and then returning. 
> gdb_suppress_entire_file is evil.

I knew it! :-) (there's something evil, and sure enough I pick it)

UNSUPPORTED sounds better indeed. Thanks for the suggestion.

I'd like to put the call to unsupported inside gdb_compile_ada in order
to help having a certain consistency between all Ada testcases. So I'd
like to suggest the attached patch instead. The code in null_record.exp
can thus remain the same (simply abort if gdb_compile_ada returns a
failure, nothing else to do since the unsupported has already been
emitted).

2004-03-31  Joel Brobecker  <brobecker@gnat.com>

        * lib/ada.exp (gdb_compile_ada): Emit UNSUPPORTED if we failed
        to build the application. Remove the message printed when in
        verbose mode, redundant with the UNSUPPORTED message above.

(not sure if I used the proper terminology in the ChangeLog entry)

Otherwise, the other approach would be to add the call to unsupported
in null_record.exp itself. In that case, it might be nice to have the
reason for the failure. For that, we would need to update the message
returned by gdb_compile_ada to include that reason, and then include
that reason in the UNSUPPORTED message.

Would either approach be ok?
-- 
Joel

[-- Attachment #2: ada.exp.diff --]
[-- Type: text/plain, Size: 639 bytes --]

Index: ada.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/ada.exp,v
retrieving revision 1.1
diff -u -p -r1.1 ada.exp
--- ada.exp	1 Apr 2004 00:51:13 -0000	1.1
+++ ada.exp	1 Apr 2004 06:06:59 -0000
@@ -405,7 +405,7 @@ proc gdb_compile_ada {source dest type o
     # We therefore simply check whether the dest file has been created
     # or not. Unless not present, the build has succeeded.
     if ![file exists $dest] {
-        verbose "Ada compilation failed: $result"
+	 unsupported "Ada compilation failed: $result"
         return "Ada compilation failed."
     }
 }

  reply	other threads:[~2004-04-01  6:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-01  2:30 Joel Brobecker
2004-04-01  4:02 ` Daniel Jacobowitz
2004-04-01  6:18   ` Joel Brobecker [this message]
2004-04-01 15:08     ` Daniel Jacobowitz
2004-04-01 17:49       ` Joel Brobecker
2004-04-02 16:28         ` Andrew Cagney
2004-04-02 17:30 Michael Elizabeth Chastain

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=20040401061828.GN888@gnat.com \
    --to=brobecker@gnat.com \
    --cc=gdb-patches@sources.redhat.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