Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH][gdb/testsuite] Add unsupported tests in catch_ex_std.exp
@ 2020-02-13  9:03 Tom de Vries
  2020-02-13 14:21 ` Tom Tromey
  0 siblings, 1 reply; 2+ messages in thread
From: Tom de Vries @ 2020-02-13  9:03 UTC (permalink / raw)
  To: gdb-patches

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*]


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH][gdb/testsuite] Add unsupported tests in catch_ex_std.exp
  2020-02-13  9:03 [PATCH][gdb/testsuite] Add unsupported tests in catch_ex_std.exp Tom de Vries
@ 2020-02-13 14:21 ` Tom Tromey
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Tromey @ 2020-02-13 14:21 UTC (permalink / raw)
  To: Tom de Vries; +Cc: gdb-patches

>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:

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

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

Thanks, this is ok.

Tom


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-13 14:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-13  9:03 [PATCH][gdb/testsuite] Add unsupported tests in catch_ex_std.exp Tom de Vries
2020-02-13 14:21 ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox