diff options
author | jenn <jenn@noemail.net> | 1999-06-29 20:14:09 (GMT) |
---|---|---|
committer | jenn <jenn@noemail.net> | 1999-06-29 20:14:09 (GMT) |
commit | 8ac122d96c344afbcd809e0b2f11f4c8da5cafc6 (patch) | |
tree | db7048bf1d37678abffa3e906a7ea4ce4463b05c /tests/all.tcl | |
parent | 775ea3ea1940edb4a703df4ac15cbaed3850598a (diff) | |
download | tcl-8ac122d96c344afbcd809e0b2f11f4c8da5cafc6.zip tcl-8ac122d96c344afbcd809e0b2f11f4c8da5cafc6.tar.gz tcl-8ac122d96c344afbcd809e0b2f11f4c8da5cafc6.tar.bz2 |
Added flags -limitconstraints, -preservecore, -help, -file, -notfile, -relateddir,
and -asidefromdir to tcltest.tcl. Also added exported proc
::tcltest::getMatchingTestFiles to tcltest.tcl. Modified documentation to match
and all.tcl to use the new functionality instead of implementing -file itself.
Changed some test names in winPipe.test to remove duplicates.
FossilOrigin-Name: f368875e9c462dbcf64354756a1b456bb8d581e9
Diffstat (limited to 'tests/all.tcl')
-rw-r--r-- | tests/all.tcl | 46 |
1 files changed, 9 insertions, 37 deletions
diff --git a/tests/all.tcl b/tests/all.tcl index f158c93..b4d132d 100644 --- a/tests/all.tcl +++ b/tests/all.tcl @@ -7,18 +7,18 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: all.tcl,v 1.6 1999/06/26 21:09:15 rjohnson Exp $ +# RCS: @(#) $Id: all.tcl,v 1.7 1999/06/29 20:14:17 jenn Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest namespace import ::tcltest::* } -info commands + set ::tcltest::testSingleFile false set ::tcltest::testsDirectory [file dir [info script]] puts stdout "Tcl $tcl_patchLevel tests running in interp: [info nameofexecutable]" -puts stdout "Tests running in working dir: $::tcltest::workingDirectory" +puts stdout "Tests running in working dir: $::tcltest::testsDirectory" if {[llength $::tcltest::skip] > 0} { puts stdout "Skipping tests that match: $::tcltest::skip" } @@ -26,37 +26,19 @@ if {[llength $::tcltest::match] > 0} { puts stdout "Only running tests that match: $::tcltest::match" } -# Use command line specified glob pattern (specified by -file or -f) -# if one exists. Otherwise use *.test. If given, the file pattern -# should be specified relative to the dir containing this file. If no -# files are found to match the pattern, print an error message and exit. - -set fileIndex [expr {[lsearch $argv "-file"] + 1}] -set fIndex [expr {[lsearch $argv "-f"] + 1}] -if {($fileIndex < 1) || ($fIndex > $fileIndex)} { - set fileIndex $fIndex +if {[llength $::tcltest::skipFiles] > 0} { + puts stdout "Skipping test files that match: $::tcltest::skipFiles" } -if {$fileIndex > 0} { - set globPattern [file join $::tcltest::testsDirectory [lindex $argv $fileIndex]] - puts stdout "Sourcing files that match: $globPattern" -} else { - set globPattern [file join $::tcltest::testsDirectory *.test] -} -set fileList [glob -nocomplain $globPattern] -if {[llength $fileList] < 1} { - puts "Error: no files found matching $globPattern" - exit +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 $fileList] { +foreach file [lsort [::tcltest::getMatchingFiles]] { set tail [file tail $file] - if {[string match l.*.test $tail]} { - # This is an SCCS lockfile; ignore it - continue - } puts stdout $tail if {[catch {source $file} msg]} { puts stdout $msg @@ -68,13 +50,3 @@ puts stdout "\nTests ended at [eval $timeCmd]" ::tcltest::cleanupTests 1 return - - - - - - - - - - |