Fossil SCM

Support a -verbose argument to the test suite.

mistachkin 2014-06-19 21:26 trunk
Commit e02795056d3d01b7a3daf6f70f429eaeb057ce27
1 file changed +13 -1
+13 -1
--- test/tester.tcl
+++ test/tester.tcl
@@ -41,10 +41,18 @@
4141
set PROT 1
4242
set argv [lreplace $argv $i $i]
4343
} else {
4444
set PROT 0
4545
}
46
+
47
+set i [lsearch $argv -verbose]
48
+if {$i>=0} {
49
+ set VERBOSE 1
50
+ set argv [lreplace $argv $i $i]
51
+} else {
52
+ set VERBOSE 0
53
+}
4654
4755
if {[llength $argv]==0} {
4856
foreach f [lsort [glob $testdir/*.test]] {
4957
set base [file root [file tail $f]]
5058
lappend argv $base
@@ -93,11 +101,15 @@
93101
94102
flush stdout
95103
set rc [catch {eval exec $cmd} result]
96104
global RESULT CODE
97105
set CODE $rc
98
- if {$rc} {protOut "ERROR: $result"}
106
+ if {$rc} {
107
+ protOut "ERROR: $result"
108
+ } elseif {$::VERBOSE} {
109
+ protOut "RESULT: $result"
110
+ }
99111
set RESULT $result
100112
}
101113
102114
# Read a file into memory.
103115
#
104116
--- test/tester.tcl
+++ test/tester.tcl
@@ -41,10 +41,18 @@
41 set PROT 1
42 set argv [lreplace $argv $i $i]
43 } else {
44 set PROT 0
45 }
 
 
 
 
 
 
 
 
46
47 if {[llength $argv]==0} {
48 foreach f [lsort [glob $testdir/*.test]] {
49 set base [file root [file tail $f]]
50 lappend argv $base
@@ -93,11 +101,15 @@
93
94 flush stdout
95 set rc [catch {eval exec $cmd} result]
96 global RESULT CODE
97 set CODE $rc
98 if {$rc} {protOut "ERROR: $result"}
 
 
 
 
99 set RESULT $result
100 }
101
102 # Read a file into memory.
103 #
104
--- test/tester.tcl
+++ test/tester.tcl
@@ -41,10 +41,18 @@
41 set PROT 1
42 set argv [lreplace $argv $i $i]
43 } else {
44 set PROT 0
45 }
46
47 set i [lsearch $argv -verbose]
48 if {$i>=0} {
49 set VERBOSE 1
50 set argv [lreplace $argv $i $i]
51 } else {
52 set VERBOSE 0
53 }
54
55 if {[llength $argv]==0} {
56 foreach f [lsort [glob $testdir/*.test]] {
57 set base [file root [file tail $f]]
58 lappend argv $base
@@ -93,11 +101,15 @@
101
102 flush stdout
103 set rc [catch {eval exec $cmd} result]
104 global RESULT CODE
105 set CODE $rc
106 if {$rc} {
107 protOut "ERROR: $result"
108 } elseif {$::VERBOSE} {
109 protOut "RESULT: $result"
110 }
111 set RESULT $result
112 }
113
114 # Read a file into memory.
115 #
116

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button