Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [PATCH][gdb/testsuite] Add unsupported tests in catch_ex_std.exp
Date: Thu, 13 Feb 2020 09:03:00 -0000	[thread overview]
Message-ID: <20200213090332.GA7575@delia> (raw)

Hi,

If I de-install gnatbind, I run into:
...
FAIL: gdb.ada/catch_ex_std.exp: gnatbind foo
...

Fix this by marking the test unsupported instead:
...
UNSUPPORTED: gdb.ada/catch_ex_std.exp: gnatbind foo
...

Likewise for gnatlink.

Tested on x86_64-linux, with and without gnatbind/gnatlink installed.

OK for trunk?

Thanks,
- Tom

[gdb/testsuite] Add unsupported tests in catch_ex_std.exp

gdb/testsuite/ChangeLog:

2020-02-13  Tom de Vries  <tdevries@suse.de>

	* gdb.ada/catch_ex_std.exp: Indicate unsupported if gnatbind/gnatlink
	are missing.

---
 gdb/testsuite/gdb.ada/catch_ex_std.exp | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/gdb/testsuite/gdb.ada/catch_ex_std.exp b/gdb/testsuite/gdb.ada/catch_ex_std.exp
index e6943ab395..3fae34008f 100644
--- a/gdb/testsuite/gdb.ada/catch_ex_std.exp
+++ b/gdb/testsuite/gdb.ada/catch_ex_std.exp
@@ -59,6 +59,12 @@ set gnatbind [find_ada_tool gnatbind]
 set gnatlink [find_ada_tool gnatlink]
 
 with_cwd $outdir {
+    # Test if gnatbind is supported
+    set status [remote_exec host "$gnatbind --version"]
+    if {[lindex $status 0] == -1} {
+	unsupported "gnatbind foo"
+	return -1
+    }
     # Bind.
     set status [remote_exec host "$gnatbind -shared foo"]
     if {[lindex $status 0] == 0} {
@@ -68,6 +74,12 @@ with_cwd $outdir {
 	return -1
     }
 
+    # Test if gnatlink is supported
+    set status [remote_exec host "$gnatlink --version"]
+    if {[lindex $status 0] == -1} {
+	unsupported "gnatlink foo"
+	return -1
+    }
     # Finally, link.
     if {[istarget "*-*-mingw*"]
 	|| [istarget *-*-cygwin*]


             reply	other threads:[~2020-02-13  9:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-13  9:03 Tom de Vries [this message]
2020-02-13 14:21 ` Tom Tromey

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=20200213090332.GA7575@delia \
    --to=tdevries@suse.de \
    --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