diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2017-01-03 21:52:18 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2017-01-03 21:52:18 (GMT) |
commit | 4302a869f0212a3e4878e66a7260b434f6584476 (patch) | |
tree | e6976e66edf648406e32b092395121e045301692 /tkimg/tests/all.tcl | |
parent | a780057cc1b51dd3a557549c3cf2431f09136c0d (diff) | |
parent | 60d692811c12788ed4468d5ff680633304e8f641 (diff) | |
download | blt-4302a869f0212a3e4878e66a7260b434f6584476.zip blt-4302a869f0212a3e4878e66a7260b434f6584476.tar.gz blt-4302a869f0212a3e4878e66a7260b434f6584476.tar.bz2 |
Merge commit '60d692811c12788ed4468d5ff680633304e8f641' as 'tkimg'
Diffstat (limited to 'tkimg/tests/all.tcl')
-rwxr-xr-x | tkimg/tests/all.tcl | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/tkimg/tests/all.tcl b/tkimg/tests/all.tcl new file mode 100755 index 0000000..5883b38 --- /dev/null +++ b/tkimg/tests/all.tcl @@ -0,0 +1,54 @@ +# all.tcl -- -*- 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 Scriptics Corporation.
+# Copyright (c) 2002 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+# All rights reserved.
+#
+# RCS: @(#) $Id: all.tcl 156 2008-10-23 15:52:49Z nijtmans $
+
+if {[lsearch [namespace children] ::tcltest] == -1} {
+ package require tcltest
+ namespace import ::tcltest::*
+}
+
+proc run_tests {} {
+ set chan $::tcltest::outputChannel
+
+ puts $chan "Tests running in interp: [info nameofexecutable]"
+ puts $chan "Tests running with pwd: [pwd]"
+ puts $chan "Tests running in working dir: $::tcltest::testsDirectory"
+
+ if {[llength $::tcltest::skip] > 0} {
+ puts $chan "Skipping tests that match: $::tcltest::skip"
+ }
+ if {[llength $::tcltest::match] > 0} {
+ puts $chan "Only running tests that match: $::tcltest::match"
+ }
+ if {[llength $::tcltest::skipFiles] > 0} {
+ puts $chan "Skipping test files that match: $::tcltest::skipFiles"
+ }
+ if {[llength $::tcltest::matchFiles] > 0} {
+ puts $chan "Only sourcing test files that match: $::tcltest::matchFiles"
+ }
+
+ set timeCmd {clock format [clock seconds]}
+ puts $chan "Tests began at [eval $timeCmd]"
+
+ # source each of the specified tests
+ foreach file [lsort [::tcltest::getMatchingFiles]] {
+ set tail [file tail $file]
+ puts $chan $tail
+ if {[catch {source $file} msg]} {
+ puts $chan $msg
+ }
+ }
+
+ # cleanup
+ puts $chan "\nTests ended at [eval $timeCmd]"
+ ::tcltest::cleanupTests 1
+ return
+}
|