This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfa/testsuite] Fix completion.exp on relative srcdir path
- From: Jim Blandy <jimb at zwingli dot cygnus dot com>
- To: Daniel Jacobowitz <drow at mvista dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: 10 Jan 2002 21:43:34 -0500
- Subject: Re: [rfa/testsuite] Fix completion.exp on relative srcdir path
- References: <20020109204006.A21094@nevyn.them.org>
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.
>
> --
> Daniel Jacobowitz Carnegie Mellon University
> MontaVista Software Debian GNU/Linux Developer
>
> 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/10 01:37:15
> @@ -656,8 +656,13 @@ gdb_expect {
> timeout { fail "(timeout) complete 'file ./Make'" }
> }
>
> +set mydir [pwd]
> +cd ${objdir}
> +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 {
>