From: Tom de Vries Date: Thu, 13 Feb 2020 14:34:06 +0000 (+0100) Subject: [gdb/testsuite] Add unsupported tests in catch_ex_std.exp X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=92b6eaf759d40406c788a1b576494a530f532928;p=binutils-gdb.git [gdb/testsuite] Add unsupported tests in catch_ex_std.exp 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 * gdb.ada/catch_ex_std.exp: Indicate unsupported if gnatbind/gnatlink are missing. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 6abc56ca859..a087cc717f2 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2020-02-13 Tom de Vries + + * gdb.ada/catch_ex_std.exp: Indicate unsupported if gnatbind/gnatlink + are missing. + 2020-02-13 Tom de Vries * lib/ada.exp (gnatmake_version_at_least): Wrap exec call in a catch diff --git a/gdb/testsuite/gdb.ada/catch_ex_std.exp b/gdb/testsuite/gdb.ada/catch_ex_std.exp index e6943ab3956..3fae34008fd 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*]