| 1 |
############################################################################## |
| 2 |
# Modules Revision 3.0 |
| 3 |
# Providing a flexible user environment |
| 4 |
# |
| 5 |
# File: modules.50-cmds/%M% |
| 6 |
# Revision: %I% |
| 7 |
# First Edition: 2017/11/28 |
| 8 |
# Last Mod.: %U%, %G% |
| 9 |
# |
| 10 |
# Authors: Xavier Delaruelle, [email protected] |
| 11 |
# |
| 12 |
# Description: Testuite testsequence |
| 13 |
# Command: load |
| 14 |
# Modulefiles: info/isused |
| 15 |
# Sub-Command: |
| 16 |
# |
| 17 |
# Comment: %C{ |
| 18 |
# Tests the 'is-used' modulefile subcommand for all |
| 19 |
# allowed shell types. |
| 20 |
# }C% |
| 21 |
# |
| 22 |
############################################################################## |
| 23 |
|
| 24 |
skip_if_quick_mode |
| 25 |
|
| 26 |
set module "info/isused" |
| 27 |
set modulefile "$modpath/$module" |
| 28 |
|
| 29 |
# |
| 30 |
# The tests |
| 31 |
# |
| 32 |
|
| 33 |
lappend ans [list set __MODULES_LMUSE $module&$modpath.2] |
| 34 |
lappend ans [list set testsuite6 1] |
| 35 |
lappend ans [list set testsuite2 0] |
| 36 |
lappend ans [list set testsuite3 0] |
| 37 |
lappend ans [list set _LMFILES_ $modulefile] |
| 38 |
lappend ans [list set LOADEDMODULES $module] |
| 39 |
lappend ans [list set testsuite4 1] |
| 40 |
lappend ans [list set testsuite5 1] |
| 41 |
lappend ans [list set MODULEPATH $modpath] |
| 42 |
lappend ans [list set testsuite1 1] |
| 43 |
|
| 44 |
testouterr_cmd "ALL" "load $module" $ans "" |
| 45 |
|
| 46 |
# empty modulepath |
| 47 |
unsetenv_path_var MODULEPATH |
| 48 |
|
| 49 |
set ans [list] |
| 50 |
lappend ans [list set __MODULES_LMUSE $modulefile&$modpath.2] |
| 51 |
lappend ans [list set testsuite6 1] |
| 52 |
lappend ans [list set testsuite2 0] |
| 53 |
lappend ans [list set testsuite3 0] |
| 54 |
lappend ans [list set _LMFILES_ $modulefile] |
| 55 |
lappend ans [list set LOADEDMODULES $modulefile] |
| 56 |
lappend ans [list set testsuite4 0] |
| 57 |
lappend ans [list set testsuite5 0] |
| 58 |
lappend ans [list unset MODULEPATH] |
| 59 |
lappend ans [list set testsuite1 0] |
| 60 |
|
| 61 |
testouterr_cmd "sh" "load $modulefile" $ans "" |
| 62 |
|
| 63 |
# modulerc usage |
| 64 |
setenv_var TESTSUITE_INFO isused-rc1 |
| 65 |
setenv_path_var MODULEPATH $modpath.2 |
| 66 |
testouterr_cmd sh {avail -t -o alias info/rcisused} OK {} |
| 67 |
setenv_path_var MODULEPATH $modpath |
| 68 |
testouterr_cmd sh {avail -t -o alias info/rcisused} OK {info/rcisused} |
| 69 |
unsetenv_var TESTSUITE_INFO |
| 70 |
|
| 71 |
|
| 72 |
# |
| 73 |
# Cleanup |
| 74 |
# |
| 75 |
|
| 76 |
reset_test_env |