| | @@ -21,10 +21,11 @@ |
| 21 | 21 | # |
| 22 | 22 | # Where ../test/tester.tcl is the name of this file and ../bld/fossil |
| 23 | 23 | # is the name of the executable to be tested. |
| 24 | 24 | # |
| 25 | 25 | |
| 26 | +set testrundir [pwd] |
| 26 | 27 | set testdir [file normalize [file dir $argv0]] |
| 27 | 28 | set fossilexe [file normalize [lindex $argv 0]] |
| 28 | 29 | set argv [lrange $argv 1 end] |
| 29 | 30 | |
| 30 | 31 | set i [lsearch $argv -halt] |
| | @@ -59,25 +60,25 @@ |
| 59 | 60 | |
| 60 | 61 | # start protocol |
| 61 | 62 | # |
| 62 | 63 | proc protInit {cmd} { |
| 63 | 64 | if {$::PROT} { |
| 64 | | - set out [open "prot" w] |
| 65 | + set out [open [file join $::testrundir prot] w] |
| 65 | 66 | fconfigure $out -translation platform |
| 66 | | - puts $out "starting tests with:$cmd" |
| 67 | + puts $out "starting tests with: $cmd" |
| 67 | 68 | close $out |
| 68 | 69 | } |
| 69 | 70 | } |
| 70 | 71 | |
| 71 | 72 | # write protocol |
| 72 | 73 | # |
| 73 | 74 | proc protOut {msg} { |
| 74 | | - puts "$msg" |
| 75 | + puts stdout $msg |
| 75 | 76 | if {$::PROT} { |
| 76 | | - set out [open "prot" a] |
| 77 | + set out [open [file join $::testrundir prot] a] |
| 77 | 78 | fconfigure $out -translation platform |
| 78 | | - puts $out "$msg" |
| 79 | + puts $out $msg |
| 79 | 80 | close $out |
| 80 | 81 | } |
| 81 | 82 | } |
| 82 | 83 | |
| 83 | 84 | # Run the fossil program |
| | @@ -92,11 +93,11 @@ |
| 92 | 93 | |
| 93 | 94 | flush stdout |
| 94 | 95 | set rc [catch {eval exec $cmd} result] |
| 95 | 96 | global RESULT CODE |
| 96 | 97 | set CODE $rc |
| 97 | | - if {$rc} {puts "ERROR: $result"} |
| 98 | + if {$rc} {protOut "ERROR: $result"} |
| 98 | 99 | set RESULT $result |
| 99 | 100 | } |
| 100 | 101 | |
| 101 | 102 | # Read a file into memory. |
| 102 | 103 | # |
| 103 | 104 | |