1# all.tcl --
2#
3# This file contains a top-level script to run all of the Tcl
4# tests.  Execute it by invoking "source all.tcl" when running tcltest
5# in this directory.
6#
7# Copyright © 1998-1999 Scriptics Corporation.
8# Copyright © 2000 Ajuba Solutions
9#
10# See the file "license.terms" for information on usage and redistribution
11# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
12
13package prefer latest
14package require tcltest 2.5
15namespace import ::tcltest::*
16
17configure {*}$argv -testdir [file dirname [file dirname [file normalize [
18    info script]/...]]]
19
20if {[singleProcess]} {
21    interp debug {} -frame 1
22}
23
24set ErrorOnFailures [info exists env(ERROR_ON_FAILURES)]
25unset -nocomplain env(ERROR_ON_FAILURES)
26if {[runAllTests] && $ErrorOnFailures} {exit 1}
27# if calling direct only (avoid rewrite exit if inlined or interactive):
28if { [info exists ::argv0] && [file tail $::argv0] eq [file tail [info script]]
29  && !([info exists ::tcl_interactive] && $::tcl_interactive)
30} {
31    proc exit args {}
32}