1# all.tcl --
2#
3# This file contains a top-level script to run all of the Tk table
4# tests.  Execute it by invoking "source all.tcl" when running tktest
5# in this directory.
6#
7# Copyright (c) 1998-2000 Ajuba Solutions
8# Copyright (c) 2000-2002 Jeffrey Hobbs
9#
10# See the file "license.txt" for information on usage and redistribution
11# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
12#
13# RCS: @(#) $Id: all.tcl,v 1.2 2002/06/21 18:16:39 hobbs Exp $
14
15package require tcltest
16namespace import -force ::tcltest::*
17
18set ::tcltest::testSingleFile false
19set ::tcltest::testsDirectory [file dir [info script]]
20
21# We need to ensure that the testsDirectory is absolute
22catch {::tcltest::normalizePath ::tcltest::testsDirectory}
23
24set chan $::tcltest::outputChannel
25
26puts $chan "Tk $tk_patchLevel tests running in interp: [info nameofexecutable]"
27puts $chan "Tests running with pwd:           [pwd]"
28puts $chan "Tests running in working dir:     $::tcltest::testsDirectory"
29if {[llength $::tcltest::skip] > 0} {
30    puts $chan "Skipping tests that match:            $::tcltest::skip"
31}
32if {[llength $::tcltest::match] > 0} {
33    puts $chan "Only running tests that match:        $::tcltest::match"
34}
35
36if {[llength $::tcltest::skipFiles] > 0} {
37    puts $chan "Skipping test files that match:       $::tcltest::skipFiles"
38}
39if {[llength $::tcltest::matchFiles] > 0} {
40    puts $chan "Only sourcing test files that match:  $::tcltest::matchFiles"
41}
42
43set timeCmd {clock format [clock seconds]}
44puts $chan "Tests began at [eval $timeCmd]"
45
46# source each of the specified tests
47foreach file [lsort [::tcltest::getMatchingFiles]] {
48    set tail [file tail $file]
49    puts $chan $tail
50    if {[catch {source $file} msg]} {
51	puts $chan $msg
52    }
53}
54
55# cleanup
56puts $chan "\nTests ended at [eval $timeCmd]"
57::tcltest::cleanupTests 1
58exit
59