From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30933 invoked by alias); 29 Nov 2004 14:06:55 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 30754 invoked from network); 29 Nov 2004 14:06:44 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 29 Nov 2004 14:06:44 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1CYmAq-0007mz-1i; Mon, 29 Nov 2004 09:06:40 -0500 Date: Mon, 29 Nov 2004 14:12:00 -0000 From: Daniel Jacobowitz To: Randolph Chung Cc: gdb@sources.redhat.com Subject: Re: canonicalization of path names in test scripts Message-ID: <20041129140640.GA29859@nevyn.them.org> Mail-Followup-To: Randolph Chung , gdb@sources.redhat.com References: <20041123193249.GO9148@tausq.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041123193249.GO9148@tausq.org> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-11/txt/msg00251.txt.bz2 On Tue, Nov 23, 2004 at 11:32:50AM -0800, Randolph Chung wrote: > I'm seeing some FAILs with the testsuite because of different ways to > expanding srcdir between the testsuite and gdb. > > for example, in gdb.mi/mi-basics.exp, > > set envirodir [string_to_regexp ${srcdir}/${subdir}] > > mi_gdb_test "202-environment-directory ${srcdir}/${subdir}" \ > "\\\^done,source-path=\"${envirodir}.\\\$cdir.\\\$cwd\"" \ > "environment-directory arg operation" > > envirodir expands to "\.\./\.\./\.\./gdb-cvs/gdb/testsuite/gdb\.mi.\$cdir.\$cwd" > > what gdb actually prints is: > ^done,source-path="/home/tausq/gdb/build-cvs/gdb/testsuite/../../../gdb-cvs/gdb/testsuite/gdb.mi:$cdir:$cwd" > > (i am running the test from /home/tausq/gdb/build-cvs/gdb/testsuite) > > what is the best way to fix this? we can of course loosen the match to > ".*${envirodir}", but that seems rather suboptimal. I've been working around it by configuring using an absolute path :-) Alternatively, you could detect this case in the test script. If the first character of srcdir is not a directory separator, add `pwd`? -- Daniel Jacobowitz