############################################################################## # Modules Revision 3.0 # Providing a flexible user environment # # File: modules.00-init/%M% # Revision: %I% # First Edition: 2018/06/25 # Last Mod.: %U%, %G% # # Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr # # Description: Testuite testsequence # Command: # Sub-Command: # # Comment: %C{ # Check auto_handling-related switches and configs. # }C% # ############################################################################## set module "prereq/full" set modulefile "$modpath/$module" set module_tron "trace/all_on" set modulefile_tron "$modpath/$module_tron" set err_pre [msg_load $module [err_prereq $module_tron]] set err_trace [msg_load "$module_tron " "$warn_msgs: 'module-trace' command not implemented"] append err_trace \n\n[msg_top_load $module {} $module_tron {}] set ans [list] if {[is_conf_enabled advversspec implicitdefault]} { lappend ans [list set __MODULES_LMALTNAME $module_tron&as|trace/default&as|trace/latest] } lappend ans [list set __MODULES_LMPREREQ "$module&$module_tron"] lappend ans [list set testsuite yes] lappend ans [list set _LMFILES_ "$modulefile_tron:$modulefile"] lappend ans [list set LOADEDMODULES "$module_tron:$module"] lappend ans [list set __MODULES_LMTAG $module_tron&auto-loaded] # # The tests # # test auto_handling set at configure time if {$install_autohandling eq "y"} { testouterr_cmd_re "sh" "load $module" $ans $err_trace } else { testouterr_cmd "sh" "load $module" "ERR" $err_pre } # overridden configuration with command-line option testouterr_cmd_re "sh" "load --auto $module" $ans $err_trace testouterr_cmd "sh" "load --no-auto $module" "ERR" $err_pre skip_if_quick_mode # disable auto_handling with environment variable setenv_var MODULES_AUTO_HANDLING 0 testouterr_cmd "sh" "load $module" "ERR" $err_pre # overridden configuration with command-line option testouterr_cmd_re "sh" "load --auto $module" $ans $err_trace testouterr_cmd "sh" "load --no-auto $module" "ERR" $err_pre # enable auto_handling with environment variable setenv_var MODULES_AUTO_HANDLING 1 testouterr_cmd_re "sh" "load $module" $ans $err_trace # overridden configuration with command-line option testouterr_cmd_re "sh" "load --auto $module" $ans $err_trace testouterr_cmd "sh" "load --no-auto $module" "ERR" $err_pre # bad environment variable value should not interfere setenv_var MODULES_AUTO_HANDLING foo if {$install_autohandling eq "y"} { testouterr_cmd_re "sh" "load $module" $ans $err_trace } else { testouterr_cmd "sh" "load $module" "ERR" $err_pre } # overridden configuration with command-line option testouterr_cmd_re "sh" "load --auto $module" $ans $err_trace testouterr_cmd "sh" "load --no-auto $module" "ERR" $err_pre # # Cleanup # reset_test_env