############################################################################## # Modules Revision 3.0 # Providing a flexible user environment # # File: modules.50-cmds/%M% # Revision: %I% # First Edition: 2025/05/31 # Last Mod.: %U%, %G% # # Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr # # Description: Testuite testsequence # Command: load, switch # Modulefiles: moda, modb, modc, othervia, othervib, othervic # Sub-Command: # # Comment: %C{ # Test require_via mechanism with switch mechanism # }C% # ############################################################################## setenv_var TESTSUITE_SPIDER_MODPATH1 use_modpath2 setenv_var TESTSUITE_SPIDER_MODPATH2 use_modpath3 # # replace via module with alternative via module # modulepath still enabled # setenv_var TESTSUITE_SPIDER_OTHERMODPATH1 use_modpath2_and_conflict_moda setenv_var TESTSUITE_REQUIRE_VIA multi_mod_in_path_with_req1 setenv_path_var MODULEPATH $modpath.spider3:$modpath.spider2:$modpath.spider1 setenv_var __MODULES_LMUSE moda/1&$modpath.spider2:modb/1&$modpath.spider3 setenv_var __MODULES_LMPREREQ othervib/1&modb/1:othervic/1&othervib/1 setenv_loaded_module [list moda/1 modb/1 othervib/1 modc/1 othervic/1] [list $modpath.spider1/moda/1 $modpath.spider2/modb/1 $modpath.spider2/othervib/1 $modpath.spider3/modc/1 $modpath.spider3/othervic/1] # replace with module load setenv_var MODULES_REQUIRE_VIA 0 setenv_var MODULES_CONFLICT_UNLOAD 0 set tserr [msg_load othervia/1 [err_conflict moda/1]] testouterr_cmd bash {load --no-auto othervia/1} ERR $tserr testouterr_cmd bash {load --auto othervia/1} ERR $tserr setenv_var MODULES_CONFLICT_UNLOAD 1 testouterr_cmd bash {load --no-auto othervia/1} ERR $tserr set ans [list] lappend ans [list set __MODULES_LMUSE modb/1&$modpath.spider3:othervia/1&$modpath.spider2] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set _LMFILES_ $modpath.spider2/modb/1:$modpath.spider2/othervib/1:$modpath.spider3/modc/1:$modpath.spider3/othervic/1:$modpath.spider1/othervia/1] lappend ans [list set LOADEDMODULES modb/1:othervib/1:modc/1:othervic/1:othervia/1] lappend ans [list set MODULEPATH $modpath.spider2:$modpath.spider3:$modpath.spider1] set tserr [msg_top_load othervia/1 moda/1 {} {}] testouterr_cmd bash {load --auto othervia/1} $ans $tserr setenv_var MODULES_REQUIRE_VIA 1 setenv_var MODULES_CONFLICT_UNLOAD 0 set tserr [msg_load othervia/1 [err_conflict moda/1]] testouterr_cmd bash {load --no-auto othervia/1} ERR $tserr testouterr_cmd bash {load --auto othervia/1} ERR $tserr setenv_var MODULES_CONFLICT_UNLOAD 1 testouterr_cmd bash {load --no-auto othervia/1} ERR $tserr set ans [list] lappend ans [list set __MODULES_LMUSE othervia/1&$modpath.spider2:modb/1&$modpath.spider3] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set __MODULES_LMPREREQ othervib/1&modb/1:othervic/1&othervib/1] lappend ans [list set _LMFILES_ $modpath.spider1/othervia/1:$modpath.spider2/modb/1:$modpath.spider2/othervib/1:$modpath.spider3/modc/1:$modpath.spider3/othervic/1] lappend ans [list set LOADEDMODULES othervia/1:modb/1:othervib/1:modc/1:othervic/1] lappend ans [list set MODULEPATH $modpath.spider3:$modpath.spider2:$modpath.spider1] set tserr [msg_top_load othervia/1 moda/1 {} {modb/1 othervib/1 modc/1 othervic/1}] testouterr_cmd bash {load --auto othervia/1} $ans $tserr # replace with module switch setenv_var MODULES_REQUIRE_VIA 0 setenv_var MODULES_CONFLICT_UNLOAD 0 set ans [list] lappend ans [list set __MODULES_LMUSE modb/1&$modpath.spider3:othervia/1&$modpath.spider2] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set _LMFILES_ $modpath.spider2/modb/1:$modpath.spider2/othervib/1:$modpath.spider3/modc/1:$modpath.spider3/othervic/1:$modpath.spider1/othervia/1] lappend ans [list set LOADEDMODULES modb/1:othervib/1:modc/1:othervic/1:othervia/1] lappend ans [list set MODULEPATH $modpath.spider2:$modpath.spider3:$modpath.spider1] set tserr [msg_load othervia/1 [err_conflict moda/1]] testouterr_cmd bash {switch --no-auto moda/1 othervia/1} $ans {} testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans {} setenv_var MODULES_CONFLICT_UNLOAD 1 testouterr_cmd bash {switch --no-auto moda/1 othervia/1} $ans {} testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans {} setenv_var MODULES_REQUIRE_VIA 1 setenv_var MODULES_CONFLICT_UNLOAD 0 set tserr [msg_unload moda/1 [err_prerequn modb/1 othervib/1]]\n\n[msg_switch moda/1 othervia/1 [err_swoff moda/1]] testouterr_cmd bash {switch --no-auto moda/1 othervia/1} ERR $tserr set ans [list] lappend ans [list set __MODULES_LMUSE othervia/1&$modpath.spider2:modb/1&$modpath.spider3] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set __MODULES_LMPREREQ othervib/1&modb/1:othervic/1&othervib/1] lappend ans [list set _LMFILES_ $modpath.spider1/othervia/1:$modpath.spider2/modb/1:$modpath.spider2/othervib/1:$modpath.spider3/modc/1:$modpath.spider3/othervic/1] lappend ans [list set LOADEDMODULES othervia/1:modb/1:othervib/1:modc/1:othervic/1] lappend ans [list set MODULEPATH $modpath.spider3:$modpath.spider2:$modpath.spider1] set tserr [msg_top_switch moda/1 othervia/1 {} {} {} {} {modb/1 othervib/1 modc/1 othervic/1}] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr setenv_var MODULES_CONFLICT_UNLOAD 1 set tserr [msg_unload moda/1 [err_prerequn modb/1 othervib/1]]\n\n[msg_switch moda/1 othervia/1 [err_swoff moda/1]] testouterr_cmd bash {switch --no-auto moda/1 othervia/1} ERR $tserr set tserr [msg_top_switch moda/1 othervia/1 {} {} {} {} {modb/1 othervib/1 modc/1 othervic/1}] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr skip_if_quick_mode # # replace via module with not an alternative via module # modulepath still enabled # setenv_var TESTSUITE_SPIDER_OTHERMODPATH1 conflict_moda setenv_var TESTSUITE_REQUIRE_VIA multi_mod_in_path_with_req1 setenv_path_var MODULEPATH $modpath.spider3:$modpath.spider2:$modpath.spider1 setenv_var __MODULES_LMUSE moda/1&$modpath.spider2:modb/1&$modpath.spider3 setenv_var __MODULES_LMPREREQ othervib/1&modb/1:othervic/1&othervib/1 setenv_loaded_module [list moda/1 modb/1 othervib/1 modc/1 othervic/1] [list $modpath.spider1/moda/1 $modpath.spider2/modb/1 $modpath.spider2/othervib/1 $modpath.spider3/modc/1 $modpath.spider3/othervic/1] # replace with module load setenv_var MODULES_REQUIRE_VIA 0 setenv_var MODULES_CONFLICT_UNLOAD 0 set tserr [msg_load othervia/1 [err_conflict moda/1]] testouterr_cmd bash {load --no-auto othervia/1} ERR $tserr testouterr_cmd bash {load --auto othervia/1} ERR $tserr setenv_var MODULES_CONFLICT_UNLOAD 1 testouterr_cmd bash {load --no-auto othervia/1} ERR $tserr set ans [list] lappend ans [list set __MODULES_LMUSE modb/1&$modpath.spider3] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set _LMFILES_ $modpath.spider2/modb/1:$modpath.spider2/othervib/1:$modpath.spider3/modc/1:$modpath.spider3/othervic/1:$modpath.spider1/othervia/1] lappend ans [list set LOADEDMODULES modb/1:othervib/1:modc/1:othervic/1:othervia/1] lappend ans [list set MODULEPATH $modpath.spider3:$modpath.spider1] set tserr [msg_top_load othervia/1 moda/1 {} {}] testouterr_cmd bash {load --auto othervia/1} $ans $tserr setenv_var MODULES_REQUIRE_VIA 1 setenv_var MODULES_CONFLICT_UNLOAD 0 set tserr [msg_load othervia/1 [err_conflict moda/1]] testouterr_cmd bash {load --no-auto othervia/1} ERR $tserr testouterr_cmd bash {load --auto othervia/1} ERR $tserr setenv_var MODULES_CONFLICT_UNLOAD 1 testouterr_cmd bash {load --no-auto othervia/1} ERR $tserr set ans [list] lappend ans [list unset __MODULES_LMUSE] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list unset __MODULES_LMPREREQ] lappend ans [list set _LMFILES_ $modpath.spider1/othervia/1] lappend ans [list set LOADEDMODULES othervia/1] lappend ans [list set MODULEPATH $modpath.spider1] set tserr [msg_top_load_conun othervia/1 {othervic/1 modc/1 othervib/1 modb/1} moda/1 {} {} {}] testouterr_cmd bash {load --auto othervia/1} $ans $tserr # replace with module switch setenv_var MODULES_REQUIRE_VIA 0 setenv_var MODULES_CONFLICT_UNLOAD 0 set ans [list] lappend ans [list set __MODULES_LMUSE modb/1&$modpath.spider3] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set _LMFILES_ $modpath.spider2/modb/1:$modpath.spider2/othervib/1:$modpath.spider3/modc/1:$modpath.spider3/othervic/1:$modpath.spider1/othervia/1] lappend ans [list set LOADEDMODULES modb/1:othervib/1:modc/1:othervic/1:othervia/1] lappend ans [list set MODULEPATH $modpath.spider3:$modpath.spider1] set tserr [msg_load othervia/1 [err_conflict moda/1]] testouterr_cmd bash {switch --no-auto moda/1 othervia/1} $ans {} testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans {} setenv_var MODULES_CONFLICT_UNLOAD 1 testouterr_cmd bash {switch --no-auto moda/1 othervia/1} $ans {} testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans {} setenv_var MODULES_REQUIRE_VIA 1 setenv_var MODULES_CONFLICT_UNLOAD 0 set tserr [msg_unload moda/1 [err_prerequn modb/1 othervib/1]]\n\n[msg_switch moda/1 othervia/1 [err_swoff moda/1]] testouterr_cmd bash {switch --no-auto moda/1 othervia/1} ERR $tserr set ans [list] lappend ans [list unset __MODULES_LMUSE] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list unset __MODULES_LMPREREQ] lappend ans [list set _LMFILES_ $modpath.spider1/othervia/1] lappend ans [list set LOADEDMODULES othervia/1] lappend ans [list set MODULEPATH $modpath.spider1] set tserr [msg_top_switch moda/1 othervia/1 {othervic/1 modc/1 othervib/1 modb/1} {} {} {} {}] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr setenv_var MODULES_CONFLICT_UNLOAD 1 set tserr [msg_unload moda/1 [err_prerequn modb/1 othervib/1]]\n\n[msg_switch moda/1 othervia/1 [err_swoff moda/1]] testouterr_cmd bash {switch --no-auto moda/1 othervia/1} ERR $tserr set tserr [msg_top_switch moda/1 othervia/1 {othervic/1 modc/1 othervib/1 modb/1} {} {} {} {}] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr # # replace via module with not an alternative via module # modulepath not anymore enabled # setenv_var TESTSUITE_SPIDER_OTHERMODPATH1 conflict_moda setenv_var TESTSUITE_REQUIRE_VIA multi_mod_in_path_with_req1 setenv_path_var MODULEPATH $modpath.spider1 setenv_var __MODULES_LMUSE moda/1&$modpath.spider2:modb/1&$modpath.spider3 setenv_var __MODULES_LMPREREQ othervib/1&modb/1:othervic/1&othervib/1 setenv_loaded_module [list moda/1 modb/1 othervib/1 modc/1 othervic/1] [list $modpath.spider1/moda/1 $modpath.spider2/modb/1 $modpath.spider2/othervib/1 $modpath.spider3/modc/1 $modpath.spider3/othervic/1] # replace with module load setenv_var MODULES_REQUIRE_VIA 0 setenv_var MODULES_CONFLICT_UNLOAD 0 set tserr [msg_load othervia/1 [err_conflict moda/1]] testouterr_cmd bash {load --no-auto othervia/1} ERR $tserr testouterr_cmd bash {load --auto othervia/1} ERR $tserr setenv_var MODULES_CONFLICT_UNLOAD 1 testouterr_cmd bash {load --no-auto othervia/1} ERR $tserr set ans [list] lappend ans [list set __MODULES_LMUSE modb/1&$modpath.spider3] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set _LMFILES_ $modpath.spider2/modb/1:$modpath.spider2/othervib/1:$modpath.spider3/modc/1:$modpath.spider3/othervic/1:$modpath.spider1/othervia/1] lappend ans [list set LOADEDMODULES modb/1:othervib/1:modc/1:othervic/1:othervia/1] lappend ans [list set MODULEPATH $modpath.spider1] set tserr [msg_top_load othervia/1 moda/1 {} {}] testouterr_cmd bash {load --auto othervia/1} $ans $tserr setenv_var MODULES_REQUIRE_VIA 1 setenv_var MODULES_CONFLICT_UNLOAD 0 set tserr [msg_load othervia/1 [err_conflict moda/1]] testouterr_cmd bash {load --no-auto othervia/1} ERR $tserr testouterr_cmd bash {load --auto othervia/1} ERR $tserr setenv_var MODULES_CONFLICT_UNLOAD 1 testouterr_cmd bash {load --no-auto othervia/1} ERR $tserr set ans [list] lappend ans [list unset __MODULES_LMUSE] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list unset __MODULES_LMPREREQ] lappend ans [list set _LMFILES_ $modpath.spider1/othervia/1] lappend ans [list set LOADEDMODULES othervia/1] lappend ans [list set MODULEPATH $modpath.spider1] set tserr [msg_top_load_conun othervia/1 {othervic/1 modc/1 othervib/1 modb/1} moda/1 {} {} {}] testouterr_cmd bash {load --auto othervia/1} $ans $tserr # replace with module switch setenv_var MODULES_REQUIRE_VIA 0 setenv_var MODULES_CONFLICT_UNLOAD 0 set ans [list] lappend ans [list set __MODULES_LMUSE modb/1&$modpath.spider3] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set _LMFILES_ $modpath.spider2/modb/1:$modpath.spider2/othervib/1:$modpath.spider3/modc/1:$modpath.spider3/othervic/1:$modpath.spider1/othervia/1] lappend ans [list set LOADEDMODULES modb/1:othervib/1:modc/1:othervic/1:othervia/1] lappend ans [list set MODULEPATH $modpath.spider1] set tserr [msg_load othervia/1 [err_conflict moda/1]] testouterr_cmd bash {switch --no-auto moda/1 othervia/1} $ans {} testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans {} setenv_var MODULES_CONFLICT_UNLOAD 1 testouterr_cmd bash {switch --no-auto moda/1 othervia/1} $ans {} testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans {} setenv_var MODULES_REQUIRE_VIA 1 setenv_var MODULES_CONFLICT_UNLOAD 0 set tserr [msg_unload moda/1 [err_prerequn modb/1 othervib/1]]\n\n[msg_switch moda/1 othervia/1 [err_swoff moda/1]] testouterr_cmd bash {switch --no-auto moda/1 othervia/1} ERR $tserr set ans [list] lappend ans [list unset __MODULES_LMUSE] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list unset __MODULES_LMPREREQ] lappend ans [list set _LMFILES_ $modpath.spider1/othervia/1] lappend ans [list set LOADEDMODULES othervia/1] lappend ans [list set MODULEPATH $modpath.spider1] set tserr [msg_top_switch moda/1 othervia/1 {othervic/1 modc/1 othervib/1 modb/1} {} {} {} {}] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr setenv_var MODULES_CONFLICT_UNLOAD 1 set tserr [msg_unload moda/1 [err_prerequn modb/1 othervib/1]]\n\n[msg_switch moda/1 othervia/1 [err_swoff moda/1]] testouterr_cmd bash {switch --no-auto moda/1 othervia/1} ERR $tserr set tserr [msg_top_switch moda/1 othervia/1 {othervic/1 modc/1 othervib/1 modb/1} {} {} {} {}] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr # MSYS environment does not support anymore such test if {!$is_symlink_supported || $os_name eq {msys} || [catch {file link -symbolic $modpath.other2 modulefiles.spider2}]} { send_user "\tskipping tests over '$modpath.other2' modulepath as symbolic links are not supported on filesystem\n" } else { # # replace via module with a via module of another modulepath # containing all the module to reload # modulepath still enabled # setenv_var TESTSUITE_SPIDER_OTHERMODPATH1 use_other2_and_conflict_moda setenv_var TESTSUITE_REQUIRE_VIA multi_mod_in_path_with_req1 setenv_path_var MODULEPATH $modpath.spider3:$modpath.spider2:$modpath.spider1 setenv_var __MODULES_LMUSE moda/1&$modpath.spider2:modb/1&$modpath.spider3 setenv_var __MODULES_LMPREREQ othervib/1&modb/1:othervic/1&othervib/1 setenv_loaded_module [list moda/1 modb/1 othervib/1 modc/1 othervic/1] [list $modpath.spider1/moda/1 $modpath.spider2/modb/1 $modpath.spider2/othervib/1 $modpath.spider3/modc/1 $modpath.spider3/othervic/1] # replace with module load setenv_var MODULES_REQUIRE_VIA 0 setenv_var MODULES_CONFLICT_UNLOAD 0 set tserr [msg_load othervia/1 [err_conflict moda/1]] testouterr_cmd bash {load --no-auto othervia/1} ERR $tserr testouterr_cmd bash {load --auto othervia/1} ERR $tserr setenv_var MODULES_CONFLICT_UNLOAD 1 testouterr_cmd bash {load --no-auto othervia/1} ERR $tserr set ans [list] lappend ans [list set __MODULES_LMUSE modb/1&$modpath.spider3:othervia/1&$modpath.other2] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set _LMFILES_ $modpath.spider2/modb/1:$modpath.spider2/othervib/1:$modpath.spider3/modc/1:$modpath.spider3/othervic/1:$modpath.spider1/othervia/1] lappend ans [list set LOADEDMODULES modb/1:othervib/1:modc/1:othervic/1:othervia/1] lappend ans [list set MODULEPATH $modpath.other2:$modpath.spider3:$modpath.spider1] set tserr [msg_top_load othervia/1 moda/1 {} {}] testouterr_cmd bash {load --auto othervia/1} $ans $tserr setenv_var MODULES_REQUIRE_VIA 1 setenv_var MODULES_CONFLICT_UNLOAD 0 set tserr [msg_load othervia/1 [err_conflict moda/1]] testouterr_cmd bash {load --no-auto othervia/1} ERR $tserr testouterr_cmd bash {load --auto othervia/1} ERR $tserr setenv_var MODULES_CONFLICT_UNLOAD 1 testouterr_cmd bash {load --no-auto othervia/1} ERR $tserr set ans [list] lappend ans [list set __MODULES_LMUSE othervia/1&$modpath.other2:modb/1&$modpath.spider3] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set __MODULES_LMPREREQ othervib/1&modb/1:othervic/1&othervib/1] lappend ans [list set _LMFILES_ $modpath.spider1/othervia/1:$modpath.other2/modb/1:$modpath.other2/othervib/1:$modpath.spider3/modc/1:$modpath.spider3/othervic/1] lappend ans [list set LOADEDMODULES othervia/1:modb/1:othervib/1:modc/1:othervic/1] lappend ans [list set MODULEPATH $modpath.spider3:$modpath.other2:$modpath.spider1] set tserr [msg_top_load othervia/1 moda/1 {} {modb/1 othervib/1 modc/1 othervic/1}] testouterr_cmd bash {load --auto othervia/1} $ans $tserr # replace with module switch setenv_var MODULES_REQUIRE_VIA 0 setenv_var MODULES_CONFLICT_UNLOAD 0 set ans [list] lappend ans [list set __MODULES_LMUSE modb/1&$modpath.spider3:othervia/1&$modpath.other2] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set _LMFILES_ $modpath.spider2/modb/1:$modpath.spider2/othervib/1:$modpath.spider3/modc/1:$modpath.spider3/othervic/1:$modpath.spider1/othervia/1] lappend ans [list set LOADEDMODULES modb/1:othervib/1:modc/1:othervic/1:othervia/1] lappend ans [list set MODULEPATH $modpath.other2:$modpath.spider3:$modpath.spider1] set tserr [msg_load othervia/1 [err_conflict moda/1]] testouterr_cmd bash {switch --no-auto moda/1 othervia/1} $ans {} testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans {} setenv_var MODULES_CONFLICT_UNLOAD 1 testouterr_cmd bash {switch --no-auto moda/1 othervia/1} $ans {} testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans {} setenv_var MODULES_REQUIRE_VIA 1 setenv_var MODULES_CONFLICT_UNLOAD 0 set tserr [msg_unload moda/1 [err_prerequn modb/1 othervib/1]]\n\n[msg_switch moda/1 othervia/1 [err_swoff moda/1]] testouterr_cmd bash {switch --no-auto moda/1 othervia/1} ERR $tserr set ans [list] lappend ans [list set __MODULES_LMUSE othervia/1&$modpath.other2:modb/1&$modpath.spider3] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set __MODULES_LMPREREQ othervib/1&modb/1:othervic/1&othervib/1] lappend ans [list set _LMFILES_ $modpath.spider1/othervia/1:$modpath.other2/modb/1:$modpath.other2/othervib/1:$modpath.spider3/modc/1:$modpath.spider3/othervic/1] lappend ans [list set LOADEDMODULES othervia/1:modb/1:othervib/1:modc/1:othervic/1] lappend ans [list set MODULEPATH $modpath.spider3:$modpath.other2:$modpath.spider1] set tserr [msg_top_switch moda/1 othervia/1 {} {} {} {} {modb/1 othervib/1 modc/1 othervic/1}] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr setenv_var MODULES_CONFLICT_UNLOAD 1 set tserr [msg_unload moda/1 [err_prerequn modb/1 othervib/1]]\n\n[msg_switch moda/1 othervia/1 [err_swoff moda/1]] testouterr_cmd bash {switch --no-auto moda/1 othervia/1} ERR $tserr set tserr [msg_top_switch moda/1 othervia/1 {} {} {} {} {modb/1 othervib/1 modc/1 othervic/1}] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr # # replace via module with a via module of another modulepath # containing all the module to reload # modulepath not anymore enabled # setenv_var TESTSUITE_SPIDER_OTHERMODPATH1 use_other2_and_conflict_moda setenv_var TESTSUITE_REQUIRE_VIA multi_mod_in_path_with_req1 setenv_path_var MODULEPATH $modpath.spider1 setenv_var __MODULES_LMUSE moda/1&$modpath.spider2:modb/1&$modpath.spider3 setenv_var __MODULES_LMPREREQ othervib/1&modb/1:othervic/1&othervib/1 setenv_loaded_module [list moda/1 modb/1 othervib/1 modc/1 othervic/1] [list $modpath.spider1/moda/1 $modpath.spider2/modb/1 $modpath.spider2/othervib/1 $modpath.spider3/modc/1 $modpath.spider3/othervic/1] # replace with module load setenv_var MODULES_REQUIRE_VIA 0 setenv_var MODULES_CONFLICT_UNLOAD 0 set tserr [msg_load othervia/1 [err_conflict moda/1]] testouterr_cmd bash {load --no-auto othervia/1} ERR $tserr testouterr_cmd bash {load --auto othervia/1} ERR $tserr setenv_var MODULES_CONFLICT_UNLOAD 1 testouterr_cmd bash {load --no-auto othervia/1} ERR $tserr set ans [list] lappend ans [list set __MODULES_LMUSE modb/1&$modpath.spider3:othervia/1&$modpath.other2] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set _LMFILES_ $modpath.spider2/modb/1:$modpath.spider2/othervib/1:$modpath.spider3/modc/1:$modpath.spider3/othervic/1:$modpath.spider1/othervia/1] lappend ans [list set LOADEDMODULES modb/1:othervib/1:modc/1:othervic/1:othervia/1] lappend ans [list set MODULEPATH $modpath.other2:$modpath.spider1] set tserr [msg_top_load othervia/1 moda/1 {} {}] testouterr_cmd bash {load --auto othervia/1} $ans $tserr setenv_var MODULES_REQUIRE_VIA 1 setenv_var MODULES_CONFLICT_UNLOAD 0 set tserr [msg_load othervia/1 [err_conflict moda/1]] testouterr_cmd bash {load --no-auto othervia/1} ERR $tserr testouterr_cmd bash {load --auto othervia/1} ERR $tserr setenv_var MODULES_CONFLICT_UNLOAD 1 testouterr_cmd bash {load --no-auto othervia/1} ERR $tserr set ans [list] lappend ans [list set __MODULES_LMUSE othervia/1&$modpath.other2:modb/1&$modpath.spider3] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set __MODULES_LMPREREQ othervib/1&modb/1:othervic/1&othervib/1] lappend ans [list set _LMFILES_ $modpath.spider1/othervia/1:$modpath.other2/modb/1:$modpath.other2/othervib/1:$modpath.spider3/modc/1:$modpath.spider3/othervic/1] lappend ans [list set LOADEDMODULES othervia/1:modb/1:othervib/1:modc/1:othervic/1] lappend ans [list set MODULEPATH $modpath.spider3:$modpath.other2:$modpath.spider1] set tserr [msg_top_load othervia/1 moda/1 {} {modb/1 othervib/1 modc/1 othervic/1}] testouterr_cmd bash {load --auto othervia/1} $ans $tserr # replace with module switch setenv_var MODULES_REQUIRE_VIA 0 setenv_var MODULES_CONFLICT_UNLOAD 0 set ans [list] lappend ans [list set __MODULES_LMUSE modb/1&$modpath.spider3:othervia/1&$modpath.other2] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set _LMFILES_ $modpath.spider2/modb/1:$modpath.spider2/othervib/1:$modpath.spider3/modc/1:$modpath.spider3/othervic/1:$modpath.spider1/othervia/1] lappend ans [list set LOADEDMODULES modb/1:othervib/1:modc/1:othervic/1:othervia/1] lappend ans [list set MODULEPATH $modpath.other2:$modpath.spider1] set tserr [msg_load othervia/1 [err_conflict moda/1]] testouterr_cmd bash {switch --no-auto moda/1 othervia/1} $ans {} testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans {} setenv_var MODULES_CONFLICT_UNLOAD 1 testouterr_cmd bash {switch --no-auto moda/1 othervia/1} $ans {} testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans {} setenv_var MODULES_REQUIRE_VIA 1 setenv_var MODULES_CONFLICT_UNLOAD 0 set tserr [msg_unload moda/1 [err_prerequn modb/1 othervib/1]]\n\n[msg_switch moda/1 othervia/1 [err_swoff moda/1]] testouterr_cmd bash {switch --no-auto moda/1 othervia/1} ERR $tserr set ans [list] lappend ans [list set __MODULES_LMUSE othervia/1&$modpath.other2:modb/1&$modpath.spider3] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set __MODULES_LMPREREQ othervib/1&modb/1:othervic/1&othervib/1] lappend ans [list set _LMFILES_ $modpath.spider1/othervia/1:$modpath.other2/modb/1:$modpath.other2/othervib/1:$modpath.spider3/modc/1:$modpath.spider3/othervic/1] lappend ans [list set LOADEDMODULES othervia/1:modb/1:othervib/1:modc/1:othervic/1] lappend ans [list set MODULEPATH $modpath.spider3:$modpath.other2:$modpath.spider1] set tserr [msg_top_switch moda/1 othervia/1 {} {} {} {} {modb/1 othervib/1 modc/1 othervic/1}] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr setenv_var MODULES_CONFLICT_UNLOAD 1 set tserr [msg_unload moda/1 [err_prerequn modb/1 othervib/1]]\n\n[msg_switch moda/1 othervia/1 [err_swoff moda/1]] testouterr_cmd bash {switch --no-auto moda/1 othervia/1} ERR $tserr set tserr [msg_top_switch moda/1 othervia/1 {} {} {} {} {modb/1 othervib/1 modc/1 othervic/1}] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr # # replace via module with a via module of another modulepath # containing all the module to reload # via module loaded after potential dependent # setenv_var TESTSUITE_SPIDER_OTHERMODPATH1 use_other2_and_conflict_moda setenv_var TESTSUITE_REQUIRE_VIA multi_mod_in_path_with_req1 setenv_var __MODULES_LMUSE modb/1&$modpath.spider3:moda/1&$modpath.spider2 setenv_var __MODULES_LMPREREQ othervib/1&modb/1:othervic/1&othervib/1 setenv_loaded_module [list modb/1 othervib/1 moda/1 modc/1 othervic/1] [list $modpath.spider2/modb/1 $modpath.spider2/othervib/1 $modpath.spider1/moda/1 $modpath.spider3/modc/1 $modpath.spider3/othervic/1] setenv_var MODULES_REQUIRE_VIA 1 setenv_var MODULES_CONFLICT_UNLOAD 1 # modulepath still enabled setenv_path_var MODULEPATH $modpath.spider2:$modpath.spider3:$modpath.spider1 set ans [list] lappend ans [list set __MODULES_LMUSE modb/1&$modpath.spider3:othervia/1&$modpath.other2] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set _LMFILES_ $modpath.spider2/modb/1:$modpath.spider2/othervib/1:$modpath.spider3/modc/1:$modpath.spider3/othervic/1:$modpath.spider1/othervia/1] lappend ans [list set LOADEDMODULES modb/1:othervib/1:modc/1:othervic/1:othervia/1] lappend ans [list set MODULEPATH $modpath.other2:$modpath.spider3:$modpath.spider1] set tserr [msg_top_load othervia/1 moda/1 {} {}] testouterr_cmd bash {load --auto othervia/1} $ans $tserr testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans {} # modulepath not anymore enabled setenv_path_var MODULEPATH $modpath.spider3:$modpath.spider1 testouterr_cmd bash {load --auto othervia/1} $ans $tserr testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans {} # # replace via module with a via module of another modulepath # containing all the module to reload # via module also a requirement declared by dependent # setenv_var TESTSUITE_SPIDER_OTHERMODPATH1 use_other2_and_conflict_moda setenv_var TESTSUITE_REQUIRE_VIA prereq_on_via1 setenv_path_var MODULEPATH $modpath.spider3:$modpath.spider2:$modpath.spider1 setenv_var __MODULES_LMUSE moda/1&$modpath.spider2:modb/1&$modpath.spider3 setenv_var __MODULES_LMPREREQ modb/1&moda|othervia:othervib/1&modb/1:modc/1&modb:othervic/1&othervib/1 setenv_loaded_module [list moda/1 modb/1 othervib/1 modc/1 othervic/1] [list $modpath.spider1/moda/1 $modpath.spider2/modb/1 $modpath.spider2/othervib/1 $modpath.spider3/modc/1 $modpath.spider3/othervic/1] setenv_var MODULES_REQUIRE_VIA 1 setenv_var MODULES_CONFLICT_UNLOAD 1 set ans [list] lappend ans [list set __MODULES_LMUSE othervia/1&$modpath.other2:modb/1&$modpath.spider3] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set __MODULES_LMPREREQ modb/1&moda|othervia:othervib/1&modb/1:modc/1&modb:othervic/1&othervib/1] lappend ans [list set _LMFILES_ $modpath.spider1/othervia/1:$modpath.other2/modb/1:$modpath.other2/othervib/1:$modpath.spider3/modc/1:$modpath.spider3/othervic/1] lappend ans [list set LOADEDMODULES othervia/1:modb/1:othervib/1:modc/1:othervic/1] lappend ans [list set MODULEPATH $modpath.spider3:$modpath.other2:$modpath.spider1] set tserr [msg_top_load othervia/1 moda/1 {} {modb/1 othervib/1 modc/1 othervic/1}] testouterr_cmd bash {load --auto othervia/1} $ans $tserr set tserr [msg_top_switch moda/1 othervia/1 {} {} {} {} {modb/1 othervib/1 modc/1 othervic/1}] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr # # replace via module with a via module of another modulepath # containing all the module to reload # test tag persistency # setenv_var TESTSUITE_SPIDER_OTHERMODPATH1 use_other2_and_conflict_moda setenv_path_var MODULEPATH $modpath.spider3:$modpath.spider2:$modpath.spider1 setenv_var __MODULES_LMUSE moda/1&$modpath.spider2:modb/1&$modpath.spider3 setenv_var __MODULES_LMPREREQ othervib/1&modb/1:othervic/1&othervib/1 setenv_loaded_module [list moda/1 modb/1 othervib/1 modc/1 othervic/1] [list $modpath.spider1/moda/1 $modpath.spider2/modb/1 $modpath.spider2/othervib/1 $modpath.spider3/modc/1 $modpath.spider3/othervic/1] setenv_var MODULES_REQUIRE_VIA 1 setenv_var MODULES_CONFLICT_UNLOAD 1 # regular and extra tags setenv_var TESTSUITE_REQUIRE_VIA tag_before_not_after setenv_var __MODULES_LMEXTRATAG othervib/1&bar setenv_var __MODULES_LMTAG othervib/1&foo&bar set ans [list] lappend ans [list set __MODULES_LMUSE othervia/1&$modpath.other2:modb/1&$modpath.spider3] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set __MODULES_LMPREREQ othervib/1&modb/1:othervic/1&othervib/1] lappend ans [list set _LMFILES_ $modpath.spider1/othervia/1:$modpath.other2/modb/1:$modpath.other2/othervib/1:$modpath.spider3/modc/1:$modpath.spider3/othervic/1] lappend ans [list set LOADEDMODULES othervia/1:modb/1:othervib/1:modc/1:othervic/1] lappend ans [list set MODULEPATH $modpath.spider3:$modpath.other2:$modpath.spider1] lappend ans [list set __MODULES_LMEXTRATAG othervib/1&bar] lappend ans [list set __MODULES_LMTAG othervib/1&bar] set tserr [msg_top_load othervia/1 moda/1 {} {modb/1 othervib/1 modc/1 othervic/1}] testouterr_cmd bash {load --auto othervia/1} $ans $tserr set tserr [msg_top_switch moda/1 othervia/1 {} {} {} {} {modb/1 othervib/1 modc/1 othervic/1}] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr setenv_var TESTSUITE_REQUIRE_VIA tag_after_not_before unsetenv_var __MODULES_LMEXTRATAG unsetenv_var __MODULES_LMTAG set ans [list] lappend ans [list set __MODULES_LMUSE othervia/1&$modpath.other2:modb/1&$modpath.spider3] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set __MODULES_LMPREREQ othervib/1&modb/1:othervic/1&othervib/1] lappend ans [list set _LMFILES_ $modpath.spider1/othervia/1:$modpath.other2/modb/1:$modpath.other2/othervib/1:$modpath.spider3/modc/1:$modpath.spider3/othervic/1] lappend ans [list set LOADEDMODULES othervia/1:modb/1:othervib/1:modc/1:othervic/1] lappend ans [list set __MODULES_LMTAG othervib/1&foo] lappend ans [list set MODULEPATH $modpath.spider3:$modpath.other2:$modpath.spider1] set tserr [msg_top_load othervia/1 moda/1 {} {modb/1 othervib/1 modc/1 othervic/1}] testouterr_cmd bash {load --auto othervia/1} $ans $tserr set tserr [msg_top_switch moda/1 othervia/1 {} {} {} {} {modb/1 othervib/1 modc/1 othervic/1}] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr setenv_var TESTSUITE_REQUIRE_VIA tag_before_and_after setenv_var __MODULES_LMEXTRATAG othervib/1&bar setenv_var __MODULES_LMTAG othervib/1&foo&bar set ans [list] lappend ans [list set __MODULES_LMUSE othervia/1&$modpath.other2:modb/1&$modpath.spider3] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set __MODULES_LMPREREQ othervib/1&modb/1:othervic/1&othervib/1] lappend ans [list set _LMFILES_ $modpath.spider1/othervia/1:$modpath.other2/modb/1:$modpath.other2/othervib/1:$modpath.spider3/modc/1:$modpath.spider3/othervic/1] lappend ans [list set LOADEDMODULES othervia/1:modb/1:othervib/1:modc/1:othervic/1] lappend ans [list set MODULEPATH $modpath.spider3:$modpath.other2:$modpath.spider1] lappend ans [list set __MODULES_LMEXTRATAG othervib/1&bar] lappend ans [list set __MODULES_LMTAG othervib/1&bar&foo] set tserr [msg_top_load othervia/1 moda/1 {} {modb/1 othervib/1 modc/1 othervic/1}] testouterr_cmd bash {load --auto othervia/1} $ans $tserr set tserr [msg_top_switch moda/1 othervia/1 {} {} {} {} {modb/1 othervib/1 modc/1 othervic/1}] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr setenv_var TESTSUITE_REQUIRE_VIA tag_before_no_module_after setenv_var __MODULES_LMEXTRATAG othervib/1&bar setenv_var __MODULES_LMTAG othervib/1&foo&bar set ans [list] lappend ans [list set __MODULES_LMUSE othervia/1&$modpath.other2:modb/1&$modpath.spider3] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list unset __MODULES_LMPREREQ] lappend ans [list set _LMFILES_ $modpath.spider1/othervia/1:$modpath.other2/modb/1:$modpath.spider3/modc/1] lappend ans [list set LOADEDMODULES othervia/1:modb/1:modc/1] lappend ans [list set MODULEPATH $modpath.spider3:$modpath.other2:$modpath.spider1] lappend ans [list unset __MODULES_LMEXTRATAG] lappend ans [list unset __MODULES_LMTAG] set tserr [msg_top_load othervia/1 moda/1 {} {{othervic/1 modc/1 othervib/1 modb/1} {modb/1 modc/1}}] testouterr_cmd bash {load --auto othervia/1} $ans $tserr set tserr [msg_top_switch moda/1 othervia/1 {} {} {} {} {{othervic/1 modc/1 othervib/1 modb/1} {modb/1 modc/1}}] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr unsetenv_var __MODULES_LMEXTRATAG # auto-loaded and keep-loaded setenv_var TESTSUITE_REQUIRE_VIA keep_loaded_before_not_after setenv_var __MODULES_LMTAG othervib/1&auto-loaded&keep-loaded set ans [list] lappend ans [list set __MODULES_LMUSE othervia/1&$modpath.other2:modb/1&$modpath.spider3] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set __MODULES_LMPREREQ othervib/1&modb/1:othervic/1&othervib/1] lappend ans [list set _LMFILES_ $modpath.spider1/othervia/1:$modpath.other2/modb/1:$modpath.other2/othervib/1:$modpath.spider3/modc/1:$modpath.spider3/othervic/1] lappend ans [list set LOADEDMODULES othervia/1:modb/1:othervib/1:modc/1:othervic/1] lappend ans [list set MODULEPATH $modpath.spider3:$modpath.other2:$modpath.spider1] lappend ans [list set __MODULES_LMTAG othervib/1&auto-loaded] set tserr [msg_top_load othervia/1 moda/1 {} {modb/1 othervib/1 modc/1 othervic/1}] testouterr_cmd bash {load --auto othervia/1} $ans $tserr set tserr [msg_top_switch moda/1 othervia/1 {} {} {} {} {modb/1 othervib/1 modc/1 othervic/1}] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr setenv_var TESTSUITE_REQUIRE_VIA keep_loaded_after_not_before setenv_var __MODULES_LMTAG othervib/1&auto-loaded set ans [list] lappend ans [list set __MODULES_LMUSE othervia/1&$modpath.other2:modb/1&$modpath.spider3] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set __MODULES_LMPREREQ othervib/1&modb/1:othervic/1&othervib/1] lappend ans [list set _LMFILES_ $modpath.spider1/othervia/1:$modpath.other2/modb/1:$modpath.other2/othervib/1:$modpath.spider3/modc/1:$modpath.spider3/othervic/1] lappend ans [list set LOADEDMODULES othervia/1:modb/1:othervib/1:modc/1:othervic/1] lappend ans [list set MODULEPATH $modpath.spider3:$modpath.other2:$modpath.spider1] lappend ans [list set __MODULES_LMTAG othervib/1&auto-loaded&keep-loaded] set tserr [msg_top_load othervia/1 moda/1 {} {modb/1 othervib/1 modc/1 othervic/1}] testouterr_cmd bash {load --auto othervia/1} $ans $tserr set tserr [msg_top_switch moda/1 othervia/1 {} {} {} {} {modb/1 othervib/1 modc/1 othervic/1}] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr setenv_var TESTSUITE_REQUIRE_VIA keep_loaded_before_and_after setenv_var __MODULES_LMTAG othervib/1&auto-loaded&keep-loaded set ans [list] lappend ans [list set __MODULES_LMUSE othervia/1&$modpath.other2:modb/1&$modpath.spider3] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set __MODULES_LMPREREQ othervib/1&modb/1:othervic/1&othervib/1] lappend ans [list set _LMFILES_ $modpath.spider1/othervia/1:$modpath.other2/modb/1:$modpath.other2/othervib/1:$modpath.spider3/modc/1:$modpath.spider3/othervic/1] lappend ans [list set LOADEDMODULES othervia/1:modb/1:othervib/1:modc/1:othervic/1] lappend ans [list set MODULEPATH $modpath.spider3:$modpath.other2:$modpath.spider1] lappend ans [list set __MODULES_LMTAG othervib/1&auto-loaded&keep-loaded] set tserr [msg_top_load othervia/1 moda/1 {} {modb/1 othervib/1 modc/1 othervic/1}] testouterr_cmd bash {load --auto othervia/1} $ans $tserr set tserr [msg_top_switch moda/1 othervia/1 {} {} {} {} {modb/1 othervib/1 modc/1 othervic/1}] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr # sticky tag setenv_var TESTSUITE_REQUIRE_VIA sticky_before_not_after setenv_var __MODULES_LMTAG othervib/1&sticky set ans [list] lappend ans [list set __MODULES_LMUSE othervia/1&$modpath.other2:modb/1&$modpath.spider3] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set __MODULES_LMPREREQ othervib/1&modb/1:othervic/1&othervib/1] lappend ans [list set _LMFILES_ $modpath.spider1/othervia/1:$modpath.other2/modb/1:$modpath.other2/othervib/1:$modpath.spider3/modc/1:$modpath.spider3/othervic/1] lappend ans [list set LOADEDMODULES othervia/1:modb/1:othervib/1:modc/1:othervic/1] lappend ans [list set MODULEPATH $modpath.spider3:$modpath.other2:$modpath.spider1] lappend ans [list unset __MODULES_LMTAG] set tserr [msg_top_load othervia/1 moda/1 {} {modb/1 othervib/1 modc/1 othervic/1}] testouterr_cmd bash {load --auto othervia/1} $ans $tserr set tserr [msg_top_switch moda/1 othervia/1 {} {} {} {} {modb/1 othervib/1 modc/1 othervic/1}] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr setenv_var TESTSUITE_REQUIRE_VIA sticky_after_not_before unsetenv_var __MODULES_LMTAG # sticky tag is forwarded to module in new modulepath set ans [list] lappend ans [list set __MODULES_LMUSE othervia/1&$modpath.other2:modb/1&$modpath.spider3] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set __MODULES_LMPREREQ othervib/1&modb/1:othervic/1&othervib/1] lappend ans [list set _LMFILES_ $modpath.spider1/othervia/1:$modpath.other2/modb/1:$modpath.other2/othervib/1:$modpath.spider3/modc/1:$modpath.spider3/othervic/1] lappend ans [list set LOADEDMODULES othervia/1:modb/1:othervib/1:modc/1:othervic/1] lappend ans [list set __MODULES_LMTAG othervib/1&sticky] lappend ans [list set MODULEPATH $modpath.spider3:$modpath.other2:$modpath.spider1] set tserr [msg_top_load othervia/1 moda/1 {} {modb/1 othervib/1 modc/1 othervic/1}] testouterr_cmd bash {load --auto othervia/1} $ans $tserr set tserr [msg_top_switch moda/1 othervia/1 {} {} {} {} {modb/1 othervib/1 modc/1 othervic/1}] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr setenv_var TESTSUITE_REQUIRE_VIA sticky_before_and_after setenv_var __MODULES_LMTAG othervib/1&sticky set ans [list] lappend ans [list set __MODULES_LMUSE othervia/1&$modpath.other2:modb/1&$modpath.spider3] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set __MODULES_LMPREREQ othervib/1&modb/1:othervic/1&othervib/1] lappend ans [list set _LMFILES_ $modpath.spider1/othervia/1:$modpath.other2/modb/1:$modpath.other2/othervib/1:$modpath.spider3/modc/1:$modpath.spider3/othervic/1] lappend ans [list set LOADEDMODULES othervia/1:modb/1:othervib/1:modc/1:othervic/1] lappend ans [list set MODULEPATH $modpath.spider3:$modpath.other2:$modpath.spider1] lappend ans [list set __MODULES_LMTAG othervib/1&sticky] set tserr [msg_top_load othervia/1 moda/1 {} {modb/1 othervib/1 modc/1 othervic/1}] testouterr_cmd bash {load --auto othervia/1} $ans $tserr set tserr [msg_top_switch moda/1 othervia/1 {} {} {} {} {modb/1 othervib/1 modc/1 othervic/1}] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr setenv_var TESTSUITE_REQUIRE_VIA sticky_before_no_module_after setenv_var __MODULES_LMTAG othervib/1&sticky set tserr [msg_load othervia/1 $err_path'othervib/1' [err_stickydepre othervib/1]] testouterr_cmd bash {load --auto othervia/1} ERR $tserr set tserr [msg_switch moda/1 othervia/1 $err_path'othervib/1' [err_stickydepre othervib/1]] testouterr_cmd bash {switch --auto moda/1 othervia/1} ERR $tserr # super-sticky tag setenv_var TESTSUITE_REQUIRE_VIA super_sticky_before_not_after setenv_var __MODULES_LMTAG othervib/1&super-sticky set ans [list] lappend ans [list set __MODULES_LMUSE othervia/1&$modpath.other2:modb/1&$modpath.spider3] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set __MODULES_LMPREREQ othervib/1&modb/1:othervic/1&othervib/1] lappend ans [list set _LMFILES_ $modpath.spider1/othervia/1:$modpath.other2/modb/1:$modpath.other2/othervib/1:$modpath.spider3/modc/1:$modpath.spider3/othervic/1] lappend ans [list set LOADEDMODULES othervia/1:modb/1:othervib/1:modc/1:othervic/1] lappend ans [list set MODULEPATH $modpath.spider3:$modpath.other2:$modpath.spider1] lappend ans [list unset __MODULES_LMTAG] set tserr [msg_top_load othervia/1 moda/1 {} {modb/1 othervib/1 modc/1 othervic/1}] testouterr_cmd bash {load --auto othervia/1} $ans $tserr set tserr [msg_top_switch moda/1 othervia/1 {} {} {} {} {modb/1 othervib/1 modc/1 othervic/1}] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr setenv_var TESTSUITE_REQUIRE_VIA super_sticky_after_not_before unsetenv_var __MODULES_LMTAG # super-sticky tag is forwarded to module in new modulepath set ans [list] lappend ans [list set __MODULES_LMUSE othervia/1&$modpath.other2:modb/1&$modpath.spider3] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set __MODULES_LMPREREQ othervib/1&modb/1:othervic/1&othervib/1] lappend ans [list set _LMFILES_ $modpath.spider1/othervia/1:$modpath.other2/modb/1:$modpath.other2/othervib/1:$modpath.spider3/modc/1:$modpath.spider3/othervic/1] lappend ans [list set LOADEDMODULES othervia/1:modb/1:othervib/1:modc/1:othervic/1] lappend ans [list set __MODULES_LMTAG othervib/1&super-sticky] lappend ans [list set MODULEPATH $modpath.spider3:$modpath.other2:$modpath.spider1] set tserr [msg_top_load othervia/1 moda/1 {} {modb/1 othervib/1 modc/1 othervic/1}] testouterr_cmd bash {load --auto othervia/1} $ans $tserr set tserr [msg_top_switch moda/1 othervia/1 {} {} {} {} {modb/1 othervib/1 modc/1 othervic/1}] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr setenv_var TESTSUITE_REQUIRE_VIA super_sticky_before_and_after setenv_var __MODULES_LMTAG othervib/1&super-sticky set ans [list] lappend ans [list set __MODULES_LMUSE othervia/1&$modpath.other2:modb/1&$modpath.spider3] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set __MODULES_LMPREREQ othervib/1&modb/1:othervic/1&othervib/1] lappend ans [list set _LMFILES_ $modpath.spider1/othervia/1:$modpath.other2/modb/1:$modpath.other2/othervib/1:$modpath.spider3/modc/1:$modpath.spider3/othervic/1] lappend ans [list set LOADEDMODULES othervia/1:modb/1:othervib/1:modc/1:othervic/1] lappend ans [list set MODULEPATH $modpath.spider3:$modpath.other2:$modpath.spider1] lappend ans [list set __MODULES_LMTAG othervib/1&super-sticky] set tserr [msg_top_load othervia/1 moda/1 {} {modb/1 othervib/1 modc/1 othervic/1}] testouterr_cmd bash {load --auto othervia/1} $ans $tserr set tserr [msg_top_switch moda/1 othervia/1 {} {} {} {} {modb/1 othervib/1 modc/1 othervic/1}] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr setenv_var TESTSUITE_REQUIRE_VIA super_sticky_before_no_module_after setenv_var __MODULES_LMTAG othervib/1&super-sticky set tserr [msg_load othervia/1 $err_path'othervib/1' [err_stickydepre othervib/1]] testouterr_cmd bash {load --auto othervia/1} ERR $tserr set tserr [msg_load othervia/1 $err_path'othervib/1' [err_stickydepre othervib/1]] testouterr_cmd bash {load --force --auto othervia/1} ERR $tserr set tserr [msg_switch moda/1 othervia/1 $err_path'othervib/1' [err_stickydepre othervib/1]] testouterr_cmd bash {switch --auto moda/1 othervia/1} ERR $tserr testouterr_cmd bash {switch --force --auto moda/1 othervia/1} ERR $tserr unsetenv_var __MODULES_LMTAG # # replace via module with a via module of another modulepath # containing all the module to reload or not # with virtual module # setenv_var TESTSUITE_SPIDER_OTHERMODPATH1 use_other2_and_conflict_moda setenv_var __MODULES_LMUSE moda/1&$modpath.spider2:modb/1&$modpath.spider3 setenv_var __MODULES_LMPREREQ othervirt/1&modb/1:othervic/1&othervirt/1 setenv_loaded_module [list moda/1 modb/1 othervirt/1 modc/1 othervic/1] [list $modpath.spider1/moda/1 $modpath.spider2/modb/1 $modpath.spider2/othervib/1 $modpath.spider3/modc/1 $modpath.spider3/othervic/1] setenv_var MODULES_REQUIRE_VIA 1 setenv_var MODULES_CONFLICT_UNLOAD 1 setenv_var TESTSUITE_REQUIRE_VIA virtual_before_and_after # modulepath enabled setenv_path_var MODULEPATH $modpath.spider3:$modpath.spider2:$modpath.spider1 set ans [list] lappend ans [list set __MODULES_LMUSE othervia/1&$modpath.other2:modb/1&$modpath.spider3] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set __MODULES_LMPREREQ othervirt/1&modb/1:othervic/1&othervirt/1] lappend ans [list set _LMFILES_ $modpath.spider1/othervia/1:$modpath.other2/modb/1:$modpath.other2/othervib/1:$modpath.spider3/modc/1:$modpath.spider3/othervic/1] lappend ans [list set LOADEDMODULES othervia/1:modb/1:othervirt/1:modc/1:othervic/1] lappend ans [list set MODULEPATH $modpath.spider3:$modpath.other2:$modpath.spider1] set tserr [msg_top_load othervia/1 moda/1 {} {modb/1 othervirt/1 modc/1 othervic/1}] testouterr_cmd bash {load --auto othervia/1} $ans $tserr set tserr [msg_top_switch moda/1 othervia/1 {} {} {} {} {modb/1 othervirt/1 modc/1 othervic/1}] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr # modulepath not anymore enabled setenv_path_var MODULEPATH $modpath.spider3:$modpath.spider1 set tserr [msg_top_load othervia/1 moda/1 {} {modb/1 othervirt/1 modc/1 othervic/1}] testouterr_cmd bash {load --auto othervia/1} $ans $tserr set tserr [msg_top_switch moda/1 othervia/1 {} {} {} {} {modb/1 othervirt/1 modc/1 othervic/1}] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr setenv_var TESTSUITE_REQUIRE_VIA virtual_before_not_after # modulepath enabled setenv_path_var MODULEPATH $modpath.spider3:$modpath.spider2:$modpath.spider1 set ans [list] lappend ans [list set __MODULES_LMUSE othervia/1&$modpath.other2:modb/1&$modpath.spider3] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list unset __MODULES_LMPREREQ] lappend ans [list set _LMFILES_ $modpath.spider1/othervia/1:$modpath.other2/modb/1:$modpath.spider3/modc/1] lappend ans [list set LOADEDMODULES othervia/1:modb/1:modc/1] lappend ans [list set MODULEPATH $modpath.spider3:$modpath.other2:$modpath.spider1] set tserr [msg_top_load othervia/1 moda/1 {} {{othervic/1 modc/1 othervirt/1 modb/1} {modb/1 modc/1}}] testouterr_cmd bash {load --auto othervia/1} $ans $tserr set tserr [msg_top_switch moda/1 othervia/1 {} {} {} {} {{othervic/1 modc/1 othervirt/1 modb/1} {modb/1 modc/1}}] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr # modulepath not anymore enabled setenv_path_var MODULEPATH $modpath.spider3:$modpath.spider1 set tserr [msg_top_load othervia/1 moda/1 {} {{othervic/1 modc/1 othervirt/1 modb/1} {modb/1 modc/1}}] testouterr_cmd bash {load --auto othervia/1} $ans $tserr set tserr [msg_top_switch moda/1 othervia/1 {} {} {} {} {{othervic/1 modc/1 othervirt/1 modb/1} {modb/1 modc/1}}] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr # # replace via module with a via module of another modulepath # containing not all the module to reload # modulepath still enabled # foreach abort_on_error {ml:reload:switch_unload:load:switch ml:reload:switch_unload} { setenv_var MODULES_ABORT_ON_ERROR $abort_on_error setenv_var TESTSUITE_SPIDER_OTHERMODPATH1 use_other2_and_conflict_moda setenv_var TESTSUITE_REQUIRE_VIA multi_mod_in_path_with_req_some_hidden1 setenv_path_var MODULEPATH $modpath.spider3:$modpath.spider2:$modpath.spider1 setenv_var __MODULES_LMUSE moda/1&$modpath.spider2:modb/1&$modpath.spider3 setenv_var __MODULES_LMPREREQ othervib/1&modb/1:othervic/1&othervib/1 setenv_loaded_module [list moda/1 modb/1 othervib/1 modc/1 othervic/1] [list $modpath.spider1/moda/1 $modpath.spider2/modb/1 $modpath.spider2/othervib/1 $modpath.spider3/modc/1 $modpath.spider3/othervic/1] # replace with module load setenv_var MODULES_REQUIRE_VIA 0 setenv_var MODULES_CONFLICT_UNLOAD 0 set tserr [msg_load othervia/1 [err_conflict moda/1]] testouterr_cmd bash {load --no-auto othervia/1} ERR $tserr testouterr_cmd bash {load --auto othervia/1} ERR $tserr setenv_var MODULES_CONFLICT_UNLOAD 1 testouterr_cmd bash {load --no-auto othervia/1} ERR $tserr set ans [list] lappend ans [list set __MODULES_LMUSE modb/1&$modpath.spider3:othervia/1&$modpath.other2] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set _LMFILES_ $modpath.spider2/modb/1:$modpath.spider2/othervib/1:$modpath.spider3/modc/1:$modpath.spider3/othervic/1:$modpath.spider1/othervia/1] lappend ans [list set LOADEDMODULES modb/1:othervib/1:modc/1:othervic/1:othervia/1] lappend ans [list set MODULEPATH $modpath.other2:$modpath.spider3:$modpath.spider1] set tserr [msg_top_load othervia/1 moda/1 {} {}] testouterr_cmd bash {load --auto othervia/1} $ans $tserr setenv_var MODULES_REQUIRE_VIA 1 setenv_var MODULES_CONFLICT_UNLOAD 0 set tserr [msg_load othervia/1 [err_conflict moda/1]] testouterr_cmd bash {load --no-auto othervia/1} ERR $tserr testouterr_cmd bash {load --auto othervia/1} ERR $tserr set ans [list] lappend ans [list set __MODULES_LMUSE moda/1&$modpath.spider2:modb/1&$modpath.spider3:othervia/1&$modpath.other2] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set _LMFILES_ $modpath.spider1/moda/1:$modpath.spider2/modb/1:$modpath.spider2/othervib/1:$modpath.spider3/modc/1:$modpath.spider3/othervic/1:$modpath.spider1/othervia/1] lappend ans [list set LOADEDMODULES moda/1:modb/1:othervib/1:modc/1:othervic/1:othervia/1] lappend ans [list set MODULEPATH $modpath.other2:$modpath.spider3:$modpath.spider2:$modpath.spider1] set tserr [msg_load othervia/1 [err_conlof moda/1]] testouterr_cmd bash {load --no-auto --force othervia/1} $ans $tserr testouterr_cmd bash {load --auto --force othervia/1} $ans $tserr setenv_var MODULES_CONFLICT_UNLOAD 1 set tserr [msg_load othervia/1 [err_conflict moda/1]] testouterr_cmd bash {load --no-auto othervia/1} ERR $tserr set tserr [msg_load othervia/1 [err_conlof moda/1]] testouterr_cmd bash {load --no-auto --force othervia/1} $ans $tserr set ans [list] lappend ans [list set __MODULES_LMUSE othervia/1&$modpath.other2:modb/1&$modpath.spider3] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list unset __MODULES_LMPREREQ] lappend ans [list set _LMFILES_ $modpath.spider1/othervia/1:$modpath.other2/modb/1:$modpath.spider3/modc/1] lappend ans [list set LOADEDMODULES othervia/1:modb/1:modc/1] lappend ans [list set MODULEPATH $modpath.spider3:$modpath.other2:$modpath.spider1] set tserr [msg_top_load_conun othervia/1 {} moda/1 {} {} {{othervic/1 modc/1 othervib/1 modb/1} {modb/1 modc/1}}] testouterr_cmd bash {load --auto othervia/1} $ans $tserr testouterr_cmd bash {load --auto --force othervia/1} $ans $tserr # replace with module switch setenv_var MODULES_REQUIRE_VIA 0 setenv_var MODULES_CONFLICT_UNLOAD 0 set ans [list] lappend ans [list set __MODULES_LMUSE modb/1&$modpath.spider3:othervia/1&$modpath.other2] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set _LMFILES_ $modpath.spider2/modb/1:$modpath.spider2/othervib/1:$modpath.spider3/modc/1:$modpath.spider3/othervic/1:$modpath.spider1/othervia/1] lappend ans [list set LOADEDMODULES modb/1:othervib/1:modc/1:othervic/1:othervia/1] lappend ans [list set MODULEPATH $modpath.other2:$modpath.spider3:$modpath.spider1] set tserr [msg_load othervia/1 [err_conflict moda/1]] testouterr_cmd bash {switch --no-auto moda/1 othervia/1} $ans {} testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans {} setenv_var MODULES_CONFLICT_UNLOAD 1 testouterr_cmd bash {switch --no-auto moda/1 othervia/1} $ans {} testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans {} setenv_var MODULES_REQUIRE_VIA 1 setenv_var MODULES_CONFLICT_UNLOAD 0 set tserr [msg_unload moda/1 [err_prerequn modb/1 othervib/1]]\n\n[msg_switch moda/1 othervia/1 [err_swoff moda/1]] testouterr_cmd bash {switch --no-auto moda/1 othervia/1} ERR $tserr set tserr [msg_unload moda/1 [err_deplof modb/1 othervib/1]] testouterr_cmd bash {switch --no-auto --force moda/1 othervia/1} $ans $tserr set ans [list] lappend ans [list set __MODULES_LMUSE othervia/1&$modpath.other2:modb/1&$modpath.spider3] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list unset __MODULES_LMPREREQ] lappend ans [list set _LMFILES_ $modpath.spider1/othervia/1:$modpath.other2/modb/1:$modpath.spider3/modc/1] lappend ans [list set LOADEDMODULES othervia/1:modb/1:modc/1] lappend ans [list set MODULEPATH $modpath.spider3:$modpath.other2:$modpath.spider1] set tserr [msg_top_switch moda/1 othervia/1 {} {} {} {} {{othervic/1 modc/1 othervib/1 modb/1} {modb/1 modc/1}}] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr testouterr_cmd bash {switch --auto --force moda/1 othervia/1} $ans $tserr setenv_var MODULES_CONFLICT_UNLOAD 1 set tserr [msg_unload moda/1 [err_prerequn modb/1 othervib/1]]\n\n[msg_switch moda/1 othervia/1 [err_swoff moda/1]] testouterr_cmd bash {switch --no-auto moda/1 othervia/1} ERR $tserr set tserr [msg_top_switch moda/1 othervia/1 {} {} {} {} {{othervic/1 modc/1 othervib/1 modb/1} {modb/1 modc/1}}] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr testouterr_cmd bash {switch --auto --force moda/1 othervia/1} $ans $tserr set ans [list] lappend ans [list set __MODULES_LMUSE modb/1&$modpath.spider3:othervia/1&$modpath.other2] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set _LMFILES_ $modpath.spider2/modb/1:$modpath.spider2/othervib/1:$modpath.spider3/modc/1:$modpath.spider3/othervic/1:$modpath.spider1/othervia/1] lappend ans [list set LOADEDMODULES modb/1:othervib/1:modc/1:othervic/1:othervia/1] lappend ans [list set MODULEPATH $modpath.other2:$modpath.spider3:$modpath.spider1] set tserr [msg_unload moda/1 [err_deplof modb/1 othervib/1]] testouterr_cmd bash {switch --no-auto --force moda/1 othervia/1} $ans $tserr } # # replace via module with a via module of another modulepath # containing not all the module to reload # modulepath expressed with a reference to an environment variable # modulepath still enabled # setenv_var TESTSUITE_SPIDER_INREF er2 set from_to_modpath_prop_list [list\ use_modpath2 $modpath.spider2 use_refvar_and_conflict_moda $modpath.oth\$TESTSUITE_SPIDER_INREF\ use_refvar $modpath.spid\$TESTSUITE_SPIDER_INREF use_other2_and_conflict_moda $modpath.other2\ use_refvar $modpath.spid\$TESTSUITE_SPIDER_INREF use_refvar_and_conflict_moda $modpath.oth\$TESTSUITE_SPIDER_INREF] foreach {from_modpath_case from_modpath to_modpath_case to_modpath} $from_to_modpath_prop_list { setenv_var TESTSUITE_SPIDER_MODPATH1 $from_modpath_case setenv_var TESTSUITE_SPIDER_OTHERMODPATH1 $to_modpath_case setenv_var TESTSUITE_REQUIRE_VIA multi_mod_in_path_with_req_some_hidden1 setenv_path_var MODULEPATH $modpath.spider3:$from_modpath:$modpath.spider1 setenv_var __MODULES_LMUSE moda/1&$from_modpath:modb/1&$modpath.spider3 setenv_var __MODULES_LMPREREQ othervib/1&modb/1:othervic/1&othervib/1 setenv_loaded_module [list moda/1 modb/1 othervib/1 modc/1 othervic/1] [list $modpath.spider1/moda/1 $modpath.spider2/modb/1 $modpath.spider2/othervib/1 $modpath.spider3/modc/1 $modpath.spider3/othervic/1] # replace with module load setenv_var MODULES_REQUIRE_VIA 0 setenv_var MODULES_CONFLICT_UNLOAD 0 set tserr [msg_load othervia/1 [err_conflict moda/1]] testouterr_cmd bash {load --no-auto othervia/1} ERR $tserr testouterr_cmd bash {load --auto othervia/1} ERR $tserr setenv_var MODULES_CONFLICT_UNLOAD 1 testouterr_cmd bash {load --no-auto othervia/1} ERR $tserr set ans [list] lappend ans [list set __MODULES_LMUSE modb/1&$modpath.spider3:othervia/1&$to_modpath] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set _LMFILES_ $modpath.spider2/modb/1:$modpath.spider2/othervib/1:$modpath.spider3/modc/1:$modpath.spider3/othervic/1:$modpath.spider1/othervia/1] lappend ans [list set LOADEDMODULES modb/1:othervib/1:modc/1:othervic/1:othervia/1] lappend ans [list set MODULEPATH $to_modpath:$modpath.spider3:$modpath.spider1] set tserr [msg_top_load othervia/1 moda/1 {} {}] testouterr_cmd bash {load --auto othervia/1} $ans $tserr setenv_var MODULES_REQUIRE_VIA 1 setenv_var MODULES_CONFLICT_UNLOAD 0 set tserr [msg_load othervia/1 [err_conflict moda/1]] testouterr_cmd bash {load --no-auto othervia/1} ERR $tserr testouterr_cmd bash {load --auto othervia/1} ERR $tserr set ans [list] lappend ans [list set __MODULES_LMUSE moda/1&$from_modpath:modb/1&$modpath.spider3:othervia/1&$to_modpath] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set _LMFILES_ $modpath.spider1/moda/1:$modpath.spider2/modb/1:$modpath.spider2/othervib/1:$modpath.spider3/modc/1:$modpath.spider3/othervic/1:$modpath.spider1/othervia/1] lappend ans [list set LOADEDMODULES moda/1:modb/1:othervib/1:modc/1:othervic/1:othervia/1] lappend ans [list set MODULEPATH $to_modpath:$modpath.spider3:$from_modpath:$modpath.spider1] set tserr [msg_load othervia/1 [err_conlof moda/1]] testouterr_cmd bash {load --no-auto --force othervia/1} $ans $tserr testouterr_cmd bash {load --auto --force othervia/1} $ans $tserr setenv_var MODULES_CONFLICT_UNLOAD 1 set tserr [msg_load othervia/1 [err_conflict moda/1]] testouterr_cmd bash {load --no-auto othervia/1} ERR $tserr set tserr [msg_load othervia/1 [err_conlof moda/1]] testouterr_cmd bash {load --no-auto --force othervia/1} $ans $tserr set ans [list] lappend ans [list set __MODULES_LMUSE othervia/1&$to_modpath:modb/1&$modpath.spider3] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list unset __MODULES_LMPREREQ] lappend ans [list set _LMFILES_ $modpath.spider1/othervia/1:$modpath.other2/modb/1:$modpath.spider3/modc/1] lappend ans [list set LOADEDMODULES othervia/1:modb/1:modc/1] lappend ans [list set MODULEPATH $modpath.spider3:$to_modpath:$modpath.spider1] set tserr [msg_top_load_conun othervia/1 {} moda/1 {} {} {{othervic/1 modc/1 othervib/1 modb/1} {modb/1 modc/1}}] testouterr_cmd bash {load --auto othervia/1} $ans $tserr testouterr_cmd bash {load --auto --force othervia/1} $ans $tserr # replace with module switch setenv_var MODULES_REQUIRE_VIA 0 setenv_var MODULES_CONFLICT_UNLOAD 0 set ans [list] lappend ans [list set __MODULES_LMUSE modb/1&$modpath.spider3:othervia/1&$to_modpath] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set _LMFILES_ $modpath.spider2/modb/1:$modpath.spider2/othervib/1:$modpath.spider3/modc/1:$modpath.spider3/othervic/1:$modpath.spider1/othervia/1] lappend ans [list set LOADEDMODULES modb/1:othervib/1:modc/1:othervic/1:othervia/1] lappend ans [list set MODULEPATH $to_modpath:$modpath.spider3:$modpath.spider1] set tserr [msg_load othervia/1 [err_conflict moda/1]] testouterr_cmd bash {switch --no-auto moda/1 othervia/1} $ans {} testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans {} setenv_var MODULES_CONFLICT_UNLOAD 1 testouterr_cmd bash {switch --no-auto moda/1 othervia/1} $ans {} testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans {} setenv_var MODULES_REQUIRE_VIA 1 setenv_var MODULES_CONFLICT_UNLOAD 0 set tserr [msg_unload moda/1 [err_prerequn modb/1 othervib/1]]\n\n[msg_switch moda/1 othervia/1 [err_swoff moda/1]] testouterr_cmd bash {switch --no-auto moda/1 othervia/1} ERR $tserr set tserr [msg_unload moda/1 [err_deplof modb/1 othervib/1]] testouterr_cmd bash {switch --no-auto --force moda/1 othervia/1} $ans $tserr set ans [list] lappend ans [list set __MODULES_LMUSE othervia/1&$to_modpath:modb/1&$modpath.spider3] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list unset __MODULES_LMPREREQ] lappend ans [list set _LMFILES_ $modpath.spider1/othervia/1:$modpath.other2/modb/1:$modpath.spider3/modc/1] lappend ans [list set LOADEDMODULES othervia/1:modb/1:modc/1] lappend ans [list set MODULEPATH $modpath.spider3:$to_modpath:$modpath.spider1] set tserr [msg_top_switch moda/1 othervia/1 {} {} {} {} {{othervic/1 modc/1 othervib/1 modb/1} {modb/1 modc/1}}] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr testouterr_cmd bash {switch --auto --force moda/1 othervia/1} $ans $tserr setenv_var MODULES_CONFLICT_UNLOAD 1 set tserr [msg_unload moda/1 [err_prerequn modb/1 othervib/1]]\n\n[msg_switch moda/1 othervia/1 [err_swoff moda/1]] testouterr_cmd bash {switch --no-auto moda/1 othervia/1} ERR $tserr set tserr [msg_top_switch moda/1 othervia/1 {} {} {} {} {{othervic/1 modc/1 othervib/1 modb/1} {modb/1 modc/1}}] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr testouterr_cmd bash {switch --auto --force moda/1 othervia/1} $ans $tserr set ans [list] lappend ans [list set __MODULES_LMUSE modb/1&$modpath.spider3:othervia/1&$to_modpath] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set _LMFILES_ $modpath.spider2/modb/1:$modpath.spider2/othervib/1:$modpath.spider3/modc/1:$modpath.spider3/othervic/1:$modpath.spider1/othervia/1] lappend ans [list set LOADEDMODULES modb/1:othervib/1:modc/1:othervic/1:othervia/1] lappend ans [list set MODULEPATH $to_modpath:$modpath.spider3:$modpath.spider1] set tserr [msg_unload moda/1 [err_deplof modb/1 othervib/1]] testouterr_cmd bash {switch --no-auto --force moda/1 othervia/1} $ans $tserr } # # replace via module with a via module of another modulepath # containing not all the module to reload (variant not available) # modulepath still enabled # setenv_var MODULES_ADVANCED_VERSION_SPEC 1 setenv_var TESTSUITE_SPIDER_MODPATH1 use_modpath2 setenv_var TESTSUITE_SPIDER_OTHERMODPATH1 use_other2_and_conflict_moda setenv_path_var MODULEPATH $modpath.spider3:$modpath.spider2:$modpath.spider1 setenv_var __MODULES_LMUSE moda/1&$modpath.spider2:modb/1&$modpath.spider3 setenv_var __MODULES_LMPREREQ othervib/1&modb/1:othervic/1&othervib/1 setenv_var __MODULES_LMVARIANT othervib/1&foo|val1|0|0 setenv_loaded_module [list moda/1 modb/1 othervib/1 modc/1 othervic/1] [list $modpath.spider1/moda/1 $modpath.spider2/modb/1 $modpath.spider2/othervib/1 $modpath.spider3/modc/1 $modpath.spider3/othervic/1] setenv_var MODULES_REQUIRE_VIA 1 setenv_var MODULES_CONFLICT_UNLOAD 1 # variant not defined in new modulepath setenv_var TESTSUITE_REQUIRE_VIA multi_mod_in_path_with_req_unk_variant_name set tserr [msg_load othervib/1{foo=val1} [err_unkvar foo]]\n\n[msg_load othervia/1 [err_depre othervib/1{foo=val1}]] testouterr_cmd bash {load --auto othervia/1} ERR $tserr set ans [list] lappend ans [list unset __MODULES_LMVARIANT] lappend ans [list set __MODULES_LMUSE othervia/1&$modpath.other2:modb/1&$modpath.spider3] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set LOADEDMODULES othervia/1:modb/1:modc/1] lappend ans [list set _LMFILES_ $modpath.spider1/othervia/1:$modpath.other2/modb/1:$modpath.spider3/modc/1] lappend ans [list unset __MODULES_LMPREREQ] lappend ans [list set MODULEPATH $modpath.spider3:$modpath.other2:$modpath.spider1] lappend ans [list ERR] set tserr [msg_load othervib/1{foo=val1} [err_unkvar foo]]\n\n[msg_top_load_conun othervia/1 {} {moda/1} {} {} {{othervic/1 modc/1 othervib/1{foo=val1} modb/1} {modb/1 modc/1}} [err_depref othervib/1{foo=val1}]] testouterr_cmd bash {load --force --auto othervia/1} $ans $tserr set tserr [msg_load othervib/1{foo=val1} [err_unkvar foo]]\n\n[msg_top_switch moda/1 othervia/1 {} {} {} {} {{othervic/1 modc/1 othervib/1{foo=val1} modb/1} {modb/1 modc/1}} [err_depref othervib/1{foo=val1}]] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr testouterr_cmd bash {switch --force --auto moda/1 othervia/1} $ans $tserr # variant value not defined in new modulepath setenv_var TESTSUITE_REQUIRE_VIA multi_mod_in_path_with_req_unk_variant_val set tserr [msg_load othervib/1{foo=val1} [err_invalvarval foo val1 {val2 val3}]]\n\n[msg_load othervia/1 [err_depre othervib/1{foo=val1}]] testouterr_cmd bash {load --auto othervia/1} ERR $tserr set ans [list] lappend ans [list unset __MODULES_LMVARIANT] lappend ans [list set __MODULES_LMUSE othervia/1&$modpath.other2:modb/1&$modpath.spider3] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set LOADEDMODULES othervia/1:modb/1:modc/1] lappend ans [list set _LMFILES_ $modpath.spider1/othervia/1:$modpath.other2/modb/1:$modpath.spider3/modc/1] lappend ans [list unset __MODULES_LMPREREQ] lappend ans [list set MODULEPATH $modpath.spider3:$modpath.other2:$modpath.spider1] lappend ans [list ERR] set tserr [msg_load othervib/1{foo=val1} [err_invalvarval foo val1 {val2 val3}]]\n\n[msg_top_load_conun othervia/1 {} {moda/1} {} {} {{othervic/1 modc/1 othervib/1{foo=val1} modb/1} {modb/1 modc/1}} [err_depref othervib/1{foo=val1}]] testouterr_cmd bash {load --force --auto othervia/1} $ans $tserr set tserr [msg_load othervib/1{foo=val1} [err_invalvarval foo val1 {val2 val3}]]\n\n[msg_top_switch moda/1 othervia/1 {} {} {} {} {{othervic/1 modc/1 othervib/1{foo=val1} modb/1} {modb/1 modc/1}} [err_depref othervib/1{foo=val1}]] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr testouterr_cmd bash {switch --force --auto moda/1 othervia/1} $ans $tserr unsetenv_var __MODULES_LMVARIANT unsetenv_var MODULES_ADVANCED_VERSION_SPEC # # replace via module with a via module of another modulepath # containing all the module to reload # with different set of requirement and conflict # modulepath still enabled # setenv_var MODULES_REQUIRE_VIA 1 setenv_var MODULES_CONFLICT_UNLOAD 1 setenv_var TESTSUITE_SPIDER_OTHERMODPATH1 use_other2_and_conflict_moda setenv_path_var MODULEPATH $modpath.spider3:$modpath.spider2:$modpath.spider1 setenv_var __MODULES_LMUSE moda/1&$modpath.spider2:modb/1&$modpath.spider3 setenv_var __MODULES_LMPREREQ othervib/1&modb/1:othervic/1&othervib/1 setenv_loaded_module [list moda/1 modb/1 othervib/1 othervic/1] [list $modpath.spider1/moda/1 $modpath.spider2/modb/1 $modpath.spider2/othervib/1 $modpath.spider3/othervic/1] # in new modulepath othervic/1 does not require anymore othervib/1, which does not exist setenv_var TESTSUITE_REQUIRE_VIA req_not_anymore_does_not_exist #FIXME: othervic/1 should be reloaded has it does not require othervib/1 in new modulepath set ans [list] lappend ans [list set __MODULES_LMUSE othervia/1&$modpath.other2:modb/1&$modpath.spider3] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list unset __MODULES_LMPREREQ] lappend ans [list set _LMFILES_ $modpath.spider1/othervia/1:$modpath.other2/modb/1] lappend ans [list set LOADEDMODULES othervia/1:modb/1] lappend ans [list set MODULEPATH $modpath.spider3:$modpath.other2:$modpath.spider1] set tserr [msg_top_load_conun othervia/1 {} moda/1 {} {} {{othervic/1 othervib/1 modb/1} {modb/1}}] testouterr_cmd bash {load --auto othervia/1} $ans $tserr set tserr [msg_top_switch moda/1 othervia/1 {} {} {} {} {{othervic/1 othervib/1 modb/1} {modb/1}}] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr # in new modulepath othervic/1 does not require anymore othervib/1, which still exists setenv_var TESTSUITE_REQUIRE_VIA req_not_anymore_still_exists setenv_var __MODULES_LMTAG othervib/1&auto-loaded #FIXME: othervib/1 could be unloaded as a UReqUn set ans [list] lappend ans [list set __MODULES_LMUSE othervia/1&$modpath.other2:modb/1&$modpath.spider3] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set __MODULES_LMPREREQ othervib/1&modb/1] lappend ans [list set _LMFILES_ $modpath.spider1/othervia/1:$modpath.other2/modb/1:$modpath.other2/othervib/1:$modpath.spider3/othervic/1] lappend ans [list set LOADEDMODULES othervia/1:modb/1:othervib/1:othervic/1] lappend ans [list set MODULEPATH $modpath.spider3:$modpath.other2:$modpath.spider1] lappend ans [list set __MODULES_LMTAG othervib/1&auto-loaded] set tserr [msg_top_load_conun othervia/1 {} moda/1 {} {} {modb/1 othervib/1 othervic/1}] testouterr_cmd bash {load --auto othervia/1} $ans $tserr set tserr [msg_top_switch moda/1 othervia/1 {} {} {} {} {modb/1 othervib/1 othervic/1}] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr unsetenv_var __MODULES_LMTAG # in new modulepath othervic/1 requires another module, not loaded setenv_var TESTSUITE_REQUIRE_VIA req_another_not_loaded set tserr [msg_load othervic/1 [err_prereq modc/1]]\n\n[msg_load othervia/1 [err_depre othervic/1]] testouterr_cmd bash {load --auto othervia/1} ERR $tserr #FIXME: new requirement modc/1 could be loaded to satisfy othervic/1 in new modulepath set ans [list] lappend ans [list set __MODULES_LMUSE othervia/1&$modpath.other2:modb/1&$modpath.spider3] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set LOADEDMODULES othervia/1:modb/1:othervib/1] lappend ans [list set _LMFILES_ $modpath.spider1/othervia/1:$modpath.other2/modb/1:$modpath.other2/othervib/1] lappend ans [list set __MODULES_LMPREREQ othervib/1&modb/1] lappend ans [list set MODULEPATH $modpath.spider3:$modpath.other2:$modpath.spider1] lappend ans [list ERR] set tserr [msg_load othervic/1 [err_prereq modc/1]]\n\n[msg_top_switch moda/1 othervia/1 {} {} {} {} {{othervic/1 othervib/1 modb/1} {modb/1 othervib/1}} [err_depref othervic/1]] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr # in new modulepath othervib/1 has a conflict with othervic/1 unsetenv_var __MODULES_LMPREREQ setenv_var TESTSUITE_REQUIRE_VIA conflict_in_new1 set ans [list] lappend ans [list set __MODULES_LMUSE othervia/1&$modpath.other2:modb/1&$modpath.spider3] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda:othervib/1&othervic] lappend ans [list set _LMFILES_ $modpath.spider1/othervia/1:$modpath.other2/modb/1:$modpath.other2/othervib/1] lappend ans [list set LOADEDMODULES othervia/1:modb/1:othervib/1] lappend ans [list set MODULEPATH $modpath.spider3:$modpath.other2:$modpath.spider1] set tserr [msg_top_load_conun othervia/1 {} moda/1 {} {} {{othervic/1 othervib/1 modb/1} {modb/1 othervib/1}}] testouterr_cmd bash {load --auto othervia/1} $ans $tserr set tserr [msg_top_switch moda/1 othervia/1 {} {} {} {} {{othervic/1 othervib/1 modb/1} {modb/1 othervib/1}}] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr # in new modulepath othervic/1 has a conflict with othervib/1 setenv_var TESTSUITE_REQUIRE_VIA conflict_in_new2 #FIXME: othervic/1 reload failure should be silenced set tserr [msg_load othervic/1 [err_conlo othervib/1]]\n\n[msg_load othervia/1 [err_depre othervic/1]] testouterr_cmd bash {load --auto othervia/1} ERR $tserr set ans [list] lappend ans [list set __MODULES_LMUSE othervia/1&$modpath.other2:modb/1&$modpath.spider3] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set LOADEDMODULES othervia/1:modb/1:othervib/1] lappend ans [list set _LMFILES_ $modpath.spider1/othervia/1:$modpath.other2/modb/1:$modpath.other2/othervib/1] lappend ans [list set MODULEPATH $modpath.spider3:$modpath.other2:$modpath.spider1] lappend ans [list ERR] set tserr [msg_load othervic/1 [err_conlo othervib/1]]\n\n[msg_top_switch moda/1 othervia/1 {} {} {} {} {{othervic/1 othervib/1 modb/1} {modb/1 othervib/1}} [err_depref othervic/1]] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr # conflict of othervib/1 with othervic/1 is not there in new modulepath setenv_var __MODULES_LMCONFLICT othervib/1&othervic setenv_var TESTSUITE_REQUIRE_VIA conflict_not_anymore1 set ans [list] lappend ans [list set __MODULES_LMUSE othervia/1&$modpath.other2:modb/1&$modpath.spider3] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set _LMFILES_ $modpath.spider1/othervia/1:$modpath.other2/modb/1:$modpath.other2/othervib/1:$modpath.spider3/othervic/1] lappend ans [list set LOADEDMODULES othervia/1:modb/1:othervib/1:othervic/1] lappend ans [list set MODULEPATH $modpath.spider3:$modpath.other2:$modpath.spider1] set tserr [msg_top_load_conun othervia/1 {} moda/1 {} {} {modb/1 othervib/1 othervic/1}] testouterr_cmd bash {load --auto othervia/1} $ans $tserr set tserr [msg_top_switch moda/1 othervia/1 {} {} {} {} {modb/1 othervib/1 othervic/1}] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr # conflict of othervic/1 with othervib/1 is not there in new modulepath setenv_var __MODULES_LMCONFLICT othervic/1&othervib setenv_var TESTSUITE_REQUIRE_VIA conflict_not_anymore2 #FIXME: othervic/1 should be reloaded as it does not declare conflict in new modulepath set ans [list] lappend ans [list set __MODULES_LMUSE othervia/1&$modpath.other2:modb/1&$modpath.spider3] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set _LMFILES_ $modpath.spider1/othervia/1:$modpath.other2/modb/1:$modpath.other2/othervib/1] lappend ans [list set LOADEDMODULES othervia/1:modb/1:othervib/1] lappend ans [list set MODULEPATH $modpath.spider3:$modpath.other2:$modpath.spider1] set tserr [msg_top_load_conun othervia/1 {} moda/1 {} {} {{othervic/1 othervib/1 modb/1} {modb/1 othervib/1}}] testouterr_cmd bash {load --auto othervia/1} $ans $tserr set tserr [msg_top_switch moda/1 othervia/1 {} {} {} {} {{othervic/1 othervib/1 modb/1} {modb/1 othervib/1}}] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr unsetenv_var __MODULES_LMCONFLICT file delete $modpath.other2 } # # replace via module with a via module of another modulepath # containing none of the module to reload # modulepath still enabled # setenv_var TESTSUITE_SPIDER_OTHERMODPATH1 use_2_and_conflict_moda setenv_var TESTSUITE_REQUIRE_VIA multi_mod_in_path_with_req1 setenv_path_var MODULEPATH $modpath.spider3:$modpath.spider2:$modpath.spider1 setenv_var __MODULES_LMUSE moda/1&$modpath.spider2:modb/1&$modpath.spider3 setenv_var __MODULES_LMPREREQ othervib/1&modb/1:othervic/1&othervib/1 setenv_loaded_module [list moda/1 modb/1 othervib/1 modc/1 othervic/1] [list $modpath.spider1/moda/1 $modpath.spider2/modb/1 $modpath.spider2/othervib/1 $modpath.spider3/modc/1 $modpath.spider3/othervic/1] # replace with module load setenv_var MODULES_REQUIRE_VIA 0 setenv_var MODULES_CONFLICT_UNLOAD 0 set tserr [msg_load othervia/1 [err_conflict moda/1]] testouterr_cmd bash {load --no-auto othervia/1} ERR $tserr testouterr_cmd bash {load --auto othervia/1} ERR $tserr setenv_var MODULES_CONFLICT_UNLOAD 1 testouterr_cmd bash {load --no-auto othervia/1} ERR $tserr set ans [list] lappend ans [list set __MODULES_LMUSE modb/1&$modpath.spider3:othervia/1&$modpath.2] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set _LMFILES_ $modpath.spider2/modb/1:$modpath.spider2/othervib/1:$modpath.spider3/modc/1:$modpath.spider3/othervic/1:$modpath.spider1/othervia/1] lappend ans [list set LOADEDMODULES modb/1:othervib/1:modc/1:othervic/1:othervia/1] lappend ans [list set MODULEPATH $modpath.2:$modpath.spider3:$modpath.spider1] set tserr [msg_top_load othervia/1 moda/1 {} {}] testouterr_cmd bash {load --auto othervia/1} $ans $tserr setenv_var MODULES_REQUIRE_VIA 1 setenv_var MODULES_CONFLICT_UNLOAD 0 set tserr [msg_load othervia/1 [err_conflict moda/1]] testouterr_cmd bash {load --no-auto othervia/1} ERR $tserr testouterr_cmd bash {load --auto othervia/1} ERR $tserr setenv_var MODULES_CONFLICT_UNLOAD 1 testouterr_cmd bash {load --no-auto othervia/1} ERR $tserr set ans [list] lappend ans [list set __MODULES_LMUSE othervia/1&$modpath.2] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list unset __MODULES_LMPREREQ] lappend ans [list set _LMFILES_ $modpath.spider1/othervia/1] lappend ans [list set LOADEDMODULES othervia/1] lappend ans [list set MODULEPATH $modpath.2:$modpath.spider1] set tserr [msg_top_load_conun othervia/1 {othervic/1 modc/1 othervib/1 modb/1} moda/1 {} {} {}] testouterr_cmd bash {load --auto othervia/1} $ans $tserr # replace with module switch setenv_var MODULES_REQUIRE_VIA 0 setenv_var MODULES_CONFLICT_UNLOAD 0 set ans [list] lappend ans [list set __MODULES_LMUSE modb/1&$modpath.spider3:othervia/1&$modpath.2] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list set _LMFILES_ $modpath.spider2/modb/1:$modpath.spider2/othervib/1:$modpath.spider3/modc/1:$modpath.spider3/othervic/1:$modpath.spider1/othervia/1] lappend ans [list set LOADEDMODULES modb/1:othervib/1:modc/1:othervic/1:othervia/1] lappend ans [list set MODULEPATH $modpath.2:$modpath.spider3:$modpath.spider1] set tserr [msg_load othervia/1 [err_conflict moda/1]] testouterr_cmd bash {switch --no-auto moda/1 othervia/1} $ans {} testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans {} setenv_var MODULES_CONFLICT_UNLOAD 1 testouterr_cmd bash {switch --no-auto moda/1 othervia/1} $ans {} testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans {} setenv_var MODULES_REQUIRE_VIA 1 setenv_var MODULES_CONFLICT_UNLOAD 0 set tserr [msg_unload moda/1 [err_prerequn modb/1 othervib/1]]\n\n[msg_switch moda/1 othervia/1 [err_swoff moda/1]] testouterr_cmd bash {switch --no-auto moda/1 othervia/1} ERR $tserr set ans [list] lappend ans [list set __MODULES_LMUSE othervia/1&$modpath.2] lappend ans [list set __MODULES_LMCONFLICT othervia/1&moda] lappend ans [list unset __MODULES_LMPREREQ] lappend ans [list set _LMFILES_ $modpath.spider1/othervia/1] lappend ans [list set LOADEDMODULES othervia/1] lappend ans [list set MODULEPATH $modpath.2:$modpath.spider1] set tserr [msg_top_switch moda/1 othervia/1 {othervic/1 modc/1 othervib/1 modb/1} {} {} {} {}] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr setenv_var MODULES_CONFLICT_UNLOAD 1 set tserr [msg_unload moda/1 [err_prerequn modb/1 othervib/1]]\n\n[msg_switch moda/1 othervia/1 [err_swoff moda/1]] testouterr_cmd bash {switch --no-auto moda/1 othervia/1} ERR $tserr set tserr [msg_top_switch moda/1 othervia/1 {othervic/1 modc/1 othervib/1 modb/1} {} {} {} {}] testouterr_cmd bash {switch --auto moda/1 othervia/1} $ans $tserr # # Cleanup # reset_test_env