| 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: 1995/12/06 |
| 8 |
# Last Mod.: %U%, %G% |
| 9 |
# |
| 10 |
# Authors: Jens Hamisch, [email protected] |
| 11 |
# |
| 12 |
# Description: Testuite testsequence |
| 13 |
# Command: load |
| 14 |
# Modulefiles: log/err_both_1, log/err_both_2, log/err_syslog, |
| 15 |
# Modulefiles: log/err_file |
| 16 |
# Sub-Command: |
| 17 |
# |
| 18 |
# Comment: %C{ |
| 19 |
# Tests the 'log-facility' module command. |
| 20 |
# At the moment this only checks the execution of the |
| 21 |
# log-facility command. This is not a check whether the |
| 22 |
# log output really goes to the configured target. |
| 23 |
# }C% |
| 24 |
# |
| 25 |
############################################################################## |
| 26 |
|
| 27 |
skip_if_quick_mode |
| 28 |
|
| 29 |
# ensure auto symbolic versions are not set for these tests |
| 30 |
setenv_var MODULES_ADVANCED_VERSION_SPEC 0 |
| 31 |
|
| 32 |
# |
| 33 |
# Variables. This test forces a module load command. It will result in the |
| 34 |
# environment variables "_LMFILES_", "LOADEDMODULES" and "testsuite" to |
| 35 |
# be set up |
| 36 |
# |
| 37 |
|
| 38 |
set module1 "log/err_both_1" |
| 39 |
set modulefile1 "$modpath/$module1" |
| 40 |
|
| 41 |
set module2 "log/err_both_2" |
| 42 |
set modulefile2 "$modpath/$module2" |
| 43 |
|
| 44 |
set module3 "log/err_syslog" |
| 45 |
set modulefile3 "$modpath/$module3" |
| 46 |
|
| 47 |
set module4 "log/err_file" |
| 48 |
set modulefile4 "$modpath/$module4" |
| 49 |
|
| 50 |
# |
| 51 |
# Check only for the csh |
| 52 |
# |
| 53 |
|
| 54 |
set err_log "$warn_msgs: 'module-log' command not implemented" |
| 55 |
|
| 56 |
# |
| 57 |
# The tests |
| 58 |
# |
| 59 |
|
| 60 |
# different behavior than C-version: on Tcl-version 'module-log' command is |
| 61 |
# not handled and will always return a warning message to inform the user. |
| 62 |
lappend ans [list set _LMFILES_ $modulefile1] |
| 63 |
lappend ans [list set LOADEDMODULES $module1] |
| 64 |
testouterr_cmd "csh" "load $module1" $ans [msg_load $module1 $err_log] |
| 65 |
|
| 66 |
set ans [list] |
| 67 |
lappend ans [list set _LMFILES_ $modulefile2] |
| 68 |
lappend ans [list set LOADEDMODULES $module2] |
| 69 |
testouterr_cmd "csh" "load $module2" $ans [msg_load $module2 $err_log] |
| 70 |
|
| 71 |
set ans [list] |
| 72 |
lappend ans [list set _LMFILES_ $modulefile3] |
| 73 |
lappend ans [list set LOADEDMODULES $module3] |
| 74 |
testouterr_cmd "csh" "load $module3" $ans [msg_load $module3 $err_log] |
| 75 |
|
| 76 |
set ans [list] |
| 77 |
lappend ans [list set _LMFILES_ $modulefile4] |
| 78 |
lappend ans [list set LOADEDMODULES $module4] |
| 79 |
testouterr_cmd "csh" "load $module4" $ans [msg_load $module4 $err_log] |
| 80 |
|
| 81 |
# |
| 82 |
# Cleanup |
| 83 |
# |
| 84 |
|
| 85 |
reset_test_env |