|
| |
|
1 |
# -*- Tcl -*- |
|
| |
|
2 |
# |
|
| |
|
3 |
# This script computes the regression test summary displayed at the |
|
| |
|
4 |
# end of the regression test. It aggreates the content of the test log |
|
| |
|
5 |
# provided via arg "-testlog". |
|
| |
1 |
6 |
|
|
| |
2 |
7 |
array set opt $::argv |
|
| |
|
8 |
|
|
| |
3 |
9 |
if {[info exists opt(-testlog)]} { |
|
| |
4 |
10 |
set f [open $opt(-testlog)]; set content [read $f]; close $f |
|
| |
5 |
|
lassign {0 0 0 0} tests success failures files |
|
| |
|
11 |
lassign {0 0 0 0 0.0} tests success failures files time |
|
| |
6 |
12 |
foreach l [split $content \n] { |
|
| |
7 |
13 |
array set "" $l |
|
| |
8 |
14 |
if {[info exists (tests)]} { |
|
| |
9 |
15 |
incr tests $(tests) |
|
| |
10 |
16 |
incr failures $(failure) |
|
| |
11 |
17 |
incr success $(success) |
|
| |
12 |
18 |
incr files 1 |
|
| |
|
19 |
set time [expr {$time + $(time)}] |
|
| |
13 |
20 |
} |
|
| |
14 |
21 |
} |
|
| |
|
22 |
|
|
| |
15 |
23 |
puts "\nRegression Test Summary:" |
|
| |
16 |
24 |
puts "\tEnvironment: Tcl $tcl_patchLevel, OS $tcl_platform(os) $tcl_platform(osVersion)\ |
|
| |
17 |
25 |
machine $tcl_platform(machine) threaded $tcl_platform(threaded)." |
|
| |
18 |
|
puts "\tNSF performed $tests tests in $files files, success $success, failures $failures." |
|
| |
|
26 |
puts "\tNSF performed $tests tests in $files files, success $success, failures $failures in time [expr {$time / 1000.0}] seconds" |
|
| |
19 |
27 |
if {$failures == 0} { |
|
| |
20 |
28 |
puts "\tCongratulations, NSF [package require nsf], NX [package require nx], and\ |
|
| |
21 |
29 |
XOTcl [package require XOTcl 2] work fine in your environment." |