- Timestamp:
- Feb 7, 2011, 6:13:01 PM (14 years ago)
- Location:
- trunk/tester
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tester/example/fermi_broken.tcl
r2084 r2087 30 30 31 31 # take a while and give some output along the way 32 Rappture::Utils::progress 0 -mesg "Starting..." 32 33 puts "Taking a while to run..." 33 after 200034 after 1000 34 35 puts "making some progress" 35 after 200036 after 1000 36 37 puts "done" 38 Rappture::Utils::progress 10 -mesg "Starting, for real now." 39 after 1000 37 40 38 41 # Label output graph with title, x-axis label, -
trunk/tester/scripts/main.tcl
r2086 r2087 171 171 pack $win.testrun.title -side top -anchor w 172 172 173 Rappture::Progress $win.testrun.progress 173 174 button $win.testrun.abort -text "Abort" 174 175 pack $win.testrun.abort -side bottom -pady {8 0} … … 346 347 # plug this object into the "Abort" button 347 348 $testrun.abort configure -command [list $testobj abort] 349 350 # hide progress bar 351 pack forget $testrun.progress 348 352 } 349 353 add { 354 set message [lindex $args 0] 355 # scan for progress updates 356 while {[regexp -indices \ 357 {=RAPPTURE-PROGRESS=> *([-+]?[0-9]+) +([^\n]*)(\n|$)} $message \ 358 match percent mesg]} { 359 360 foreach {i0 i1} $percent break 361 set percent [string range $message $i0 $i1] 362 363 foreach {i0 i1} $mesg break 364 set mesg [string range $message $i0 $i1] 365 366 pack $testrun.progress -fill x -padx 10 -pady 10 367 $testrun.progress settings -percent $percent -message $mesg 368 369 foreach {i0 i1} $match break 370 set message [string replace $message $i0 $i1] 371 } 372 350 373 $testrun.scrl.info configure -state normal 351 $testrun.scrl.info insert end [lindex $args 0]374 $testrun.scrl.info insert end $message 352 375 353 376 # if there are too many lines, delete some
Note: See TracChangeset
for help on using the changeset viewer.