* canonicalization of path names in test scripts
@ 2004-11-23 20:41 Randolph Chung
2004-11-29 14:12 ` Daniel Jacobowitz
0 siblings, 1 reply; 2+ messages in thread
From: Randolph Chung @ 2004-11-23 20:41 UTC (permalink / raw)
To: gdb
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.
thoughts?
randolph
--
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: canonicalization of path names in test scripts
2004-11-23 20:41 canonicalization of path names in test scripts Randolph Chung
@ 2004-11-29 14:12 ` Daniel Jacobowitz
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2004-11-29 14:12 UTC (permalink / raw)
To: Randolph Chung; +Cc: gdb
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-11-29 14:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-23 20:41 canonicalization of path names in test scripts Randolph Chung
2004-11-29 14:12 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox