[gdb/testsuite] Add unsupported tests in catch_ex_std.exp
authorTom de Vries <tdevries@suse.de>
Thu, 13 Feb 2020 14:34:06 +0000 (15:34 +0100)
committerTom de Vries <tdevries@suse.de>
Thu, 13 Feb 2020 14:34:06 +0000 (15:34 +0100)
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.

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/ChangeLog
gdb/testsuite/gdb.ada/catch_ex_std.exp

index 6abc56ca859d8003876902e8469339b2cb4d7442..a087cc717f2b7349ce0e723e111fc7343b3f1c49 100644 (file)
@@ -1,3 +1,8 @@
+2020-02-13  Tom de Vries  <tdevries@suse.de>
+
+       * gdb.ada/catch_ex_std.exp: Indicate unsupported if gnatbind/gnatlink
+       are missing.
+
 2020-02-13  Tom de Vries  <tdevries@suse.de>
 
        * lib/ada.exp (gnatmake_version_at_least): Wrap exec call in a catch
index e6943ab3956373cb646c9e2220f10e93fdcfd9fd..3fae34008fd15a4e8b961f2802d48ea1be3a9bc7 100644 (file)
@@ -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*]