aboutsummaryrefslogtreecommitdiff
path: root/tests/runall.tcl
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2016-09-02 13:29:09 +1000
committerSteve Bennett <steveb@workware.net.au>2016-09-02 13:29:50 +1000
commitc302dda04832fa72c355b8afccb334b071e08263 (patch)
tree22d107a45230a20a1f24d52753796a13eecf5020 /tests/runall.tcl
parentb407e4dc85910fff3790d2f942a02973df64593d (diff)
downloadjimtcl-c302dda04832fa72c355b8afccb334b071e08263.zip
jimtcl-c302dda04832fa72c355b8afccb334b071e08263.tar.gz
jimtcl-c302dda04832fa72c355b8afccb334b071e08263.tar.bz2
tests: Fix return code when running tests without [interp]
The return code was the wrong sense. Also, load 'interp' if possible. Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'tests/runall.tcl')
-rw-r--r--tests/runall.tcl7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/runall.tcl b/tests/runall.tcl
index 059f4d2..5b5d220 100644
--- a/tests/runall.tcl
+++ b/tests/runall.tcl
@@ -5,12 +5,15 @@
lappend auto_path .
+# In case interp is a module
+catch {package require interp}
+
if {[info commands interp] eq ""} {
- set rc 0
+ set rc 1
foreach script [lsort [glob *.test]] {
if {[catch {
exec [info nameofexecutable] $script >@stdout 2>@stderr
- set rc 1
+ set rc 0
} msg opts]} {
puts "Failed: $script"
}