120-siteconfig.exp (modules-5.1.1.tar.bz2) | : | 120-siteconfig.exp (modules-5.2.0.tar.bz2) | ||
---|---|---|---|---|
skipping to change at line 55 | skipping to change at line 55 | |||
lappend ans "DEBUG setConf: siteconfig set to '$::siteconfig_filere'" | lappend ans "DEBUG setConf: siteconfig set to '$::siteconfig_filere'" | |||
lappend ans "${mainconfigdbg}DEBUG setConf: locked_configs set to '$::instal l_lockedconfigs'" | lappend ans "${mainconfigdbg}DEBUG setConf: locked_configs set to '$::instal l_lockedconfigs'" | |||
if {[info exists ::env(TESTSUITE_ENABLE_SITECONFIG_NOEXTRASITECONFIG)]} { | if {[info exists ::env(TESTSUITE_ENABLE_SITECONFIG_NOEXTRASITECONFIG)]} { | |||
lappend ans "DEBUG setConf: locked_configs set to 'extra_siteconfig'" | lappend ans "DEBUG setConf: locked_configs set to 'extra_siteconfig'" | |||
lappend ans "DEBUG setState: siteconfig_loaded set to '1'" | lappend ans "DEBUG setState: siteconfig_loaded set to '1'" | |||
} elseif {!$islocked} { | } elseif {!$islocked} { | |||
lappend ans "DEBUG setConf: extra_siteconfig set to '$getextrasiteconfig re'" | lappend ans "DEBUG setConf: extra_siteconfig set to '$getextrasiteconfig re'" | |||
} | } | |||
lappend ans "${siteconfigdbg}DEBUG setState: supported_shells set to 'sh bas h ksh zsh csh tcsh fish cmd tcl perl python ruby lisp cmake r'" | lappend ans "${siteconfigdbg}DEBUG setState: supported_shells set to 'sh bas h ksh zsh csh tcsh fish cmd tcl perl python ruby lisp cmake r'" | |||
lappend ans "DEBUG setState: shell set to 'sh'" | lappend ans "DEBUG setState: shell set to 'sh'" | |||
lappend ans "DEBUG setState: shelltype set to 'sh'" | ||||
lappend ans "DEBUG setState: subcmd set to ''" | lappend ans "DEBUG setState: subcmd set to ''" | |||
lappend ans "DEBUG setState: subcmd_args set to ''" | lappend ans "DEBUG setState: subcmd_args set to ''" | |||
lappend ans "DEBUG setState: init_error_report set to '1'" | lappend ans "DEBUG setState: init_error_report set to '1'" | |||
lappend ans "DEBUG setConf: verbosity set to 'debug'" | lappend ans "DEBUG setConf: verbosity set to 'debug'" | |||
lappend ans "DEBUG setConf: term_background set to '$::install_termbg'" | lappend ans "DEBUG setConf: term_background set to '$::install_termbg'" | |||
lappend ans "(DEBUG initConfColors: Ignore invalid default.*\\n)?DEBUG setCo nf: colors set to '.*'" | lappend ans "(DEBUG initConfColors: Ignore invalid default.*\\n)?DEBUG setCo nf: colors set to '.*'" | |||
lappend ans "DEBUG setConf: color set to '0'" | lappend ans "DEBUG setConf: color set to '0'" | |||
lappend ans "DEBUG setConf: pager set to '$::install_pagercmd'" | lappend ans "DEBUG setConf: pager set to '$::install_pagercmd'" | |||
lappend ans "DEBUG setState: paginate set to '0'" | lappend ans "DEBUG setState: paginate set to '0'" | |||
lappend ans "DEBUG setState: report_format set to 'regular'" | lappend ans "DEBUG setState: report_format set to 'regular'" | |||
lappend ans "DEBUG setState: reportfd set to 'stderr'" | lappend ans "DEBUG setState: reportfd set to 'stderr'" | |||
lappend ans "DEBUG setState: timer set to '0'" | ||||
lappend ans $::vers_reportre | lappend ans $::vers_reportre | |||
setenv_var MODULES_SITECONFIG $siteconfig | setenv_var MODULES_SITECONFIG $siteconfig | |||
testouterr_cmd_re sh {--no-pager -D -V} {} [join $ans \n] | testouterr_cmd_re sh {--no-pager -D -V} {} [join $ans \n] | |||
unsetenv_var MODULES_SITECONFIG | unsetenv_var MODULES_SITECONFIG | |||
} | } | |||
# check excepted siteconfig file is installed | # check excepted siteconfig file is installed | |||
set is_stderr_tty [siteconfig_isStderrTty] | set is_stderr_tty [siteconfig_isStderrTty] | |||
if {$is_stderr_tty} { | if {$is_stderr_tty} { | |||
skipping to change at line 95 | skipping to change at line 95 | |||
if {$::install_multilibsupport eq {y}} { | if {$::install_multilibsupport eq {y}} { | |||
lappend ans "DEBUG setState: machine set to '$::tcl_platform(machine)'" | lappend ans "DEBUG setState: machine set to '$::tcl_platform(machine)'" | |||
} | } | |||
lappend ans "DEBUG setConf: tcl_ext_lib set to '$tclextlib_file'(\\nDEBUG Load T cl extension library \\(.+\\))?(\\nDEBUG setState: tcl_ext_lib_loaded set to '1' )?" | lappend ans "DEBUG setConf: tcl_ext_lib set to '$tclextlib_file'(\\nDEBUG Load T cl extension library \\(.+\\))?(\\nDEBUG setState: tcl_ext_lib_loaded set to '1' )?" | |||
lappend ans "DEBUG setConf: siteconfig set to '$siteconfig_filere'" | lappend ans "DEBUG setConf: siteconfig set to '$siteconfig_filere'" | |||
lappend ans "DEBUG sourceSiteConfig: Source site configuration \\($siteconfig_fi lere\\)" | lappend ans "DEBUG sourceSiteConfig: Source site configuration \\($siteconfig_fi lere\\)" | |||
lappend ans "DEBUG setState: siteconfig_loaded set to '1'" | lappend ans "DEBUG setState: siteconfig_loaded set to '1'" | |||
lappend ans "DEBUG setConf: locked_configs set to '$install_lockedconfigs'" | lappend ans "DEBUG setConf: locked_configs set to '$install_lockedconfigs'" | |||
lappend ans "DEBUG setState: supported_shells set to 'sh bash ksh zsh csh tcsh f ish cmd tcl perl python ruby lisp cmake r'" | lappend ans "DEBUG setState: supported_shells set to 'sh bash ksh zsh csh tcsh f ish cmd tcl perl python ruby lisp cmake r'" | |||
lappend ans "DEBUG setState: shell set to 'sh'" | lappend ans "DEBUG setState: shell set to 'sh'" | |||
lappend ans "DEBUG setState: shelltype set to 'sh'" | ||||
lappend ans "DEBUG setState: subcmd set to ''" | lappend ans "DEBUG setState: subcmd set to ''" | |||
lappend ans "DEBUG setState: subcmd_args set to ''" | lappend ans "DEBUG setState: subcmd_args set to ''" | |||
lappend ans "DEBUG setState: init_error_report set to '1'" | lappend ans "DEBUG setState: init_error_report set to '1'" | |||
lappend ans "DEBUG setConf: verbosity set to 'debug'" | lappend ans "DEBUG setConf: verbosity set to 'debug'" | |||
lappend ans "DEBUG setConf: term_background set to '$install_termbg'" | lappend ans "DEBUG setConf: term_background set to '$install_termbg'" | |||
lappend ans "(DEBUG initConfColors: Ignore invalid default.*\\n)?DEBUG setConf: colors set to '.*'" | lappend ans "(DEBUG initConfColors: Ignore invalid default.*\\n)?DEBUG setConf: colors set to '.*'" | |||
lappend ans "DEBUG setConf: color set to '0'" | lappend ans "DEBUG setConf: color set to '0'" | |||
lappend ans "DEBUG setConf: pager set to '$install_pagercmd'" | lappend ans "DEBUG setConf: pager set to '$install_pagercmd'" | |||
lappend ans "DEBUG setState: is_stderr_tty set to '1'" | lappend ans "DEBUG setState: is_stderr_tty set to '1'" | |||
lappend ans "DEBUG setState: paginate set to '1'" | lappend ans "DEBUG setState: paginate set to '1'" | |||
lappend ans "DEBUG setState: report_format set to 'regular'" | lappend ans "DEBUG setState: report_format set to 'regular'" | |||
lappend ans "DEBUG setState: reportfd set to 'file\\d'" | lappend ans "DEBUG setState: reportfd set to 'file\\d'" | |||
lappend ans "DEBUG setState: timer set to '0'" | ||||
lappend ans $vers_reportre | lappend ans $vers_reportre | |||
testouterr_cmd_re "sh" "-V" "" [join $ans "\n"] | testouterr_cmd_re "sh" "-V" "" [join $ans "\n"] | |||
# test variable superseding of regular siteconfig file by additional siteconfig file if enabled | # test variable superseding of regular siteconfig file by additional siteconfig file if enabled | |||
if {![is_config_locked extra_siteconfig]} { | if {![is_config_locked extra_siteconfig]} { | |||
setenv_var MODULES_SITECONFIG testsuite/example/siteconfig.tcl-2 | setenv_var MODULES_SITECONFIG testsuite/example/siteconfig.tcl-2 | |||
testouterr_cmd_re sh {-V} {} $vers_reportre | testouterr_cmd_re sh {-V} {} $vers_reportre | |||
unsetenv_var MODULES_SITECONFIG | unsetenv_var MODULES_SITECONFIG | |||
} | } | |||
# restore environment | # restore environment | |||
unsetenv_var TESTSUITE_ENABLE_SITECONFIG_DEBUG | unsetenv_var TESTSUITE_ENABLE_SITECONFIG_DEBUG | |||
# test broken siteconfig file | # test broken siteconfig file | |||
if { $verbose > 0 } { | if { $verbose > 0 } { | |||
send_user "\tSetup TESTSUITE_ENABLE_SITECONFIG_BROKEN = '1'\n" | send_user "\tSetup TESTSUITE_ENABLE_SITECONFIG_BROKEN = '1'\n" | |||
} | } | |||
set env(TESTSUITE_ENABLE_SITECONFIG_BROKEN) 1 | set env(TESTSUITE_ENABLE_SITECONFIG_BROKEN) 1 | |||
set ans [list] | set tserr [escre "$error_msgs: Site configuration source failed | |||
lappend ans "$error_msgs: Site configuration source failed" | invalid command name \"unk_foo\" | |||
lappend ans { invalid command name "unk_foo"} | while executing | |||
lappend ans { while executing} | \"unk_foo<EXM>\" | |||
lappend ans { "unk_foo"} | (file \"$siteconfig_file\" line 2)<EXM>"] | |||
lappend ans " invoked from within | testouterr_cmd_re sh -V ERR $tserr | |||
\"if {\[info exists env(TESTSUITE_ENABLE_SITECONFIG)\]} \{ | ||||
# force stderr terminal attachment state | ||||
proc initStateIsStderrTty {} { | ||||
return 1 | ||||
} | ||||
# enable...\" | ||||
(file \"$siteconfig_file\" line 2)" | ||||
if {[info exists env(COVERAGE)]} { | ||||
lappend ans " invoked from within | ||||
\"::_instrument_::source $siteconfig_file\" | ||||
(\"uplevel\" body line 1) | ||||
invoked from within | ||||
\"uplevel 1 \$args\" | ||||
(procedure \"source\" line 16) | ||||
(file \"$siteconfig_file\")" | ||||
} | ||||
testouterr_cmd "sh" "-V" "ERR" [join $ans "\n"] | ||||
# restore environment | # restore environment | |||
if { $verbose > 0 } { | if { $verbose > 0 } { | |||
send_user "\tUnset TESTSUITE_ENABLE_SITECONFIG_BROKEN\n" | send_user "\tUnset TESTSUITE_ENABLE_SITECONFIG_BROKEN\n" | |||
} | } | |||
unset env(TESTSUITE_ENABLE_SITECONFIG_BROKEN) | unset env(TESTSUITE_ENABLE_SITECONFIG_BROKEN) | |||
# test siteconfig that breaks modulecmd.tcl code | # test siteconfig that breaks modulecmd.tcl code | |||
setenv_var TESTSUITE_ENABLE_SITECONFIG_BROKEN2 1 | setenv_var TESTSUITE_ENABLE_SITECONFIG_BROKEN2 1 | |||
set ans [list] | set ans [list] | |||
skipping to change at line 187 | skipping to change at line 168 | |||
testouterr_cmd sh {foo} ERR [join $ans \n] | testouterr_cmd sh {foo} ERR [join $ans \n] | |||
unsetenv_var TESTSUITE_ENABLE_SITECONFIG_BROKEN3 | unsetenv_var TESTSUITE_ENABLE_SITECONFIG_BROKEN3 | |||
# test siteconfig file raising error | # test siteconfig file raising error | |||
# test parseAccessIssue with custom error code by the way | # test parseAccessIssue with custom error code by the way | |||
if { $verbose > 0 } { | if { $verbose > 0 } { | |||
send_user "\tSetup TESTSUITE_ENABLE_SITECONFIG_ACCESSERR = '1'\n" | send_user "\tSetup TESTSUITE_ENABLE_SITECONFIG_ACCESSERR = '1'\n" | |||
} | } | |||
set env(TESTSUITE_ENABLE_SITECONFIG_ACCESSERR) 1 | set env(TESTSUITE_ENABLE_SITECONFIG_ACCESSERR) 1 | |||
set ans [list] | set tserr [escre "$error_msgs: Site configuration source failed | |||
lappend ans "$error_msgs: Site configuration source failed" | Cannot access 'foo' | |||
lappend ans { Cannot access 'foo'} | while executing | |||
lappend ans { while executing} | \"error \[parseAccessIssue \"foo\"\]<EXM>\" | |||
lappend ans { "error [parseAccessIssue "foo"]"} | (file \"$siteconfig_file\" line 2)<EXM>"] | |||
lappend ans " invoked from within | testouterr_cmd_re sh -V ERR $tserr | |||
\"if {\[info exists env(TESTSUITE_ENABLE_SITECONFIG)\]} \{ | ||||
# force stderr terminal attachment state | ||||
proc initStateIsStderrTty {} { | ||||
return 1 | ||||
} | ||||
# enable...\" | ||||
(file \"$siteconfig_file\" line 2)" | ||||
if {[info exists env(COVERAGE)]} { | ||||
lappend ans " invoked from within | ||||
\"::_instrument_::source $siteconfig_file\" | ||||
(\"uplevel\" body line 1) | ||||
invoked from within | ||||
\"uplevel 1 \$args\" | ||||
(procedure \"source\" line 16) | ||||
(file \"$siteconfig_file\")" | ||||
} | ||||
testouterr_cmd "sh" "-V" "ERR" [join $ans "\n"] | ||||
# restore environment | # restore environment | |||
if { $verbose > 0 } { | if { $verbose > 0 } { | |||
send_user "\tUnset TESTSUITE_ENABLE_SITECONFIG_ACCESSERR\n" | send_user "\tUnset TESTSUITE_ENABLE_SITECONFIG_ACCESSERR\n" | |||
} | } | |||
unset env(TESTSUITE_ENABLE_SITECONFIG_ACCESSERR) | unset env(TESTSUITE_ENABLE_SITECONFIG_ACCESSERR) | |||
# test displayElementList procedure in terse+numbered mode | # test displayElementList procedure in terse+numbered mode | |||
if { $verbose > 0 } { | if { $verbose > 0 } { | |||
send_user "\tSetup TESTSUITE_ENABLE_SITECONFIG_TERSENUM = '1'\n" | send_user "\tSetup TESTSUITE_ENABLE_SITECONFIG_TERSENUM = '1'\n" | |||
skipping to change at line 291 | skipping to change at line 253 | |||
testouterr_cmd_re "sh" "-V" "OK" [join $ans "\n"] | testouterr_cmd_re "sh" "-V" "OK" [join $ans "\n"] | |||
# restore environment | # restore environment | |||
if { $verbose > 0 } { | if { $verbose > 0 } { | |||
send_user "\tUnset TESTSUITE_ENABLE_SITECONFIG_READMODNOREPORT\n" | send_user "\tUnset TESTSUITE_ENABLE_SITECONFIG_READMODNOREPORT\n" | |||
} | } | |||
unset env(TESTSUITE_ENABLE_SITECONFIG_READMODNOREPORT) | unset env(TESTSUITE_ENABLE_SITECONFIG_READMODNOREPORT) | |||
# test loaded module accessor procedures on non-loaded module | # test loaded module accessor procedures on non-loaded module | |||
# does not happened currently within modulecmd.tcl as there is always a | # does not happened currently within modulecmd.tcl as there is always a | |||
# getLoadedModulesList retrieval or a isModuleLoaded call prior use of get | # 'getLoadedModulePropertyList name' retrieval or a isModuleLoaded call prior | |||
# accessor | # use of get accessor | |||
if { $verbose > 0 } { | if { $verbose > 0 } { | |||
send_user "\tSetup TESTSUITE_ENABLE_SITECONFIG_LMACCESSOR = '1'\n" | send_user "\tSetup TESTSUITE_ENABLE_SITECONFIG_LMACCESSOR = '1'\n" | |||
} | } | |||
set env(TESTSUITE_ENABLE_SITECONFIG_LMACCESSOR) 1 | set env(TESTSUITE_ENABLE_SITECONFIG_LMACCESSOR) 1 | |||
set ans [list] | set ans [list] | |||
lappend ans "" | lappend ans "" | |||
lappend ans "" | lappend ans "" | |||
lappend ans "" | lappend ans "" | |||
lappend ans "bar1 bar2" | lappend ans "bar1 bar2" | |||
skipping to change at line 366 | skipping to change at line 328 | |||
setenv_var TESTSUITE_ENABLE_SITECONFIG_GETDIFFBETWEENLIST 1 | setenv_var TESTSUITE_ENABLE_SITECONFIG_GETDIFFBETWEENLIST 1 | |||
set ans [list] | set ans [list] | |||
lappend ans "{foo foo2} {bar bar2}" | lappend ans "{foo foo2} {bar bar2}" | |||
lappend ans $vers_reportre | lappend ans $vers_reportre | |||
testouterr_cmd_re sh -V OK [join $ans \n] | testouterr_cmd_re sh -V OK [join $ans \n] | |||
# restore environment | # restore environment | |||
unsetenv_var TESTSUITE_ENABLE_SITECONFIG_GETDIFFBETWEENLIST | unsetenv_var TESTSUITE_ENABLE_SITECONFIG_GETDIFFBETWEENLIST | |||
# test getDiffBetweenArray procedure with element of first list arg with empty v | ||||
alue | ||||
# not in second list arg (notset_equals_empty option enabled) | ||||
setenv_var TESTSUITE_ENABLE_SITECONFIG_GETDIFFBETWEENARRAY 1 | ||||
set ans [list] | ||||
lappend ans "{} {} {}" | ||||
lappend ans $vers_reportre | ||||
testouterr_cmd_re sh -V OK [join $ans \n] | ||||
# restore environment | ||||
unsetenv_var TESTSUITE_ENABLE_SITECONFIG_GETDIFFBETWEENARRAY | ||||
# test clear sub-command confirmation message without waiting indefinitely | # test clear sub-command confirmation message without waiting indefinitely | |||
if {$is_stdin_tty} { | if {$is_stdin_tty} { | |||
setenv_var TESTSUITE_ENABLE_SITECONFIG_EXITONGETSSTDIN 1 | setenv_var TESTSUITE_ENABLE_SITECONFIG_EXITONGETSSTDIN 1 | |||
set tserr "(Are you sure you want to clear all loaded modules\\!\\? \\\[n\\\ ] )" | set tserr "(Are you sure you want to clear all loaded modules\\!\\? \\\[n\\\ ] )" | |||
testouterr_cmd_re sh clear {} $tserr | testouterr_cmd_re sh clear {} $tserr | |||
# restore environment | # restore environment | |||
unsetenv_var TESTSUITE_ENABLE_SITECONFIG_EXITONGETSSTDIN | unsetenv_var TESTSUITE_ENABLE_SITECONFIG_EXITONGETSSTDIN | |||
} elseif {$verbose > 0} { | } elseif {$verbose > 0} { | |||
skipping to change at line 390 | skipping to change at line 364 | |||
setenv_var TESTSUITE_ENABLE_SITECONFIG_NOEXTRASITECONFIG 1 | setenv_var TESTSUITE_ENABLE_SITECONFIG_NOEXTRASITECONFIG 1 | |||
test_getSiteConfig testsuite/example/siteconfig.tcl-2 0 1 | test_getSiteConfig testsuite/example/siteconfig.tcl-2 0 1 | |||
# restore environment | # restore environment | |||
unsetenv_var TESTSUITE_ENABLE_SITECONFIG_NOEXTRASITECONFIG | unsetenv_var TESTSUITE_ENABLE_SITECONFIG_NOEXTRASITECONFIG | |||
# test tcl ext lib load on an incompatible interp if available | # test tcl ext lib load on an incompatible interp if available | |||
if {[info exists tclextlib_file] && [file executable ./tclsh83]} { | if {[info exists tclextlib_file] && [file executable ./tclsh83]} { | |||
setenv_var TESTSUITE_ENABLE_SITECONFIG_TCLEXTLIBLOAD83 1 | setenv_var TESTSUITE_ENABLE_SITECONFIG_TCLEXTLIBLOAD83 1 | |||
set ans [list] | ||||
lappend ans "$error_msgs: Site configuration source failed" | ||||
lappend ans { version conflict for package "Tcl": have 8.3, need 8.5} | ||||
lappend ans { while executing} | ||||
lappend ans { "exec ./tclsh83 << "load [getConf tcl_ext_lib] Envmodules""} | ||||
lappend ans " invoked from within | ||||
\"if {\[info exists env(TESTSUITE_ENABLE_SITECONFIG)\]} \{ | ||||
# force stderr terminal attachment state | ||||
proc initStateIsStderrTty {} { | ||||
return 1 | ||||
} | ||||
# enable...\" | ||||
(file \"$siteconfig_file\" line 2)" | ||||
if {[info exists env(COVERAGE)]} { | ||||
lappend ans " invoked from within | ||||
\"::_instrument_::source $siteconfig_file\" | ||||
(\"uplevel\" body line 1) | ||||
invoked from within | ||||
\"uplevel 1 \$args\" | ||||
(procedure \"source\" line 16) | ||||
(file \"$siteconfig_file\")" | ||||
} | ||||
testouterr_cmd sh -V ERR [join $ans "\n"] | set tserr [escre "$error_msgs: Site configuration source failed | |||
version conflict for package \"Tcl\": have 8.3, need 8.5 | ||||
while executing | ||||
\"exec ./tclsh83 << \"load \[getConf tcl_ext_lib\] Envmodules\"<EXM>\" | ||||
(file \"$siteconfig_file\" line 2)<EXM>"] | ||||
testouterr_cmd_re sh -V ERR $tserr | ||||
# restore environment | # restore environment | |||
unsetenv_var TESTSUITE_ENABLE_SITECONFIG_TCLEXTLIBLOAD83 | unsetenv_var TESTSUITE_ENABLE_SITECONFIG_TCLEXTLIBLOAD83 | |||
} elseif {$verbose > 0} { | } elseif {$verbose > 0} { | |||
send_user "\tSkip tcl ext lib load tests with tclsh83 as either ext lib or t clsh83 is not available\n" | send_user "\tSkip tcl ext lib load tests with tclsh83 as either ext lib or t clsh83 is not available\n" | |||
} | } | |||
# test tcl ext lib procedures against erroneous calls | # test tcl ext lib procedures against erroneous calls | |||
if {[info exists tclextlib_file]} { | if {[info exists tclextlib_file]} { | |||
setenv_var TESTSUITE_ENABLE_SITECONFIG_TCLEXTLIBBADCALL 1 | setenv_var TESTSUITE_ENABLE_SITECONFIG_TCLEXTLIBBADCALL 1 | |||
set ans [list] | set ans [list] | |||
End of changes. 10 change blocks. | ||||
79 lines changed or deleted | 36 lines changed or added |