From: Jimmy Guo <guo@cup.hp.com>
To: gdb-patches@sourceware.cygnus.com
Subject: Re: [RFA] new patch: dejagnu runtest.exp redundant testing
Date: Mon, 14 Aug 2000 11:09:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.10.10008141103570.23765-100000@hpcll168.cup.hp.com> (raw)
In-Reply-To: <Pine.LNX.4.10.10008111927060.780-100000@hpcll168.cup.hp.com>
I've committed this patch, with a slight modification to match for
"${prev_dir}/" instead of ${prev_dir} in ${dir}, i.e.
...
if { [string first "${prev_dir}/" ${dir}] == -1} {
...
This change is necessary to guard against the cases where you have
<tool>.a and <tool>.aa test_top_dirs entries ... although not seen in
GDB / GCC / G++ testsuite trees. Again, tested w/ GDB / GCC / G++
testsuites with no regression.
- Jimmy
On Fri, 11 Aug 2000, Jimmy Guo wrote:
>This patch passes gdb and gcc / g++ testing. I've also added more
>inline comments as compared to the one that's withdrawn.
>
>- Jimmy
>
>2000-08-11 Jimmy Guo <guo@cup.hp.com>
>
> * runtest.exp: Eliminate from test_top_dirs entries that
> are subdirectories of other entries, to avoid redundant
> testing on *.exp files in these subdirectories.
>
>Index: runtest.exp
>===================================================================
>RCS file: /cvs/src/src/dejagnu/runtest.exp,v
>retrieving revision 1.4
>diff -c -r1.4 runtest.exp
>*** runtest.exp 2000/08/05 06:34:02 1.4
>--- runtest.exp 2000/08/12 02:24:11
>***************
>*** 1664,1669 ****
>--- 1664,1712 ----
> set test_top_dirs [lsort [getdirs -all ${srcdir} "${tool}*"]]
> if { ${test_top_dirs} == "" } {
> set test_top_dirs ${srcdir}
>+ } else {
>+ # JYG:
>+ # DejaGNU's notion of test tree and test files is very
>+ # general:
>+ # given ${srcdir} and ${tool}, any subdirectory (at any
>+ # level deep) with the "${tool}" prefix starts a test tree;
>+ # given a test tree, any *.exp file underneath (at any
>+ # level deep) is a test file.
>+ #
>+ # For test tree layouts with ${tool} prefix on
>+ # both a parent and a child directory, we need to eliminate
>+ # the child directory entry from test_top_dirs list.
>+ # e.g. gdb.hp/gdb.base-hp/ would result in two entries
>+ # in the list: gdb.hp, gdb.hp/gdb.base-hp.
>+ # If the latter not eliminated, test files under
>+ # gdb.hp/gdb.base-hp would be run twice (since test files
>+ # are gathered from all sub-directories underneath a
>+ # directory).
>+ #
>+ # Since ${tool} may be g++, etc. which could confuse
>+ # regexp, we cannot do the simpler test:
>+ # ...
>+ # if [regexp "${srcdir}/.*${tool}.*/.*${tool}.*" ${dir}]
>+ # ...
>+ # instead, we rely on the fact that test_top_dirs is
>+ # a sorted list of entries, and any entry that contains
>+ # the previous valid test top dir entry in its own pathname
>+ # must be excluded.
>+
>+ set temp_top_dirs ""
>+ set prev_dir ""
>+ foreach dir "${test_top_dirs}" {
>+ if { [string length ${prev_dir}] == 0 ||
>+ [string first ${prev_dir} ${dir}] == -1} {
>+ # the first top dir entry, or an entry that
>+ # does not share the previous entry's entire
>+ # pathname, record it as a valid top dir entry.
>+ #
>+ lappend temp_top_dirs ${dir}
>+ set prev_dir ${dir}
>+ }
>+ }
>+ set test_top_dirs ${temp_top_dirs}
> }
> verbose "Top level testsuite dirs are ${test_top_dirs}" 2
> set testlist "";
>
>
prev parent reply other threads:[~2000-08-14 11:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-08-11 19:29 Jimmy Guo
2000-08-14 11:09 ` Jimmy Guo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.10.10008141103570.23765-100000@hpcll168.cup.hp.com \
--to=guo@cup.hp.com \
--cc=gdb-patches@sourceware.cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox