head	1.7;
access;
symbols
	core-8-0-6-branch:1.6.0.2
	core-8-0-6-base:1.6
	core-8-0-5:1.4.2.1
	dev-8-1-stubs-branch:1.1.4.3.0.2
	dev-stubs-branch:1.4.0.4
	scriptics-tclpro-1-2:1.4
	scriptics-tclpro-1-2-b2:1.4
	core-8-1-merge-2/10/99:1.4
	core-8-0-5-branch:1.4.0.2
	core-8-0-5-base:1.4
	scriptics-tclpro-1-2-b1:1.4
	scriptics-tclpro-1-2-a1:1.4
	core-8-1-b1:1.1.4.3
	core-8-0-4:1.2
	core-8-1-a2:1.1.4.1
	core-8-0-2:1.1
	core-8-0-3:1.2;
locks; strict;
comment	@# @;


1.7
date	99.04.16.01.51.33;	author stanton;	state dead;
branches;
next	1.6;

1.6
date	99.04.16.01.25.55;	author stanton;	state Exp;
branches;
next	1.5;

1.5
date	99.03.24.18.07.46;	author hershey;	state Exp;
branches;
next	1.4;

1.4
date	98.12.07.23.29.00;	author hershey;	state Exp;
branches
	1.4.2.1;
next	1.3;

1.3
date	98.12.04.04.19.12;	author hershey;	state Exp;
branches;
next	1.2;

1.2
date	98.09.14.18.23.42;	author stanton;	state Exp;
branches;
next	1.1;

1.1
date	98.04.01.09.58.05;	author rjohnson;	state Exp;
branches
	1.1.4.1;
next	;

1.1.4.1
date	98.09.29.00.25.45;	author stanton;	state Exp;
branches;
next	1.1.4.2;

1.1.4.2
date	98.09.30.02.18.21;	author stanton;	state Exp;
branches;
next	1.1.4.3;

1.1.4.3
date	98.12.10.03.43.54;	author stanton;	state Exp;
branches;
next	1.1.4.4;

1.1.4.4
date	99.03.11.18.50.35;	author hershey;	state dead;
branches;
next	;

1.4.2.1
date	99.03.22.06.42.59;	author jingham;	state Exp;
branches;
next	;


desc
@@


1.7
log
@* Merged 8.1 branch into the main trunk
@
text
@# This file contains a top-level script to run all of the Tcl
# tests.  Execute it by invoking "source all" when running tclTest
# in this directory.
#
# RCS: @@(#) $Id: all,v 1.6 1999/04/16 01:25:55 stanton Exp $

set TESTS_DIR [file join [pwd] [file dirname [info script]]]
source [file join $TESTS_DIR defs]
set currentDir [pwd]

catch {array set flag $argv}
set requiredSourceFiles [list arc.tcl bugs.tcl butGeom2.tcl \
	canvPsBmap.tcl canvPsText.tcl bevel.tcl butGeom.tcl \
	canvPsArc.tcl canvPsGrph.tcl cmap.tcl filebox.test \
	option.file1 option.file2 visual README defs]

#
# Set the TMP_DIR to pwd or the arg of -tmpdir, if given.
# 

if {[info exists flag(-tmpdir)]} {
    set TMP_DIR $flag(-tmpdir)
    if {![file exists $TMP_DIR]} {
	if {[catch {file mkdir $TMP_DIR} msg]} {
	    error "bad argument \"$flag(-tmpdir)\" to -tmpdir:\n$msg"
	}
	file mkdir $TMP_DIR
    } elseif {![file isdir $TMP_DIR]} {
	error "bad argument \"$flag(-tmpdir)\" to -tmpdir:\n$TMP_DIR is not a directory"
    }
    if {[string compare [file pathtype $TMP_DIR] absolute] != 0} {
	set TMP_DIR [file join [pwd] $TMP_DIR]
    }
    cd $TMP_DIR
}

#
# copy each required source file to the current dir (if it's not already there).
#

if {[string compare $TESTS_DIR [pwd]] != 0} {

    foreach file $requiredSourceFiles {
	if {![file exists $file]} {
	    catch {file copy [file join $TESTS_DIR $file] .}
	}
    }
}

if {$tcl_platform(os) == "Win32s"} {
    set globPattern [file join $TESTS_DIR *.tes]
} else {
    set globPattern [file join $TESTS_DIR *.test]
}

foreach file [lsort [glob $globPattern]] {
    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
    }
}

# remove the required source files from the current dir.
if {[info exists TMP_DIR]} {
    foreach file $requiredSourceFiles {
        catch {file delete -force $file}
    }
    cd $currentDir
}

# exit if Tk is running in non-interactive mode.
# Don't exit at the end of all the tests on the Mac, since
# this destroys the window that contains the test results...

if {([info exists tk_version] && !$tcl_interactive) \
	|| [string compare $tcl_platform(platform) macintosh]} {
    catch {destroy .}
    exit
}
@


1.6
log
@* Merged changes from 8.0.5:
    - Updated for Mac release
@
text
@d5 1
a5 1
# RCS: @@(#) $Id: all,v 1.5 1999/03/24 18:07:46 hershey Exp $
@


1.5
log
@all file now exits only when Tk is not in interactive mode.
@
text
@d5 1
a5 1
# RCS: @@(#) $Id: all,v 1.4 1998/12/07 23:29:00 hershey Exp $
d77 6
a82 1
if {[info exists tk_version] && !$tcl_interactive} {
@


1.4
log
@- updated filebox test to work regardless of current working dir.
- updated imgPhoto to check for teapot.ppm before running the tests.
  exits gracefully if file cannot be found.
- lint in "all" file
@
text
@d5 1
a5 1
# RCS: @@(#) $Id: all,v 1.3 1998/12/04 04:19:12 hershey Exp $
d76 4
a79 2
catch {destroy .}
exit
@


1.4.2.1
log
@Don't exit on the Macintosh, since this destroys the window that contained the test results.
@
text
@d5 1
a5 1
# RCS: @@(#) $Id: all,v 1.4 1998/12/07 23:29:00 hershey Exp $
d76 2
a77 7
# Don't exit at the end of all the tests on the Mac, since
# this destroys the window that contains the test results...

if {[string compare $tcl_platform(platform) macintosh]} {
    catch {destroy .}
    exit
}
@


1.3
log
@Update all and defs to work with nightly test environment.
Both files now pass the checker!
@
text
@d5 1
a5 1
# RCS: @@(#) $Id: all,v 1.2 1998/09/14 18:23:42 stanton Exp $
d15 1
a15 1
	option.file1 option.file2 visual defs]
@


1.2
log
@Replaced SCCS strings, fixed binary files
@
text
@d5 1
a5 1
# RCS: @@(#) $Id$
d7 29
a35 8
switch $tcl_platform(platform) {
    "windows" {
	# Tests that cause tk to crash under windows.
	set crash {}

	# Tests that fail under windows.

	set fail { grid.test }
d37 9
a45 2
	if {! [info exist exclude] } {
	    set exclude [string tolower "$crash $fail"]
a47 17
    "macintosh" {
	set x [pwd]
	cd $tk_library
	set tk_library [pwd]
	cd $x
	
	# Tests that cause tk to crash under mac.
	set crash {}

	# Tests that fail under mac.
	set fail {bind.test entry.test send.test textDisp.test}
	
	set exclude [string tolower "$crash $fail"]
    }    
    "unix" {
	set exclude ""
    }
d51 1
a51 1
    set tests [lsort [glob *.tes]]
d53 1
a53 1
    set tests [lsort [glob *.test]]
d56 4
a59 3
foreach i $tests {
    if [string match l.*.test $i] {
	# This is an SCCS lock file;  ignore it.
d62 10
a71 4
    if [lsearch $exclude [string tolower $i]]>=0 {
	# Do not source this file; it exercises a known bug at this time.
	puts stdout "Skipping $i"
	continue
d73 1
a73 2
    puts stdout $i
    source $i
d75 3
@


1.1
log
@Initial revision
@
text
@d5 1
a5 1
# SCCS: @@(#) all 1.23 97/08/06 18:50:18
@


1.1.4.1
log
@initial tk8.1a2 version
@
text
@d5 1
a5 1
# SCCS: @@(#) all 1.28 97/12/23 15:00:50
a6 4
# These tests are not done because they cause the new configuration package 
# to crash.

set exclude {}
d10 1
a10 1
	set crash { safe.test }
d13 1
d16 3
a18 1
	set exclude [string tolower [concat $exclude $crash $fail]]
d32 1
a32 1
	set exclude [string tolower [concat $exclude $crash $fail]]
d35 1
a35 7
	# Tests that cause tk to crash under unix.
	set crash {}

	# Tests that fail under unix.
	set fail {}

	set exclude [concat $exclude $crash $fail]
@


1.1.4.2
log
@Merged 8.0.3 changes into 8.1
@
text
@d5 1
a5 1
# RCS: @@(#) $Id: all,v 1.2 1998/09/14 18:23:42 stanton Exp $
@


1.1.4.3
log
@merge 8.0 changes
@
text
@d5 1
a5 1
# RCS: @@(#) $Id$
d7 34
a40 29
set TESTS_DIR [file join [pwd] [file dirname [info script]]]
source [file join $TESTS_DIR defs]
set currentDir [pwd]

catch {array set flag $argv}
set requiredSourceFiles [list arc.tcl bugs.tcl butGeom2.tcl \
	canvPsBmap.tcl canvPsText.tcl bevel.tcl butGeom.tcl \
	canvPsArc.tcl canvPsGrph.tcl cmap.tcl filebox.test \
	option.file1 option.file2 visual README defs]

#
# Set the TMP_DIR to pwd or the arg of -tmpdir, if given.
# 

if {[info exists flag(-tmpdir)]} {
    set TMP_DIR $flag(-tmpdir)
    if {![file exists $TMP_DIR]} {
	if {[catch {file mkdir $TMP_DIR} msg]} {
	    error "bad argument \"$flag(-tmpdir)\" to -tmpdir:\n$msg"
	}
	file mkdir $TMP_DIR
    } elseif {![file isdir $TMP_DIR]} {
	error "bad argument \"$flag(-tmpdir)\" to -tmpdir:\n$TMP_DIR is not a directory"
    }
    if {[string compare [file pathtype $TMP_DIR] absolute] != 0} {
	set TMP_DIR [file join [pwd] $TMP_DIR]
    }
    cd $TMP_DIR
}
d42 1
a42 10
#
# copy each required source file to the current dir (if it's not already there).
#

if {[string compare $TESTS_DIR [pwd]] != 0} {

    foreach file $requiredSourceFiles {
	if {![file exists $file]} {
	    catch {file copy [file join $TESTS_DIR $file] .}
	}
d47 1
a47 1
    set globPattern [file join $TESTS_DIR *.tes]
d49 1
a49 1
    set globPattern [file join $TESTS_DIR *.test]
d52 3
a54 4
foreach file [lsort [glob $globPattern]] {
    set tail [file tail $file]
    if {[string match l.*.test $tail]} {
	# This is an SCCS lockfile; ignore it
d57 4
a60 3
    puts stdout $tail
    if {[catch {source $file} msg]} {
	puts stdout $msg
d62 2
a64 11

# remove the required source files from the current dir.
if {[info exists TMP_DIR]} {
    foreach file $requiredSourceFiles {
        catch {file delete -force $file}
    }
    cd $currentDir
}

catch {destroy .}
exit
@


1.1.4.4
log
@Updated the testsuite to use "test" namespace and commandline args
to control verbose  level and which tests get run.  Tests now work from
any working dir.
@
text
@d5 1
a5 1
# RCS: @@(#) $Id: all,v 1.1.4.3 1998/12/10 03:43:54 stanton Exp $
@


