diff --git a/.travis.yml b/.travis.yml index 4efc2dc13..b93cc7a04 100644 --- a/.travis.yml +++ b/.travis.yml @@ -225,7 +225,7 @@ matrix: - docker # openSUSE - - env: OS_NAME=opensuse OS_VERSION=leap DOCKER_IMAGE=${OS_NAME}:${OS_VERSION} CONTAINER=${OS_VERSION} + - env: OS_NAME=opensuse OS_VERSION=leap DOCKER_IMAGE=${OS_NAME}/${OS_VERSION} CONTAINER=${OS_VERSION} CMD_PREFIX="docker exec --env RUNTESTFLAGS=-v $CONTAINER" CONFIGURE_OPTS='--disable-compat-version --enable-versioning' sudo: required @@ -233,10 +233,10 @@ matrix: - docker # also enable a display on this test case to validate x-resource behavior - - env: OS_NAME=opensuse OS_VERSION=leap DOCKER_IMAGE=${OS_NAME}:${OS_VERSION} CONTAINER=${OS_VERSION} + - env: OS_NAME=opensuse OS_VERSION=leap DOCKER_IMAGE=${OS_NAME}/${OS_VERSION} CONTAINER=${OS_VERSION} CMD_PREFIX="docker exec --env RUNTESTFLAGS=-v $CONTAINER xvfb-run" CONFIGURE_OPTS='--prefix=/tmp/modules --enable-compat-version --enable-versioning --with-loadedmodules=null:dot --with-quarantine-vars=LD_LIBRARY_PATH' - EXTRA_PKGS='which xrdb xvfb-run autoconf automake gettext-tools-mini gcc tcl-devel' + EXTRA_PKGS='which xrdb xvfb-run autoconf automake gettext-tools gcc tcl-devel' sudo: required services: - docker diff --git a/NEWS.rst b/NEWS.rst index 19356c4d7..a70ce2d2b 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -6,6 +6,25 @@ Release notes This file describes changes in recent versions of Modules. It primarily documents those changes that are of interest to users and admins. +Modules 4.2.5 (2019-07-08) +-------------------------- + +* Correctly escape ``?`` character in shell alias. (fix issue #275) +* When resolving the enabled list of modulepaths, ensure resolved path + entries are unique. (fix issue #274) +* Right trim '#' characters from the fetched modulefile magic cookie string + to ensure a correct compatibility version comparison. Useful when modulefile + first line is equal to ``#%Module4.2##############``. +* Fix argument parsing for the ``append-path``, ``prepend-path`` and + ``remove-path`` modulefile commands to consider every arguments found after + the variable name as variable values and not command option even if argument + starts with ``-`` character. (fix issue #278) +* Fix automatic loading of modulefiles when multiple module names are set on a + single ``module load`` modulefile command. When auto_handling mode was + disabled, the load of not loaded modules was not achieved as soon as some + modules on this list were already loaded. (fix issue #281) + + Modules 4.2.4 (2019-04-26) -------------------------- diff --git a/contrib/rpm/environment-modules.spec.in b/contrib/rpm/environment-modules.spec.in index 0e2614e19..1349727b2 100644 --- a/contrib/rpm/environment-modules.spec.in +++ b/contrib/rpm/environment-modules.spec.in @@ -1,7 +1,7 @@ %global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d) Name: environment-modules -Version: 4.2.4 +Version: 4.2.5 Release: @MODULES_RPM_RELEASE@%{?dist} Summary: Provides dynamic modification of a user's environment @@ -218,6 +218,9 @@ fi %changelog +* Mon Jul 08 2019 Xavier Delaruelle - 4.2.5-1 +- Update to 4.2.5 + * Fri Apr 26 2019 Xavier Delaruelle - 4.2.4-1 - Update to 4.2.4 diff --git a/modulecmd.tcl.in b/modulecmd.tcl.in index 6d142032c..5fc2b0022 100644 --- a/modulecmd.tcl.in +++ b/modulecmd.tcl.in @@ -1850,12 +1850,19 @@ proc module {command args} { # load here if no auto mode, done through prereq elsewhere # inhibited if currently in DepRe context if {![getAutoHandling] && [currentModuleEvalContext] ne\ - {depre} && ![eval is-loaded $args] && ![eval is-loading\ - $args]} { - set ret [eval cmdModuleLoad reqlo 0 $args] - # ignore obtained error if force mode enabled - if {[getForce]} { - set ret 0 + {depre}} { + # attempt load of not already loaded modules + foreach arg $args { + if {![is-loaded $arg] && ![is-loading $arg]} { + lappend modlist $arg + } + } + if {[info exists modlist]} { + set ret [eval cmdModuleLoad reqlo 0 $modlist] + # ignore obtained error if force mode enabled + if {[getForce]} { + set ret 0 + } } } # register modulefiles to load as individual prereqs @@ -2473,39 +2480,42 @@ proc parsePathCommandArgs {cmd args} { set allow_dup 0 set idx_val 0 foreach arg $args { - switch -glob -- $arg { - --index { - if {$cmd eq {add-path}} { - reportWarning "--index option has no effect on $cmd" - } else { - set idx_val 1 + # everything passed after variable name is considered a value + if {[info exists var]} { + # set multiple passed values in a list + lappend val_raw_list $arg + } else { + switch -glob -- $arg { + --index { + if {$cmd eq {add-path}} { + reportWarning "--index option has no effect on $cmd" + } else { + set idx_val 1 + } } - } - --duplicates { - if {$cmd eq {unload-path}} { - reportWarning "--duplicates option has no effect on $cmd" - } else { - set allow_dup 1 + --duplicates { + if {$cmd eq {unload-path}} { + reportWarning "--duplicates option has no effect on $cmd" + } else { + set allow_dup 1 + } } - } - -d - -delim - --delim { - set next_is_delim 1 - } - --delim=* { - set delim [string range $arg 8 end] - } - -* { - error "invalid option '$arg' for $cmd" - } - default { - if {$next_is_delim} { - set delim $arg - set next_is_delim 0 - } elseif {![info exists var]} { - set var $arg - } else { - # set multiple passed values in a list - lappend val_raw_list $arg + -d - -delim - --delim { + set next_is_delim 1 + } + --delim=* { + set delim [string range $arg 8 end] + } + -* { + error "invalid option '$arg' for $cmd" + } + default { + if {$next_is_delim} { + set delim $arg + set next_is_delim 0 + } else { + set var $arg + } } } } @@ -3371,7 +3381,7 @@ proc getModulePathList {{behavior returnempty} {resolv_var 1} {set_abs 1}} { if {$set_abs} { set modpath [getAbsolutePath $modpath] } - lappend modpathlist $modpath + appendNoDupToList modpathlist $modpath } } return $modpathlist @@ -5525,11 +5535,11 @@ proc resolveModuleVersionOrAlias {name} { return $ret } -proc charEscaped {str {charlist { \\\t\{\}|<>!;#^$&*"'`()}}} { +proc charEscaped {str {charlist { \\\t\{\}|<>!;#^$&*?"'`()}}} { return [regsub -all "\(\[$charlist\]\)" $str {\\\1}] } -proc charUnescaped {str {charlist { \\\t\{\}|<>!;#^$&*"'`()}}} { +proc charUnescaped {str {charlist { \\\t\{\}|<>!;#^$&*?"'`()}}} { return [regsub -all "\\\\\(\[$charlist\]\)" $str {\1}] } @@ -5742,7 +5752,7 @@ proc checkValidModule {modfile} { if {[catch { set fid [open $modfile r] # extract magic cookie (first word of modulefile) - set fheader [lindex [split [gets $fid]] 0] + set fheader [string trimright [lindex [split [gets $fid]] 0] #] close $fid }]} { set check_valid accesserr @@ -5786,8 +5796,8 @@ proc readModuleContent {modfile {report_read_issue 0} {must_have_cookie 1}} { set fdata [read $fid] close $fid # extract magic cookie (first word of modulefile) - set fheader [lindex [split [string range $fdata 0 [string first \n\ - $fdata]]] 0] + set fheader [string trimright [lindex [split [string range $fdata 0\ + [string first \n $fdata]]] 0] #] } errMsg ]} { if {$report_read_issue} { reportError [parseAccessIssue $modfile] diff --git a/testsuite/install.00-init/020-module.exp b/testsuite/install.00-init/020-module.exp index e6e61166f..2c300efa3 100644 --- a/testsuite/install.00-init/020-module.exp +++ b/testsuite/install.00-init/020-module.exp @@ -44,7 +44,7 @@ foreach shell $shell_list { # ensure tools used in complex shell alias definition are available if {[find_bin grep] ne "" && [find_bin tr] ne "" && [find_bin awk] ne ""} { foreach shell $shell_list { - testall_cmd_re "$shell" "module load $testsuite_modpath/alias/3.0\; testsuite" "Release" ".*" 0 + testall_cmd_re "$shell" "module load $testsuite_modpath/alias/3.0\; testsuite; ts2" "Release\nhttp://an.example.web\\?¶m=one" ".*" 0 } } elseif {$verbose > 0} { send_user "\tSkipping shell alias definition tests\n" diff --git a/testsuite/modulefiles.deps/m10 b/testsuite/modulefiles.deps/m10 new file mode 100644 index 000000000..1c148cdd2 --- /dev/null +++ b/testsuite/modulefiles.deps/m10 @@ -0,0 +1 @@ +#%Module diff --git a/testsuite/modulefiles.deps/m11 b/testsuite/modulefiles.deps/m11 new file mode 100644 index 000000000..1c148cdd2 --- /dev/null +++ b/testsuite/modulefiles.deps/m11 @@ -0,0 +1 @@ +#%Module diff --git a/testsuite/modulefiles.deps/m12 b/testsuite/modulefiles.deps/m12 new file mode 100644 index 000000000..24c7b7a39 --- /dev/null +++ b/testsuite/modulefiles.deps/m12 @@ -0,0 +1,2 @@ +#%Module +module load m10 m11 diff --git a/testsuite/modulefiles/alias/3.0 b/testsuite/modulefiles/alias/3.0 index d3863d1cb..e1535eeae 100644 --- a/testsuite/modulefiles/alias/3.0 +++ b/testsuite/modulefiles/alias/3.0 @@ -33,3 +33,5 @@ switch -- [module-info shelltype] { } } +# check '?' and '&' are correctly escaped +set-alias ts2 {echo "http://an.example.web?¶m=one"} diff --git a/testsuite/modulefiles/append/1.8 b/testsuite/modulefiles/append/1.8 new file mode 100644 index 000000000..842a98eee --- /dev/null +++ b/testsuite/modulefiles/append/1.8 @@ -0,0 +1,26 @@ +#%Module1.0 + +############################################################################## +# Modules Revision 3.0 +# Providing a flexible user environment +# +# File: append/%M% +# Revision: %I% +# First Edition: 2019/06/26 +# Last Mod.: %U%, %G% +# +# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr +# +# Description: Test appending multiple paths prefixed with minus sign +# Command: +# Sub-Command: append-path +# +# Invocation: load @M@/@V@ +# Comment: %C{ +# }C% +# +############################################################################## + +append-path testsuite --delim=, {http://foobar.com} +append-path testsuite2 -d , {http://foobar.com} +append-path testsuite3 -Lfoo bar diff --git a/testsuite/modulefiles/prepend/1.10 b/testsuite/modulefiles/prepend/1.10 new file mode 100644 index 000000000..27ba45fa3 --- /dev/null +++ b/testsuite/modulefiles/prepend/1.10 @@ -0,0 +1,28 @@ +#%Module1.0 + +############################################################################## +# Modules Revision 3.0 +# Providing a flexible user environment +# +# File: prepend/%M% +# Revision: %I% +# First Edition: 2019/06/26 +# Last Mod.: %U%, %G% +# +# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr +# +# Description: Testuite modulefile +# Command: +# Sub-Command: prepend-path +# +# Invocation: load @M@/@V@ +# Comment: %C{ +# Check passing command-line switches after variable name, +# should be considered as value +# }C% +# +############################################################################## + +prepend-path testsuite --delim=, {http://foobar.com} +prepend-path testsuite2 -d , {http://foobar.com} +prepend-path testsuite3 -Lfoo bar diff --git a/testsuite/modulefiles/remove/1.8 b/testsuite/modulefiles/remove/1.8 new file mode 100644 index 000000000..bfc320531 --- /dev/null +++ b/testsuite/modulefiles/remove/1.8 @@ -0,0 +1,26 @@ +#%Module1.0 + +############################################################################## +# Modules Revision 3.0 +# Providing a flexible user environment +# +# File: remove/%M% +# Revision: %I% +# First Edition: 2019/06/26 +# Last Mod.: %U%, %G% +# +# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr +# +# Description: Test removing multiple paths prefixed with minus sign +# Command: +# Sub-Command: remove-path +# +# Invocation: load @M@/@V@ +# Comment: %C{ +# }C% +# +############################################################################## + +remove-path testsuite --delim=, {http://foobar.com} +remove-path testsuite2 -d , {http://foobar.com} +remove-path testsuite3 -Lfoo bar diff --git a/testsuite/modules.00-init/006-procs.exp b/testsuite/modules.00-init/006-procs.exp index 43ae40d8e..de9407b2e 100644 --- a/testsuite/modules.00-init/006-procs.exp +++ b/testsuite/modules.00-init/006-procs.exp @@ -219,7 +219,7 @@ proc shell_val {test_shell val {re_mode 0}} { if {$val ne "(.*)"} { switch -- $test_shell { {sh} - {bash} - {ksh} - {zsh} - {csh} - {tcsh} - {fish} { - set val [regsub -all {([\\"'$|{}`* ()!&])} $val {\\\1}] + set val [regsub -all {([\\"'$|{}`*? ()!&])} $val {\\\1}] } {lisp} - {cmake} { set val [regsub -all {(["])} $val {\\\1}] diff --git a/testsuite/modules.20-locate/057-mcookie.exp b/testsuite/modules.20-locate/057-mcookie.exp index a57d6d110..7fdcb9c75 100644 --- a/testsuite/modules.20-locate/057-mcookie.exp +++ b/testsuite/modules.20-locate/057-mcookie.exp @@ -60,8 +60,8 @@ foreach mod $modlist tserr $tserrlist tswherr $tswherrlist tspaerr $tspaerrlist } # create temporary modulefiles whose magic cookie matches current version -set tmpmodfilelist [list $modpath/mcookie/.modulerc $modpath/mcookie/2 $modpath/mcookie/3 $modpath/mcookie/4 $modpath/mcookierc/5] -foreach f $tmpmodfilelist r [list $release $release $majorrel " 99" $majorrel] { +set tmpmodfilelist [list $modpath/mcookie/.modulerc $modpath/mcookie/2 $modpath/mcookie/3 $modpath/mcookie/4 $modpath/mcookierc/5 $modpath/mcookie/0 $modpath/mcookie/0.2] +foreach f $tmpmodfilelist r [list $release $release $majorrel " 99" $majorrel "$release#########################" "99###########"] { if { $verbose > 0 } { send_user "\tCreate test modulefile $f\n" } @@ -71,8 +71,8 @@ foreach f $tmpmodfilelist r [list $release $release $majorrel " 99" $majorrel] { } # test over temporarily created modfiles some of them matching minimal version requirement -set modlist [list mcookie/2 mcookie/3 mcookie/4 mcookierc/5] -set tserrlist [list "" "" "" [moderr_minverreq $modpath/mcookierc/.modulerc 99]] +set modlist [list mcookie/2 mcookie/3 mcookie/4 mcookierc/5 mcookie/0] +set tserrlist [list "" "" "" [moderr_minverreq $modpath/mcookierc/.modulerc 99] ""] foreach mod $modlist tserr $tserrlist { set ans [list] lappend ans [list setpath LOADEDMODULES $mod] @@ -88,6 +88,15 @@ foreach mod $modlist tserr $tserrlist { testouterr_cmd "sh" "path $mod" $anspa $tserr testouterr_cmd "sh" "paths $mod" $anspa $tserr } +# test over temporarily created modfiles none matching minimal version requirement +foreach mod [list mcookie/0.2] tserr [list [moderr_minverreq $modpath/mcookie/0.2 99]] { + testouterr_cmd "sh" "load $mod" ERR $tserr + testouterr_cmd "sh" "source $modpath/$mod" "" "" + testouterr_cmd "sh" "avail -t $mod" "" "" + testouterr_cmd "sh" "whatis $mod" ERR $tserr + testouterr_cmd "sh" "path $mod" "" $tserr + testouterr_cmd "sh" "paths $mod" "" "" +} # recheck generic modname now some valid modulefiles have been created there foreach mod [list mcookie mcookierc] resmod [list mcookie/4 mcookierc/5] tserr [list "" [moderr_minverreq $modpath/mcookierc/.modulerc 99]] { diff --git a/testsuite/modules.50-cmds/040-append.exp b/testsuite/modules.50-cmds/040-append.exp index 82983fa41..9317e2724 100644 --- a/testsuite/modules.50-cmds/040-append.exp +++ b/testsuite/modules.50-cmds/040-append.exp @@ -121,6 +121,20 @@ set modulefile "$modpath/$module" set ts_err "$moderr_msgs: add-path should get a valid environment variable name\nIn '$modulefile'\n$err_contactns" testouterr_cmd "sh" "load $module" "ERR" [msg_load $module $ts_err] +# +# Try command switches passed after variable name +# + +set module "append/1.8" +set modulefile "$modpath/$module" +set ans [list] +lappend ans [list setpath testsuite --delim=,:http://foobar.com] +lappend ans [list setpath testsuite2 -d:,:http://foobar.com] +lappend ans [list setpath testsuite3 -Lfoo:bar] +lappend ans [list setpath LOADEDMODULES $module] +lappend ans [list setpath _LMFILES_ $modulefile] +testouterr_cmd_re "sh" "load $module" $ans {} + # # Append multiple paths passed as one string # diff --git a/testsuite/modules.50-cmds/045-append-undo.exp b/testsuite/modules.50-cmds/045-append-undo.exp index 3a32445f6..c5612543d 100644 --- a/testsuite/modules.50-cmds/045-append-undo.exp +++ b/testsuite/modules.50-cmds/045-append-undo.exp @@ -144,6 +144,25 @@ setenv_loaded_module $module $modulefile set ts_err "$moderr_msgs: unload-path should get a valid environment variable name\nIn '$modulefile'\n$err_contactns" testouterr_cmd "sh" "unload $module" "ERR" [msg_unload $module $ts_err] +# +# Try command switches passed after variable name +# + +set module "append/1.8" +set modulefile "$modpath/$module" +setenv_loaded_module $module $modulefile +setenv_path_var testsuite --delim=, +setenv_path_var testsuite2 , foo +set ans [list] +lappend ans [list unsetpath testsuite] +lappend ans [list setpath testsuite2 foo] +lappend ans [list unset testsuite3] +lappend ans [list unsetpath LOADEDMODULES] +lappend ans [list unsetpath _LMFILES_] +testouterr_cmd_re "sh" "unload $module" $ans {} +unsetenv_path_var testsuite +unsetenv_path_var testsuite2 + # # Append multiple paths passed as one string # diff --git a/testsuite/modules.50-cmds/050-prepend.exp b/testsuite/modules.50-cmds/050-prepend.exp index 1509db1df..1ace1f227 100644 --- a/testsuite/modules.50-cmds/050-prepend.exp +++ b/testsuite/modules.50-cmds/050-prepend.exp @@ -149,6 +149,20 @@ set modulefile "$modpath/$module" set ts_err "$moderr_msgs: add-path should get a valid environment variable name\nIn '$modulefile'\n$err_contactns" testouterr_cmd "sh" "load $module" "ERR" [msg_load $module $ts_err] +# +# Try command switches passed after variable name +# + +set module "prepend/1.10" +set modulefile "$modpath/$module" +set ans [list] +lappend ans [list setpath testsuite --delim=,:http://foobar.com] +lappend ans [list setpath testsuite2 -d:,:http://foobar.com] +lappend ans [list setpath testsuite3 -Lfoo:bar] +lappend ans [list setpath LOADEDMODULES $module] +lappend ans [list setpath _LMFILES_ $modulefile] +testouterr_cmd_re "sh" "load $module" $ans {} + # # Try prepending empty string and check reference counter diff --git a/testsuite/modules.50-cmds/055-prepend-undo.exp b/testsuite/modules.50-cmds/055-prepend-undo.exp index 1c622ed0e..61371b246 100644 --- a/testsuite/modules.50-cmds/055-prepend-undo.exp +++ b/testsuite/modules.50-cmds/055-prepend-undo.exp @@ -174,6 +174,26 @@ setenv_loaded_module $module $modulefile set ts_err "$moderr_msgs: unload-path should get a valid environment variable name\nIn '$modulefile'\n$err_contactns" testouterr_cmd "sh" "unload $module" "ERR" [msg_unload $module $ts_err] +# +# Try command switches passed after variable name +# + +set module "prepend/1.10" +set modulefile "$modpath/$module" +setenv_loaded_module $module $modulefile +setenv_path_var testsuite --delim=, +setenv_path_var testsuite2 , foo +set ans [list] +lappend ans [list unsetpath testsuite] +lappend ans [list setpath testsuite2 foo] +lappend ans [list unset testsuite3] +lappend ans [list unsetpath LOADEDMODULES] +lappend ans [list unsetpath _LMFILES_] +testouterr_cmd_re "sh" "unload $module" $ans {} +unsetenv_path_var testsuite +unsetenv_path_var testsuite2 + + # # Try prepending empty string and check reference counter diff --git a/testsuite/modules.50-cmds/060-remove.exp b/testsuite/modules.50-cmds/060-remove.exp index 1ec8f9767..ebee61465 100644 --- a/testsuite/modules.50-cmds/060-remove.exp +++ b/testsuite/modules.50-cmds/060-remove.exp @@ -81,6 +81,25 @@ set modulefile "$modpath/$module" set ts_err "$moderr_msgs: unload-path should get a valid environment variable name\nIn '$modulefile'\n$err_contactns" testouterr_cmd "sh" "load $module" "ERR" [msg_load $module $ts_err] +# +# Try command switches passed after variable name +# + +setenv_path_var testsuite --delim=, +setenv_path_var testsuite2 , foo +set module "remove/1.8" +set modulefile "$modpath/$module" +set ans [list] +lappend ans [list unsetpath testsuite] +lappend ans [list setpath testsuite2 foo] +lappend ans [list unset testsuite3] +lappend ans [list setpath LOADEDMODULES $module] +lappend ans [list setpath _LMFILES_ $modulefile] +testouterr_cmd_re "sh" "load $module" $ans {} +unsetenv_path_var testsuite +unsetenv_path_var testsuite2 + + # # Remove multiple paths passed as one string # diff --git a/testsuite/modules.50-cmds/065-remove-undo.exp b/testsuite/modules.50-cmds/065-remove-undo.exp index f3a317c9f..24065baac 100644 --- a/testsuite/modules.50-cmds/065-remove-undo.exp +++ b/testsuite/modules.50-cmds/065-remove-undo.exp @@ -94,6 +94,23 @@ setenv_loaded_module $module $modulefile set ts_err "$moderr_msgs: unload-path should get a valid environment variable name\nIn '$modulefile'\n$err_contactns" testouterr_cmd "sh" "unload $module" "ERR" [msg_unload $module $ts_err] +# +# Try command switches passed after variable name +# + +setenv_path_var testsuite --delim=, +setenv_path_var testsuite2 , foo +set module "remove/1.8" +set modulefile "$modpath/$module" +setenv_loaded_module $module $modulefile +set ans [list] +lappend ans [list unsetpath LOADEDMODULES] +lappend ans [list unsetpath _LMFILES_] +testouterr_cmd_re "sh" "unload $module" $ans {} +unsetenv_path_var testsuite +unsetenv_path_var testsuite2 + + # # Remove multiple paths passed as one string # diff --git a/testsuite/modules.50-cmds/076-alias-sub.exp b/testsuite/modules.50-cmds/076-alias-sub.exp index ebdbcb877..45764318e 100644 --- a/testsuite/modules.50-cmds/076-alias-sub.exp +++ b/testsuite/modules.50-cmds/076-alias-sub.exp @@ -76,16 +76,19 @@ set modulefile "$modpath/$module" set ans [list] lappend ans [list alias testsuite {echo $(grep "report .Modules " modulecmd.tcl | tr -d \\ | awk '{print $3}')}] +lappend ans [list alias ts2 {echo "http://an.example.web?¶m=one"}] lappend ans [list setpath LOADEDMODULES $module] lappend ans [list setpath _LMFILES_ $modulefile] set ans2 [list] lappend ans2 [list alias testsuite {echo `grep "report .Modules " modulecmd.tcl | tr -d \\ | awk '{print $3}'`}] +lappend ans2 [list alias ts2 {echo "http://an.example.web?¶m=one"}] lappend ans2 [list setpath LOADEDMODULES $module] lappend ans2 [list setpath _LMFILES_ $modulefile] set ans3 [list] lappend ans3 [list alias testsuite {echo (grep "report .Modules " modulecmd.tcl | tr -d \\ | awk '{print $3}')}] +lappend ans3 [list alias ts2 {echo "http://an.example.web?¶m=one"}] lappend ans3 [list setpath LOADEDMODULES $module] lappend ans3 [list setpath _LMFILES_ $modulefile] diff --git a/testsuite/modules.50-cmds/376-deps7.exp b/testsuite/modules.50-cmds/376-deps7.exp index 904431b66..d9f03f667 100644 --- a/testsuite/modules.50-cmds/376-deps7.exp +++ b/testsuite/modules.50-cmds/376-deps7.exp @@ -197,6 +197,42 @@ set tserr [list {load m7} \n[msg_load m7 "$err_path'm8'" [err_reqlof m8]]] testouterr_cmd_re sh {load --force --auto m7} $ans [join $tserr \n] testouterr_cmd_re sh {load --force --no-auto m7} $ans [join $tserr \n] +# load test where 'module load' has multiple module args +set ans [list] +lappend ans [list setpath LOADEDMODULES m10:m11:m12] +lappend ans [list setpath _LMFILES_ $mp/m10:$mp/m11:$mp/m12] +lappend ans [list setpath MODULES_LMPREREQ m12&m10&m11] +lappend ans [list setpath MODULES_LMNOTUASKED m10:m11] +set tserr [list [msg_top_load m12 {} {m10 m11} {}]] +testouterr_cmd_re sh {load --auto m12} $ans [join $tserr \n] +testouterr_cmd_re sh {load --no-auto m12} $ans [join $tserr \n] +setenv_loaded_module [list m10] [list $mp/m10] +set ans [list] +lappend ans [list setpath LOADEDMODULES m10:m11:m12] +lappend ans [list setpath _LMFILES_ $mp/m10:$mp/m11:$mp/m12] +lappend ans [list setpath MODULES_LMPREREQ m12&m10&m11] +lappend ans [list setpath MODULES_LMNOTUASKED m11] +set tserr [list [msg_top_load m12 {} {m11} {}]] +testouterr_cmd_re sh {load --auto m12} $ans [join $tserr \n] +testouterr_cmd_re sh {load --no-auto m12} $ans [join $tserr \n] +setenv_loaded_module [list m11] [list $mp/m11] +set ans [list] +lappend ans [list setpath LOADEDMODULES m11:m10:m12] +lappend ans [list setpath _LMFILES_ $mp/m11:$mp/m10:$mp/m12] +lappend ans [list setpath MODULES_LMPREREQ m12&m10&m11] +lappend ans [list setpath MODULES_LMNOTUASKED m10] +set tserr [list [msg_top_load m12 {} {m10} {}]] +testouterr_cmd_re sh {load --auto m12} $ans [join $tserr \n] +testouterr_cmd_re sh {load --no-auto m12} $ans [join $tserr \n] +setenv_loaded_module [list m10 m11] [list $mp/m10 $mp/m11] +set ans [list] +lappend ans [list setpath LOADEDMODULES m10:m11:m12] +lappend ans [list setpath _LMFILES_ $mp/m10:$mp/m11:$mp/m12] +lappend ans [list setpath MODULES_LMPREREQ m12&m10&m11] +set tserr {} +testouterr_cmd_re sh {load --auto m12} $ans [join $tserr \n] +testouterr_cmd_re sh {load --no-auto m12} $ans [join $tserr \n] + # # 'module unload' tests diff --git a/testsuite/modules.90-avail/070-full.exp b/testsuite/modules.90-avail/070-full.exp index 350c7e91b..36bccd2e8 100644 --- a/testsuite/modules.90-avail/070-full.exp +++ b/testsuite/modules.90-avail/070-full.exp @@ -41,92 +41,93 @@ set len [string length $modpath] set lrep [expr {($test_cols - $len - 2)/2}] set rrep [expr {$test_cols - $len - 2 - $lrep}] set ts_sh "[string repeat {-} $lrep] $modpath [string repeat {-} $rrep] -alias/1.0 info/others loc_sym/1.0 modbad/is-used spread/3.0 -alias/2.0 info/shells loc_sym/alias1 modbad/path spread/4.0 -alias/3.0 info/shellsexp loc_sym/alias2 modbad/paths spread/5.0 -append/0.1 info/specified(foo) loc_sym/alias3 modbad/prepend-path spread/6.0 -append/0.2 info/type loc_sym/alias4 modbad/remove-path spread/7.0 -append/0.3 info/user loc_sym/alias5 module/2.0 spread/8.0 -append/0.4 info/userexp loc_sym/alias6 module/bad spreadrc/dir1/1.0 -append/0.5 inforc/1.0 loc_sym/alias7 module/empty spreadrc/dir2/1.0 -append/1.0 inforc/2.0(avail:bar:default) loc_sym/alias8 module/err spreadrc/dir3/1.0 -append/1.1 inforc/foo(@) loc_sym/alias9 module/lbad spreadrc/dir4/1.0 -append/1.3 load/00 loc_sym/alias10 module/lerr spreadrc/dir5/1.0 -append/1.4 load/10 loc_sym/alias11 module/lunk spreadrc/dir6/1.0 -append/1.5 load/11 loc_sym/exec1 module/meta spreadrc/dir7/1.0 -append/1.6 load/12 loc_sym/exec2 module/relpath spreadrc/dir8/1.0 -append/1.7 load/13 loc_sym/exec3 module/unk symlink/0.9 -append/2.0 load/14 loc_sym/getvers1 modvar/modfile symlink/1(@) -append/2.1 load/15 loc_sym/getvers2 modvar/submodfile symlink/1.2(default:new) -append/2.2 load/16 loc_sym/getvers3 prepend/0.1 symlink/bar(@) -append/2.3 load/17 loc_sym/getvers4 prepend/0.2 symlink2/1.0 -append/2.4 load/18 loc_sym/getvers5 prepend/0.3 symlink2/2.0 -append/4.0 load/19 loc_sym/getvers6 prepend/0.4 system/1.0 -append/4.1 load/20 loc_sym/getvers7 prepend/0.5 system/2.0 -append/5.0 load/21 loc_sym/getvers8 prepend/1.0 test/1.0 -append/6.0 load/22 loc_sym/getvers9 prepend/1.1 test/1.2 -append/7.0 load/23 loc_sym/getvers10 prepend/1.3 test/2.0 -append/8.0 load/24 loc_sym/versinf1 prepend/1.4 tr2_loc(trreg) -averssort/1(@) load/25 loc_sym/versinf2 prepend/1.5 tr2_loc/al1(tr2unstable:@) -averssort/1.2.4(@) load/26 loc_sym/versinf3 prepend/1.6 tr2_loc/al2(tr2bar:@) -averssort/1.10(@) load/27 loc_sym/versinf4 prepend/1.7 tr2_loc/al3(default:tr2exp:trreg:@) -bad/after(good) load/28 loc_sym/versinf5 prepend/1.8 tr2_loc/al4(@) -bad/before load/29 loc_sym/versinf6 prepend/1.9 tr2_loc/al5(default:trreg:@) -bad2/body load/30 loc_sym/versinf7 prepend/2.0 tr_loc/al1(tr2unstable:trunstable:@) -bad2/proc load/all(default) loc_sym/version1 prepend/2.1 tr_loc/al2(default:tr2bar:tr2exp:trbar:trreg:@) -break/1.0 loc_def/default loc_sym/version2 prepend/2.2 tr_loc/al3(trexp:@) -break/2.0 loc_def/truedef loc_sym/version3 prepend/2.3 tr_loc/al4(@) -break/3.0 loc_dv1/1.0 loc_sym/version4 prepend/2.4 tr_loc/al5(@) -break/4.0 loc_dv1/2.0 loc_sym/version5 prepend/3.0 trace/all_off -break/5.0 loc_dv2/1.0(default) loc_sym/version6 prepend/3.1 trace/all_on -break/6.0 loc_dv2/2.0 loc_sym/version7 prepend/4.0 uname/cache -chdir/1.0 loc_dv3/1.0 loc_sym/version8 prepend/8.0 uname/domain -chdir/2.0 loc_dv3/2.0 loc_sym/version9 prereq/full uname/machine -chdir/3.0 loc_dv4/1.0 loc_sym/version10 prereq/fullpath uname/nodename -chdir/4.0 loc_dv6/1.0 loc_sym/version11 prereq/module uname/release -coll/a loc_dv6/2.0/1.0 loc_sym/version12 prereq/orlist uname/sysname -coll/b loc_dv7/1.0 loc_sym/version13 prereq/relpath uname/unk -coll/c loc_dv7/2.0(default) loc_sym/version14 puts/1 uname/version -coll/d loc_dv7/2.0/1.0 loc_sym/version15 puts/2 unsetenv/0.6 -conflict/full loc_dv7/3.0 loc_sym/version16 puts/3 unsetenv/0.8 -conflict/fullpath loc_dv8/1.0 loc_sym/version17 puts/4 unsetenv/0.9 -conflict/module loc_dv8/2.0 loc_sym/version18 puts/5 unsetenv/1.0 -conflict/relpath loc_dv9/1.0(default) loc_sym/version19 puts/6 use/1.0(default) -continue/1.0 loc_dv9/2.0 loc_sym/version20 puts/7 use/2.0 -continue/2.0 loc_dvv1/1.0(default) loc_sym/version21 puts/8 use/2.1 -continue/3.0 loc_dvv1/2.0 loc_sym/version22 puts/9 use/2.2 -continue/4.0 loc_fq/1.0 loc_sym/version23 recurs/modA use/3.0 -continue/5.0 loc_rc1/1.0(foo) loc_sym/version24 recurs/modB use/3.1 -continue/6.0 loc_rc1/2.0 loc_sym/version25 remove/0.3 use/3.2 -dirmodalias(@) loc_rc2/1.0(bar:blah:foo) loc_sym/version26 remove/0.4 use/4.0 -dirmodalias/1.0 loc_rc2/2.0 loc_tr(reg) remove/0.5 use/4.1 -dirmodvirt loc_rc3/1.0(default) loc_tr/1.0(cur:stable) remove/1.0 user/adv -dirmodvirt/1.0 loc_rc3/2.0(cur:stable) loc_tr/2.0(next:tr2unstable:trunstable:unstable) remove/1.3 user/advanced -empty/1.0 loc_rc3/3.0(chk:exp:new:test) loc_tr/3.0(bar:default:exp:foo:reg:tr2bar:tr2exp:trbar:trexp:trreg) remove/1.4 user/exp -eschars/1.0 loc_rc4/1.0 loc_tr/al1(unstable:@) remove/1.5 user/expert -exit/1.0 loc_rc4/2.0(default) loc_tr/al2(bar:default:exp:reg:trexp:@) remove/1.6 user/nov -exit/2.0 loc_rc4/3.0 loc_tr/al3(default:exp:reg:@) remove/1.7 user/novice -exit/3.0 loc_rc5/1.0 loc_tr/al4(default:reg:@) remove/2.0 user/undef -exit/4.0 loc_rc5/2.0 loc_virt1/1.0 remove/2.3 verbose/msg -function/1.0 loc_rc6/0.9 loc_virt1/2.0 remove/2.4 verbose/off -function/2.0 loc_rc6/1(@) loc_virt1/3.0 remove/3.0 verbose/on -getenv/0.6 loc_rc6/1.2(default:new) loc_virt1/4.0 remove/3.1 verbose/undef -getenv/1.0 loc_rc6/bar(@) loc_virt2/1.0 remove/4.0 versions/1.1 -help/2.0 loc_rc7/0.9 loc_virt2/2.0 remove/4.1 versions/1.2 -info/command loc_rc7/1(@) log/badfac remove/4.2 versions/1.3 -info/commandexp loc_rc7/1.2 log/err_both_1 remove/5.0 verssort/1 -info/isavail loc_rc7/bar(@) log/err_both_2 remove/8.0 verssort/1.2.1 -info/isloaded loc_rc8/0.9(@) log/err_file setenv/0.6 verssort/1.2.4 -info/issaved loc_rc8/1.0 log/err_syslog setenv/0.7.1 verssort/1.8-2015-12-01 -info/isused loc_rc010/2.0 modbad/append-path setenv/0.7.2 verssort/1.8-2016-02-01 -info/loaded loc_rcv1/1(@) modbad/autoinit setenv/0.8 verssort/1.10 -info/mode1 loc_rcv1/1.1 modbad/empty setenv/1.0 whatis/lines -info/mode2 loc_rcv1/1.2(default:new) modbad/foo source/0.9 whatis/multiple -info/mode3 loc_rcv1/2.0 modbad/help source/1.0 whatis/none -info/mode4 loc_rcv1/bar(@) modbad/info-loaded source/1.1 whatis/single -info/mode5 loc_rcv2/1.2 modbad/is-avail source/1.2 whatis/string -info/mode6 loc_rcv2/1.5 modbad/is-loaded spread/1.0 x-resource/1 -info/name loc_rcv2/2.0 modbad/is-saved spread/2.0 " +alias/1.0 info/others loc_sym/alias1 modbad/paths spread/4.0 +alias/2.0 info/shells loc_sym/alias2 modbad/prepend-path spread/5.0 +alias/3.0 info/shellsexp loc_sym/alias3 modbad/remove-path spread/6.0 +append/0.1 info/specified(foo) loc_sym/alias4 module/2.0 spread/7.0 +append/0.2 info/type loc_sym/alias5 module/bad spread/8.0 +append/0.3 info/user loc_sym/alias6 module/empty spreadrc/dir1/1.0 +append/0.4 info/userexp loc_sym/alias7 module/err spreadrc/dir2/1.0 +append/0.5 inforc/1.0 loc_sym/alias8 module/lbad spreadrc/dir3/1.0 +append/1.0 inforc/2.0(avail:bar:default) loc_sym/alias9 module/lerr spreadrc/dir4/1.0 +append/1.1 inforc/foo(@) loc_sym/alias10 module/lunk spreadrc/dir5/1.0 +append/1.3 load/00 loc_sym/alias11 module/meta spreadrc/dir6/1.0 +append/1.4 load/10 loc_sym/exec1 module/relpath spreadrc/dir7/1.0 +append/1.5 load/11 loc_sym/exec2 module/unk spreadrc/dir8/1.0 +append/1.6 load/12 loc_sym/exec3 modvar/modfile symlink/0.9 +append/1.7 load/13 loc_sym/getvers1 modvar/submodfile symlink/1(@) +append/1.8 load/14 loc_sym/getvers2 prepend/0.1 symlink/1.2(default:new) +append/2.0 load/15 loc_sym/getvers3 prepend/0.2 symlink/bar(@) +append/2.1 load/16 loc_sym/getvers4 prepend/0.3 symlink2/1.0 +append/2.2 load/17 loc_sym/getvers5 prepend/0.4 symlink2/2.0 +append/2.3 load/18 loc_sym/getvers6 prepend/0.5 system/1.0 +append/2.4 load/19 loc_sym/getvers7 prepend/1.0 system/2.0 +append/4.0 load/20 loc_sym/getvers8 prepend/1.1 test/1.0 +append/4.1 load/21 loc_sym/getvers9 prepend/1.3 test/1.2 +append/5.0 load/22 loc_sym/getvers10 prepend/1.4 test/2.0 +append/6.0 load/23 loc_sym/versinf1 prepend/1.5 tr2_loc(trreg) +append/7.0 load/24 loc_sym/versinf2 prepend/1.6 tr2_loc/al1(tr2unstable:@) +append/8.0 load/25 loc_sym/versinf3 prepend/1.7 tr2_loc/al2(tr2bar:@) +averssort/1(@) load/26 loc_sym/versinf4 prepend/1.8 tr2_loc/al3(default:tr2exp:trreg:@) +averssort/1.2.4(@) load/27 loc_sym/versinf5 prepend/1.9 tr2_loc/al4(@) +averssort/1.10(@) load/28 loc_sym/versinf6 prepend/1.10 tr2_loc/al5(default:trreg:@) +bad/after(good) load/29 loc_sym/versinf7 prepend/2.0 tr_loc/al1(tr2unstable:trunstable:@) +bad/before load/30 loc_sym/version1 prepend/2.1 tr_loc/al2(default:tr2bar:tr2exp:trbar:trreg:@) +bad2/body load/all(default) loc_sym/version2 prepend/2.2 tr_loc/al3(trexp:@) +bad2/proc loc_def/default loc_sym/version3 prepend/2.3 tr_loc/al4(@) +break/1.0 loc_def/truedef loc_sym/version4 prepend/2.4 tr_loc/al5(@) +break/2.0 loc_dv1/1.0 loc_sym/version5 prepend/3.0 trace/all_off +break/3.0 loc_dv1/2.0 loc_sym/version6 prepend/3.1 trace/all_on +break/4.0 loc_dv2/1.0(default) loc_sym/version7 prepend/4.0 uname/cache +break/5.0 loc_dv2/2.0 loc_sym/version8 prepend/8.0 uname/domain +break/6.0 loc_dv3/1.0 loc_sym/version9 prereq/full uname/machine +chdir/1.0 loc_dv3/2.0 loc_sym/version10 prereq/fullpath uname/nodename +chdir/2.0 loc_dv4/1.0 loc_sym/version11 prereq/module uname/release +chdir/3.0 loc_dv6/1.0 loc_sym/version12 prereq/orlist uname/sysname +chdir/4.0 loc_dv6/2.0/1.0 loc_sym/version13 prereq/relpath uname/unk +coll/a loc_dv7/1.0 loc_sym/version14 puts/1 uname/version +coll/b loc_dv7/2.0(default) loc_sym/version15 puts/2 unsetenv/0.6 +coll/c loc_dv7/2.0/1.0 loc_sym/version16 puts/3 unsetenv/0.8 +coll/d loc_dv7/3.0 loc_sym/version17 puts/4 unsetenv/0.9 +conflict/full loc_dv8/1.0 loc_sym/version18 puts/5 unsetenv/1.0 +conflict/fullpath loc_dv8/2.0 loc_sym/version19 puts/6 use/1.0(default) +conflict/module loc_dv9/1.0(default) loc_sym/version20 puts/7 use/2.0 +conflict/relpath loc_dv9/2.0 loc_sym/version21 puts/8 use/2.1 +continue/1.0 loc_dvv1/1.0(default) loc_sym/version22 puts/9 use/2.2 +continue/2.0 loc_dvv1/2.0 loc_sym/version23 recurs/modA use/3.0 +continue/3.0 loc_fq/1.0 loc_sym/version24 recurs/modB use/3.1 +continue/4.0 loc_rc1/1.0(foo) loc_sym/version25 remove/0.3 use/3.2 +continue/5.0 loc_rc1/2.0 loc_sym/version26 remove/0.4 use/4.0 +continue/6.0 loc_rc2/1.0(bar:blah:foo) loc_tr(reg) remove/0.5 use/4.1 +dirmodalias(@) loc_rc2/2.0 loc_tr/1.0(cur:stable) remove/1.0 user/adv +dirmodalias/1.0 loc_rc3/1.0(default) loc_tr/2.0(next:tr2unstable:trunstable:unstable) remove/1.3 user/advanced +dirmodvirt loc_rc3/2.0(cur:stable) loc_tr/3.0(bar:default:exp:foo:reg:tr2bar:tr2exp:trbar:trexp:trreg) remove/1.4 user/exp +dirmodvirt/1.0 loc_rc3/3.0(chk:exp:new:test) loc_tr/al1(unstable:@) remove/1.5 user/expert +empty/1.0 loc_rc4/1.0 loc_tr/al2(bar:default:exp:reg:trexp:@) remove/1.6 user/nov +eschars/1.0 loc_rc4/2.0(default) loc_tr/al3(default:exp:reg:@) remove/1.7 user/novice +exit/1.0 loc_rc4/3.0 loc_tr/al4(default:reg:@) remove/1.8 user/undef +exit/2.0 loc_rc5/1.0 loc_virt1/1.0 remove/2.0 verbose/msg +exit/3.0 loc_rc5/2.0 loc_virt1/2.0 remove/2.3 verbose/off +exit/4.0 loc_rc6/0.9 loc_virt1/3.0 remove/2.4 verbose/on +function/1.0 loc_rc6/1(@) loc_virt1/4.0 remove/3.0 verbose/undef +function/2.0 loc_rc6/1.2(default:new) loc_virt2/1.0 remove/3.1 versions/1.1 +getenv/0.6 loc_rc6/bar(@) loc_virt2/2.0 remove/4.0 versions/1.2 +getenv/1.0 loc_rc7/0.9 log/badfac remove/4.1 versions/1.3 +help/2.0 loc_rc7/1(@) log/err_both_1 remove/4.2 verssort/1 +info/command loc_rc7/1.2 log/err_both_2 remove/5.0 verssort/1.2.1 +info/commandexp loc_rc7/bar(@) log/err_file remove/8.0 verssort/1.2.4 +info/isavail loc_rc8/0.9(@) log/err_syslog setenv/0.6 verssort/1.8-2015-12-01 +info/isloaded loc_rc8/1.0 modbad/append-path setenv/0.7.1 verssort/1.8-2016-02-01 +info/issaved loc_rc010/2.0 modbad/autoinit setenv/0.7.2 verssort/1.10 +info/isused loc_rcv1/1(@) modbad/empty setenv/0.8 whatis/lines +info/loaded loc_rcv1/1.1 modbad/foo setenv/1.0 whatis/multiple +info/mode1 loc_rcv1/1.2(default:new) modbad/help source/0.9 whatis/none +info/mode2 loc_rcv1/2.0 modbad/info-loaded source/1.0 whatis/single +info/mode3 loc_rcv1/bar(@) modbad/is-avail source/1.1 whatis/string +info/mode4 loc_rcv2/1.2 modbad/is-loaded source/1.2 x-resource/1 +info/mode5 loc_rcv2/1.5 modbad/is-saved spread/1.0 +info/mode6 loc_rcv2/2.0 modbad/is-used spread/2.0 +info/name loc_sym/1.0 modbad/path spread/3.0 " set ts_sh_small "- $modpath.deep - badmodvers/dir1/2.0 diff --git a/testsuite/modules.90-avail/090-dup-modpath.exp b/testsuite/modules.90-avail/090-dup-modpath.exp new file mode 100644 index 000000000..471f35238 --- /dev/null +++ b/testsuite/modules.90-avail/090-dup-modpath.exp @@ -0,0 +1,37 @@ +############################################################################## +# Modules Revision 3.0 +# Providing a flexible user environment +# +# File: modules.90-avail/%M% +# Revision: %I% +# First Edition: 2019/05/15 +# Last Mod.: %U%, %G% +# +# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr +# +# Description: Testuite testsequence +# Command: avail +# Modulefiles: +# Sub-Command: +# +# Comment: %C{ +# Check the module 'avail' command when MODULEPATH variable +# hold duplicate path entries +# }C% +# +############################################################################## + +# set MODULEPATH with multiple entries all pointing to the same directory +setenv_path_var MODULEPATH $modpath:$modpath:$modpath/test/.. + +# single entry should be reported +testouterr_cmd sh {avail -t help/2.0} OK "$modpath:\nhelp/2.0" +testouterr_cmd sh use OK "Search path for module files (in search order):\n $modpath" + +# +# Cleanup +# + +# restore MODULEPATH +setenv_path_var MODULEPATH $modpath + diff --git a/testsuite/modules.95-version/090-dup-modpath-version.exp b/testsuite/modules.95-version/090-dup-modpath-version.exp new file mode 100644 index 000000000..ae67531f5 --- /dev/null +++ b/testsuite/modules.95-version/090-dup-modpath-version.exp @@ -0,0 +1,42 @@ +############################################################################## +# Modules Revision 3.0 +# Providing a flexible user environment +# +# File: modules.95-version/%M% +# Revision: %I% +# First Edition: 2019/05/15 +# Last Mod.: %U%, %G% +# +# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr +# +# Description: Testuite testsequence +# Command: avail +# Modulefiles: +# Sub-Command: +# +# Comment: %C{ +# Check the module 'avail' command when MODULEPATH variable +# hold path entries using variable reference that all resolve +# to the same directory +# }C% +# +############################################################################## + +# set MODULEPATH with multiple entries all pointing to the same directory +unsetenv_var UNDEFINED +setenv_var DEFINED modulefiles +setenv_path_var MODULEPATH $modpath:$modpath/\$UNDEFINED:$modpath/../\$DEFINED + +# single entry should be reported +testouterr_cmd sh {avail -t help/2.0} OK "$modpath:\nhelp/2.0" +testouterr_cmd sh use OK "Search path for module files (in search order):\n $modpath" + + +# +# Cleanup +# + +# restore environment +setenv_path_var MODULEPATH $modpath +unsetenv_var DEFINED +