This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFA] dejagnu runtest.exp redundant testing
- To: Fernando Nasser <fnasser at cygnus dot com>
- Subject: [RFA] dejagnu runtest.exp redundant testing
- From: Jimmy Guo <guo at cup dot hp dot com>
- Date: Mon, 7 Aug 2000 11:34:27 -0700 (PDT)
- Cc: Geoff Keating <geoffk at cygnus dot com>,gdb-patches at sourceware dot cygnus dot com
Here is the runtest.exp patch which fixes the redundant testing problem
without violating the assumption that any *.exp file under a ${tool}*
directory tree is a valid test file.
Geoff, please try it against GCC testing to see if I break something
this time. Thanks!
- Jimmy
2000-08-07 Jimmy Guo <guo@cup.hp.com>
* runtest.exp: Eliminate from test_top_dirs entries that
cause redundant testing. Entries picked up because of their
${tool} prefix under the real top dir with the ${tool} prefix
have been making dejagnu run tests under these entries twice,
since dejagnu treats all *.exp files under a given directory
tree as test files.
*** runtest.exp.orig Mon Aug 7 11:01:57 2000
--- runtest.exp Mon Aug 7 11:21:57 2000
***************
*** 1664,1669 ****
--- 1664,1689 ----
set test_top_dirs [lsort [getdirs -all ${srcdir} "${tool}*"]]
if { ${test_top_dirs} == "" } {
set test_top_dirs ${srcdir}
+ } else {
+ # JYG: For test tree layouts with ${tool} prefix on
+ # both a parent and a child directory, 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.
+ set temp_top_dirs ""
+ foreach dir "${test_top_dirs}" {
+ if [regexp "${srcdir}/.*${tool}.*/.*${tool}" ${dir}] {
+ # skip this directory.
+ continue
+ } else {
+ lappend temp_top_dirs ${dir}
+ }
+ }
+ set test_top_dirs ${temp_top_dirs}
}
verbose "Top level testsuite dirs are ${test_top_dirs}" 2
set testlist "";