summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-06-01 12:20:55 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-06-01 12:20:55 (GMT)
commit11730b607dcdeaa7a08c40257078f43219663558 (patch)
tree1bc011dd9b3058544cb1bf2bee03e892e32ebe72
parente92590e87d50f13720f02419f42aca99d7706cc7 (diff)
parent5331fe2426d21535fabda8f3cc23c92c0b98be9a (diff)
downloadtcl-11730b607dcdeaa7a08c40257078f43219663558.zip
tcl-11730b607dcdeaa7a08c40257078f43219663558.tar.gz
tcl-11730b607dcdeaa7a08c40257078f43219663558.tar.bz2
Merge trunk
-rw-r--r--doc/tcltest.n14
-rw-r--r--doc/tell.n2
-rw-r--r--library/tcltest/pkgIndex.tcl2
-rw-r--r--library/tcltest/tcltest.tcl36
-rw-r--r--tools/genStubs.tcl2
-rw-r--r--tools/man2html.tcl2
-rw-r--r--tools/man2html1.tcl2
-rw-r--r--tools/man2html2.tcl2
-rwxr-xr-xtools/tclZIC.tcl2
-rw-r--r--unix/Makefile.in4
-rw-r--r--win/Makefile.in4
11 files changed, 49 insertions, 23 deletions
diff --git a/doc/tcltest.n b/doc/tcltest.n
index cedc763..05c1922 100644
--- a/doc/tcltest.n
+++ b/doc/tcltest.n
@@ -872,8 +872,8 @@ harness are doing.
.
Sets the type of output verbosity desired to \fIlevel\fR,
a list of zero or more of the elements \fBbody\fR, \fBpass\fR,
-\fBskip\fR, \fBstart\fR, \fBerror\fR and \fBline\fR. Default value
-is
+\fBskip\fR, \fBstart\fR, \fBerror\fR, \fBline\fR, \fBmsec\fR and \fBusec\fR.
+Default value is
.QW "\fBbody error\fR" .
Levels are defined as:
.RS
@@ -890,6 +890,16 @@ Print errorInfo and errorCode, if they exist, when a test return code
does not match its expected return code
.IP "line (\fBl\fR)"
Print source file line information of failed tests
+.IP "msec (\fBm\fR)"
+Print each test's execution time in milliseconds
+.IP "usec (\fBu\fR)"
+Print each test's execution time in microseconds
+.PP
+Note that the \fBmsec\fR and \fBusec\fR verbosity levels are provided as
+indicative measures only. They do not tackle the problem of repeatibility which
+should be considered in performance tests or benchmarks. To use these verbosity
+levels to thoroughly track performance degradations, consider wrapping your
+test bodies with \fBtime\fR commands.
.PP
The single letter abbreviations noted above are also recognized
so that
diff --git a/doc/tell.n b/doc/tell.n
index 1da240d..a56e9e3 100644
--- a/doc/tell.n
+++ b/doc/tell.n
@@ -16,7 +16,7 @@ tell \- Return current access position for an open channel
.BE
.SH DESCRIPTION
.PP
-Returns an integer string giving the current access position in
+Returns an integer giving the current access position in
\fIchannelId\fR. This value returned is a byte offset that can be passed to
\fBseek\fR in order to set the channel to a particular position. Note
that this value is in terms of bytes, not characters like \fBread\fR.
diff --git a/library/tcltest/pkgIndex.tcl b/library/tcltest/pkgIndex.tcl
index 0dd28d8..0227a33 100644
--- a/library/tcltest/pkgIndex.tcl
+++ b/library/tcltest/pkgIndex.tcl
@@ -9,4 +9,4 @@
# full path name of this file's directory.
if {![package vsatisfies [package provide Tcl] 8.5-]} {return}
-package ifneeded tcltest 2.3.8 [list source [file join $dir tcltest.tcl]]
+package ifneeded tcltest 2.3.9 [list source [file join $dir tcltest.tcl]]
diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl
index a2821d7..70cca8f 100644
--- a/library/tcltest/tcltest.tcl
+++ b/library/tcltest/tcltest.tcl
@@ -22,7 +22,7 @@ namespace eval tcltest {
# When the version number changes, be sure to update the pkgIndex.tcl file,
# and the install directory in the Makefiles. When the minor version
# changes (new feature) be sure to update the man page as well.
- variable Version 2.3.8
+ variable Version 2.3.9
# Compatibility support for dumb variables defined in tcltest 1
# Do not use these. Call [package provide Tcl] and [info patchlevel]
@@ -611,16 +611,27 @@ namespace eval tcltest {
proc AcceptVerbose { level } {
set level [AcceptList $level]
+ set levelMap {
+ l list
+ p pass
+ b body
+ s skip
+ t start
+ e error
+ l line
+ m msec
+ u usec
+ }
+ set levelRegexp "^([join [dict values $levelMap] |])\$"
if {[llength $level] == 1} {
- if {![regexp {^(pass|body|skip|start|error|line)$} $level]} {
+ if {![regexp $levelRegexp $level]} {
# translate single characters abbreviations to expanded list
- set level [string map {p pass b body s skip t start e error l line} \
- [split $level {}]]
+ set level [string map $levelMap [split $level {}]]
}
}
set valid [list]
foreach v $level {
- if {[regexp {^(pass|body|skip|start|error|line)$} $v]} {
+ if {[regexp $levelRegexp $v]} {
lappend valid $v
}
}
@@ -1972,6 +1983,11 @@ proc tcltest::test {name description args} {
# Only run the test body if the setup was successful
if {!$setupFailure} {
+ # Register startup time
+ if {[IsVerbose msec] || [IsVerbose usec]} {
+ set timeStart [clock microseconds]
+ }
+
# Verbose notification of $body start
if {[IsVerbose start]} {
puts [outputChannel] "---- $name start"
@@ -2076,6 +2092,16 @@ proc tcltest::test {name description args} {
}
}
+ if {[IsVerbose msec] || [IsVerbose usec]} {
+ set t [expr {[clock microseconds] - $timeStart}]
+ if {[IsVerbose usec]} {
+ puts [outputChannel] "++++ $name took $t μs"
+ }
+ if {[IsVerbose msec]} {
+ puts [outputChannel] "++++ $name took [expr {round($t/1000.)}] ms"
+ }
+ }
+
# if we didn't experience any failures, then we passed
variable numTests
if {!($setupFailure || $cleanupFailure || $coreFailure
diff --git a/tools/genStubs.tcl b/tools/genStubs.tcl
index aafa025..9f2c6ca 100644
--- a/tools/genStubs.tcl
+++ b/tools/genStubs.tcl
@@ -10,8 +10,6 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-package require Tcl 8.4-
-
namespace eval genStubs {
# libraryName --
#
diff --git a/tools/man2html.tcl b/tools/man2html.tcl
index 13d6916..2d03ab6 100644
--- a/tools/man2html.tcl
+++ b/tools/man2html.tcl
@@ -2,8 +2,6 @@
# \
exec tclsh "$0" ${1+"$@"}
-package require Tcl 8.4-
-
# man2html.tcl --
#
# This file contains procedures that work in conjunction with the
diff --git a/tools/man2html1.tcl b/tools/man2html1.tcl
index 65ff106..64982ff 100644
--- a/tools/man2html1.tcl
+++ b/tools/man2html1.tcl
@@ -5,8 +5,6 @@
#
# Copyright (c) 1996 by Sun Microsystems, Inc.
-package require Tcl 8.4-
-
# Global variables used by these scripts:
#
# state - state variable that controls action of text proc.
diff --git a/tools/man2html2.tcl b/tools/man2html2.tcl
index 753fde4..e4ccedf 100644
--- a/tools/man2html2.tcl
+++ b/tools/man2html2.tcl
@@ -6,8 +6,6 @@
#
# Copyright (c) 1996 by Sun Microsystems, Inc.
-package require Tcl 8.4-
-
# Global variables used by these scripts:
#
# NAME_file - array indexed by NAME and containing file names used for
diff --git a/tools/tclZIC.tcl b/tools/tclZIC.tcl
index d025d72..85c9ba9 100755
--- a/tools/tclZIC.tcl
+++ b/tools/tclZIC.tcl
@@ -30,8 +30,6 @@
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#----------------------------------------------------------------------
-package require Tcl 8.5-
-
# Define the names of the Olson files that we need to load.
# We avoid the solar time files and the leap seconds.
diff --git a/unix/Makefile.in b/unix/Makefile.in
index 8c7dc90..3c5c26f 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -847,8 +847,8 @@ install-libraries: libraries
done;
@echo "Installing package msgcat 1.6.0 as a Tcl Module";
@$(INSTALL_DATA) $(TOP_DIR)/library/msgcat/msgcat.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl9/9.0/msgcat-1.6.0.tm;
- @echo "Installing package tcltest 2.3.8 as a Tcl Module";
- @$(INSTALL_DATA) $(TOP_DIR)/library/tcltest/tcltest.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl9/9.0/tcltest-2.3.8.tm;
+ @echo "Installing package tcltest 2.3.9 as a Tcl Module";
+ @$(INSTALL_DATA) $(TOP_DIR)/library/tcltest/tcltest.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl9/9.0/tcltest-2.3.9.tm;
@echo "Installing package platform 1.0.14 as a Tcl Module";
@$(INSTALL_DATA) $(TOP_DIR)/library/platform/platform.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl9/9.0/platform-1.0.14.tm;
diff --git a/win/Makefile.in b/win/Makefile.in
index d8120d5..7f297de 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -656,8 +656,8 @@ install-libraries: libraries install-tzdata install-msgs
done;
@echo "Installing package msgcat 1.6.0 as a Tcl Module";
@$(COPY) $(ROOT_DIR)/library/msgcat/msgcat.tcl $(SCRIPT_INSTALL_DIR)/../tcl9/9.0/msgcat-1.6.0.tm;
- @echo "Installing package tcltest 2.3.8 as a Tcl Module";
- @$(COPY) $(ROOT_DIR)/library/tcltest/tcltest.tcl $(SCRIPT_INSTALL_DIR)/../tcl9/9.0/tcltest-2.3.8.tm;
+ @echo "Installing package tcltest 2.3.9 as a Tcl Module";
+ @$(COPY) $(ROOT_DIR)/library/tcltest/tcltest.tcl $(SCRIPT_INSTALL_DIR)/../tcl9/9.0/tcltest-2.3.9.tm;
@echo "Installing package platform 1.0.14 as a Tcl Module";
@$(COPY) $(ROOT_DIR)/library/platform/platform.tcl $(SCRIPT_INSTALL_DIR)/../tcl9/9.0/platform-1.0.14.tm;
@echo "Installing package platform::shell 1.1.4 as a Tcl Module";