aboutsummaryrefslogtreecommitdiff
path: root/tests/runall.tcl
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2016-09-09 17:31:16 +1000
committerSteve Bennett <steveb@workware.net.au>2016-09-09 17:37:14 +1000
commit4baa884e739b59dfd50cbf606786c41de1d289a8 (patch)
tree575d5fa4f7e4be4a097f1b98613a87890ef3ae5e /tests/runall.tcl
parentcf4ac87da5bba7e95dda8df09ef8ae63d1a2c5ee (diff)
downloadjimtcl-4baa884e739b59dfd50cbf606786c41de1d289a8.zip
jimtcl-4baa884e739b59dfd50cbf606786c41de1d289a8.tar.gz
jimtcl-4baa884e739b59dfd50cbf606786c41de1d289a8.tar.bz2
signal: Remove the signal command from child interpreters
Currently signals can only be delivered to a single interpreter. To avoid confusion where currently this is the most recently created interpreter, don't create the signal command and handle signals in child interpreters. Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'tests/runall.tcl')
-rw-r--r--tests/runall.tcl42
1 files changed, 25 insertions, 17 deletions
diff --git a/tests/runall.tcl b/tests/runall.tcl
index 5b5d220..e51d520 100644
--- a/tests/runall.tcl
+++ b/tests/runall.tcl
@@ -24,25 +24,33 @@ if {[info commands interp] eq ""} {
foreach script [lsort [glob *.test]] {
set ::argv0 $script
- set i [interp]
-
- foreach var {argv0 auto_path} {
- $i eval [list set $var [set ::$var]]
- }
-
- # Run the test
- catch -exit {$i eval source $script} msg opts
- if {[info returncode $opts(-code)] eq "error"} {
- puts [format "%16s: --- error ($msg)" $script]
- incr total(fail)
- }
-
- # Extract the counts
- foreach var {pass fail skip tests} {
- incr total($var) [$i eval "set testinfo(num$var)"]
+ if {$script eq "signal.test"} {
+ # special case, can't run this in a child interpeter
+ source $script
+ foreach var {pass fail skip tests} {
+ incr total($var) $testinfo(num$var)
+ }
+ } else {
+ set i [interp]
+
+ foreach var {argv0 auto_path} {
+ $i eval [list set $var [set ::$var]]
+ }
+
+ # Run the test
+ catch -exit {$i eval source $script} msg opts
+ if {[info returncode $opts(-code)] eq "error"} {
+ puts [format "%16s: --- error ($msg)" $script]
+ incr total(fail)
+ }
+
+ # Extract the counts
+ foreach var {pass fail skip tests} {
+ incr total($var) [$i eval "set testinfo(num$var)"]
+ }
+ $i delete
}
- $i delete
stdout flush
}
puts [string repeat = 73]