OLD | NEW |
1 | 1 |
2 | 2 |
3 | 3 |
4 proc bc_find_binaries {zCaption} { | 4 proc bc_find_binaries {zCaption} { |
5 # Search for binaries to test against. Any executable files that match | 5 # Search for binaries to test against. Any executable files that match |
6 # our naming convention are assumed to be testfixture binaries to test | 6 # our naming convention are assumed to be testfixture binaries to test |
7 # against. | 7 # against. |
8 # | 8 # |
9 set binaries [list] | 9 set binaries [list] |
10 set pattern "[file tail [info nameofexec]]?*" | 10 set self [file tail [info nameofexec]] |
| 11 set pattern "$self?*" |
11 if {$::tcl_platform(platform)=="windows"} { | 12 if {$::tcl_platform(platform)=="windows"} { |
12 set pattern [string map {\.exe {}} $pattern] | 13 set pattern [string map {\.exe {}} $pattern] |
13 } | 14 } |
14 foreach file [glob -nocomplain $pattern] { | 15 foreach file [glob -nocomplain $pattern] { |
| 16 if {$file==$self} continue |
15 if {[file executable $file] && [file isfile $file]} {lappend binaries $file} | 17 if {[file executable $file] && [file isfile $file]} {lappend binaries $file} |
16 } | 18 } |
17 | 19 |
18 if {[llength $binaries]==0} { | 20 if {[llength $binaries]==0} { |
19 puts "WARNING: No historical binaries to test against." | 21 puts "WARNING: No historical binaries to test against." |
20 puts "WARNING: Omitting backwards-compatibility tests" | 22 puts "WARNING: Omitting backwards-compatibility tests" |
21 } | 23 } |
22 | 24 |
23 foreach bin $binaries { | 25 foreach bin $binaries { |
24 puts -nonewline "Testing against $bin - " | 26 puts -nonewline "Testing against $bin - " |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 catch { code1 { db close } } | 65 catch { code1 { db close } } |
64 catch { code2 { db close } } | 66 catch { code2 { db close } } |
65 catch { close $::bc_chan } | 67 catch { close $::bc_chan } |
66 } | 68 } |
67 | 69 |
68 proc do_all_bc_test {script} { | 70 proc do_all_bc_test {script} { |
69 foreach bin $::BC(binaries) { | 71 foreach bin $::BC(binaries) { |
70 uplevel [list do_bc_test $bin $script] | 72 uplevel [list do_bc_test $bin $script] |
71 } | 73 } |
72 } | 74 } |
OLD | NEW |