Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] dejagnu runtest.exp misc. fixes
@ 2000-07-31 17:00 Jimmy Guo
  0 siblings, 0 replies; 3+ messages in thread
From: Jimmy Guo @ 2000-07-31 17:00 UTC (permalink / raw)
  To: gdb-patches

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
  			}


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2000-08-02 15:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <3986F310.1498E68B@cygnus.com>
2000-08-01  9:57 ` [PATCH] dejagnu runtest.exp misc. fixes Jimmy Guo
2000-08-02 15:35   ` Jimmy Guo
2000-07-31 17:00 Jimmy Guo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox