From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 75329 invoked by alias); 7 Feb 2016 07:10:03 -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 75303 invoked by uid 89); 7 Feb 2016 07:10:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.1 required=5.0 tests=AWL,BAYES_20,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 spammy=fun_addr.exp, UD:fun_addr.exp, fun_addrexp, tcl X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Sun, 07 Feb 2016 07:10:01 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id AD94011671D; Sun, 7 Feb 2016 02:09:59 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 3BsmCdWg18WG; Sun, 7 Feb 2016 02:09:59 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 3EDC31166F2; Sun, 7 Feb 2016 02:09:59 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 1AA1C406C6; Sun, 7 Feb 2016 11:09:55 +0400 (RET) Date: Sun, 07 Feb 2016 07:10:00 -0000 From: Joel Brobecker To: Simon Marchi Cc: Pedro Alves , gdb-patches@sourceware.org Subject: Re: [PATCH] Always organize test artifacts in a directory hierarchy Message-ID: <20160207070955.GC15342@adacore.com> References: <1452268308-23845-1-git-send-email-simon.marchi@ericsson.com> <5694F8D2.5090807@redhat.com> <56952A6C.8070507@ericsson.com> <569630EC.2000702@redhat.com> <20160117063144.GB4059@adacore.com> <56A6926F.6040503@ericsson.com> <56AFDF1F.1040702@ericsson.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56AFDF1F.1040702@ericsson.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2016-02/txt/msg00172.txt.bz2 > > However, when building in-tree, srcdir is relative: ./gdb.ada/fun_addr. > > When using parallel or always-in-outputs-directory mode, we are cd'ed in > > the outputs directory. So -I$srcdir is relative to the current > > directory, which is wrong. > > > > To fix it, I made the TCL variable srcdir (set in site.exp, from which > > everything else is derived) always absolute. It is done by assigning > > autoconf's abs_srcdir instead of autoconf's srcdir. This way -I$srcdir > > will always be good, regardless of where we cd'ed to. A small apparent > > change is that when running tests, DejaGnu will say: > > > > Running /tmp/binutils-gdb/gdb/testsuite/gdb.ada/fun_addr.exp ... > > > > instead of > > > > Running ./gdb.ada/fun_addr.exp ... > > > > I hope it's not too much of an annoyance. I think that it should make > > the testsuite a tiny bit more robust against other bugs of the same > > class. > > > > Regtested in & out of tree, only with native target. > > --- > > gdb/testsuite/Makefile.in | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/gdb/testsuite/Makefile.in b/gdb/testsuite/Makefile.in > > index 7c251d3..38c3052 100644 > > --- a/gdb/testsuite/Makefile.in > > +++ b/gdb/testsuite/Makefile.in > > @@ -21,6 +21,7 @@ srcdir = @srcdir@ > > prefix = @prefix@ > > exec_prefix = @exec_prefix@ > > abs_builddir = @abs_builddir@ > > +abs_srcdir = @abs_srcdir@ > > > > target_alias = @target_noncanonical@ > > program_transform_name = @program_transform_name@ > > @@ -119,7 +120,7 @@ $(abs_builddir)/site.exp site.exp: ./config.status Makefile > > @echo "set target_alias $(target_alias)" >> ./tmp0 > > @echo "set target_triplet ${target_canonical}" >> ./tmp0 > > @echo "set build_triplet ${build_canonical}" >> ./tmp0 > > - @echo "set srcdir ${srcdir}" >> ./tmp0 > > + @echo "set srcdir ${abs_srcdir}" >> ./tmp0 > > @echo "set tool gdb" >> ./tmp0 > > @echo 'source $${srcdir}/lib/append_gdb_boards_dir.exp' >> ./tmp0 > > @echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0 OK for me! -- Joel