canonicalization of path names in test scripts

Randolph Chung randolph@tausq.org
Tue Nov 23 20:41:00 GMT 2004


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/



More information about the Gdb mailing list