Skip to content

Commit 0620c53

Browse files
committed
ts: remove default_tclsh and expect TCLSH env var to be set
Signed-off-by: Xavier Delaruelle <[email protected]>
1 parent f7d2ddc commit 0620c53

File tree

5 files changed

+5
-26
lines changed

5 files changed

+5
-26
lines changed

testsuite/config/unix.exp

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -61,26 +61,6 @@ proc default_modulecmd {} {
6161

6262
}
6363

64-
proc default_tclsh {} {
65-
global TCLSH
66-
global verbose
67-
global env
68-
69-
if ![info exists TCLSH] then {
70-
if [info exists env(TCLSH)] {
71-
set TCLSH $env(TCLSH)
72-
} else {
73-
set TCLSH [which modulecmd]
74-
if ![file exists $TCLSH] then {
75-
fail "No 'tclsh' found"
76-
exit -1
77-
} elseif { $verbose > 1 } {
78-
send_user "using 'tclsh' from search path"
79-
}
80-
}
81-
}
82-
}
83-
8464

8565
#
8666
# modulecmd_xxx_ -- run modulecmd
@@ -130,7 +110,6 @@ proc modulecmd_xxx_ {command {input noinput}} {
130110
}
131111

132112
default_modulecmd
133-
default_tclsh
134113

135114
set cmdlist [list $TCLSH $MODULECMD $shell]
136115
# check if asked not to split passed command line
@@ -185,7 +164,6 @@ proc modulecmd_xxx_ {command {input noinput}} {
185164
}
186165

187166
default_modulecmd
188-
default_tclsh
189167

190168
set cmdlist [list exec $TCLSH $MODULECMD $shell]
191169
# check if asked not to split passed command line

testsuite/modules.00-init/005-init_ts.exp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626

2727
send_user "\tInitializing the testsuite ...\n"
2828

29+
# excepted information to run the testsuite
30+
set TCLSH $env(TCLSH)
31+
send_user "\tTCLSH is '$TCLSH'\n"
32+
33+
2934
# Modules release number
3035
set major_minor_rel [join [lrange [split $install_version .] 0 1] .]
3136

@@ -321,7 +326,6 @@ if {![string length $lsb_cmd]} {
321326
}
322327

323328
# fetch tclsh version used to adapt tests producing different output depending on this version
324-
default_tclsh
325329
catch {set tclsh_version [exec $TCLSH << {puts [info tclversion]}]} errMsg
326330
if {[info exists tclsh_version]} {
327331
send_user "\ttclsh version is $tclsh_version\n"

testsuite/modules.50-cmds/400-source-sh.exp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1600,7 +1600,6 @@ setenv_var TESTSUITE_SHTOMOD_MODULE 1
16001600
# changes made by the script
16011601
setenv_var MODULES_SET_SHELL_STARTUP 0
16021602
setenv_var MODULES_CMD [file normalize $env(TESTSUITEDIR)/../modulecmd.tcl]
1603-
setenv_var TCLSH $TCLSH
16041603

16051604
set lmsourceshpath {}
16061605
# setup simpler MANPATH value for tests if autoinit adds Modules man location to MANPATH

testsuite/modules.70-maint/310-sh-to-mod.exp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,6 @@ setenv_var TESTSUITE_SHTOMOD_MODULE 1
797797
# changes made by the script
798798
setenv_var MODULES_SET_SHELL_STARTUP 0
799799
setenv_var MODULES_CMD [file normalize $env(TESTSUITEDIR)/../modulecmd.tcl]
800-
setenv_var TCLSH $TCLSH
801800

802801
# if module was defined in environment prior test, the result of the source-sh evaluation
803802
# will be the unset of the module functions

testsuite/modules.70-maint/311-eval-sh-to-mod.exp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,6 @@ setenv_var TESTSUITE_SHTOMOD_MODULE 1
475475
# changes made by the script
476476
setenv_var MODULES_SET_SHELL_STARTUP 0
477477
setenv_var MODULES_CMD [file normalize $env(TESTSUITEDIR)/../modulecmd.tcl]
478-
setenv_var TCLSH $TCLSH
479478

480479
# if module was defined in environment prior test, the result of the source-sh evaluation
481480
# will be the unset of the module functions

0 commit comments

Comments
 (0)