This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfa/testsuite] Fix completion.exp on relative srcdir path


On Thu, Jan 10, 2002 at 09:43:34PM -0500, Jim Blandy wrote:
> 
> Daniel Jacobowitz <drow@mvista.com> 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  <drow@mvista.com>

        * 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]