diff options
author | Steve Bennett <steveb@workware.net.au> | 2020-11-08 09:31:26 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2020-11-08 10:17:57 +1000 |
commit | 4b865fed1ad29c97c1b21757d953886758b22796 (patch) | |
tree | 809c9f5f10713cc01d42e45f0269c53559948b5b /tests/runall.tcl | |
parent | 8e1a22bac49a3acb1ee757ca34ed16b27bb7cd17 (diff) | |
download | jimtcl-4b865fed1ad29c97c1b21757d953886758b22796.zip jimtcl-4b865fed1ad29c97c1b21757d953886758b22796.tar.gz jimtcl-4b865fed1ad29c97c1b21757d953886758b22796.tar.bz2 |
build: Fix build and tests for out-of-tree build
Loadable modules and tests
Fixes #179
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'tests/runall.tcl')
-rw-r--r-- | tests/runall.tcl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/runall.tcl b/tests/runall.tcl index 57f6399..2b49526 100644 --- a/tests/runall.tcl +++ b/tests/runall.tcl @@ -5,12 +5,14 @@ lappend auto_path . +set testdir [file dirname [info script]] + # In case interp is a module catch {package require interp} if {[info commands interp] eq ""} { set rc 1 - foreach script [lsort [glob *.test]] { + foreach script [lsort [glob $testdir/*.test]] { if {[catch { exec [info nameofexecutable] $script >@stdout 2>@stderr set rc 0 @@ -21,10 +23,10 @@ if {[info commands interp] eq ""} { exit $rc } else { array set total {pass 0 fail 0 skip 0 tests 0} - foreach script [lsort [glob *.test]] { + foreach script [lsort [glob $testdir/*.test]] { set ::argv0 $script - if {$script eq "signal.test"} { + if {[file tail $script] eq "signal.test"} { # special case, can't run this in a child interpeter catch -exit { source $script |