From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12173 invoked by alias); 13 Jan 2002 22:13:59 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 12134 invoked from network); 13 Jan 2002 22:13:57 -0000 Received: from unknown (HELO nevyn.them.org) (128.2.145.6) by sources.redhat.com with SMTP; 13 Jan 2002 22:13:57 -0000 Received: from drow by nevyn.them.org with local (Exim 3.33 #1 (Debian)) id 16Pst3-0000oB-00 for ; Sun, 13 Jan 2002 17:13:57 -0500 Date: Sun, 13 Jan 2002 14:13:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Subject: Re: [rfa/testsuite] Fix completion.exp on relative srcdir path Message-ID: <20020113171357.A2823@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com References: <20020109204006.A21094@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.23i X-SW-Source: 2002-01/txt/msg00365.txt.bz2 On Thu, Jan 10, 2002 at 09:43:34PM -0500, Jim Blandy wrote: > > Daniel Jacobowitz writes: > > I always configure with relative paths - srcdir = ../../../src/gdb/testsuite > > or so. That caused a bogus failure. Is this patch OK? > > What's behind the `cd ${objdir}' there that you're not doing anything > with? Is the patch incomplete, or does it need to be cleaned up? > > If you address that, and add a comment explaining why what you're > doing is necessary, then this patch looks good. OK. Here's what I checked in; the cd turned out to be unnecessary. 2002-01-09 Daniel Jacobowitz * gdb.base/completion.exp: Expand ${srcdir} to an absolute path. Index: completion.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.base/completion.exp,v retrieving revision 1.10 diff -u -p -r1.10 completion.exp --- completion.exp 2001/12/17 22:58:42 1.10 +++ completion.exp 2002/01/13 22:10:58 @@ -656,8 +656,14 @@ gdb_expect { timeout { fail "(timeout) complete 'file ./Make'" } } +# ${srcdir} may be a relative path. We want to make sure we end up +# in the right directory - so make sure we know where it is. +set mydir [pwd] +cd ${srcdir} +set fullsrcdir [pwd] +cd ${mydir} -gdb_test "cd ${srcdir}" "Working directory ${srcdir}.*" "cd to \${srcdir}" +gdb_test "cd ${fullsrcdir}" "Working directory ${fullsrcdir}.*" "cd to \${srcdir}" send_gdb "file ./gdb.base/compl\t" sleep 1 gdb_expect { -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer