This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: DejaGnu PATCH to lib/dg.exp: enhance support for "exotic" dir-names
- To: Fernando Nasser <fnasser at redhat dot com>
- Subject: Re: DejaGnu PATCH to lib/dg.exp: enhance support for "exotic" dir-names
- From: Gabriel Dos Reis <gdr at codesourcery dot com>
- Date: 25 Jan 2001 04:43:45 +0100
- Cc: Benjamin Kosnik <bkoz at redhat dot com>, Gabriel Dos Reis <gdr at codesourcery dot com>, gdb-patches at sources dot redhat dot com
- Organization: CodeSourcery, LLC
- References: <Pine.SOL.3.91.1010124100126.24948A-100000@cse.cygnus.com> <3A6F94B4.DD958028@redhat.com>
Fernando Nasser <fnasser@redhat.com> writes:
| Thanks to Jim Wilson who took the time to check Benjamin's patch for us
| (yes, including the GDB testsuite) we can now check this in.
|
| I am not sure if SID folks did look at it, but this patch looks safe
| enough to
| be checked in without more ado.
|
| I will be checking it in momentarily.
Thanks a lot for your cooperation. Now we can expect to make progress
on the V3 testuite framework side.
I would like to make sure it is this version of the patch below
(essentially identical to the one I originally submitted except that it
does not contain the '*' character) which is being dealt with.
Thanks!
-- Gaby
CodeSourcery, LLC http://www.codesourcery.com
2001-01-18 Gabriel Dos Reis <gdr@codesourcery.com>
* lib/dg.exp (dg-trim-dirname): New function.
(dg-test): Use it to rip directory-name out of file name.
Index: lib/dg.exp
===================================================================
RCS file: /cvs/src/src/dejagnu/lib/dg.exp,v
retrieving revision 1.1.1.1
diff -p -r1.1.1.1 dg.exp
*** dg.exp 1999/11/09 01:28:42 1.1.1.1
--- dg.exp 2001/01/23 04:10:15
*************** proc dg-runtest { testcases flags defaul
*** 586,591 ****
--- 586,604 ----
}
}
+ # dg-trim-dirname -- rip DIR_NAME out of FILE_NAME
+ #
+ # Syntax: dg-trim-dirname dir_name file_name
+ # We need to go through this contorsion in order to properly support
+ # directory-names which might have embedded regexp special characters.
+
+ proc dg-trim-dirname { dir_name file_name } {
+ set special_character "\[\?\+\-\.\(\)\$\|\]"
+ regsub -all $special_character $dir_name "\\\\&" dir_name
+ regsub "^$dir_name/?" $file_name "" file_name
+ return $file_name
+ }
+
# dg-test -- runs a new style DejaGnu test
#
# Syntax: dg-test [-keep-output] prog tool_flags default_extra_tool_flags
*************** proc dg-test { args } {
*** 631,637 ****
set text "\[- A-Za-z0-9\.\;\"\_\:\'\`\(\)\!\#\=\+\?\&\*]*"
! regsub "^$srcdir/?" $prog "" name
# If we couldn't rip $srcdir out of `prog' then just do the best we can.
# The point is to reduce the unnecessary noise in the logs. Don't strip
# out too much because different testcases with the same name can confuse
--- 644,650 ----
set text "\[- A-Za-z0-9\.\;\"\_\:\'\`\(\)\!\#\=\+\?\&\*]*"
! set name [dg-trim-dirname $srcdir $prog]
# If we couldn't rip $srcdir out of `prog' then just do the best we can.
# The point is to reduce the unnecessary noise in the logs. Don't strip
# out too much because different testcases with the same name can confuse