From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>,
Philippe Waroquiers <philippe.waroquiers@skynet.be>
Subject: [PATCH][gdb/testsuite] Require gnatmake 8 for gdb.ada/rename_subscript_param.exp
Date: Thu, 29 Aug 2019 14:38:00 -0000 [thread overview]
Message-ID: <20190829143754.GA18195@delia> (raw)
Hi,
When running gdb.ada/rename_subscript_param.exp with gnatmake 7.4.1, we get:
...
FAIL: gdb.ada/rename_subscript_param.exp: print rename_subscript_param_b \
before changing its value
FAIL: gdb.ada/rename_subscript_param.exp: print rename_subscript_param_b \
after changing its value
...
The commit last touching the test-case (afcfda091e) states:
...
The test still fails with old compilers that do not properly
generate debug info for this renaming:
...
Fix this by requiring at least gnatmake 8 for the test-case.
Tested on x86_64-linux.
OK for trunk?
Thanks,
- Tom
[gdb/testsuite] Require gnatmake 8 for gdb.ada/rename_subscript_param.exp
gdb/testsuite/ChangeLog:
2019-08-29 Tom de Vries <tdevries@suse.de>
PR teststuite/24599
* gdb.ada/rename_subscript_param.exp: Require gnatmake 8.
* lib/ada.exp (gnatmake_version_at_least): New proc.
---
gdb/testsuite/gdb.ada/rename_subscript_param.exp | 4 ++++
gdb/testsuite/lib/ada.exp | 19 +++++++++++++++++++
2 files changed, 23 insertions(+)
diff --git a/gdb/testsuite/gdb.ada/rename_subscript_param.exp b/gdb/testsuite/gdb.ada/rename_subscript_param.exp
index ffcfa50df3..fd8208825a 100644
--- a/gdb/testsuite/gdb.ada/rename_subscript_param.exp
+++ b/gdb/testsuite/gdb.ada/rename_subscript_param.exp
@@ -15,6 +15,10 @@
load_lib "ada.exp"
+if { ![gnatmake_version_at_least 8] } {
+ return -1
+}
+
standard_ada_testfile pb30_012
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
diff --git a/gdb/testsuite/lib/ada.exp b/gdb/testsuite/lib/ada.exp
index 1345c747c5..95f0f525b1 100644
--- a/gdb/testsuite/lib/ada.exp
+++ b/gdb/testsuite/lib/ada.exp
@@ -105,3 +105,22 @@ proc find_ada_tool {tool} {
return $result
}
+
+# Return 1 if gnatmake is at least version $MAJOR.x.x
+
+proc gnatmake_version_at_least { major } {
+ set gnatmake [gdb_find_gnatmake]
+ set gnatmake [lindex [split $gnatmake] 0]
+ set output [exec $gnatmake --version]
+ if { [regexp {GNATMAKE ([^ .]+).([^ .]+).([^ .]+)} $output \
+ match gnatmake_major gnatmake_minor gnatmake_micro] } {
+ if { $gnatmake_major >= $major } {
+ return 1
+ } else {
+ return 0
+ }
+ }
+
+ # Unknown, return 1
+ return 1
+}
next reply other threads:[~2019-08-29 14:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-29 14:38 Tom de Vries [this message]
2019-09-13 18:09 ` [PING][PATCH][gdb/testsuite] " Tom de Vries
2019-09-13 20:32 ` Andrew Burgess
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=20190829143754.GA18195@delia \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
--cc=philippe.waroquiers@skynet.be \
--cc=tom@tromey.com \
/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