This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] dejagnu runtest.exp misc. fixes
- To: gdb-patches at sourceware dot cygnus dot com
- Subject: [PATCH] dejagnu runtest.exp misc. fixes
- From: Jimmy Guo <guo at cup dot hp dot com>
- Date: Mon, 31 Jul 2000 17:00:13 -0700 (PDT)
Mon Jul 31 16:54:52 Jimmy Guo <guo@cup.hp.com>
* runtest.exp: Handle multiple directories in TCL variables
dir_to_run and cmdline_dir_to_run; limit *.exp find to
one directory level to avoid foo/bar/baz.exp getting tested
twice (when ${dir} is 'foo', and when ${dir} is 'foo/bar').
Index: runtest.exp
/usr/local/bin/diff -c -L runtest.exp runtest.exp@@/main/cygnus/6 runtest.exp
*** runtest.exp
--- runtest.exp Mon Jul 31 16:54:33 2000
***************
*** 1734,1740 ****
# value (for example in MULTIPASS) and the test
# directory matches that directory.
if {[info exists dir_to_run] && $dir_to_run != ""} {
! if ![string match "*${dir_to_run}*" $dir] {
continue
}
}
--- 1734,1747 ----
# value (for example in MULTIPASS) and the test
# directory matches that directory.
if {[info exists dir_to_run] && $dir_to_run != ""} {
! set found 0
! foreach directory $dir_to_run {
! if [string match "*${directory}*" $dir] {
! set found 1
! break
! }
! }
! if {!$found} {
continue
}
}
***************
*** 1744,1755 ****
# directory matches that directory
if {[info exists cmdline_dir_to_run] \
&& $cmdline_dir_to_run != ""} {
! if ![string match "*${cmdline_dir_to_run}*" $dir] {
continue
}
}
! foreach test_name [lsort [find ${dir} *.exp]] {
if { ${test_name} == "" } {
continue
}
--- 1751,1772 ----
# directory matches that directory
if {[info exists cmdline_dir_to_run] \
&& $cmdline_dir_to_run != ""} {
! set found 0
! foreach directory $cmdline_dir_to_run {
! if [string match "*${directory}*" $dir] {
! set found 1
! break
! }
! }
! if {!$found} {
continue
}
}
! # JYG: Limit find to one level, since we don't want
! # to pick up foo/bar/baz.exp twice ...
! # ${test_top_dirs} includes '... foo/ foo/bar/ ...'
! foreach test_name [lsort [find -maxdepth 1 ${dir} *.exp]] {
if { ${test_name} == "" } {
continue
}