Changeset 2055
- Timestamp:
- Jan 19, 2011, 7:49:28 PM (14 years ago)
- Location:
- trunk/tester
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tester/test.tcl
r2053 r2055 115 115 # USAGE: getInputs 116 116 # 117 # TODO 117 # Returns a list of key value pairs for all inputs given in the test xml. 118 # Each key is the path to the input element, and each key is its current 119 # value. 118 120 # ----------------------------------------------------------------------- 119 121 itcl::body Rappture::Tester::Test::getInputs {{path input}} { … … 149 151 # USAGE: getOutputs 150 152 # 151 # TODO 153 # Returns a list of key value pairs for all outputs in the runfile 154 # generated by the last run of the test. Each key is the path to the 155 # element, and each value is its status (ok, diff, added, or missing). 156 # Throws an error if the test has not been ran. 152 157 # ---------------------------------------------------------------------- 153 158 itcl::body Rappture::Tester::Test::getOutputs {{path output}} { … … 158 163 foreach child [$_runobj children $path] { 159 164 set fullpath $path.$child 160 if {$fullpath != "output.time" && $fullpath != "output.user" && $fullpath != "output.status"} { 165 if {$fullpath != "output.time" && $fullpath != "output.user" \ 166 && $fullpath != "output.status"} { 161 167 if {[lsearch $fullpath [getDiffs]] != -1} { 162 168 set status diff 163 169 } elseif {[lsearch $fullpath [getAdded]] != -1} { 164 170 set status added 165 #} elseif {[lsearch $fullpath [getMissing]] != -1} {166 # set status missing167 171 } else { 168 172 if {[$_runobj get $fullpath] != ""} { -
trunk/tester/testtree.tcl
r2053 r2055 38 38 39 39 constructor {args} { #defined later } 40 destructor { #defined later } 40 41 41 42 public method getTest {args} … … 117 118 } 118 119 119 # TODO: destructor 120 121 # ---------------------------------------------------------------------- 122 # Repopulate tree if test directory or toolxml have been changed. 120 # ---------------------------------------------------------------------- 121 # DESTRUCTOR 122 # ---------------------------------------------------------------------- 123 itcl::body Rappture::Tester::TestTree::destructor {} { 124 foreach id [getLeaves] { 125 itcl::delete object [getTest $id] 126 } 127 } 128 129 # ---------------------------------------------------------------------- 130 # CONFIGURATION OPTION: -testdir 131 # 132 # Location of the directory containing a set of test xml files. 133 # Repopulate the tree if -testdir option is changed, but only if 134 # -toolxml has already been defined. 123 135 # ---------------------------------------------------------------------- 124 136 itcl::configbody Rappture::Tester::TestTree::testdir { … … 128 140 } 129 141 142 # ---------------------------------------------------------------------- 143 # CONFIGURATION OPTION: -toolxml 144 # 145 # Location of the tool.xml for the tool being tested. Repopulate the 146 # tree if -toolxml is changed, but only if -testdir has already been 147 # defined. 130 148 itcl::configbody Rappture::Tester::TestTree::toolxml { 131 149 if {$itk_option(-testdir) != ""} { … … 135 153 136 154 # ---------------------------------------------------------------------- 155 # CONFIGURATION OPTION: -selectcommand 156 # 137 157 # Forward the TestTree's selectcommand to the treeview, but tack on the 138 158 # updateLabel method to keep the label refreshed when selection is … … 256 276 # ---------------------------------------------------------------------- 257 277 itcl::body Rappture::Tester::TestTree::populate {} { 258 # TODO: Delete existing test objects 278 foreach id [getLeaves] { 279 itcl::delete object [getTest $id] 280 } 259 281 $itk_component(treeview) delete 0 260 282 # TODO: add an appropriate icon -
trunk/tester/testview.tcl
r2054 r2055 4 4 # Entire right hand side of the regression tester. Displays the 5 5 # golden test results, and compares them to the new results if the test 6 # has been ran. The -test configuration option is used to provide a 7 # Test object to display. 6 # has been ran. Also show tree representation of all inputs and 7 # outputs. The -test configuration option is used to provide a Test 8 # object to display. 8 9 # ====================================================================== 9 10 # AUTHOR: Ben Rafferty, Purdue University … … 122 123 123 124 # ---------------------------------------------------------------------- 125 # CONFIGURATION OPTION: -test 126 # 124 127 # When the -test configuration option is modified, update the display 125 128 # accordingly. The data passed in should be a Test object, or an empty … … 202 205 # ---------------------------------------------------------------------- 203 206 # USAGE: updateResults 207 208 # Used internally to update the results tab according to the test 209 # currently specified by the -test configuration option. Show the 210 # golden results contained in the test xml, and if the the test has been 211 # ran, show the new results as well. 204 212 # ---------------------------------------------------------------------- 205 213 itcl::body Rappture::Tester::TestView::updateResults {} { … … 218 226 } 219 227 228 # ---------------------------------------------------------------------- 229 # USAGE: updateInputs 230 # 231 # Used internally to update the inputs tab according to the test 232 # currently specified by the -test configuration option. Shows a tree 233 # representation of all inputs given in the test xml and their given 234 # values. 235 # ---------------------------------------------------------------------- 220 236 itcl::body Rappture::Tester::TestView::updateInputs {} { 221 237 $itk_component(inputs) delete 0 … … 230 246 } 231 247 248 # ---------------------------------------------------------------------- 249 # USAGE: updateOutputs 250 # 251 # Used internally to update the outputs tab according to the test 252 # currently specified by the -test configuration option. Shows a tree 253 # representation of all outputs in the runfile generated by the last run 254 # of the test, along with their status (ok, diff, added, or missing). 255 # Disable the outputs tab if test has not been ran, or resulted in an 256 # error. 257 # ---------------------------------------------------------------------- 232 258 itcl::body Rappture::Tester::TestView::updateOutputs {} { 233 259 $itk_component(outputs) delete 0
Note: See TracChangeset
for help on using the changeset viewer.