From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 45892 invoked by alias); 13 Sep 2019 18:09:01 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 45884 invoked by uid 89); 13 Sep 2019 18:09:01 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.6 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 spammy=UD:rename_subscript_param.exp, sk:rename_, HX-Languages-Length:2448 X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 13 Sep 2019 18:08:59 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id C8DCEAC26; Fri, 13 Sep 2019 18:08:56 +0000 (UTC) Subject: [PING][PATCH][gdb/testsuite] Require gnatmake 8 for gdb.ada/rename_subscript_param.exp From: Tom de Vries To: gdb-patches@sourceware.org Cc: Tom Tromey , Philippe Waroquiers References: <20190829143754.GA18195@delia> Openpgp: preference=signencrypt Message-ID: Date: Fri, 13 Sep 2019 18:09:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190829143754.GA18195@delia> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-09/txt/msg00237.txt.bz2 On 29-08-19 16:37, Tom de Vries wrote: > 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? > Ping. Thanks, - Tom > [gdb/testsuite] Require gnatmake 8 for gdb.ada/rename_subscript_param.exp > > gdb/testsuite/ChangeLog: > > 2019-08-29 Tom de Vries > > 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 > +} >