* [rfa/testsuite] Fix completion.exp on relative srcdir path
@ 2002-01-09 17:39 Daniel Jacobowitz
2002-01-10 18:42 ` Jim Blandy
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Jacobowitz @ 2002-01-09 17:39 UTC (permalink / raw)
To: gdb-patches
I always configure with relative paths - srcdir = ../../../src/gdb/testsuite
or so. That caused a bogus failure. Is this patch OK?
--
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 {
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [rfa/testsuite] Fix completion.exp on relative srcdir path
2002-01-09 17:39 [rfa/testsuite] Fix completion.exp on relative srcdir path Daniel Jacobowitz
@ 2002-01-10 18:42 ` Jim Blandy
2002-01-10 18:49 ` Daniel Jacobowitz
2002-01-13 14:13 ` Daniel Jacobowitz
0 siblings, 2 replies; 4+ messages in thread
From: Jim Blandy @ 2002-01-10 18:42 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches
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 {
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [rfa/testsuite] Fix completion.exp on relative srcdir path
2002-01-10 18:42 ` Jim Blandy
@ 2002-01-10 18:49 ` Daniel Jacobowitz
2002-01-13 14:13 ` Daniel Jacobowitz
1 sibling, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2002-01-10 18:49 UTC (permalink / raw)
To: Jim Blandy; +Cc: gdb-patches
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.
${srcdir} is a relative path - it starts with a '.'. Objdir is known
(IIRC) to be an absolute path. I'm reasonably sure that pwd will
always be objdir at this point, but not certain. It might still work
if I remove that line, though. I'll check.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [rfa/testsuite] Fix completion.exp on relative srcdir path
2002-01-10 18:42 ` Jim Blandy
2002-01-10 18:49 ` Daniel Jacobowitz
@ 2002-01-13 14:13 ` Daniel Jacobowitz
1 sibling, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2002-01-13 14:13 UTC (permalink / raw)
To: gdb-patches
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-01-13 22:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-09 17:39 [rfa/testsuite] Fix completion.exp on relative srcdir path Daniel Jacobowitz
2002-01-10 18:42 ` Jim Blandy
2002-01-10 18:49 ` Daniel Jacobowitz
2002-01-13 14:13 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox