summaryrefslogtreecommitdiffstats
path: root/tls/tests/all.tcl
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2019-01-02 21:21:46 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2019-01-02 21:21:46 (GMT)
commitd2825c8167bd0d1f1daa937aa3b6ab21f7522527 (patch)
treed6d980c6b1806a43dc20219ed070b9440f59dfe9 /tls/tests/all.tcl
parent4db70369bb58c270b362c5696a6fe8c91a1a0217 (diff)
parent7417c0c39dc6049faf0dbb2ae2b90414895b2290 (diff)
downloadblt-d2825c8167bd0d1f1daa937aa3b6ab21f7522527.zip
blt-d2825c8167bd0d1f1daa937aa3b6ab21f7522527.tar.gz
blt-d2825c8167bd0d1f1daa937aa3b6ab21f7522527.tar.bz2
Merge commit '7417c0c39dc6049faf0dbb2ae2b90414895b2290' as 'tls'
Diffstat (limited to 'tls/tests/all.tcl')
-rw-r--r--tls/tests/all.tcl56
1 files changed, 56 insertions, 0 deletions
diff --git a/tls/tests/all.tcl b/tls/tests/all.tcl
new file mode 100644
index 0000000..aeb37a8
--- /dev/null
+++ b/tls/tests/all.tcl
@@ -0,0 +1,56 @@
+# all.tcl --
+#
+# This file contains a top-level script to run all of the Tcl
+# tests. Execute it by invoking "source all.test" when running tcltest
+# in this directory.
+#
+# Copyright (c) 1998-2000 by Ajuba Solutions.
+# All rights reserved.
+#
+# RCS: @(#) $Id: all.tcl,v 1.5 2000/08/15 18:45:01 hobbs Exp $
+
+if {[lsearch [namespace children] ::tcltest] == -1} {
+ package require tcltest
+ namespace import ::tcltest::*
+}
+
+set ::tcltest::testSingleFile false
+set ::tcltest::testsDirectory [file dir [info script]]
+
+# We should ensure that the testsDirectory is absolute.
+# This was introduced in Tcl 8.3+'s tcltest, so we need a catch.
+catch {::tcltest::normalizePath ::tcltest::testsDirectory}
+
+puts stdout "Tests running in interp: [info nameofexecutable]"
+puts stdout "Tests running in working dir: $::tcltest::testsDirectory"
+if {[llength $::tcltest::skip] > 0} {
+ puts stdout "Skipping tests that match: $::tcltest::skip"
+}
+if {[llength $::tcltest::match] > 0} {
+ puts stdout "Only running tests that match: $::tcltest::match"
+}
+
+if {[llength $::tcltest::skipFiles] > 0} {
+ puts stdout "Skipping test files that match: $::tcltest::skipFiles"
+}
+if {[llength $::tcltest::matchFiles] > 0} {
+ puts stdout "Only sourcing test files that match: $::tcltest::matchFiles"
+}
+
+set timeCmd {clock format [clock seconds]}
+puts stdout "Tests began at [eval $timeCmd]"
+
+# source each of the specified tests
+foreach file [lsort [::tcltest::getMatchingFiles]] {
+ set tail [file tail $file]
+ puts stdout $tail
+ if {[catch {source $file} msg]} {
+ puts stdout $msg
+ }
+}
+
+# cleanup
+puts stdout "\nTests ended at [eval $timeCmd]"
+::tcltest::cleanupTests 1
+return
+