[gdb/testsuite] Handle missing gnatmake in gnat_runtime_has_debug_info
authorTom de Vries <tdevries@suse.de>
Tue, 18 Feb 2020 09:18:36 +0000 (10:18 +0100)
committerTom de Vries <tdevries@suse.de>
Tue, 18 Feb 2020 09:18:36 +0000 (10:18 +0100)
commitd4295de4f3d6cb24289d79c424d430b0df38db07
tree70c71ca5bca7d0d204e69187ffb50c2e55cb7721
parent685313de6b2ae6e4b2ad32935cbb18d65ebd42ce
[gdb/testsuite] Handle missing gnatmake in gnat_runtime_has_debug_info

After de-installing gnatmake, I get on stdout/stderr:
...
Running src/gdb/testsuite/gdb.base/gdb-caching-proc.exp ...
FAIL: gdb-caching-proc.exp: failed to compile gnat-debug-info test binary
  ...
FAIL: gdb-caching-proc.exp: failed to compile gnat-debug-info test binary
...

In gdb.sum, we see these FAILs (each paired with an UNSUPPORTED as well)
followed by:
...
PASS: gdb-caching-proc.exp: gnat_runtime_has_debug_info consistency
...

Likewise, after re-installing gnatmake, I get a PASS for each of the
UNSUPPORTEDs, and the FAILs disappear.

The FAIL comes from gnat_runtime_has_debug_info, the PASS/UNSUPPORTED comes
from gdb_compile_ada.

Fix this by removing the corresponding fail call in
gnat_runtime_has_debug_info, as well as using a new variant gdb_compile_ada_1
that doesn't call pass/unsupported.

Tested on x86_64-linux, with gnatmake installed and de-installed.

gdb/testsuite/ChangeLog:

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

* lib/ada.exp (gdb_compile_ada_1): Factor out of ...
(gdb_compile_ada): ... here.
(gnat_runtime_has_debug_info): Remove fail call for gdb_compile_ada
failure.  Use gdb_compile_ada_1 instead of gdb_compile_ada.
gdb/testsuite/ChangeLog
gdb/testsuite/lib/ada.exp