Projects
openEuler:Mainline
environment-modules
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 3
View file
_service:tar_scm:environment-modules.spec
Changed
@@ -1,13 +1,12 @@ %global vimdatadir %{_datadir}/Modules/share/vim/vimfiles Name: environment-modules -Version: 5.0.1 +Version: 5.1.1 Release: 2 Summary: Provides dynamic modification of a user's environment License: GPLv2+ URL: http://modules.sourceforge.net/ Source0: http://downloads.sourceforge.net/modules/modules-%{version}.tar.bz2 -Patch0001: openeuler-20200527.patch BuildRequires: gcc tcl-devel libX11-devel dejagnu sed procps hostname man less Requires: tcl sed procps man less vim-filesystem @@ -136,6 +135,12 @@ %{_mandir}/man4/modulefile-c.4.gz %changelog +* Thu Dec 1 2022 zhoupengcheng <zhoupengcheng11@huawei.com> - 5.1.1-2 +- delete unnecessary patch + +* Wed Aug 3 2022 panxiaohe <panxh.life@foxmail.com> - 5.1.1-1 +- upgrade version to 5.1.1 + * Mon Jul 18 2022 zoulin <zoulin13@h-partners.com> - 5.0.1-2 - delete duplicate files
View file
_service:tar_scm:openeuler-20200527.patch
Deleted
@@ -1,12 +0,0 @@ -diff -ur modules-4.1.4/testsuite/modules.50-cmds/095-uname.exp modules-4.1.4-20200527/testsuite/modules.50-cmds/095-uname.exp ---- modules-4.1.4/testsuite/modules.50-cmds/095-uname.exp 2018-08-20 23:46:50.000000000 +0800 -+++ modules-4.1.4-20200527/testsuite/modules.50-cmds/095-uname.exp 2020-05-27 16:03:11.167849615 +0800 -@@ -55,7 +55,7 @@ - test_cmd_re "csh" "load $module/$field" $ans - } - --foreach field list nodename version { -+foreach field list nodename { - if {$uname ne ""} { - set ans list - lappend ans list set _LMFILES_ "$modulefile/$field"
View file
_service
Changed
@@ -2,7 +2,7 @@ <service name="tar_scm"> <param name="scm">git</param> <param name="url">git@gitee.com:src-openeuler/environment-modules.git</param> - <param name="revision">8bded573c132d3c42e2222be8346670fad14be91</param> + <param name="revision">master</param> <param name="exclude">*</param> <param name="extract">*</param> </service>
View file
_service:tar_scm:modules-5.0.1.tar.bz2/tcl/coll.tcl
Deleted
@@ -1,253 +0,0 @@ -########################################################################## - -# COLL.TCL, collection management procedures -# Copyright (C) 2016-2021 Xavier Delaruelle -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -########################################################################## - -# build list of what to undo then do to move from an initial list to a target -# list, eventually checking element presence in extra from/to lists -proc getMovementBetweenList {from to {extfrom {}} {extto {}} {cmp eq}} { - reportDebug "from($from) to($to) with extfrom($extfrom) extto($extto)" - - set undo {} - set do {} - - # determine what element to undo then do - # to restore a target list from a current list - # with preservation of the element order - set imax if {llength $to > llength $from} {llength $to} {llength\ - $from} - set list_equal 1 - for {set i 0} {$i < $imax} {incr i} { - set to_obj lindex $to $i - set from_obj lindex $from $i - # check from/to element presence in extra from/to list - set in_extfrom expr {$from_obj in $extfrom} - set in_extto expr {$to_obj in $extto} - # are elts the sames and are both part of or missing from extra lists - # when comparing modules, ask comparison against loaded module - # alternative and simplified names (modEq will also compare variants) - if {($cmp eq {modeq} && !modEq $to_obj $from_obj equal 1 3 1) ||\ - ($cmp eq {eq} && $to_obj ne $from_obj) || $in_extfrom != $in_extto} { - set list_equal 0 - } - if {$list_equal == 0} { - if {$to_obj ne {}} { - lappend do $to_obj - } - if {$from_obj ne {}} { - lappend undo $from_obj - } - } - } - - return list $undo $do -} - -# build list of currently loaded modules where modulename is registered minus -# module version if loaded version is the default one -proc getSimplifiedLoadedModuleList {} { - set curr_mod_list {} - set curr_nuasked_list {} - set modpathlist getModulePathList - foreach mod getLoadedModuleList { - set altandsimplist getLoadedAltAndSimplifiedName $mod - - set parentmod file dirname $mod - set simplemod $mod - # simplify to parent name as long as it is found in simplified name list - while {$parentmod ne {.}} { - if {$parentmod in $altandsimplist} { - set simplemod $parentmod - set parentmod file dirname $parentmod - } else { - set parentmod . - } - } - - # add each module specification as list to correctly enclose spaces in - # module name or variant name or value - set simplemodvr list $simplemod {*}getVariantList $mod 5 1 - lappend curr_mod_list $simplemodvr - # record not user asked module list in simplified version form - if {isModuleTagged $mod auto-loaded 1} { - lappend curr_nuasked_list $simplemodvr - } - } - - return list $curr_mod_list $curr_nuasked_list -} - -# return saved collections found in user directory which corresponds to -# enabled collection target if any set. -proc findCollections {} { - if {info exists ::env(HOME)} { - set coll_search $::env(HOME)/.module/* - } else { - reportErrorAndExit {HOME not defined} - } - - # find saved collections (matching target suffix) - # a target is a domain on which a collection is only valid. - # when a target is set, only the collections made for that target - # will be available to list and restore, and saving will register - # the target footprint - set colltarget getConf collection_target - if {$colltarget ne {}} { - append coll_search .$colltarget - } - - # glob excludes by default files starting with "." - if {catch {set coll_list glob -nocomplain $coll_search} errMsg} { - reportErrorAndExit "Cannot access collection directory.\n$errMsg" - } - - return $coll_list -} - -# get filename corresponding to collection name provided as argument. -# name provided may already be a file name. collection description name -# (with target info if any) is returned along with collection filename -proc getCollectionFilename {coll} { - # initialize description with collection name - set colldesc $coll - - if {$coll eq {}} { - reportErrorAndExit getEmptyNameMsg collection - # is collection a filepath - } elseif {string first / $coll > -1} { - # collection target has no influence when - # collection is specified as a filepath - set collfile $coll - # elsewhere collection is a name - } elseif {info exists ::env(HOME)} { - set collfile $::env(HOME)/.module/$coll - # if a target is set, append the suffix corresponding - # to this target to the collection file name - set colltarget getConf collection_target - if {$colltarget ne {}} { - append collfile .$colltarget - # add knowledge of collection target on description - append colldesc " (for target \"$colltarget\")" - } - } else { - reportErrorAndExit {HOME not defined} - } - - return list $collfile $colldesc -} - -# generate collection content based on provided path and module lists -proc formatCollectionContent {path_list mod_list nuasked_list {sgr 0}} { - set content {} - - # graphically enhance module command if asked - set modcmd expr {$sgr ? sgr cm module : {module}} - - # start collection content with modulepaths - foreach path $path_list { - # enclose path if space character found in it - if {string first { } $path != -1} { - set path "{$path}" - } - # 'module use' prepends paths by default so we clarify - # path order here with --append flag - append content "$modcmd use --append $path" \n - } - - # then add modules - foreach mod $mod_list { - # mark modules not asked by user to restore the user asked state - set opt expr {$mod in $nuasked_list ? {--notuasked } : {}} - # no need to specifically enclose module specification if space char - # used in it as $mod is a list so elements including space will be - # automatically enclosed - append content "$modcmd load $opt$mod" \n - } - - return $content -} - -# read given collection file and return the path and module lists it defines -proc readCollectionContent {collfile colldesc} { - # init lists (maybe coll does not set mod to load) - set path_list {} - set mod_list {} - set nuasked_list {} - - # read file - if {catch { - set fdata split readFile $collfile \n - } errMsg } { - reportErrorAndExit "Collection $colldesc cannot be read.\n$errMsg" - } - - # analyze collection content - foreach fline $fdata { - if {regexp {module use (.*)$} $fline match patharg == 1} { - # paths are appended by default - set stuff_path append - # manage multiple paths and path options specified on single line, - # for instance "module use --append path1 path2 path3", with list - # representation of patharg (which handles quoted elements containing - # space in their name) - foreach path $patharg { - # following path is asked to be appended - if {($path eq {--append}) || ($path eq {-a})\ - || ($path eq {-append})} { - set stuff_path append - # following path is asked to be prepended - # collection generated with 'save' does not prepend - } elseif {($path eq {--prepend}) || ($path eq {-p})\ - || ($path eq {-prepend})} { - set stuff_path prepend - } else { - # ensure given path is absolute to be able to correctly - # compare with paths registered in MODULEPATH - set path getAbsolutePath $path - # add path to end of list - if {$stuff_path eq {append}} { - lappend path_list $path - # insert path to first position - } else { - set path_list linsert $path_list 0 $path - } - } - } - } elseif {regexp {module load (.*)$} $fline match modarg == 1} { - # remove collection-specific flags in specification - set cleanlist lsearch -all -inline -not -exact $modarg\ - --notuasked - # parse module specification to distinguish between module + variant - # specif and multiple modules specified on a single line - set parsedlist parseModuleSpecification 0 {*}$cleanlist - if {llength $modarg != llength $cleanlist} { - foreach parsed $parsedlist { - # add module name version and variant spec to the list - lappend nuasked_list $parsed - } - } - lappend mod_list {*}$parsedlist - } - } - return list $path_list $mod_list $nuasked_list -} - -# ;;; Local Variables: *** -# ;;; mode:tcl *** -# ;;; End: *** -# vim:set tabstop=3 shiftwidth=3 expandtab autoindent:
View file
_service:tar_scm:modules-5.1.1.tar.bz2/CODE_OF_CONDUCT.md
Added
@@ -0,0 +1,134 @@ + +# Modules Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, caste, color, religion, or sexual +identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the overall + community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or advances of + any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email address, + without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +modules-maintainers@lists.sourceforge.net. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of +actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or permanent +ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the +community. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenanthomepage, +version 2.1, available at +https://www.contributor-covenant.org/version/2/1/code_of_conduct.htmlv2.1. + +Community Impact Guidelines were inspired by +Mozilla's code of conduct enforcement ladderMozilla CoC. + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faqFAQ. Translations are available at +https://www.contributor-covenant.org/translationstranslations. + +homepage: https://www.contributor-covenant.org +v2.1: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html +Mozilla CoC: https://github.com/mozilla/diversity +FAQ: https://www.contributor-covenant.org/faq +translations: https://www.contributor-covenant.org/translations +
View file
_service:tar_scm:modules-5.0.1.tar.bz2/CONTRIBUTING.rst -> _service:tar_scm:modules-5.1.1.tar.bz2/CONTRIBUTING.rst
Changed
@@ -67,6 +67,15 @@ .. _running-the-tests: +Design notes +~~~~~~~~~~~~ + +See the :ref:`design` for recent feature specifications. You may also find +there some development howtos: + +* :ref:`add-new-sub-command` +* :ref:`add-new-config-option` + Running the tests ~~~~~~~~~~~~~~~~~ @@ -130,12 +139,38 @@ setState already_report 1 } +* `No trailing space nor misspelling <commit-hooks_>`_ + .. _Tcl minimal escaping style: https://wiki.tcl-lang.org/page/Tcl+Minimal+Escaping+Style +.. _commit-hooks: + +Commit hooks +~~~~~~~~~~~~ + +A :command:`pre-commit` hook script is provided in the :file:`script` +directory of the project to help you check that the contribution made is free +of misspellings and trailing spaces. It requires the `codespell`_ utility that +checks for typos in any kind of files and the `Aspell`_ utility that spell +checks documentation files. The :command:`pre-commit` could be enabled in your +local repository with following command:: + + ln -s ../../script/pre-commit .git/hooks/pre-commit + +A :command:`commit-msg` hook script is also provided in the :file:`script` +directory of the project to help you check that your commit messages are free +of misspellings. It requires the `Aspell`_ utility and could be enabled in +your local repository with following command:: + + ln -s ../../script/commit-msg .git/hooks/commit-msg + +.. _codespell: https://github.com/codespell-project/codespell +.. _Aspell: http://aspell.net/ + Emacs settings for coding conventions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -This is an example emacs configuration that adheres to the first two +This is an example Emacs configuration that adheres to the first two coding conventions. You may wish to add this to your ``.emacs`` or ``.emacs.d/`` to modify your tcl-mode::
View file
_service:tar_scm:modules-5.0.1.tar.bz2/ChangeLog -> _service:tar_scm:modules-5.1.1.tar.bz2/ChangeLog
Changed
@@ -1,3 +1,2696 @@ +2022-05-31 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * NEWS.rst, contrib/rpm/environment-modules.spec.in, doc/source/conf.py, + version.inc.in: Release of version 5.1.1 + + * testsuite/is_module_defined, testsuite/modules.00-init/005-init_ts.exp: + ts: fix is_modules_defined test Add bash script to test whether module + function is defined + + * Makefile, NEWS.rst: install: call git cmds in Makefile only if needed + Update Makefile to call git command only if the version.inc file needs to + get rebuilt (if it does not exist or if the git repository has been updated + after version.inc built). Include version.inc file in main Makefile only if + its variables have not been just generated within Makefile flow. + +2022-05-30 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * .aspell.en.pws, Makefile, NEWS.rst, lib/.gitignore, lib/Makefile.in: + install: include generated config.{guess,sub} in dist Include the + lib/config.guess and lib/config.sub scripts in distribution tarball if + generated by autoreconf + + * Makefile, init/Makefile: install: no dependency to version.inc in + init/Makefile The Makefile script in the init directory does not depend on + the definitions stored in the version.inc file. So remove inclusion and + requirement definition to this version.inc file in init/Makefile. + + * script/mrel: install: locate rpmlint rc file with -r in mrel Update mrel + script to locate rpmlint rc file with the -r command-line switch as -f is + not recognized anymore on rpmlint v2. + + * contrib/rpm/environment-modules.rpmlintrc: install: update rpmlint rc + config for fc36 Update rpmlint rc file to match the new rpmlint version and + configuration provided in Fedora 36. + +2022-05-28 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modulefiles.3/lcompat/1.7, + testsuite/modules.50-cmds/517-always-load.exp: ts: add depre tests for + always-load command in 50/517 + + * NEWS.rst, tcl/subcmd.tcl.in, testsuite/modules.50-cmds/465-tag-opt.exp: + Update mod designation with tags set by DepRe modules Update module + designation with the tags set by reloading dependent module. Closes #460. + +2022-05-27 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * NEWS.rst, doc/source/design/module-tags.rst, tcl/mfinterp.tcl.in, + tcl/modeval.tcl, testsuite/modulefiles.3/tag/8.0, + testsuite/modules.50-cmds/465-tag-opt.exp: Update tags set with prereq on + all loaded mods Update tags set through prereq command on all already + loaded requirements. Closes #459. + +2022-05-20 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/example/siteconfig.tcl-1, testsuite/modules.00-init/170-cwd.exp: + ts: test module over a removed current working dir + + * NEWS.rst, tcl/util.tcl: Report known error when cwd cannot be retrieved + Closes #457. + +2022-05-14 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * tcl/mfinterp.tcl.in, tcl/report.tcl.in: Migration conflict error report in + dedicated proc Add reportPresentConflictError procedure to report error + when a conflict is detected. + + * tcl/mfinterp.tcl.in, tcl/report.tcl.in: Migrate prereq error report in + dedicated proc Add the reportMissingPrereqError procedure to report error + when prereq is not satisfied. + + * tcl/mfinterp.tcl.in: Add getCurrentModfileInterpName proc Add + getCurrentModfileInterpName procedure to return identifier name of current + Tcl modulefile interpreter. + +2022-05-12 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * tcl/main.tcl.in, tcl/modeval.tcl: Return if prereq has been loaded on + loadRequirementModuleList Update loadRequirementModuleList procedure to + also return if one of the requirement from list has been loaded. + +2022-05-11 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * tcl/subcmd.tcl.in: Remove dependency to try_modulefile of cmdModuleUnload + The try_modulefile state does not impact the cmdModuleUnload procedure as + the only kind of error reported here is when an empty module name is + specified. Such error should be reported whatever the try_modulefile state. + + * tcl/main.tcl.in: Clarify {try,any}_modulefile state in ml proc Clarify + that the try_modulefile and any_modulefile states cannot be enabled when set + through the ml procedure: ml shortcut syntax leads to regular load and not + load-any or try-load. + +2022-05-10 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * tcl/main.tcl.in, tcl/subcmd.tcl.in: Move load-any no load error into + cmdModuleLoad Refactor module procedure to move the error raise when no + error and no module loaded in case of a load-any sub-command. This code is + moved directly at the end of cmdModuleLoad. + +2022-05-09 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * tcl/modfind.tcl.in: Refactor setModuleTag call in setLoadedModule As + setModuleTag now ensures no duplicate tag are set, no need to check if + auto-loaded tag is already set. Simplify also the if/else branch as same + commands are applied whether the loaded or auto-loaded tag need to be set. + +2022-05-08 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * tcl/main.tcl.in, tcl/modeval.tcl, + testsuite/modules.50-cmds/517-always-load.exp: Refactor 'module load' to use + loadRequirementModuleList Update module procedure to use + loadRequirementModuleList procedure when loading modules in load evaluation + mode when auto_handling is disabled. Update the loadRequirementModuleList + to return 0 is everything went well or 1 if an issue occurred. + + * testsuite/modules.70-maint/310-sh-to-mod.exp: ts: fix 70/310 tests when + module is defined in env + + * tcl/main.tcl.in: Refactor use of --tag option within module load + + * testsuite/modules.70-maint/350-term_width.exp: ts: add tests to improve + --width option coverage + + * testsuite/modules.50-cmds/520-pushenv.exp: ts: add pushenv test to improve + coverage + + * testsuite/modules.50-cmds/400-source-sh.exp: ts: test loaded completion + not defined in source-sh script + + * testsuite/example/sh-to-mod.csh, testsuite/example/sh-to-mod.fish, + testsuite/example/sh-to-mod.sh, testsuite/example/siteconfig.tcl-1, + testsuite/modules.50-cmds/400-source-sh.exp: ts: test removal of + alias/func/comp from source-sh script + +2022-05-07 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * NEWS.rst, tcl/subcmd.tcl.in, testsuite/modules.50-cmds/465-tag-opt.exp, + testsuite/modules.70-maint/322-tag-sgr.exp: No already loaded msg if new tag + applied Remove the *already loaded* message displayed when verbosity level + is higher or equal to 'verbose2', if new tags are applied to the loaded + module. Closes #456 + +2022-05-06 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modules.50-cmds/465-tag-opt.exp, + testsuite/modules.70-maint/321-tag_abbrev.exp, + testsuite/modules.70-maint/322-tag-sgr.exp: ts: test module designation with + tags when loading + + * NEWS.rst, tcl/report.tcl.in: Fix module designation rendering when no 'hi' + color key Fix rendering of loading or unloading module designation when + configured color palette does not set the 'hi' color key. Closes #455 + +2022-05-05 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modules.70-maint/045-listlong.exp, + testsuite/modules.70-maint/290-json.exp, + testsuite/modules.70-maint/322-tag-sgr.exp: ts: test space in module name on + list/avail outputs + +2022-05-04 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/example/siteconfig.tcl-1, + testsuite/modules.00-init/120-siteconfig.exp: ts: add readCollectionContent + coverage test + +2022-05-03 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * .cirrus.yml: cirrus: test FreeBSD 13.0 instead of eol 11.4 + + * testsuite/example/siteconfig.tcl-1, + testsuite/modules.00-init/120-siteconfig.exp: ts: add + unsetModuleTag/unsetModuleExtraTag coverage test + + * testsuite/modules.00-init/120-siteconfig.exp: ts: no tcl ext lib err call + tests if test libs not there + + * NEWS.rst, contrib/rpm/environment-modules.spec.in: rpm: install lib in + specific directory Move libtclenvmodules in an environment-modules + directory under libdir, as it is a private library. + + * NEWS.rst, configure: install: fix libdir64/32 guess in configure script + Update configure script to better guess the libdir64 and libdir32 directory + locations based on specified libdir. Correctly guess these directories when + libdir does not end with '64' but contains '64' like in + '/usr/lib64/environment-modules'. + + * .aspell.en.pws, NEWS.rst, contrib/rpm/environment-modules.rpmlintrc, + script/mrel: install: add rpmlint rc config file Add rpmlint rc + configuration file to filter false positive warning messages when checking + RPM spec file and built packages. Update 'mrel' script to use this rc + configuration file when linting RPM spec file. + + * contrib/rpm/environment-modules.spec.in: rpm: remove useless + environment-modules provides Remove useless environment-modules Provides + statement since this package is already named environment-modules. + +2022-05-02 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/example/sh-to-mod.sh, testsuite/modules.00-init/005-init_ts.exp, + testsuite/modules.50-cmds/400-source-sh.exp: ts: fix 50/400 tests when + module was defined but uninstalled Correct source-sh tests in 50/400 to + succeed when tests are run in an environment where module is defined but has + been uninstalled. It corresponds to the environment created for 'mrel' + script execution. + +2022-05-01 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * .../modules.20-locate/130-mcookie_check_eval.exp: ts: fix 20/130 tests + when run from path containing + char + + * script/mpub, script/mrel: script: no line number dependency for expected + errors Update mpub and mrel scripts not to depend on the line number + expressed in error message when comparing them to expected error message. + + * NEWS.rst: doc: fix rst typo in 5.1 NEWS + +2022-04-30 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * MIGRATING.rst, NEWS.rst, contrib/rpm/environment-modules.spec.in, + doc/source/conf.py, lib/configure.ac, tcl/subcmd.tcl.in, + testsuite/home/coll40, testsuite/home/coll41, testsuite/home/coll42, + testsuite/home/coll43, testsuite/home/coll45, testsuite/home/coll46, + testsuite/home/coll49, testsuite/home/coll49-tosource, + testsuite/modules.61-coll/010-init_ts.exp, version.inc.in: Release of + version 5.1.0 + +2022-04-29 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/home/coll49-tosource, testsuite/modules.50-cmds/465-tag-opt.exp, + testsuite/modules.61-coll/040-restore.exp: ts: tests tagging messages on + verbose/verbose2 modes + +2022-04-28 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * doc/source/design/hide-or-forbid-modulefile.rst, tcl/main.tcl.in, + tcl/mfinterp.tcl.in, tcl/modeval.tcl, tcl/subcmd.tcl.in: No Tagging msg + block if hidden and nuasked Do not output Tagging message block if module + is set hidden-loaded and evaluation has not been directly asked by user. + Add uasked argument to cmdModuleTag procedure to know if the evaluation of + module has been asked or not by user. + + * .aspell.en.pws, MIGRATING.rst, doc/source/_static/terminal_output.css, + doc/source/conf.py: doc: add examples in more tagging section in MIGRATING + + * NEWS.rst, doc/source/design/module-tags.rst, doc/source/module.rst: doc: + desc. tagging evaluation message + + * testsuite/modules.00-init/005-init_ts.exp, + testsuite/modules.61-coll/040-restore.exp: ts: adapt existing restore tests + to the Tagging msg + + * tcl/subcmd.tcl.in: Add Tagging message block When just tagging a module + already loaded, report a *Tagging* message with module denomination. Like + for *Loading* message, it is only seen during a restore/source sub-commands + or in verbose mode. + + * .aspell.en.pws, NEWS.rst, doc/example/log-module-commands/siteconfig.tcl, + doc/source/cookbook/log-module-commands.rst: doc: fix log-module-command + recipe siteconfig.tcl Fix the siteconfig.tcl file of the log-module-command + cookbook recipe not to break when a file is sourced through cmdModuleSource. + Limit the addition of the 'auto' log field only if load evaluation comes + from cmdModuleLoad procedure. Fixes #453 + + * NEWS.rst, doc/source/design/module-tags.rst, doc/source/module.rst: doc: + desc. tag report on load/unload/refresh msg block + +2022-04-27 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/install.00-init/020-module.exp, + testsuite/install.00-init/024-ml.exp, + testsuite/modules.00-init/130-auto_handling.exp, + testsuite/modules.20-locate/100-wspace.exp, + testsuite/modules.20-locate/115-forbid.exp, + testsuite/modules.20-locate/118-hidden-loaded.exp, + testsuite/modules.20-locate/119-hide-cascading.exp, + testsuite/modules.50-cmds/078-refresh.exp, + testsuite/modules.50-cmds/120-prereq-full.exp, + testsuite/modules.50-cmds/121-prereq-module.exp, + testsuite/modules.50-cmds/122-prereq-fullpath.exp, + testsuite/modules.50-cmds/150-module.exp, + testsuite/modules.50-cmds/170-swap.exp, + testsuite/modules.50-cmds/288-info-tags.exp, + testsuite/modules.50-cmds/370-deps-bis.exp, + testsuite/modules.50-cmds/370-deps.exp, + testsuite/modules.50-cmds/372-deps3.exp, + testsuite/modules.50-cmds/373-deps4.exp, + testsuite/modules.50-cmds/374-deps5.exp, + testsuite/modules.50-cmds/375-deps6.exp, + testsuite/modules.50-cmds/375-order.exp, + testsuite/modules.50-cmds/376-deps7.exp, + testsuite/modules.50-cmds/376-switch.exp, + testsuite/modules.50-cmds/377-cyclic.exp, + testsuite/modules.50-cmds/377-error.exp, + testsuite/modules.50-cmds/377-opposite.exp, + testsuite/modules.50-cmds/378-sametarget.exp, + testsuite/modules.50-cmds/379-module-unload.exp, + testsuite/modules.50-cmds/380-altname.exp, + testsuite/modules.50-cmds/430-implicit-req.exp, + testsuite/modules.50-cmds/431-not-req.exp, + testsuite/modules.50-cmds/450-hidden-loaded.exp, + testsuite/modules.50-cmds/460-sticky.exp, + testsuite/modules.50-cmds/461-super-sticky.exp, + testsuite/modules.50-cmds/462-sticky-corner.exp, + testsuite/modules.50-cmds/465-tag-opt.exp, + testsuite/modules.50-cmds/473-variant-prereq.exp, + testsuite/modules.50-cmds/474-variant-conflict.exp, + testsuite/modules.50-cmds/475-variant-tag.exp, + testsuite/modules.61-coll/040-restore.exp, + testsuite/modules.70-maint/120-autoinit.exp, + testsuite/modules.70-maint/230-verbosity.exp, + .../modules.70-maint/270-adv_version_spec.exp, + .../modules.70-maint/271-adv_version_spec-in.exp, + .../272-adv_version_spec-range.exp, .../273-adv_version_spec-space.exp, + .../274-adv_version_spec-autosym.exp, + testsuite/modules.70-maint/320-tags.exp, + .../modules.70-maint/377-variant-shortcut.exp: ts: update tests with tags + reported in msg block + + * tcl/report.tcl.in: Report module tags in header message block Update + Loading/Unloading/Refreshing header message block to render the tags + applying on the currently analyzed module over or along this module name, as + done when reporting loaded modules with list sub-command. + + * tcl/report.tcl.in: Make getModuleDesignation rely on + formatListEltToDisplay Use formatListEltToDisplay in getModuleDesignation + to render module designation. + +2022-04-26 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modules.20-locate/090-memcache.exp, + testsuite/modules.20-locate/100-wspace.exp, + testsuite/modules.70-maint/240-icase.exp, + .../272-adv_version_spec-range.exp, + testsuite/modules.70-maint/376-variant-tag.exp, + testsuite/modules.90-avail/080-noindepth.exp: ts: update avail/list tests + when space in module name + + * NEWS.rst, tcl/report.tcl.in: Quote name if it contains space when listing + modules Update formatListEltToDisplay and formatListEltToLongDisplay to + enclose element name in single quote if it contains a space character. As a + result list and avail output will now report enclosed module names if space + character if found in them, like it is done when reporting module + designation as loading/unloading header. Only enclose element name and not + suffix, to follow the same output approach than 'ls' command. + + * tcl/report.tcl.in, tcl/subcmd.tcl.in: Register tag list in module + designation Update registerModuleDesignation procedure to also register the + list of tags applied along module name and variants. + + * MIGRATING.rst, NEWS.rst: doc: desc. tags improvement in NEWS/MIGRATING + + * doc/source/design/module-tags.rst: doc: list mfcmd where --tag opt is + available in design + + * NEWS.rst, doc/source/changes.rst, doc/source/design/module-tags.rst: doc: + link to --tag option section + +2022-04-25 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * .github/workflows/windows_tests.yaml: gh: configure safe.directory git opt + on Cygwin & win native + + * doc/source/module.rst: doc: mention --tag in Module tags section + + * doc/source/module.rst, doc/source/modulefile.rst: doc: --tag update tag + list if mod is loaded already + + * doc/source/module.rst: doc: add an option section for --tag in module(1) + + * testsuite/modules.50-cmds/465-tag-opt.exp: ts: test tag set with full path + module spec + +2022-04-24 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/home/coll49, testsuite/modulefiles.3/foo/.modulerc, + testsuite/modulefiles.3/keep/1.0, testsuite/modulefiles.3/tag/8.0, + testsuite/modules.61-coll/010-init_ts.exp, + testsuite/modules.61-coll/040-restore.exp, + testsuite/modules.61-coll/999-cleanup.exp: ts: add restore tests with tags + set or not + + * tcl/subcmd.tcl.in: Clear auto-loaded tag on cmdModuleTag When the + unset_extra flag is enabled, also remove the auto-loaded tag on module if it + is not part of the target tag_list. + + * tcl/subcmd.tcl.in: Clear auto-loaded/keep-loaded tags when unloading + Remove from the in-memory knowledge the auto-loaded and keep-loaded tags set + on unloading modules. These tags are then forgotten and will not be + reapplied if module is currently reloading. + +2022-04-20 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * tcl/modeval.tcl, tcl/subcmd.tcl.in, + testsuite/modules.50-cmds/377-error.exp, + testsuite/modules.50-cmds/450-hidden-loaded.exp, + testsuite/modules.50-cmds/465-tag-opt.exp: Save/restore extra tags when + reloading modules Update reloadModuleListUnloadPhase and + reloadModuleListLoadPhase procedures to save extra tags of unloaded modules + to re-inject them when reloading these modules. + + * testsuite/modules.61-coll/040-restore.exp: ts: update restore tests now + extra tags are cleared + + * tcl/subcmd.tcl.in: Clear extra tags when unloading module Remove from the + in-memory knowledge the extra tags set on unloading modules. These extra + tags are then forgotten and will not be reapplied if module is currently + reloading. + + * tcl/subcmd.tcl.in: Clear extra tags when restoring collection When + restoring a collection, unset the extra tags on loaded modules that are not + defined in collection. + + * tcl/main.tcl.in, tcl/mfinterp.tcl.in, tcl/modeval.tcl, tcl/modfind.tcl.in, + tcl/subcmd.tcl.in: Unset extra tags on cmdModuleTag Add unset_extra + argument to the cmdModuleTag procedure to remove, when enabled, the extra + tags currently set on designated modules that are not part of the + transmitted tag list. Update every cmdModuleTag calls to take into account + this new unset_extra argument. + +2022-04-19 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * doc/source/design/module-tags.rst: doc: desc. updating tags on loaded mods + in design doc + +2022-04-15 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modulefiles.3/foo/1.0, testsuite/modulefiles.3/tag/8.0, + testsuite/modules.50-cmds/465-tag-opt.exp, + testsuite/modules.50-cmds/517-always-load.exp: ts: add tests where tags are + updated on loaded mods + +2022-04-13 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modules.50-cmds/465-tag-opt.exp: ts: fix existing tests to set + tags on already loaded mod + + * tcl/main.tcl.in, tcl/mfinterp.tcl.in, tcl/modeval.tcl: Apply new tags set + on loaded requirement Update the loadRequirementModuleList procedure to + apply tags defined on the first requirement found loaded. + +2022-04-12 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * tcl/subcmd.tcl.in: Apply new tags set on loaded module When a module load + attempt is made on an already loaded module with additional tag set, update + the tag list set on this loaded module: add the new tags not already set on + the loaded module. + +2022-04-11 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * .cirrus.yml: cirrus: test over newer FreeBSD 12 release + + * NEWS.rst, doc/source/modulefile.rst: doc: desc avail module subcmds in + modulefile interp ctx + +2022-04-10 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * NEWS.rst, doc/source/modulefile.rst: doc: add mfile/rc interp diff table + in modulefile man + +2022-04-09 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * INSTALL.rst, doc/source/module.rst: doc: mention rc files are not for + module config + +2022-04-08 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * doc/source/modulefile.rst: doc: mention use/unuse in module modulefile man + section + + * NEWS.rst: doc: desc. coll file signature change in NEWS + +2022-04-06 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/home/.module/coll48, testsuite/modules.00-init/005-init_ts.exp, + testsuite/modules.61-coll/010-init_ts.exp, + testsuite/modules.61-coll/020-savelist.exp, + testsuite/modules.61-coll/040-restore.exp, + testsuite/modules.61-coll/050-saverm.exp, + testsuite/modules.61-coll/060-saveshow.exp, + testsuite/modules.61-coll/999-cleanup.exp, + testsuite/modules.70-maint/154-is-saved.exp: ts: verify coll compat on all + coll subcmds + +2022-04-05 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modules.61-coll/080-access-coll.exp: ts: adapt existing tests + now coll compat is verified + +2022-04-06 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * .gitignore, Makefile, tcl/{coll.tcl => coll.tcl.in}: install: tcl/coll.tcl + should be built Need to build tcl/coll.tcl as this part of the code need to + use the @MODULES_VERSION@ pattern. + +2022-04-05 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * tcl/coll.tcl, tcl/subcmd.tcl.in: Check collections are valid when + searching them Update findCollections procedure to rely on a checkValidColl + procedure that verifies given collections can be read and are compatible + with current Modules version if they express a minimum version requirement. + As a side effect, when listing available collections with savelist + sub-command, now the collections that cannot be read are withdrawn from + result list. + +2022-04-03 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * tcl/coll.tcl, tcl/mfinterp.tcl.in, tcl/subcmd.tcl.in: Merge + getCollectionFilename into findCollections Update findCollections procedure + to merge behavior of getCollectionFilename in it. If search argument is set + to 'exact' an exact collection search match is performed. If search argument + is set to 'name', only the name of the collection file is computed. + +2022-04-02 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/home/coll40, testsuite/home/coll41, testsuite/home/coll42, + testsuite/home/coll43, testsuite/home/coll45, testsuite/home/coll46, + testsuite/modules.61-coll/010-init_ts.exp, + testsuite/modules.61-coll/030-save.exp, + testsuite/modules.61-coll/999-cleanup.exp: ts: update tag saved in + collection tests Set temporarily file signature to 5.0 version. Will move + to 5.1 version with the release commit of 5.1.0. + + * tcl/coll.tcl, tcl/subcmd.tcl.in: Add Module header when saving coll with + tags Record Modules magic cookie at the beginning of a collection when tags + are found set on the module to save. The #%Module file signature is followed + by the version number of Modules introducing the tag support. This version + number is temporarily set to 5.0 for test purpose. It will be moved to 5.1, + on the release commit of 5.1.0. If collection starts with a Modules file + signature, this header will not be reported on saveshow output. + + * tcl/coll.tcl, tcl/modfind.tcl.in: No empty entry in tag array for build + coll Update getSimplifiedLoadedModuleList and + getLoadedModuleWithVariantSaveTagArrayList procedure to fill the tag array + only with entries for modules with tags applied to them. This way it is + possible to know if collection define tags by checking number if this array + is empty. + +2022-04-01 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modulefiles.3/tag/.modulerc, + testsuite/modules.61-coll/010-init_ts.exp, + testsuite/modules.61-coll/030-save.exp, + testsuite/modules.61-coll/999-cleanup.exp: ts: test saving nearly-forbidden + tag in collection + + * testsuite/home/coll45, testsuite/home/coll46, + testsuite/modules.61-coll/010-init_ts.exp, + testsuite/modules.61-coll/040-restore.exp, + testsuite/modules.61-coll/999-cleanup.exp: ts: test restore colls with + invalid tags saved + +2022-03-30 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * NEWS.rst: doc: desc. __MODULES_LMEXTRATAG/collection_pin_tag in NEWS + +2022-03-29 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modulefiles.3/tag/8.0, + testsuite/modules.50-cmds/465-tag-opt.exp: ts: test reload with extra tags + in 50/465 + + * doc/source/design/module-tags.rst: doc: desc. collection_pin_tag in design + doc + + * testsuite/modules.61-coll/010-init_ts.exp, + testsuite/modules.61-coll/030-save.exp, + testsuite/modules.61-coll/040-restore.exp, + testsuite/modules.61-coll/999-cleanup.exp: ts: test save/restore with + collection_pin_tag enabled + +2022-03-28 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * tcl/modfind.tcl.in: Save all tags if collection_pin_tag is enabled Update + the getSaveTagList procedure to return all defined tags for given module + when the collection_pin_tag configuration option is enabled. An exception is + made for nearly-forbidden tag which is not saved due to its temporal + meaning. + + * testsuite/modules.00-init/010-environ.exp, + testsuite/modules.70-maint/220-config.exp: ts: test collection_pin_tag + config option + + * doc/source/changes.rst, doc/source/module.rst: doc: desc. + MODULES_COLLECTION_PIN_TAG in man/changes + + * INSTALL.rst, doc/source/changes.rst, doc/source/module.rst: doc: desc. + collection_pin_tag config in man/changes/INSTALL + + * init/Makefile, init/fish_completion, init/zsh-functions/_module.in: init: + add collection_pin_tag config to completion scripts + + * tcl/init.tcl.in: Add collection_pin_tag configuration option Add + collection_pin_tag configuration option that controls whether all tags + should be recorded in collection or just the tags specifically set with + --tag option or describing loaded module state (like auto-loaded or + keep-loaded tags). Disabled by default. When configuration is modified it + sets the MODULES_COLLECTION_PIN_TAG environment variable. + + * testsuite/modulefiles.3/tag/.modulerc, testsuite/modulefiles.3/tag/8.0, + testsuite/modules.61-coll/010-init_ts.exp, + testsuite/modules.61-coll/030-save.exp, + testsuite/modules.61-coll/040-restore.exp, + testsuite/modules.61-coll/999-cleanup.exp: ts: add collection tests for + extra tag record + +2022-03-27 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * .aspell.en.pws, tcl/coll.tcl, tcl/modfind.tcl.in, tcl/subcmd.tcl.in: Only + record extra tags in collection Update way collection is saved to only + record in it the extra tags set through --tag option and tags describing the + load state of a module like auto-loaded and keep-loaded. The getSaveTagList + procedure is introduce to return the list of tag to save for each loaded + module. + + * testsuite/modules.61-coll/010-init_ts.exp, + testsuite/modules.61-coll/030-save.exp, + testsuite/modules.61-coll/040-restore.exp, + testsuite/modules.61-coll/999-cleanup.exp: ts: adapt --tag option collection + tests + + * testsuite/modules.50-cmds/465-tag-opt.exp: ts: adapt --tag option tests + +2022-03-26 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modules.70-maint/210-clear.exp, + testsuite/modules.70-maint/280-ml.exp: ts: adapt clear subcmd tests for + __MODULES_LMEXTRATAG + + * tcl/modfind.tcl.in, tcl/subcmd.tcl.in: Record extra tags in + __MODULES_LMEXTRATAG Introduce __MODULES_LMEXTRATAG environment variable to + record the extra tags that have been set on loaded modules through the --tag + option. Exclude from this variable the auto-loaded and keep-loaded tags + that may be in some situation set through --tag option. + + * testsuite/install.00-init/010-environ.exp, + testsuite/modules.00-init/010-environ.exp: ts: clear __MODULES_LMEXTRATAG + prior tests + + * .aspell.en.pws, doc/source/changes.rst, doc/source/design/module-tags.rst, + doc/source/module.rst: doc: desc. __MODULES_LMEXTRATAG in man/changes/design + +2022-03-31 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * .aspell.en.pws, NEWS.rst: doc: desc. sysconf error handling in ext lib + + * Makefile, lib/.gitignore, lib/Makefile.in, lib/testutil-sysconf.c, + testsuite/example/siteconfig.tcl-1, + testsuite/modules.00-init/005-init_ts.exp, + testsuite/modules.00-init/120-siteconfig.exp: ts/lib: test tcl ext lib + against a failed sysconf call Add an utility library that supersedes the + sysconf function from libc. The sysconf function from this added library + always returns an error (-1). It is used for coverage test of the sysconf + call made within the Envmodules_InitStateUsergroupsObjCmd function of the + Tcl extension library. + +2022-03-30 Lukáš Zaoral <lzaoral@redhat.com> + + * lib/envmodules.c: lib: handle sysconf failure in InitStateUsergroupsObjCmd + sysconf may fail to obtain the value of the NGROUPS_MAX variable. In such + case, it returns -1 and sets errno to indicate the error. Let's handle this + situation as the size argument of ckalloc is an unsigned int so the size of + the allocated memory would be UINT_MAX instead. Subsequently, getgroups + would fail with EINVAL as maxgroupsize is non-zero but less than the number + of GIDs that would have been returned. Note that if sysconf returns -1 and + leaves errno intact, the given variable has no limit. However, that does + not seem to be the case on any reasonable operating system 1. Found by + Coverity. Resolves: modules-5.0.1/lib/envmodules.c:355: negative_return_fn: + Function "sysconf(_SC_NGROUPS_MAX)" returns a negative number. + modules-5.0.1/lib/envmodules.c:355: assign: Assigning: "maxgroups" = + "sysconf(_SC_NGROUPS_MAX)". modules-5.0.1/lib/envmodules.c:368: + negative_returns: "maxgroups" is passed to a parameter that cannot be + negative. 366| 367| #if defined (HAVE_GETGROUPS) 368|-> if ((ngroups = + getgroups(maxgroups, groups)) == -1) { 369| Tcl_SetErrno(errno); + 370| Tcl_SetObjResult(interp, 1 https://www.j3e.de/ngroups.html + +2022-03-24 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * init/python.py.in: init: explicitly send err output to sys.stderr in + python Update python initialization script to explicitly send error output + to the sys.stderr channel (instead of parent process stderr channel) to be + able to catch this content. + +2022-03-23 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modules.70-maint/120-autoinit.exp: ts: update autoinit tests to + new python code + + * .aspell.en.pws, NEWS.rst, tcl/envmngt.tcl.in: Update module() python func + to send output to sys.stderr Update definition of the module() python + function to explicitly send output to sys.stderr to get the ability to catch + this content. + + * MIGRATING.rst: doc: fix missing word in Lmod Tcl mfile support desc. + + * MIGRATING.rst: doc: desc. Lmod Tcl mfile support in MIGRATING + +2022-03-22 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * NEWS.rst, doc/source/modulefile.rst: doc: add Lmod Tcl mfile support + section in modulefile(4) + +2022-03-21 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * .aspell.en.pws, doc/source/design/lmod-tcl-modulefile-compat.rst: doc: + desc. pushenv in design notes + +2022-03-20 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * NEWS.rst: doc: desc. pushenv in NEWS + + * testsuite/install.00-init/010-environ.exp, + testsuite/modules.00-init/010-environ.exp: ts: clean family envvar prior + tests + + * testsuite/install.00-init/010-environ.exp, + testsuite/modules.00-init/010-environ.exp: ts: clean pushenv stack envvar + prior tests + +2022-03-17 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modulefiles.3/flatlcompat, + testsuite/modulefiles.3/lcompat/.modulerc, + testsuite/modulefiles.3/lcompat/1.10, testsuite/modulefiles.3/lcompat/1.11, + testsuite/modules.50-cmds/511-remove-property.exp, + testsuite/modules.50-cmds/520-pushenv.exp: ts: test pushenv mfcmd in 50/520 + +2022-03-20 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * tcl/envmngt.tcl.in, tcl/mfinterp.tcl.in: Ensure pushenv stack var is + cleared by other cmds Like for the reference counter array, ensure the push + stack environment variable is cleared when targeted variable is handled by + append-path, prepend-path, remove-path, setenv and unsetenv modulefile + commands. + +2022-03-16 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * tcl/envmngt.tcl.in, tcl/mfinterp.tcl.in: Add pushenv modulefile command + Introduce the pushenv modulefile command that sets an environment variable + with a value specified as argument but saves the previous value set to + restore it when modulefile is unloaded. Use a __MODULES_PUSHENV_<VAR> + environment variable as a stack to record the previous values of environment + variable <VAR>. Each element in this Modules-specific variable is the + combination of the currently evaluating modulename and pushed value. When + unloading, the value set by this module is removed not the value on top of + the list. When saving value set before any module, an empty module name is + used to push to the stack. When restoring this initial value, initial entry + in stack is also cleared (as no other module unload will unset it). Follow + same implementation principle that setenv, with a dedicated procedure for + the unload and whatis modes. + +2022-03-15 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * doc/source/changes.rst, doc/source/module.rst: doc: desc. + __MODULES_PUSHENV_<VAR> in changes/man + + * doc/source/changes.rst, doc/source/modulefile.rst: doc: desc. pushenv in + changes/man + +2022-03-14 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * contrib/vim/syntax/modulefile.vim: vim: add syntax highlight for pushenv + mfcmd + + * INSTALL.rst, doc/source/_static/rtd_theme_overrides.css: doc: fix config + opt table layout in INSTALL Update CSS and content of table to make default + value words correctly wrap and be able to see the 4th and 5th cols on small + screens. + +2022-03-13 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * .aspell.en.pws, INSTALL.rst, NEWS.rst, + doc/source/design/add-new-config-option.rst: doc: add Configuration options + section in INSTALL + +2022-03-12 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * doc/source/module.rst: doc: reorder silent_shell_debug config opt in + module(1) + + * doc/source/module.rst: doc: see linked envvar for details on configs + +2022-03-11 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * INSTALL.rst: doc: fix wrong default value for some install opts + + * CONTRIBUTING.rst: doc: use plural for Commit hook section in CONTRIBUTING + +2022-03-10 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * .aspell.en.pws, NEWS.rst, doc/source/conf.py, doc/source/module.rst: doc: + clarify instopt & default value of config opts + +2022-03-09 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * doc/source/module.rst: doc: MODULES_ML has to get set prior Modules init + + * INSTALL.rst, NEWS.rst: doc: clarify config opt linked to install opt + + * NEWS.rst, doc/source/module.rst: doc: clarify env vars to set prior + Modules initialization + + * doc/source/module.rst: doc: clarify module-generated env vars in module(1) + +2022-03-08 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * NEWS.rst, doc/source/module.rst: doc: clarify config opt linked to env var + Update the ENVIRONMENT section in module(1) man page to provide for each + Modules environment variable the name of the configuration option that could + be used to set the variable through the config sub-command. + +2022-03-06 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * INSTALL.rst, MIGRATING.rst, NEWS.rst, doc/source/changes.rst, + doc/source/cookbook/reduce-io-load.rst, doc/source/module.rst, + doc/source/modulefile.rst: doc: magic cookie means file signature Update + documentation to clarify that the Modules magic cookie corresponds to a file + signature. + +2022-03-05 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * .gitattributes: install: exclude git hook stuff from git export + + * CONTRIBUTING.rst, INSTALL.rst, NEWS.rst, script/commit-msg: script: add + commit-msg hook script to check commit msg + + * .aspell.en.pws, .codespellrc, .gitignore, CONTRIBUTING.rst, NEWS.rst, + script/pre-commit: script: update pre-commit to spell check docs with Aspell + +2022-03-04 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * script/pre-commit: script: pre-commit warn if codespell not installed + + * NEWS.rst, doc/source/modulefile.rst: doc: desc. Dependencies between + modulefiles Fixes #431. Fixes #433. + +2022-03-03 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * CONTRIBUTING.rst, MIGRATING.rst, NEWS.rst, README.md, doc/source/FAQ.rst, + doc/source/changes.rst, doc/source/cookbook/compiler-etc-dependencies.rst, + doc/source/design/hide-or-forbid-modulefile.rst, + doc/source/design/output-configuration.rst, + .../design/source-shell-script-in-modulefile.rst, + doc/source/design/variants.rst, doc/source/index.rst: doc: fix typos found + with Aspell + +2022-03-01 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * CONTRIBUTING.rst, NEWS.rst, script/pre-commit: script: add pre-commit + script to verify commits + + * NEWS.rst, tcl/mfinterp.tcl.in, testsuite/modules.00-init/005-init_ts.exp, + testsuite/modules.70-maint/310-sh-to-mod.exp: Handle empty fish shell + function in sh-to-mod/source-sh Update the sh-to-mod and source-sh + mechanism to handle fish shell function with an empty body. + + * NEWS.rst: doc: desc. recent sh-to-mod/source-sh fixes in NEWS + + * tcl/mfinterp.tcl.in, testsuite/install.00-init/091-source-sh.exp, + testsuite/modules.70-maint/310-sh-to-mod.exp: Include private functions in + fish sh-to-mod analysis Update the environment analysis made for sh-to-mod + sub-command and source-sh modulefile command for fish shell to include the + private functions. Catch this way all definition that may be used to set + shell completion. + +2022-02-28 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/install.00-init/091-source-sh.exp: ts: test unload of source-sh + mods in install ts + +2022-02-27 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * .github/workflows/windows_tests.yaml: gh: upgrade to python 3.9 on Cygwin + Seem a new python37-sphinx release on Cygwin has broken dependencies, so + upgrate Cygwin test cases to python 3.9 which is the recommanded version. + + * .codespellrc: codespell: ignore spack/miniconda3/OpenFOAM-dev content + + * .cirrus.yml, .gitignore, Makefile, + testsuite/install.00-init/091-source-sh.exp, + testsuite/modulefiles.3/source-sh/openfoam: install/ts: test source-sh over + OpenFOAM scripts + +2022-02-25 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/install.00-init/091-source-sh.exp: ts: test source-sh over Conda + script on ksh/zsh/tcsh/fish + + * tcl/mfinterp.tcl.in: Fix csh alias detection on source-sh Alias + definition may sometimes be enclosed in parenthesis on csh shell. Fix alias + parsing regexp to support such definition. Useful for Conda initialization + script for csh shell: conda shell alias definition is presented by csh shell + enclosed in parenthesis. Fixes #434. + + * .cirrus.yml, .gitignore, Makefile: install/ts: fetch/install Conda/Spack + for source-sh tests Add directives into Makefile to fetch and install Spack + and Conda in order to test source-sh feature against their profile scripts. + + * testsuite/example/sh-to-mod.fish: ts: test fish complete def without -c + when fish>=3.2 Test fish shell completion definition without -c/--complete + option when fish is >=3.2 instead of >=3.0. + + * .cirrus.yml, testsuite/install.00-init/091-source-sh.exp, + testsuite/modulefiles.3/source-sh/conda: ts: test source-sh over Conda + scripts in install ts + + * .cirrus.yml: cirrus: upgrade linux test env to ubuntu 20.04 + +2022-02-24 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modules.70-maint/120-autoinit.exp: ts: fix autoinit tests after + modulecmd.tcl output quoting + + * testsuite/install.00-init/020-module.exp, + testsuite/install.00-init/090-sh-to-mod.exp, + testsuite/modulefiles.3/noglobeval/1.0: ts: update install tests after + modulecmd.tcl output quoting + + * .github/workflows/linux_tests.yaml, INSTALL.rst, Makefile, + Makefile.inc.in, NEWS.rst, configure, doc/source/changes.rst, + doc/source/module.rst, init/Makefile, init/fish_completion, + init/zsh-functions/_module.in, site.exp.in, tcl/envmngt.tcl.in, + tcl/init.tcl.in, testsuite/example/initrc.in, + testsuite/install.00-init/010-environ.exp, + testsuite/modules.00-init/010-environ.exp, + testsuite/modules.70-maint/120-autoinit.exp, + testsuite/modules.70-maint/220-config.exp: Revert work on noglob_eval_shells + config option Remove entirely the work on the noglob_eval_shells option as + enclosing in quotes the generated output of modulecmd.tcl to pass it to the + eval command is equivalent to disable the pathname expansion mechanism of + sh-kind shells. + + * init/bash.in, init/ksh.in, init/sh.in, init/zsh.in: init: translate `` + into $() for sh-kind shells + + * doc/source/FAQ.rst, doc/source/module.rst: doc: translate `` into $() for + sh-kind shells + +2022-02-23 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * tcl/envmngt.tcl.in: Translate `` into $() for sh-kind shells As the + module shell function code is currently updated for sh-kind shells, take + this opportunity to translate the `cmd` execution syntax into the more + modern $(cmd) syntax. + +2022-02-21 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/install.00-init/091-source-sh.exp: ts: test ksh/zsh over Spack + scripts in install ts + + * tcl/envmngt.tcl.in: Enclose modulecmd.tcl output in quotes on sh-kind + shells Update the module shell function definition for sh-kind shell to + enclose the output generated by modulecmd.tcl in quotes in order to pass it + to the eval command. Quoting code to pass it to eval brings correctness to + the definition of shell functions without harming already well functionning + definition. Regular shell function definition could now be correctly defined + in user environment: no more need to get each command line in these function + ending with a ';' character. Same mechanism was applied in initialization + script to evaluate the code produced by the autoinit sub-command. Multiple + function-definition issues spotted when using source-sh across environment + setting script shell are fixed with this change. Moreover, all the + noglob_eval_shells work is made useless with this change as no globbing is + applyed to the code produced by modulecmd.tcl as it is now enclosed in + quotes. + +2022-02-24 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/example/sh-to-mod.fish, testsuite/example/sh-to-mod.sh, + testsuite/install.00-init/090-sh-to-mod.exp, + testsuite/modules.50-cmds/078-refresh.exp, + testsuite/modules.50-cmds/400-source-sh.exp, + testsuite/modules.70-maint/310-sh-to-mod.exp: ts: test wildcard char in func + on sh-to-mod tests + +2022-02-23 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/bin/install_test_csh, testsuite/example/sh-to-mod.csh, + testsuite/example/sh-to-mod.fish, testsuite/example/sh-to-mod.sh, + testsuite/install.00-init/090-sh-to-mod.exp, + testsuite/modules.50-cmds/400-source-sh.exp, + testsuite/modules.70-maint/310-sh-to-mod.exp: ts: test wildcard char in + envvar on sh-to-mod tests + +2022-02-21 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * .cirrus.yml, testsuite/install.00-init/091-source-sh.exp, + testsuite/modulefiles.3/source-sh/spack: ts: test source-sh over Spack + scripts in install ts + + * doc/source/changes.rst: doc: desc. MODULES_NOGLOB_EVAL_SHELLS in changes + + * testsuite/example/sh-to-mod.fish, + testsuite/modules.70-maint/310-sh-to-mod.exp: ts: test sh-to-mod against + fish nested func/_ in name + +2022-02-20 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * tcl/mfinterp.tcl.in: Correctly escape and | in builtin fish funcs + Update execShAndGetEnv to correctly escape the '' and '|' characters in + fish shell code to filter builtin commands. These character were not + correctly escaped previously (replaced by '$1'). + + * tcl/mfinterp.tcl.in: Remove dup ';' in execShAndGetEnv getfunc fish code + + * NEWS.rst, tcl/mfinterp.tcl.in: Fix fish builtin func withdrawal on + sh-to-mod/source-sh Fix the fish code to withdraw builtin functions to + compare functions defined before and after fish script shell execution in + execShAndGetEnv procedure. Previous regexp was not matching the full + string, so every function whose name contained a substring equal to the name + of a builtin function (like '_') where filtered. + + * NEWS.rst, doc/source/design/source-shell-script-in-modulefile.rst, + tcl/mfinterp.tcl.in: Support fish nested function on sh-to-mod/source-sh On + fish shell, function definition can be embedded inside function definition. + Update the execShAndGetEnv procedure to add a string separated after each + function definition (%ModulesSubShToMod%) to clearly delimitate the shell + function to analyse and report and skip the definition of nested functions. + +2022-02-19 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * .cirrus.yml, .github/workflows/linux_tests.yaml: cirrus/gh: remove broken + snapd fish config Remove snapd file that breaks fish shell on bionic (see + https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1961365). + + * testsuite/install.00-init/020-module.exp, + testsuite/modulefiles.3/noglobeval/1.0: ts: add install tests for + noglob_eval_shells + + * .github/workflows/linux_tests.yaml, testsuite/example/initrc.in, + testsuite/modules.70-maint/120-autoinit.exp: ts: test noglob_eval_shells + over autoinit subcmd + +2022-02-18 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/install.00-init/010-environ.exp, + testsuite/modules.00-init/010-environ.exp, + testsuite/modules.70-maint/220-config.exp: ts: test noglob_eval_shells + config option + +2022-02-17 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * NEWS.rst, doc/source/changes.rst, doc/source/module.rst: doc: desc. + noglob_eval_shells in man/changes/NEWS + +2022-02-16 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * INSTALL.rst: doc: desc. --with-noglob-eval-shells option in INSTALL + + * tcl/envmngt.tcl.in: Disable pathname expansion prior shell eval Add code + in module shell function (for shells listed in noglob_eval_shells) to + disable pathname expansion for the time of produced shell code evaluation. + +2022-02-13 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * init/Makefile, init/fish_completion, init/zsh-functions/_module.in: init: + add noglob_eval_shells config to completion scripts + + * Makefile, Makefile.inc.in, configure, site.exp.in, tcl/init.tcl.in: + install: add --with-noglob-eval-shells configure opt Introduce the + --with-noglob-eval-shells configure option to choose at installation time if + the pathname expansion should be disabled or not in the module function to + evaluate shell code produced by modulecmd.tcl, for the shells listed in + option value. + + * tcl/init.tcl.in: Add noglob_eval_shells configuration option Add + noglob_eval_shells configuration option that controls whether or not the + module shell function should disable pathname expansion to evaluate shell + code produced by modulecmd.tcl script. Enabled by default for sh, bash ans + ksh shells. Support also zsh shell. When configuration option is modified it + sets the MODULES_NOGLOB_EVAL_SHELLS environment variable. Pathname + expansion is primarily an issue of bash and ksh93 shells when evaluating + shell function body code. It also impacts bash-flavored sh shells. So the + option is provided to support any shell from the sh family, but disabled by + default for shells not having the globbing issue (zsh). + +2022-02-17 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * .codespellrc: Add codespell configuration for the project + + * contrib/modulefiles/openwin, testsuite/modules.50-cmds/190-load.exp: ts: + fix some other typos in tests + + * MIGRATING.rst, NEWS.rst, doc/source/cookbook/sticky-modules.rst, + doc/source/design/sticky-modules.rst, doc/source/design/variants.rst, + doc/source/module.rst, tcl/modeval.tcl, tcl/subcmd.tcl.in, + testsuite/modules.50-cmds/460-sticky.exp, + testsuite/modules.50-cmds/461-super-sticky.exp, + testsuite/modules.50-cmds/462-sticky-corner.exp, + testsuite/modules.50-cmds/475-variant-tag.exp, + testsuite/modules.61-coll/040-restore.exp: Fix stickiness typos Fixes #442. + +2022-02-17 Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> + + * INSTALL.rst, contrib/modulefiles/scheme/racket/5.0.2, + doc/source/cookbook/new-features-without-breaking-old-module.rst, + doc/source/design/extended-default.rst, + doc/source/design/hide-or-forbid-modulefile.rst, + doc/source/design/insensitive-case.rst, + doc/source/design/sticky-modules.rst: Fix typos not found by codespell + + * contrib/modulefiles/gnu, contrib/modulefiles/openwin: contrib: fix + additional typos + +2022-02-17 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * contrib/modulefiles/java/6/35, contrib/modulefiles/java/6/38, + contrib/modulefiles/java/7/07, contrib/modulefiles/java/7/11, + contrib/modulefiles/openwin, contrib/readme.txt, + contrib/rpm/environment-modules.spec.in: contrib: fix typos found in several + files + + * NEWS.rst: doc: fix typos in NEWS + + * testsuite/modulefiles/module/unk, + testsuite/modules.50-cmds/150-module.exp, + testsuite/modules.50-cmds/170-swap.exp, + testsuite/modules.50-cmds/180-unload.exp, + testsuite/modules.70-maint/055-whatis.exp, + testsuite/modules.70-maint/070-display.exp, + testsuite/modules.70-maint/080-help.exp, + testsuite/modules.70-maint/085-test.exp: ts: fix NonExistent typo in several + tests Fixes #439 + +2022-02-16 Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> + + * init/bash.in, init/cmake.in, init/fish.in, init/ksh.in, init/perl.pm.in, + init/python.py.in, init/r.R.in, init/ruby.rb.in, init/sh.in, init/tcl.in, + init/zsh.in: init: fix typo in comment + +2022-02-14 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modules.00-init/120-siteconfig.exp, + testsuite/modules.00-init/140-color.exp: ts: fix 00/{120,140} tests after + typos fix + + * NEWS.rst: doc: desc. typos fix in NEWS + +2022-02-13 Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> + + * .github/ISSUE_TEMPLATE/bug_report.md, Makefile.inc.in, README.md, + configure, .../guide/get_started/08-guide_modulefile_search-alias.sh, + doc/example/compiler-etc-dependencies/homebrewed/bar/common, + doc/example/expose-procs-vars-to-modulefiles/siteconfig.tcl, + doc/example/inhibit-report-info/siteconfig.tcl, + doc/example/unload-firstly-loaded/siteconfig.tcl, doc/source/FAQ.rst, + doc/source/changes.rst, doc/source/cookbook/compiler-etc-dependencies.rst, + doc/source/cookbook/modulefiles-in-git.rst, + .../cookbook/new-features-without-breaking-old-module.rst, + doc/source/design/default-latest-version-specifiers.rst, + doc/source/design/hide-or-forbid-modulefile.rst, + doc/source/design/lmod-tcl-modulefile-compat.rst, + doc/source/design/sticky-modules.rst, doc/source/design/variants.rst, + doc/source/module.rst, script/mlprof, script/mpub, tcl/coll.tcl, + tcl/init.tcl.in, tcl/modfind.tcl.in, testsuite/config/base-config.exp, + testsuite/example/siteconfig.tcl-1, + testsuite/install.00-init/005-init_ts.exp, + testsuite/install.00-init/070-stderrtty.exp, + testsuite/modulefiles/append/1.7, testsuite/modulefiles/append/2.4, + testsuite/modulefiles/help/2.0, testsuite/modulefiles/info/mode3, + testsuite/modulefiles/info/mode4, testsuite/modulefiles/info/userexp, + testsuite/modulefiles/loc_dv1/1.0, testsuite/modulefiles/loc_dv1/2.0, + testsuite/modulefiles/loc_dv1/3.0, testsuite/modulefiles/loc_dv2/1.0, + testsuite/modulefiles/loc_dv2/2.0, testsuite/modulefiles/loc_dv3/1.0, + testsuite/modulefiles/loc_dv3/2.0, testsuite/modulefiles/loc_dv4/1.0, + testsuite/modulefiles/loc_dv4/2.0, testsuite/modulefiles/loc_dv6/1.0, + testsuite/modulefiles/loc_dv7/1.0, testsuite/modulefiles/loc_dv7/3.0, + testsuite/modulefiles/loc_dv8/1.0, testsuite/modulefiles/loc_dv8/2.0, + testsuite/modulefiles/loc_dv9/.version, testsuite/modulefiles/loc_dv9/1.0, + testsuite/modulefiles/loc_dv9/2.0, testsuite/modulefiles/loc_dvv1/.common, + testsuite/modulefiles/loc_dvv1/.modulerc, + testsuite/modulefiles/loc_dvv1/.version, testsuite/modulefiles/loc_fq/1.0, + testsuite/modulefiles/loc_fq/2.0, testsuite/modulefiles/loc_rc5/1.0, + testsuite/modulefiles/loc_rc5/2.0, testsuite/modulefiles/loc_sym/alias3, + testsuite/modulefiles/loc_sym/alias5, testsuite/modulefiles/loc_sym/alias8, + testsuite/modulefiles/loc_sym/getvers10, + testsuite/modulefiles/loc_sym/getvers5, + testsuite/modulefiles/loc_sym/getvers6, + testsuite/modulefiles/loc_sym/getvers7, + testsuite/modulefiles/loc_sym/versinf3, + testsuite/modulefiles/loc_sym/versinf4, + testsuite/modulefiles/loc_sym/versinf5, + testsuite/modulefiles/loc_sym/version11, + testsuite/modulefiles/loc_sym/version12, + testsuite/modulefiles/loc_sym/version13, + testsuite/modulefiles/loc_sym/version14, + testsuite/modulefiles/loc_sym/version2, + testsuite/modulefiles/loc_sym/version3, + testsuite/modulefiles/loc_sym/version4, + testsuite/modulefiles/loc_sym/version6, + testsuite/modulefiles/loc_sym/version7, + testsuite/modulefiles/loc_sym/version8, + testsuite/modulefiles/loc_sym/version9, testsuite/modulefiles/spread/1.0, + testsuite/modulefiles/spread/2.0, testsuite/modulefiles/spread/3.0, + testsuite/modulefiles/spread/4.0, testsuite/modulefiles/spread/5.0, + testsuite/modulefiles/spread/6.0, testsuite/modulefiles/spread/7.0, + testsuite/modulefiles/spread/8.0, testsuite/modulefiles/spreadrc/dir1/1.0, + testsuite/modulefiles/spreadrc/dir2/1.0, + testsuite/modulefiles/spreadrc/dir3/1.0, + testsuite/modulefiles/spreadrc/dir4/1.0, + testsuite/modulefiles/spreadrc/dir5/1.0, + testsuite/modulefiles/spreadrc/dir6/1.0, + testsuite/modulefiles/spreadrc/dir7/1.0, + testsuite/modulefiles/spreadrc/dir8/1.0, + testsuite/modules.00-init/005-init_ts.exp, + testsuite/modules.00-init/100-pager.exp, + testsuite/modules.00-init/120-siteconfig.exp, + testsuite/modules.00-init/130-auto_handling.exp, + testsuite/modules.00-init/140-color.exp, + testsuite/modules.10-use/030-use.exp, + testsuite/modules.20-locate/030-defvers.exp, + testsuite/modules.20-locate/031-defvers2.exp, + testsuite/modules.20-locate/038-defcontext.exp, + testsuite/modules.20-locate/065-rcerrs.exp, + testsuite/modules.20-locate/069-cross.exp, + testsuite/modules.20-locate/110-hide.exp, + testsuite/modules.20-locate/111-hide-hard.exp, + testsuite/modules.20-locate/115-forbid.exp, + testsuite/modules.20-locate/118-hidden-loaded.exp, + testsuite/modules.20-locate/119-hide-cascading.exp, + testsuite/modules.50-cmds/035-unsetenv-undo.exp, + testsuite/modules.50-cmds/040-append.exp, + testsuite/modules.50-cmds/076-alias-sub.exp, + testsuite/modules.50-cmds/084-info-mode-exp.exp, + testsuite/modules.50-cmds/085-info-flags.exp, + testsuite/modules.50-cmds/100-loglevel.exp, + testsuite/modules.50-cmds/170-swap.exp, + testsuite/modules.50-cmds/180-unload.exp, + testsuite/modules.50-cmds/190-load.exp, + testsuite/modules.50-cmds/371-deps2.exp, + testsuite/modules.50-cmds/372-deps3.exp, + testsuite/modules.50-cmds/375-deps6.exp, + testsuite/modules.50-cmds/376-deps7.exp, + testsuite/modules.50-cmds/376-switch.exp, + testsuite/modules.50-cmds/377-deps8.exp, + testsuite/modules.50-cmds/378-sametarget.exp, + testsuite/modules.50-cmds/380-altname.exp, + testsuite/modules.50-cmds/450-hidden-loaded.exp, + testsuite/modules.61-coll/020-savelist.exp, + testsuite/modules.61-coll/040-restore.exp, + testsuite/modules.61-coll/060-saveshow.exp, + testsuite/modules.70-maint/030-purge.exp, + testsuite/modules.70-maint/040-list.exp, + testsuite/modules.70-maint/048-listlongno.exp, + testsuite/modules.70-maint/056-whatis-nullpath.exp, + testsuite/modules.70-maint/060-apropos.exp, + testsuite/modules.70-maint/070-display.exp, + testsuite/modules.70-maint/080-help.exp, + testsuite/modules.70-maint/120-autoinit.exp, + testsuite/modules.70-maint/200-errdisp.exp, + testsuite/modules.70-maint/271-adv_version_spec-in.exp, + testsuite/modules.70-maint/272-adv_version_spec-range.exp, + testsuite/modules.70-maint/273-adv_version_spec-space.exp, + testsuite/modules.70-maint/310-sh-to-mod.exp, + testsuite/modules.70-maint/320-tags.exp, + testsuite/modules.70-maint/350-term_width.exp, + testsuite/modules.70-maint/360-avail_output.exp, + testsuite/modules.70-maint/999-cleanup.exp, + testsuite/modules.90-avail/020-single.exp, + testsuite/modules.90-avail/030-multiple.exp, + testsuite/modules.90-avail/040-wild.exp, + testsuite/modules.90-avail/050-long.exp, + testsuite/modules.90-avail/060-empty.exp, + testsuite/modules.90-avail/070-full.exp, + testsuite/modules.91-sort/020-avail.exp: Fix typos found by codespell + +2022-02-14 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * .cirrus.yml: cirrus: move from centos8 to rockylinux8 + +2022-02-13 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * MIGRATING.rst: doc: desc. shell completion features in MIGRATING + +2022-02-12 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modules.50-cmds/400-source-sh.exp: ts: add refresh tests on + source-sh in 50/400 + + * doc/source/design/shell-completion.rst, + .../design/source-shell-script-in-modulefile.rst, + testsuite/modules.50-cmds/400-source-sh.exp, + testsuite/modules.50-cmds/540-complete.exp: doc/ts: completion is first + cleared before set on fish + + * tcl/envmngt.tcl.in, tcl/mfinterp.tcl.in: Ensure pre-existing fish + completion is cleared When defining completion for a given command on fish + shell, start by clearing any potential previous completion definition. + Modulefile should this way provide the full completion definition for + command and cannot rely on partial definition coming from other sides. + +2022-02-11 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * NEWS.rst: doc: desc. completion support on source-sh/sh-to-mod in NEWS + + * .../design/source-shell-script-in-modulefile.rst: doc: desc. shell + completion support on source-sh in design + + * doc/source/changes.rst: doc: desc. completion support on + sh-to-mod/source-sh in changes + + * doc/source/module.rst, doc/source/modulefile.rst: doc: desc. completion + support on sh-to-mod/source-sh man + +2022-02-09 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/example/sh-to-mod.fish, testsuite/modulefiles.2/source-sh/7.2, + testsuite/modules.50-cmds/400-source-sh.exp, + testsuite/modules.70-maint/310-sh-to-mod.exp: ts: test fish complete on + sh-to-mod/source-sh + +2022-02-08 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/example/sh-to-mod.sh, testsuite/modulefiles.2/source-sh/7.1, + testsuite/modules.50-cmds/400-source-sh.exp, + testsuite/modules.70-maint/310-sh-to-mod.exp: ts: test bash complete on + sh-to-mod/source-sh + +2022-02-07 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/example/sh-to-mod.csh, testsuite/modulefiles.2/source-sh/7.0, + testsuite/modulefiles.2/source-sh/8.0, + testsuite/modules.00-init/005-init_ts.exp, + testsuite/modules.50-cmds/400-source-sh.exp, + testsuite/modules.70-maint/310-sh-to-mod.exp: ts: test tcsh complete on + sh-to-mod/source-sh + +2022-02-06 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * tcl/mfinterp.tcl.in: Tcsh support for complete/uncomplete changes on + sh-to-mod Update execShAndGetEnv procedure to add support for complete and + uncomplete changes on sh-to-mod for tcsh shell. + + * tcl/mfinterp.tcl.in: Fish support for complete/uncomplete changes on + sh-to-mod Update execShAndGetEnv procedure to add support for complete and + uncomplete changes on sh-to-mod for fish shell. + + * tcl/mfinterp.tcl.in: Bash support for complete/uncomplete changes on + sh-to-mod Update execShAndGetEnv procedure to add support for complete and + uncomplete changes on sh-to-mod for bash shell. + + * tcl/mfinterp.tcl.in, tcl/modfind.tcl.in: Support for complete/uncomplete + changes on sh-to-mod Update the sh-to-mod and execShAndGetEnv procedures to + analyze complete and uncomplete changes on sourced shell script and render + the corresponding modulefile commands. Add basic code for shells that do no + support complete/uncomplete environment changes. + +2022-02-02 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/install.00-init/020-module.exp, + testsuite/modulefiles.3/complete/1.0, testsuite/modulefiles.3/complete/1.1: + ts: add complete test in install ts + +2022-02-01 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modulefiles.3/complete/.modulerc, + testsuite/modulefiles.3/complete/1.1, testsuite/modulefiles.3/complete/1.2, + testsuite/modules.50-cmds/541-uncomplete.exp: ts: add tests for uncomplete + mfcmd in 50/541 + +2022-01-31 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modulefiles.3/complete/.modulerc, + testsuite/modulefiles.3/complete/1.0, testsuite/modulefiles.3/complete/1.2, + testsuite/modulefiles.3/complete/2.0, + testsuite/modules.50-cmds/540-complete.exp: ts: add tests for complete mfcmd + in 50/540 + +2022-01-30 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * contrib/vim/syntax/modulefile.vim: vim: add syntax highlight for + complete/uncomplete + + * doc/source/modulefile.rst: doc: desc. complete/uncomplete in man + + * NEWS.rst, doc/source/changes.rst: doc: desc. complete/uncomplete in + NEWS/changes + + * tcl/envmngt.tcl.in, tcl/mfinterp.tcl.in, tcl/modeval.tcl: Add + complete/uncomplete modulefile commands Introduce the complete and + uncomplete modulefile commands to define completion mechanism on running + shell. It supports only shell with completion capabilities that could be + defined with shell commands: bash, tcsh and fish. complete command takes a + shell name as first argument to apply completion specification only if + currently running shell corresponds to this shell name set as argument. This + is done as completion implementation is really different from one shell to + another. Also the arguments passed after command name are specific of the + shell and are not checked by module command. When unloading module, + complete becomes uncomplete. uncomplete can also be set as an independent + modulefile command and only acts on load evaluation module. complete is also + evaluated in refresh evaluation mode to push completion definition in + sub-shells for instance. Multiple completion definition for the same + command may be defined and will be applied to shell. Some shell, like fish, + needs multiple complete commands to fully define all parameters for the + completion of a single command. + + * NEWS.rst, doc/source/design/shell-completion.rst: doc: add + shell-completion design notes + +2022-01-23 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modules.70-maint/230-verbosity.exp: ts: check trace of + dynamically defined procs + +2022-01-21 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modulefiles.3/list/1.0, testsuite/modulefiles.3/list/2.0, + testsuite/modulefiles.3/variant/6.0, + testsuite/modules.00-init/140-color.exp, + testsuite/modules.50-cmds/530-module-list.exp, + testsuite/modules.70-maint/290-json.exp, + testsuite/modules.70-maint/361-list_output.exp, + testsuite/modules.70-maint/400-list-search.exp: ts: test pattern search on + list sub-cmd + +2022-01-22 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * doc/source/module.rst: doc: improve pattern search desc. on avail subcmd + +2022-01-21 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * NEWS.rst, doc/source/changes.rst, doc/source/module.rst: doc: desc. list + filtering in NEWS/changes/man + +2022-01-20 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modules.00-init/005-init_ts.exp, + testsuite/modules.00-init/071-args.exp, + testsuite/modules.50-cmds/152-module-emptyarg.exp, + testsuite/modules.70-maint/190-emptyarg.exp: ts: adapt existing tests now + list accepts args + +2022-01-19 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * tcl/init.tcl.in, tcl/subcmd.tcl.in: Add search capabilities to list subcmd + When module specification is passed to the list sub-command, only output the + loaded modules that matches at least one of these specification (OR + operation). Sub-command header message is adapted when module + specifications are passed to the sub-command. However same header message is + reported if there is no loaded module to report from the start. Search + capabilities rely on the modEq comparison procedure, so it takes into + account the search_match mode (starts-with/contains), the alternative names + set over loaded modules and the variant defined. Only the first specified + search pattern is set for SGR highlight due to the current limitation of + reportModules procedure (which only accepts one mod argument). + +2022-01-20 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * tcl/modspec.tcl, testsuite/example/siteconfig.tcl-1, + testsuite/modules.00-init/120-siteconfig.exp: Restore psuf arg on modEq proc + Pattern suffix is useful again on modEq comparison procedure due to the + introduction of search capabilities on the list sub-command. + +2022-01-19 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * tcl/main.tcl.in, tcl/report.tcl.in, tcl/subcmd.tcl.in: Allow search match + option on list subcmd Allow to pass the search match options (-S/-C) to the + list sub-command. + + * tcl/main.tcl.in, tcl/report.tcl.in, tcl/subcmd.tcl.in: Allow mod spec as + argument to list subcmd Allow the list sub-command to receive module + specifications as argument. + + * tcl/modspec.tcl: Trace dynamically defined procs in debug2 mode When + verbosity is set to debug2 or an higher mode, also add trace to the + procedure that are dynamically generated during the modulecmd.tcl run. + +2022-01-18 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * tcl/main.tcl.in, testsuite/modules.00-init/090-switches.exp: Add + --initial_load cmd-line option Add dummy support for the --initial_load + command-line option for compatiblity with script written for Lmod. Goal + here is just to avoid error when this option is used. + + * tcl/main.tcl.in, testsuite/modules.00-init/090-switches.exp: Add + --no_redirect cmd-line option Add dummy support for the --no_redirect + command-line option for compatiblity with script written for Lmod. Goal + here is to avoid error when this option is used. Support not added within + module shell function. + +2022-01-17 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * MIGRATING.rst: doc: add ref to reduce-io-load recipe in MIGRATING + + * MIGRATING.rst, doc/source/changes.rst, + doc/source/cookbook/reduce-io-load.rst: doc: fix typos in + MIGRATING/changes/reduce-io-load + +2022-01-13 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * NEWS.rst, doc/source/_static/terminal_output.css, doc/source/conf.py, + doc/source/cookbook/reduce-io-load.rst: doc: add reduce-io-load cookbook + recipe + +2022-01-10 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modulefiles.3/flatlcompat, + testsuite/modulefiles.3/lcompat/.modulerc, + testsuite/modulefiles.3/lcompat/1.8, + testsuite/modulefiles.3/lcompat/1.9/1.9, + testsuite/modulefiles.3/lcompat/1.9/2.0, + testsuite/modules.50-cmds/519-family.exp: ts: test family mfcmd in 50/519 + +2022-01-08 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * doc/source/design/lmod-tcl-modulefile-compat.rst: doc: desc. family in + design doc + + * NEWS.rst: doc: desc. family/MODULES_FAMILY_<NAME> in NEWS + + * contrib/vim/syntax/modulefile.vim: vim: add syntax highlight for family + mfcmd + + * doc/source/changes.rst, doc/source/module.rst: doc: desc. + MODULES_FAMILY_<NAME> in man/changes + + * doc/source/changes.rst, doc/source/modulefile.rst: doc: desc. family in + man/changes + +2022-01-07 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * tcl/mfinterp.tcl.in: Add family modulefile command Introduce the family + modulefile command that indicates currently loading module provides name + passed as argument and this name could only be provided by one loaded + module. family is implemented with the combined definition of a conflict + and a module alias. An environment variable is set to indicate what module + currently provides for the family within the loaded environment. + +2022-01-09 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modulefiles.3/puts/prestdout, + testsuite/modules.50-cmds/311-puts-prestdout.exp: ts: test prestdout channel + on puts command in 50/311 + + * NEWS.rst, doc/source/changes.rst, doc/source/modulefile.rst: doc: desc. + prestdout channel in man/changes/NEWS + + * tcl/envmngt.tcl.in, tcl/mfinterp.tcl.in, tcl/modeval.tcl: Add prestdout + channel to puts command Introduce the prestdout channel for the modified + puts command to be able to set specific content prior any other content sent + to stdout after the environment changes generated by modulefile evaluation. + Fixes #432 + + * NEWS.rst, doc/source/modulefile.rst: doc: desc. puts mfcmd in man + +2022-01-08 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * doc/source/modulefile.rst: doc: desc auto_handling on prereq in man + +2022-01-06 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * tcl/modfind.tcl.in: Clean useless code in setLoadedAltname + +2022-01-03 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * MIGRATING.rst: doc: desc. mcookie_check in MIGRATING + +2022-01-04 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * tcl/modfind.tcl.in: Protect 'file mtime' call when do not know what we + check Catch error of file mtime when targeted file has not been checked + previously (when mcookie_check is set to 'eval'). + +2022-01-03 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * NEWS.rst: doc: desc. mcookie_check in NEWS + +2021-12-28 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modulefiles/loc_dv1/3.0, testsuite/modulefiles/loc_dv4/1.0, + testsuite/modulefiles/loc_dv4/2.0, testsuite/modulefiles/loc_rc1/.modulerc, + testsuite/modulefiles/loc_virt2/.modulerc, testsuite/modulefiles/mcookie/1, + testsuite/modules.00-init/005-init_ts.exp, + .../modules.20-locate/130-mcookie_check_eval.exp, + testsuite/modules.61-coll/040-restore.exp: ts: test mcookie_check set to + eval in 20/130 + +2021-12-27 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * NEWS.rst, doc/source/design/magic-cookie-check.rst: doc: add + magic-cookie-check design notes + +2021-12-26 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/install.00-init/010-environ.exp, + testsuite/modules.00-init/010-environ.exp, + testsuite/modules.70-maint/220-config.exp: ts: test mcookie_check config + option + + * tcl/modfind.tcl.in: No mcookie check when searching module Update + checkValidModule to skip Module magic cookie check in file if mcookie_check + configuration option is not set to 'always'. When mcookie_check is set to + 'eval', files are not read when searching modulefiles. Which means any file + located within a modulepath directory is considered a modulefile. An error + will be obtained if an attempt is made to evaluate a non-modulefile located + in a modulepath directory. Also if a modulefile is specified fullpath, + Modules magic cookie will also not be checked if mcookie_check is set to + 'eval', and if this file is not a modulefile an error will be obtained if an + attempt is made to evaluate this file. + +2021-12-25 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * doc/source/changes.rst, doc/source/module.rst, doc/source/modulefile.rst: + doc: desc mcookie_check in changes/man + + * doc/source/changes.rst, doc/source/module.rst: doc: desc + MODULES_MCOOKIE_CHECK in changes/man + + * init/Makefile, init/fish_completion, init/zsh-functions/_module.in: init: + add mcookie_check config to completion script + + * tcl/init.tcl.in: Add mcookie_check configuration option Add the + mcookie_check configuration option that controls whether or not the magic + cookie at the start of modulefile (`#%Module`) need to get checked. + +2022-01-02 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * configure, doc/source/conf.py, tcl/coll.tcl, tcl/envmngt.tcl.in, + tcl/init.tcl.in, tcl/main.tcl.in, tcl/mfinterp.tcl.in, tcl/modeval.tcl, + tcl/modfind.tcl.in, tcl/modspec.tcl, tcl/report.tcl.in, tcl/subcmd.tcl.in, + tcl/util.tcl: New year (2022) copyright mention update + +2021-12-25 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * .github/workflows/windows_tests.yaml: gh: precise python-sphinx deps on + Cygwin Need to precise all sphinxcontrib packages required as dependency + specification of python37-sphinx Cygwin package is regularly broken. + +2021-12-24 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modulefiles.3/notreq/loadany, + testsuite/modulefiles.3/notreq/loadanymul, + testsuite/modulefiles.3/notreq/tryload, + testsuite/modulefiles.3/notreq/tryloadmul, + testsuite/modules.50-cmds/431-not-req.exp: ts: test --not-req with module + try-load/load-any in 50/431 + + * tcl/main.tcl.in: Add support for --not-req on module try-load/load-any + + * NEWS.rst, doc/source/changes.rst, doc/source/modulefile.rst: doc: desc. + --not-req support on module try-load/load-any + + * NEWS.rst, doc/source/changes.rst, doc/source/module.rst, + doc/source/modulefile.rst: doc: desc. load-any in NEWS/changes/man + + * NEWS.rst, doc/source/changes.rst, doc/source/design/module-tags.rst, + doc/source/modulefile.rst: doc: desc. --tag opt on load-any in + NEWS/changes/man/design + + * doc/source/design/add-new-sub-command.rst: doc: desc. module-info command + in add new subcmd guide + + * testsuite/modulefiles.3/tag/8.0, + testsuite/modules.50-cmds/465-tag-opt.exp: ts: add --tag tests for load-any + subcmd in 50/465 + +2021-12-23 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modulefiles.3/loadany/.modulerc, + testsuite/modulefiles.3/loadany/1.0, testsuite/modulefiles.3/loadany/2.0, + testsuite/modules.00-init/005-init_ts.exp, + testsuite/modules.50-cmds/518-load-any.exp: ts: test load-any subcmd in + 50/518 + +2021-12-20 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * doc/source/modulefile.rst, testsuite/modulefiles/info/commandexp, + testsuite/modules.50-cmds/282-info-command.exp, + testsuite/modules.50-cmds/283-info-command-exp.exp: ts/doc: add load-any + test/doc on 'module-info command' + + * testsuite/modulefiles.2/modemptyarg/load-any, + testsuite/modules.00-init/071-args.exp, + testsuite/modules.50-cmds/152-module-emptyarg.exp: ts: adapt existing tests + for try-load subcmd + + * init/Makefile, init/bash_completion.in, init/fish_completion, + init/tcsh_completion.in, init/zsh-functions/_module.in: init: add load-any + sub-cmd to completion scripts + + * tcl/main.tcl.in, tcl/report.tcl.in, tcl/subcmd.tcl.in: Introduce load-any + sub-command Add the load-any module sub-command that loads first valid + module in specified list. Errors for unknown modulefile are silenced like + for try-load sub-command. add-any is an alias over load-any sub-command. + The any_modulefile state is introduced to indicate cmdModuleLoad to stop + after first loaded modulefile in list. When used from a modulefile + evaluation context, load-any first checks if a module from its specified + list is already loaded. If this is the case, no additional requirement load + is performed as constraint is considered satisfied. + +2021-12-22 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * tcl/mfinterp.tcl.in, tcl/modeval.tcl: Move requirement load code of prereq + in dedicated proc Create the dedicated loadRequirementModuleList procedure + to attempt to load a list of module requirement in an OR operation. This + procedure is called by prereq modulefile command when auto_handling mode is + enabled. + +2021-12-19 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * doc/source/design/lmod-tcl-modulefile-compat.rst: doc: desc module + load-any in design doc + + * doc/source/design/lmod-tcl-modulefile-compat.rst: doc: desc. always-load + in design doc + +2021-12-18 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * tcl/modfind.tcl.in, testsuite/modules.50-cmds/465-tag-opt.exp, + testsuite/modules.50-cmds/467-keep-loaded.exp, + testsuite/modules.61-coll/010-init_ts.exp, + testsuite/modules.61-coll/040-restore.exp: Ensure no duplicate in tags set + to module Update setModuleTag procedure to avoid adding a tag to module + which is already set to avoid duplicate entries. Adapt existing tests. + +2021-12-17 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * NEWS.rst, doc/source/changes.rst, doc/source/modulefile.rst: doc: desc. + always-load in NEWS/changes/man + + * testsuite/modules.50-cmds/465-tag-opt.exp: ts: fix tests in 50/465 for Tcl + 8.5 + +2021-12-16 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modulefiles.3/keep/1.0, + testsuite/modulefiles.3/lcompat/.modulerc, + testsuite/modulefiles.3/lcompat/1.7, testsuite/modulefiles.3/tag/8.0, + testsuite/modules.50-cmds/465-tag-opt.exp, + testsuite/modules.50-cmds/467-keep-loaded.exp, + testsuite/modules.50-cmds/517-always-load.exp: ts: test always-load mfcmd in + 50/{465,467,517} + + * tcl/mfinterp.tcl.in: Add always-load modulefile command Introduce + always-load modulefile command that loads all modulefile specified (AND + operation) and applies to them the keep-loaded module tag in order to avoid + these modules to get automatically unloaded. + +2021-12-15 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * tcl/mfinterp.tcl.in, testsuite/modules.50-cmds/465-tag-opt.exp, + testsuite/modules.50-cmds/515-depends-on.exp, + testsuite/modules.50-cmds/516-prereq-all.exp: Pass mfcmd name to + parsePrereqCommandArgs proc + + * contrib/vim/syntax/modulefile.vim: vim: add syntax highlight for + always-load mfcmd + +2021-12-14 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * contrib/vim/syntax/modulefile.vim: vim: add + prereq-{all,any}/require-filename/depends-on mfcmds + + * testsuite/modulefiles.3/keep/1.0, testsuite/modulefiles.3/keep/2.0, + testsuite/modules.50-cmds/467-keep-loaded.exp: ts: test keep-loaded module + tag in 50/467 + + * doc/source/module.rst, doc/source/modulefile.rst: doc: fix missing only + html directive in mans + + * NEWS.rst: doc: desc keep-loaded tag in NEWS + + * doc/source/changes.rst: doc: fix missing tag_abbrev mconfig in changes + +2021-12-13 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * INSTALL.rst, doc/source/design/module-tags.rst, doc/source/module.rst, + doc/source/modulefile.rst: doc: desc keep-loaded tag in INSTALL/design/mans + + * configure: install: add default abbrev/sgr for keep-loaded tag + + * tcl/modeval.tcl: Add keep-loaded module tag Introduce the keep-loaded + module tag that avoids an auto-loaded module to get automatically unloaded + when all its dependent modules are unloaded. + +2021-12-12 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * doc/source/module.rst: doc: reorg option desc for load/switch/try-load in + man + + * doc/source/module.rst: doc: fix sort of try-add subcmd in man + + * NEWS.rst, doc/source/changes.rst, doc/source/module.rst, + doc/source/modulefile.rst: doc: desc --tag option in changes/NEWS/mans + + * testsuite/home/coll39, testsuite/home/coll40, testsuite/home/coll41, + testsuite/home/coll42, testsuite/home/coll43, + testsuite/modulefiles.3/tag/.modulerc, testsuite/modulefiles.3/tag/8.0, + testsuite/modules.61-coll/010-init_ts.exp, + testsuite/modules.61-coll/030-save.exp, + testsuite/modules.61-coll/040-restore.exp, + testsuite/modules.61-coll/060-saveshow.exp, + testsuite/modules.61-coll/999-cleanup.exp: ts: add collection tests for + --tag option + +2021-12-11 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modules.20-locate/118-hidden-loaded.exp, + testsuite/modules.50-cmds/350-allin.exp, + testsuite/modules.61-coll/010-init_ts.exp, + testsuite/modules.61-coll/040-restore.exp: ts: adapt existing collection + tests for --tag record + + * tcl/coll.tcl, tcl/modfind.tcl.in, tcl/subcmd.tcl.in: Create + getExportTagList from getTagList Create getExportTagList procedure to get + list of tags applying to module that can be exported (not loaded or hidden). + Use getExportTagList when building persistency variable so serializing code + is only useful in this procedure and not anymore in getTagList. + + * testsuite/modules.61-coll/010-init_ts.exp, + testsuite/modules.61-coll/040-restore.exp, + testsuite/modules.61-coll/999-cleanup.exp: ts: fix auto-loaded module + restore tests in 61/040 + +2021-12-10 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * tcl/coll.tcl, tcl/modfind.tcl.in, tcl/subcmd.tcl.in: Save tags set on + loaded modules in collection Adapt collection mechanism to dump the tags + set on loaded module when saving a collection and setting them back when + collection is restored. Tags are recorded in collection with the --tag= + option set on module load lines. Previously used --notuasked option is still + processed if found in collection but when saving new ones the auto-loaded + tag is dumped instead 'module load --tag=auto-loaded foo/1.0' for instance. + With this current patch savec tags are restored if module is not yet loaded + at the correct position in expected loaded module list. + +2021-12-09 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modules.50-cmds/513-prereq-any.exp, + testsuite/modules.50-cmds/515-depends-on.exp, + testsuite/modules.50-cmds/516-prereq-all.exp: ts: adapt existing prereq + tests for --tag opt + +2021-12-06 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modulefiles.3/tag/.modulerc, testsuite/modulefiles.3/tag/8.0, + testsuite/modulefiles.3/tag/9.0, testsuite/modules.00-init/005-init_ts.exp, + testsuite/modules.50-cmds/465-tag-opt.exp: ts: add test for --tag option in + 50/465 + +2021-12-08 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * tcl/main.tcl.in, tcl/mfinterp.tcl.in: Add --tag option to prereq + modulefile command Add the --tag option for the prereq modulefile command + to be albe to precise tags to apply to loading module when auto handling + mode is enabled. This way tags could be specified whatever the dependency + mechanism used. Also apply on prereq-any, prereq-all and depends-on + modulefile commands. + +2021-12-07 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * doc/source/design/module-tags.rst: doc: update module tag design for --tag + opt + +2021-12-05 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * tcl/main.tcl.in, tcl/mfinterp.tcl.in, tcl/modeval.tcl, tcl/subcmd.tcl.in: + Pass and apply tag_list in cmdModuleLoad Transmit the tag list specified on + module load, try-load or switch to the cmdModuleLoad procedure to apply + these tags to the module to load. Need to refine later on tag list + transmission on collection management (cmdModuleRestore) and environment + reload (reloadModuleListLoadPhase). An already loaded module will not be + reloaded if a different tag list is specified. Loaded tags for this module + are not changed either. + + * init/Makefile, init/bash_completion.in, init/fish_completion, + init/tcsh_completion.in, init/zsh-functions/_module.in: init: add --tag= opt + to completion scripts + +2021-12-04 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * tcl/main.tcl.in, tcl/report.tcl.in: Add parsing of --tag opt for + load/switch/try-load subcmds Adapt parseModuleCommandArgs and reportUsage + procedures to handle the --tag option for the load, switch and try-load + sub-comands. '--tag=LIST' is the syntax for the command-line whereas '--tag + LIST' is the main syntax for use within modulefiles. LIST is composed of tag + names separated by colon character. Allow --tag for unload sub-command to + avoid errors on mixed unload/load ml command. + +2021-12-03 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modulefiles.3/lcompat/.modulerc, + testsuite/modulefiles.3/lcompat/1.6, + testsuite/modules.50-cmds/516-prereq-all.exp: ts: add tests for prereq-all + in 50/516 + +2021-12-02 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * NEWS.rst, doc/source/changes.rst, doc/source/modulefile.rst: doc: desc + prereq-all in NEWS/changes/man + + * tcl/mfinterp.tcl.in: Add prereq-all modulefile command Rename depends-on + into prereq-all modulefile command and make depends-on an alias on it. + + * testsuite/modulefiles.3/lcompat/.modulerc, + testsuite/modulefiles.3/lcompat/1.5, + testsuite/modules.50-cmds/515-depends-on.exp: ts: add tests for depends-on + in 50/515 + + * doc/source/modulefile.rst: doc: split prereq/conflict man description + + * tcl/mfinterp.tcl.in: Add depends-on modulefile command Introduce the + depends-on modulefile command which defines module requirements for + currently loading modulefile. This command is an alias over prereq command + with all modulefile arguments treated as a Boolean AND operation: all + specified modulefiles are required. + + * NEWS.rst, doc/source/changes.rst, + doc/source/design/lmod-tcl-modulefile-compat.rst, doc/source/modulefile.rst: + doc: desc depends-on in NEWS/changes/man/design + +2021-11-29 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modulefiles.3/lcompat/.modulerc, + testsuite/modulefiles.3/lcompat/1.4, testsuite/modulefiles.3/lcompatdep/1.4, + testsuite/modulefiles.3/lcompatdep/2.0, + testsuite/modules.00-init/005-init_ts.exp, + testsuite/modules.50-cmds/514-require-fullname.exp: ts: add tests for + require-fullname in 50/514 + + * tcl/mfinterp.tcl.in, tcl/modfind.tcl.in, tcl/modspec.tcl: Add + require-fullname modulefile command Introduce the require-fullname + modulefile command that raises an error if loading module is not fully + qualified. Alias and symbols are considered fully qualified versions expect + for the default symbol. Add the filter_default argument on + getAllModuleResolvedName procedure to exclude module parent name and default + symbol version from alternative name list. Update modEq procedures to call + for getAllModuleResolvedName with filter_default mode enabled when ismodlo + argument is set to 4. + +2021-11-28 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * NEWS.rst, doc/source/changes.rst, doc/source/modulefile.rst: doc: desc. + require-fullname in man/changes/NEWS + + * NEWS.rst, doc/source/design/lmod-tcl-modulefile-compat.rst: doc: add + lmod-tcl-modulefile-compat initial version + + * NEWS.rst, doc/source/changes.rst, doc/source/modulefile.rst: doc: desc + reportError and reportWarning in man/changes/NEWS + +2021-11-27 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modulefiles.3/lcompat/.version, + testsuite/modules.20-locate/120-moduleversion.exp: ts: test ModuleVersion in + 20/120 + + * NEWS.rst, doc/source/changes.rst, tcl/mfinterp.tcl.in: Set ModuleVersion + as an alias over ModulesVersion Set ModuleVersion as an alias over + ModulesVersion modulefile variable for compatibility with Lmod Tcl + modulefiles. + + * NEWS.rst, doc/source/modulefile.rst: doc: desc ModulesVersion mfvar in man + + * NEWS.rst, tcl/mfinterp.tcl.in, + testsuite/modules.50-cmds/513-prereq-any.exp: Clear msg when no arg is + passed to prereq Produce a clear error message when wrong number of + argument is received by prereq command. + + * testsuite/modulefiles.3/lcompat/.modulerc, + testsuite/modulefiles.3/lcompat/1.3, + testsuite/modules.50-cmds/513-prereq-any.exp: ts: add tests for prereq-any + in 50/513 + + * NEWS.rst, doc/source/changes.rst, doc/source/modulefile.rst: doc: desc + prereq-any in man/NEWS/changes + + * tcl/mfinterp.tcl.in: Add prereq-any modulefile command Introduce the + prereq-any modulefile command which is a bare alias for the prereq command. + + * NEWS.rst, doc/source/modulefile.rst: doc: desc + {add,remove}-property/extensions in man/NEWS + +2021-11-26 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modulefiles.3/lcompat/.modulerc, + testsuite/modulefiles.3/lcompat/1.2, + testsuite/modules.50-cmds/512-extensions.exp: ts: add test for extensions in + 50/512 + + * testsuite/modulefiles.3/lcompat/.modulerc, + testsuite/modulefiles.3/lcompat/1.1, + testsuite/modules.50-cmds/511-remove-property.exp: ts: add tests for + remove-property in 50/511 + + * testsuite/modulefiles.3/lcompat/.modulerc, + testsuite/modulefiles.3/lcompat/1.0, testsuite/modulefiles.3/lcompat/2.0, + testsuite/modules.50-cmds/510-add-property.exp: ts: add tests for + add-property in 50/510 + + * doc/source/changes.rst: doc: desc. add-property/remove-property/extensions + in changes + + * tcl/mfinterp.tcl.in: Add add-property/extensions/remove-property cmds + Introduce the add-property, extensions and remove-property modulefile + commands. Implemented as a no-operation command for modulefile evaluation + context. + +2021-11-24 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * .cirrus.yml: ts: update CI config to test completiondir install opt + +2021-11-23 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * INSTALL.rst, NEWS.rst: doc: desc completiondir install opts in + NEWS/INSTALL + +2021-11-22 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * contrib/rpm/environment-modules.spec.in: rpm: use shell-specific + completion dir + + * Makefile.inc.in, configure, init/Makefile, init/fish.in, site.exp.in: + install: add --with-fishcompletiondir configure opt Add the + --with-fishcompletiondir option to the configure installation script to + define a particular installation directory for the fish completion script. + If option is not defined, fish completion script is installed by default in + initdir and it is sourced in fish init script. If option is set, completion + script is installed in designated directory and fish init script does not + source it. + + * Makefile.inc.in, configure, init/Makefile, init/bash.in, site.exp.in: + install: add --with-bashcompletiondir configure opt Add the + --with-bashcompletiondir option to the configure installation script to + define a particular installation directory for the bash completion script. + If option is not defined, bash completion script is installed by default in + initdir and it is sourced in bash init script. If option is set, completion + script is installed in designated directory and bash init script does not + source it. + +2021-11-21 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * Makefile.inc.in, configure, init/Makefile, init/zsh.in, site.exp.in: + install: add --with-zshcompletiondir configure opt Add the + --with-zshcompletiondir option to the configure installation script to + define a particular installation directory for the zsh completion script. + If option is not defined, zsh completion script is installed by default in + initdir and the FPATH environment variable is set in zsh init script. If + option is set, completion script is installed in designated directory and + zsh init script does not set the FPATH environment variable. Fixes #428 + + * MIGRATING.rst: doc: desc. modfile command behavior opts in MIGRATING + +2021-11-20 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modulefiles.3/path-cmd-opt/1.5, + testsuite/modules.50-cmds/505-set-if-undef.exp: ts: test setenv + --set-if-undef on modfile cmds + + * doc/example/top-priority-values/siteconfig.tcl, + doc/source/cookbook/top-priority-values.rst: doc: update setenv in + top-priority-values recipe config + +2021-11-19 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modules.00-init/120-siteconfig.exp, + testsuite/modules.50-cmds/400-source-sh.exp, + testsuite/modules.50-cmds/504-unset-on-unload.exp, + testsuite/modules.70-maint/300-err_stack.exp: ts: fix existing setenv tests + for --set-if-undef + + * NEWS.rst, doc/source/changes.rst, doc/source/modulefile.rst: doc: desc. + setenv --set-if-undef in man/changes/NEWS + + * tcl/mfinterp.tcl.in: Add --set-if-undef option on setenv Add the + --set-if-undef option on the setenv modulefile command. When set, the + environment variable is set when modulefile is loaded only if currently + unset. Fixes #425 + +2021-11-18 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * tcl/mfinterp.tcl.in: Parse setenv args with parseUnsetenvCommandArgs Add + the parseUnsetenvCommandArgs procedure to parse arguments set on setenv + modulefile command. Split procedure for setenv and unsetenv commands in + whatis evaluation mode, as both commands now have different set of options + that should also be parsed in whatis mode to extract targeted environment + variable name. + + * testsuite/modulefiles.3/path-cmd-opt/1.4, + testsuite/modules.00-init/005-init_ts.exp, + testsuite/modules.50-cmds/504-unset-on-unload.exp: ts: test unsetenv + --unset-on-unload on modfile cmds + + * NEWS.rst, doc/source/changes.rst, doc/source/modulefile.rst: doc: desc. + unsetenv --unset-on-unload in man/changes/NEWS + + * testsuite/modules.50-cmds/030-unsetenv.exp, + testsuite/modules.50-cmds/035-unsetenv-undo.exp: ts: fix existing unsetenv + tests for --unset-on-unload + + * tcl/mfinterp.tcl.in: Add --unset-on-unload option on unsetenv Add the + --unset-on-unload option on the unsetenv modulefile command. When set, the + environment variable is unset when modulefile is unloaded, like it does when + modulefile is loaded. + +2021-11-17 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modulefiles.3/path-cmd-opt/1.3, + testsuite/modules.50-cmds/503-noop-on-unload.exp: ts: test unsetenv + --noop-on-unload on modfile cmds + + * NEWS.rst, doc/source/changes.rst, doc/source/modulefile.rst: doc: desc. + unsetenv --noop-on-unload in man/changes/NEWS + + * testsuite/modules.50-cmds/030-unsetenv.exp, + testsuite/modules.50-cmds/035-unsetenv-undo.exp: ts: fix existing unsetenv + tests for --noop-on-unload + + * tcl/mfinterp.tcl.in: Add --noop-on-unload option on unsetenv Add the + --noop-on-unload option to the unsetenv modulefile command. Corresponds to + the actual default behavior, which is enforced even if a value to restore on + unload mode is specified. + + * tcl/mfinterp.tcl.in: Parse unsetenv args with parseUnsetenvCommandArgs + Add the parseUnsetenvCommandArgs procedure to parse the arguments set on an + unsetenv moduefile command. + +2021-11-16 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modulefiles.3/path-cmd-opt/1.3, + testsuite/modules.50-cmds/503-noop-on-unload.exp: ts: test --noop-on-unload + option on modfile cmds + +2021-11-15 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * NEWS.rst, doc/source/changes.rst, doc/source/modulefile.rst: doc: desc. + --noop-on-unload in man/changes/NEWS + + * testsuite/modules.10-use/030-use.exp, + testsuite/modules.10-use/070-unuse.exp, + testsuite/modules.70-maint/150-append-path.exp, + testsuite/modules.70-maint/151-prepend-path.exp, + testsuite/modules.70-maint/152-remove-path.exp: ts: test --noop-on-unload + option on subcmds + + * tcl/envmngt.tcl.in, tcl/mfinterp.tcl.in, tcl/subcmd.tcl.in: Add + --noop-on-unload on remove-path/module unuse Add the --noop-on-unload + option to the remove-path and module unuse sub-command to perform no + operation when commands are evaluated in unload mode. + +2021-11-14 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modulefiles.3/path-cmd-opt/1.2, + .../modules.50-cmds/502-prepend-on-unload.exp: ts: test --prepend-on-unload + option on modfile cmds + + * testsuite/modules.10-use/030-use.exp, + testsuite/modules.10-use/070-unuse.exp, + testsuite/modules.70-maint/150-append-path.exp, + testsuite/modules.70-maint/151-prepend-path.exp, + testsuite/modules.70-maint/152-remove-path.exp: ts: test --prepend-on-unload + option on subcmds + + * tcl/envmngt.tcl.in, tcl/subcmd.tcl.in: Add --prepend-on-unload on + remove-path/module unuse Add the --prepend-on-unload option to the + remove-path and module unuse sub-command to append specified paths when + commands are evaluated in unload mode. If option is set prior path list + specification, this path list which is unsets when modulefile loads is + appended back when modulefile unloads. If a different path list is passed + after option specification, this list is appended on unload mode instead of + the list removed at load time. --prepend-on-unload option cannot be mixed + with --index option. + + * tcl/envmngt.tcl.in, tcl/mfinterp.tcl.in, tcl/subcmd.tcl.in: Pass precise + behavior to apply to add-path Instead of barely setting 'add' as default + behavior to apply on add-path procedure, precise this behavior with 'append' + and 'prepend' value. + + * NEWS.rst, doc/source/changes.rst, doc/source/modulefile.rst: doc: desc. + --prepend-on-unload in man/changes/NEWS + + * NEWS.rst, doc/source/changes.rst, doc/source/modulefile.rst: doc: desc. + --append-on-unload in man/changes/NEWS + + * doc/source/design/control-mode-behaviors.rst: doc: add noop-on-unload + + details in ctrl mode bhv design + +2021-11-07 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * doc/example/top-priority-values/siteconfig.tcl: doc: update + top-priority-values recipe config Update the siteconfig.tcl configuration + of top-priority-values cookbook recipe after the add-path/unload-path + changes. + +2021-11-13 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modulefiles.3/path-cmd-opt/1.0, + testsuite/modulefiles.3/path-cmd-opt/1.1, + testsuite/modules.50-cmds/500-remove-on-load.exp, + testsuite/modules.50-cmds/501-append-on-unload.exp: ts: additional + --remove-on-unload/--append-on-unload tests + + * tcl/subcmd.tcl.in, testsuite/modules.50-cmds/500-remove-on-load.exp, + testsuite/modules.50-cmds/501-append-on-unload.exp: Allow use of + --remove-on-unload on module unuse Even if it corresponds to the default + behavior, allow the use of the --remove-on-unload option on the module unuse + modulefile command. Adapt existing tests. + + * tcl/envmngt.tcl.in, testsuite/modules.50-cmds/500-remove-on-load.exp, + testsuite/modules.50-cmds/501-append-on-unload.exp: Allow --remove-on-unload + to get set after variable name Adapt parsePathCommandArgs procedure to + allow the --remove-on-unload option to get set after the variable name, like + for --append-on-unload. Adapt existing tests. + + * testsuite/modules.50-cmds/501-append-on-unload.exp: ts: fix + append-on-unload tests for reuse of load path list + + * tcl/envmngt.tcl.in, tcl/subcmd.tcl.in: Reuse more path list defined for + load in parsePathCommandArgs In case the --append-on-unload argument is set + after environment variable name but prior path list definition, the path + list to use for load evaluation will also be used on the append behavior + during unload evaluation. In addition, if no path list is defined after + --append-on-unload argument, the list used for load evaluation is reused on + the append behavior of unload evaluation. Applies to remove-path and module + unuse modulefile commands. + + * tcl/report.tcl.in: Filter internal cmd starting from $ sign from stack + trace Update the formatErrStackTrace procedure to filter from error stack + trace the internal calls made through the use of a variable to designate the + command to call (like done in runModuleUse). + + * tcl/subcmd.tcl.in: No error catch in runModuleUse Remove the error catch + set in runModuleUse when calling for add-path or unload-path. Errors are + this way rendered like any other: internal module bug if called during a + modulefile evaluation or top error with report link advice. + +2021-11-12 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modulefiles.3/path-cmd-opt/1.1, + testsuite/modules.50-cmds/501-append-on-unload.exp: ts: test + --append-on-unload option on modfile cmds + + * tcl/subcmd.tcl.in: Make runModuleUse rely on add-path/unload-path Make + the runModuleUse procedure rely on the add-path and unload-path procedures + rather {append,prepend,remove}-path to be able to precise the current + evaluation mode. + + * tcl/envmngt.tcl.in, tcl/mfinterp.tcl.in: Align add-path args with + unload-path Adopt same argument list for add-path procedure as unload-path + to make it easy to dynamically call one or the other. + + * tcl/main.tcl.in, tcl/subcmd.tcl.in: Pass down eval mode to runModuleUse + Add argument mode to the runModuleUse procedure to get knowledge of current + evaluation mode in order to distinguish a module unuse in load or unload + evaluation mode. Update the module, cmdModuleUse and cmdModuleUnuse + procedures to pass down the mode information. + +2021-11-11 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modules.10-use/030-use.exp, + testsuite/modules.10-use/070-unuse.exp, + testsuite/modules.70-maint/150-append-path.exp, + testsuite/modules.70-maint/151-prepend-path.exp, + testsuite/modules.70-maint/152-remove-path.exp: ts: test --append-on-unload + option on subcmds + + * tcl/envmngt.tcl.in, tcl/subcmd.tcl.in: Add --append-on-unload on + remove-path/module unuse Add the --append-on-unload option to the + remove-path and module unuse sub-command to append specified paths when + commands are evaluated in unload mode. If option is set prior path list + specification, this path list which is unsets when modulefile loads is + appended back when modulefile unloads. If a different path list is passed + after option specification, this list is appended on unload mode instead of + the list removed at load time. --append-on-unload option cannot be mixed + with --index option. Fixes #114 + +2021-11-10 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * tcl/envmngt.tcl.in, tcl/mfinterp.tcl.in: Add mode arg to + unload-path/parsePathCommandArgs Update the unload-path and + parsePathCommandArgs procedure to add a mode argument to get knowledge of + the current evaluation mode when checking passed arguments. + +2021-11-07 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modules.10-use/030-use.exp, + testsuite/modules.10-use/031-append.exp, + testsuite/modules.10-use/032-prepend.exp, + testsuite/modules.10-use/070-unuse.exp: ts: add use/unuse tests with var ref + in modpath + + * testsuite/modules.10-use/030-use.exp, + testsuite/modules.50-cmds/040-append.exp: ts: fix comments on work to be + done in a future release + + * testsuite/modules.00-init/120-siteconfig.exp, + testsuite/modules.20-locate/090-memcache.exp, + testsuite/modules.50-cmds/310-puts.exp, + testsuite/modules.70-maint/080-help.exp, + testsuite/modules.70-maint/230-verbosity.exp: ts: adapt existing debug msg + tests + + * NEWS.rst: doc: desc. debug msg rework in NEWS + + * tcl/main.tcl.in: Add debug report at end of parseModuleCommandName + + * tcl/mfinterp.tcl.in: Move arg debug report of getenv/getvariant in parse + proc + + * tcl/envmngt.tcl.in, tcl/main.tcl.in, tcl/mfinterp.tcl.in, tcl/modeval.tcl, + tcl/modfind.tcl.in, tcl/subcmd.tcl.in: Remove obvious debug reports Remove + the debug reports of argument passed to the procedure as they are already + generated when debug2 verbosity mode is enabled and for the debug verbosity + mode the procedures bound to a modulefile command are traced to emit a debug + report of their call. + + * tcl/mfinterp.tcl.in: Trace mfcmd calls to report them in debug verbosity + mode Add trace over each modulefile/modulerc commands to report when they + are called and with what paramaters. These traces are set only if the + verbosity equals to debug. When verbosity is higher than debug, traces are + set on all modulecmd.tcl procedures. + +2021-11-05 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * NEWS.rst, doc/source/changes.rst: doc: error when unk opt for use/unuse in + changes/NEWS + +2021-11-04 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * NEWS.rst, doc/source/changes.rst, doc/source/modulefile.rst: doc: desc. + --remove-on-unload in man/changes/NEWS + + * testsuite/modulefiles.3/path-cmd-opt/1.0, + testsuite/modulefiles.3/path-cmd-opt/2.0, + testsuite/modules.50-cmds/500-remove-on-load.exp: ts: test + --remove-on-unload option on modfile cmds + + * tcl/subcmd.tcl.in: Raise error when unknown argument passed to use/unuse + Raise an error when an unknown option is passed to module use or module + unuse modulefile command. + + * tcl/main.tcl.in, tcl/subcmd.tcl.in: Add runModuleUse procedure for both + use/unuse subcmd Introduce the runModuleUse procedure that is called by + cmdModuleUse and cmdModuleUnuse to share execution code between both + sub-commands. runModuleUse takes a position argument (append, prepend, + remove) and a command (use or unuse) to know what arguments are allowed and + what kind of path change to apply. Aplying module use in unload mode now + calls for cmdModuleUse with position argument set to remove. To allow same + set of arguments for the module use command whatever the evaluation mode + set. + +2021-11-03 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * tcl/subcmd.tcl.in: Push eval mode if none on use/unuse Push a load + evaluation mode when processing module use or module unuse command only if + no evaluation mode already set. + +2021-11-01 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modules.00-init/005-init_ts.exp, + testsuite/modules.10-use/030-use.exp, + testsuite/modules.10-use/070-unuse.exp, + testsuite/modules.70-maint/150-append-path.exp, + testsuite/modules.70-maint/151-prepend-path.exp, + testsuite/modules.70-maint/152-remove-path.exp: ts: test --remove-on-unload + option on subcmds + + * tcl/envmngt.tcl.in: Add --remove-on-unload option to remove-path Add the + --remove-on-unload option on remove-path modulefile command to also remove + the path elements specified when modulefile is evaluated in unload mode. + + * tcl/envmngt.tcl.in, tcl/mfinterp.tcl.in: Update unload-path for nop and + return bhv & var Update the unload-path procedure to return immediately + when the behavior to apply is 'nop' (no-operation). Also always make this + procedure return a list with behavior applied and variable name. Make + remove-path-un procedure (remove-path when called within an unload mode + modulefile interpreter) rely on unload-path after this change, instead of + directly calling parsePathCommandArgs. + + * tcl/envmngt.tcl.in, tcl/mfinterp.tcl.in: Precise default behavior to apply + by parsePathCommandArgs Pass down the default behavior to apply on + parsePathCommandArgs procedure to prepare ground for upcoming new arguments + to change path command behavior. + +2021-10-31 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modules.50-cmds/040-append.exp, + testsuite/modules.50-cmds/042-append-delim.exp, + testsuite/modules.50-cmds/045-append-undo.exp, + testsuite/modules.50-cmds/047-app-del-undo.exp, + testsuite/modules.50-cmds/050-prepend.exp, + testsuite/modules.50-cmds/052-prepend-delim.exp, + testsuite/modules.50-cmds/055-prepend-undo.exp, + testsuite/modules.50-cmds/057-pre-del-undo.exp, + testsuite/modules.50-cmds/060-remove.exp, + testsuite/modules.50-cmds/062-remove-delim.exp, + testsuite/modules.50-cmds/065-remove-undo.exp, + testsuite/modules.50-cmds/150-module.exp, + testsuite/modules.50-cmds/170-swap.exp, + testsuite/modules.70-maint/140-multiargs.exp, + testsuite/modules.70-maint/150-append-path.exp, + testsuite/modules.70-maint/151-prepend-path.exp, + testsuite/modules.70-maint/152-remove-path.exp, + testsuite/modules.70-maint/190-emptyarg.exp: ts: update unload-path/add-path + error msgs + + * tcl/envmngt.tcl.in, tcl/mfinterp.tcl.in: Pass effective mfcmd name to + parsePathCommandArgs Update the procedure chain from append-path, + prepend-path and remove-path modulefile commands to parsePathCommandArgs, to + pass command name down the way. So add-path and unload-path are changed to + get modulefile command name as first argument and pass it down to + parsePathCommandArgs. As a consequence error message raised from + parsePathCommandArgs now use the accurate modulefile command name. + +2021-10-30 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * tcl/mfinterp.tcl.in, tcl/subcmd.tcl.in: Revert "Pass calling name as first + arg of remove-path" This reverts commit + 2970dcc2fa10725548325c7a2adf702969fc6850. + + * tcl/mfinterp.tcl.in: Use specific proc for {append,prepend}-path on unload + When modulefile interpreter is set for unload mode, use specific procedures + for the append-path and prepend-path suffixed -un rather reusing remove-path + proc. This way it is possible to distinguish a real remove-path call. + +2021-10-29 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * tcl/subcmd.tcl.in: Use append-path instead of add-path in subcmd procs + Update sub-command procedures to make use of append-path rather directly + add-path. + + * tcl/subcmd.tcl.in: Use remove-path instead of unload-path in subcmd procs + Update sub-command procedures to make use of remove-path rather directly + unload-path. + + * tcl/mfinterp.tcl.in, tcl/subcmd.tcl.in: Pass calling name as first arg of + remove-path Update way to call remove-path procedure to pass as first + argument the alias name used to call it. Will enable to distinguish a true + remove-path call from an append-path call in unload mode. + +2021-11-14 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * .cirrus.yml: cirrus: update OSX image version + +2021-11-09 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * CONTRIBUTING.rst: doc: add design notes section in CONTRIBUTING + +2021-11-08 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * NEWS.rst, doc/source/design/add-new-sub-command.rst: doc: add + add-new-sub-command design doc + + * doc/source/design/add-new-config-option.rst: doc: fix typo in + add-new-config-option design doc + +2021-11-06 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * doc/source/design/add-new-config-option.rst: doc: use ghcommit role in + add-new-config-option doc + + * doc/source/conf.py: doc: add new 'ghcommit' sphinx role + + * CODE_OF_CONDUCT.md, Makefile, NEWS.rst, README.md: Set a Code of conduct + for Modules Set a Code of conduct for the Modules project and its + community. This Code of conduct is based on the Contribution Covenant, + version 2.1. + + * doc/source/design/control-mode-behaviors.rst: doc: refine + {restore,set}-on-unload in ctrl mode bhvs + +2021-10-28 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * NEWS.rst, doc/source/design/add-new-config-option.rst: doc: add + add-new-config-option design doc + +2021-10-27 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * NEWS.rst, doc/source/design/control-mode-behaviors.rst: doc: add + control-mode-behaviors design doc + +2021-10-26 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * doc/source/module.rst, doc/source/modulefile.rst: doc: fix missing + only-html tag in man pages + +2021-10-24 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modules.50-cmds/400-source-sh.exp: ts: module usage in script + run through source-sh + +2021-10-22 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * NEWS.rst: doc: desc. env filtering for sh-to-mod/source-sh in NEWS + +2021-10-21 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * doc/source/module.rst, doc/source/modulefile.rst: doc: desc var filtering + on source-sh/sh-to-mod man + + * doc/source/design/source-shell-script-in-modulefile.rst: doc: desc private + env var filter on sh-to-mod design + + * tcl/mfinterp.tcl.in: ignore Modules private variables on sh-to-mod + processing Filter out the variables intended for Modules private usage when + processing the environment changes made by a script evaluated by sh-to-mod + sub-command or source-sh modulefile command. _LMFILES_, LOADEDMODULES and + any variable prefixed by __MODULES_ are withdrawn this way. Closes #427. + + * testsuite/example/sh-to-mod.csh, testsuite/example/sh-to-mod.fish, + testsuite/example/sh-to-mod.sh, + testsuite/modules.70-maint/310-sh-to-mod.exp: ts: module usage in script run + through sh-to-mod + +2021-10-20 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * doc/source/design/source-shell-script-in-modulefile.rst: doc: note to + extend source-sh/sh-to-mod for other tools + +2021-10-19 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * NEWS.rst: doc: desc state/supported_shells in NEWS + + * testsuite/modulefiles.3/modbad/state, + testsuite/modules.00-init/071-args.exp, + testsuite/modules.00-init/100-pager.exp, + testsuite/modules.00-init/120-siteconfig.exp, + testsuite/modules.00-init/150-access-init.exp, + testsuite/modules.50-cmds/151-module-onlytop.exp, + testsuite/modules.70-maint/220-config.exp, + testsuite/modules.70-maint/390-state.exp: ts: add tests for state subcmd + +2021-10-18 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * init/Makefile, init/bash_completion.in, init/fish_completion, + init/tcsh_completion.in, init/zsh-functions/_module.in: init: add state + subcmd to completion scripts + + * tcl/main.tcl.in, tcl/report.tcl.in, tcl/subcmd.tcl.in: Introduce 'state' + sub-command Add the state sub-command to get all states or one state + specified as argument. Code that was previously reporting state for config + sub-command has been moved to a dedicated cmdModuleState procedure. state + sub-command can only be called from top level and accepts 0 or 1 argument. + Closes #426 + +2021-10-17 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * doc/source/changes.rst, doc/source/module.rst, doc/source/modulefile.rst: + doc: desc. state subcmd in man/changes + + * tcl/main.tcl.in: Add supported_shells state Add the supported_shells + state to list the shells Modules is able to produce output for. + +2021-10-19 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modules.50-cmds/260-getenv.exp, + testsuite/modules.50-cmds/472-getvariant.exp: ts: fix --return-value tests + for Tcl8.5 in 50/{260,472} + +2021-10-13 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modulefiles.3/variant/5.1, + testsuite/modules.50-cmds/472-getvariant.exp: ts: add getvariant + --return-value tests in 50/472 + +2021-10-12 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modulefiles/getenv/1.0, + testsuite/modules.50-cmds/260-getenv.exp: ts: add getenv --return-value + tests in 50/260 + + * NEWS.rst: doc: desc. --return-value option in NEWS + + * doc/source/changes.rst, doc/source/modulefile.rst: doc: desc. getvariant + --return-value option in man/changes + + * tcl/mfinterp.tcl.in: Add --return-value option to getvariant modulefile + command Add the --return-value option to the getvariant modulefile command + to force to return the value of designated variant when modulefile is + evaluated in display mode. + + * doc/source/changes.rst, doc/source/modulefile.rst: doc: desc. getenv + --return-value option in man/changes + + * tcl/mfinterp.tcl.in: Add --return-value option to getenv modulefile + command Add the --return-value option to the getenv modulefile command to + force to return the value of designated environment variable when modulefile + is evaluated in display mode. Closes #422. + +2021-10-10 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * MIGRATING.rst, NEWS.rst: doc: desc. redirect_output in NEWS/MIGRATING + +2021-10-09 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/install.00-init/005-init_ts.exp, + testsuite/install.00-init/070-stderrtty.exp: ts: add install tests to check + redirect_output + +2021-10-07 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modules.70-maint/120-autoinit.exp: ts: adapt autoinit test for + output redirection code + + * tcl/envmngt.tcl.in: Add output redirection handling on fish module + function Update the definition of the module function for fish shell family + to support the output redirection. Now both _module_raw and module shell + functions are always defined. Default redirection behavior depends on the + interactiveness of the shell when the autoinit command is run. Then shell + code is set in module function definition to adapt behavior depending on + MODULES_REDIRECT_OUTPUT environment variable value or + --redirect/--no-redirect command-line switches. + +2021-10-06 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * init/bash.in, init/sh.in, tcl/envmngt.tcl.in: Add output redirection + handling on sh module function Update the definition of the module function + for sh shell family (sh, bash, ksh and zsh) to support the output + redirection. Now both _module_raw and module shell functions are always + defined. Default redirection behavior depends on the interactiveness of the + shell when the autoinit command is run. Then shell code is set in module + function definition to adapt behavior depending on MODULES_REDIRECT_OUTPUT + environment variable value or --redirect/--no-redirect command-line + switches. + +2021-10-05 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * doc/source/module.rst, tcl/main.tcl.in, tcl/report.tcl.in, + testsuite/modules.00-init/090-switches.exp: Warn if --redirect is used on + unsupported shells --redirect is only supported on sh, bash, ksh, zsh and + fish shells. Emit a warning message when used on another shells. + +2021-10-04 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * doc/source/changes.rst, doc/source/module.rst: doc: desc. + --redirect/--no-redirect in man/changes + + * testsuite/modules.00-init/090-switches.exp, + testsuite/modules.70-maint/220-config.exp: ts: basic tests for + --redirect/--no-redirect switches + + * tcl/main.tcl.in, tcl/report.tcl.in: Add --redirect/--no-redirect cmdline + switches Add the --redirect and --no-redirect command line switches to + control where the output of the module command should be sent. When + redirected it is sent to stdout otherwise not redirected means it is left on + stderr. These command line switches have no effect within modulecmd.tcl + code. They are treated directly in module shell function to adapt output + redirection. Closes #410. + +2021-10-03 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * doc/source/changes.rst, doc/source/module.rst: doc: desc. + MODULES_REDIRECT_OUTPUT in man/changes + + * doc/source/changes.rst, doc/source/module.rst: doc: desc. redirect_output + config in man/changes + + * testsuite/install.00-init/010-environ.exp, + testsuite/modules.00-init/010-environ.exp, + testsuite/modules.70-maint/220-config.exp: ts: test redirect_output config + option + + * init/Makefile, init/fish_completion, init/zsh-functions/_module.in: init: + add redirect_output config to completion script + +2021-10-01 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * tcl/init.tcl.in: Add redirect_output configuration option Add + redirect_output configuration option that controls whether or not the output + of module command should be redirected from stderr to stdout. Enabled by + default. When configuration is modified it sets the MODULES_REDIRECT_OUTPUT + environment variable. + +2021-09-29 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * NEWS.rst, doc/source/changes.rst: doc: desc open value variant in + NEWS/changes + + * testsuite/modulefiles.3/variant/1.0, testsuite/modulefiles.3/vrreq1/1.0, + testsuite/modulefiles.3/vrreq2/1.0, + testsuite/modules.00-init/005-init_ts.exp, + testsuite/modules.50-cmds/470-variant.exp, + testsuite/modules.50-cmds/471-variant-unload.exp, + testsuite/modules.50-cmds/473-variant-prereq.exp, + testsuite/modules.50-cmds/479-variant-boolean.exp: ts: add new variant tests + to check open value variant + +2021-09-28 Xavier Delaruelle <xavier.delaruelle@cea.fr> + + * testsuite/modules.50-cmds/470-variant.exp, + testsuite/modules.70-maint/375-variant-whatis.exp: ts: adapt existing tests + for open value variant + + * tcl/mfinterp.tcl.in: Allow variant with no accepted value list Allow to + declare variant with no list of accepted value. Such variant accepts any + value specified. Closes #405. + + * doc/source/module.rst, doc/source/modulefile.rst: doc: desc optional + variant value list in man pages + + * doc/source/design/variants.rst: doc: allow variant definition with no + accepted value list + 2021-10-16 Xavier Delaruelle <xavier.delaruelle@cea.fr> * NEWS.rst, contrib/rpm/environment-modules.spec.in, doc/source/conf.py,
View file
_service:tar_scm:modules-5.0.1.tar.bz2/INSTALL.rst -> _service:tar_scm:modules-5.1.1.tar.bz2/INSTALL.rst
Changed
@@ -1,5 +1,8 @@ .. _INSTALL: + + + Installing Modules on Unix ========================== @@ -220,6 +223,10 @@ tune :command:`module`'s default behaviors. This configuration way is recommended over directly modifying the shell initialization scripts. +See the `Configuration options`_ section to discover all Modules +:subcmd:`config` options available, their default value and the installation +options linked to them. + If you go through the above steps you should have a valid setup tuned to your needs. After that you still have to write modulefiles to get something to load and unload in your newly configured Modules setup. In case you want to @@ -252,6 +259,9 @@ aliases, virtual modules or module properties such as tags, forbidding rules, etc. + .. note:: Run-command files are intended to set parameters for + modulefiles, not to configure the :command:`module` command itself. + To learn more about siteconfig and run-command files, see the :ref:`Modulecmd startup` section in :ref:`module(1)` reference manual. You may also look at the available :ref:`setup recipes<cookbook>` to get concrete @@ -267,7 +277,7 @@ options by typing ``./configure --help``. Fine tuning of the installation directories (the default value for each option -is displayed within brakets): +is displayed within brackets): .. instopt:: --bindir=DIR @@ -341,6 +351,10 @@ constraint prefixed by the ``@`` character. This option also allows to specify module variants. (default=yes) + This installation option defines the default value of the + :mconfig:`advanced_version_spec` configuration option which could be changed + after installation with the :subcmd:`config` sub-command. + .. only:: html .. versionadded:: 4.4 @@ -372,6 +386,10 @@ actions, like loading the pre-requisites of a modulefile when loading this modulefile. (default=yes) + This installation option defines the default value of the + :mconfig:`auto_handling` configuration option which could be changed after + installation with the :subcmd:`config` sub-command. + .. only:: html .. versionadded:: 4.2 @@ -387,6 +405,10 @@ search results to the matching modulefiles and directories found at the depth level expressed by the search query if disabled. (default=yes) + This installation option defines the default value of the + :mconfig:`avail_indepth` configuration option which could be changed after + installation with the :subcmd:`config` sub-command. + .. only:: html .. versionadded:: 4.3 @@ -397,6 +419,10 @@ equals to the ``auto`` color mode. ``no`` equals to the ``never`` color mode. (default=yes) + This installation option defines the default value of the + :mconfig:`color` configuration option which could be changed after + installation with the :subcmd:`config` sub-command. + .. only:: html .. versionadded:: 4.3 @@ -431,6 +457,10 @@ separated from the rest of the version string by a ``.`` character. (default=yes) + This installation option defines the default value of the + :mconfig:`extended_default` configuration option which could be changed after + installation with the :subcmd:`config` sub-command. + .. only:: html .. versionadded:: 4.4 @@ -446,6 +476,10 @@ module passed for evaluation should be fully qualified elsewhere an error is returned. (default=yes) + This installation option defines the default value of the + :mconfig:`implicit_default` configuration option which could be changed after + installation with the :subcmd:`config` sub-command. + .. only:: html .. versionadded:: 4.3 @@ -456,6 +490,10 @@ respectively on :mfcmd:`module load<module>` or :mfcmd:`module unload<module>` commands in modulefile. (default=yes) + This installation option defines the default value of the + :mconfig:`implicit_requirement` configuration option which could be changed + after installation with the :subcmd:`config` sub-command. + .. only:: html .. versionadded:: 4.7 @@ -472,8 +510,13 @@ .. instopt:: --enable-mcookie-version-check Enable check of the version specified right after Modules magic cookie - (``#%Module``) in modulefiles, which defines the minimal version of the - Modules tool to use in order to evaluate the modulefile. (default=yes) + (i.e., ``#%Module`` file signature) in modulefiles, which defines the minimal + version of the Modules tool to use in order to evaluate the modulefile. + (default=yes) + + This installation option defines the default value of the + :mconfig:`mcookie_version_check` configuration option which could be changed + after installation with the :subcmd:`config` sub-command. .. only:: html @@ -484,6 +527,10 @@ Define the :command:`ml` command, a handy frontend to the module command, when Modules initializes. (default=yes) + This installation option defines the default value of the :mconfig:`ml` + configuration option which could be changed after installation with the + :subcmd:`config` sub-command. + .. only:: html .. versionadded:: 4.5 @@ -539,6 +586,10 @@ Generate code in module function definition to add support for the environment variable quarantine mechanism (default=no) + This installation option defines the default value of the + :mconfig:`quarantine_support` configuration option which could be changed + after installation with the :subcmd:`config` sub-command. + .. only:: html .. versionadded:: 4.1 @@ -570,6 +621,10 @@ Set when module function is defined the shell startup file to ensure that the module function is still defined in sub-shells. (default=no) + This installation option defines the default value of the + :mconfig:`set_shell_startup` configuration option which could be changed + after installation with the :subcmd:`config` sub-command. + .. only:: html .. versionadded:: 4.3 @@ -582,6 +637,10 @@ Generate code in module function definition to add support for silencing shell debugging properties (default=no) + This installation option defines the default value of the + :mconfig:`silent_shell_debug` configuration option which could be changed + after installation with the :subcmd:`config` sub-command. + .. only:: html .. versionadded:: 4.2 @@ -612,6 +671,10 @@ this workaround solves Tcsh history issue but weakens shell evaluation of the code produced by modulefiles. (default=no) + This installation option defines the default value of the :mconfig:`wa_277` + configuration option which could be changed after installation with the + :subcmd:`config` sub-command. + .. only:: html .. versionadded:: 4.3 @@ -639,6 +702,10 @@ separated by ``:``). The order of the elements in LIST does not matter. (default=\ ``modulepath:alias:dirwsym:sym:tag:key``) + This installation option defines the default value of the + :mconfig:`avail_output` configuration option which could be changed after + installation with the :subcmd:`config` sub-command. + .. only:: html .. versionadded:: 4.7 @@ -651,10 +718,24 @@ in LIST are separated by ``:``). The order of the elements in LIST does not matter. (default=\ ``modulepath:alias:dirwsym:sym:tag``) + This installation option defines the default value of the + :mconfig:`avail_terse_output` configuration option which could be changed + after installation with the :subcmd:`config` sub-command. + .. only:: html .. versionadded:: 4.7 +.. instopt:: --with-bashcompletiondir=DIR + + Directory for Bash completion scripts. When this option is not set Bash + completion script for Modules is installed in the initialization script + directory and is sourced from Modules Bash initialization script. (default=) + + .. only:: html + + .. versionadded:: 5.1 + .. instopt:: --with-bin-search-path=PATHLIST List of paths to look at when searching the location of tools required to @@ -686,11 +767,17 @@ this abbreviation to get a graphical rendering. Each basic tag has by default a key set in the color palette, based on its abbreviated string: auto-loaded (``aL``), forbidden (``F``), hidden and hidden-loaded (``H``), loaded - (``L``), nearly-forbidden (``nF``), sticky (``S``) and super-sticky (``sS``). + (``L``), nearly-forbidden (``nF``), sticky (``S``), super-sticky (``sS``) and + keep-loaded (``kL``). For a complete SGR code reference, see https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters. - (default=\ ``hi=1:db=2:tr=2:se=2:er=91:wa=93:me=95:in=94:mp=1;94:di=94:al=96:va=93:sy=95:de=4:cm=92:aL=100:L=90;47:H=2:F=41:nF=43:S=46:sS=44``) + (default=\ ``hi=1:db=2:tr=2:se=2:er=91:wa=93:me=95:in=94:mp=1;94:di=94:al=96:va=93:sy=95:de=4:cm=92:aL=100:L=90;47:H=2:F=41:nF=43:S=46:sS=44:kL=30;48;5;109``) + + This installation option defines the default value of the :mconfig:`colors` + configuration option when :mconfig:`term_background` configuration option + equals ``dark``. :mconfig:`colors` could be changed after installation with + the :subcmd:`config` sub-command. .. only:: html @@ -707,15 +794,32 @@ .. versionchanged:: 4.8 Output item for module variant (``va``) added + .. versionchanged:: 5.1 + Output item for keep-loaded module tag (``kL``) added + .. instopt:: --with-editor=BIN Name or full path of default editor program to use to open modulefile through the :subcmd:`edit` sub-command. (default=\ ``vi``) + This installation option defines the default value of the :mconfig:`editor` + configuration option which could be changed after installation with the + :subcmd:`config` sub-command. + .. only:: html .. versionadded:: 4.8 +.. instopt:: --with-fishcompletiondir=DIR + + Directory for Fish completion scripts. When this option is not set Fish + completion script for Modules is installed in the initialization script + directory and is sourced from Modules Fish initialization script. (default=) + + .. only:: html + + .. versionadded:: 5.1 + .. instopt:: --with-icase=VALUE Apply a case insensitive match to module specification on :subcmd:`avail`, @@ -725,6 +829,10 @@ insensitive match is disabled when this option is set to ``never``. (default=\ ``search``) + This installation option defines the default value of the :mconfig:`icase` + configuration option which could be changed after installation with the + :subcmd:`config` sub-command. + .. only:: html .. versionadded:: 4.4 @@ -749,7 +857,12 @@ Default color set to apply if terminal background color is defined to ``light``. Expect the same syntax than described for :instopt:`--with-dark-background-colors`. - (default=\ ``hi=1:db=2:tr=2:se=2:er=31:wa=33:me=35:in=34:mp=1;34:di=34:al=36:va=33:sy=35:de=4:cm=32:aL=107:L=47:H=2:F=101:nF=103:S=106:sS=104``) + (default=\ ``hi=1:db=2:tr=2:se=2:er=31:wa=33:me=35:in=34:mp=1;34:di=34:al=36:va=33:sy=35:de=4:cm=32:aL=107:L=47:H=2:F=101:nF=103:S=106:sS=104:kL=48;5;109``) + + This installation option defines the default value of the :mconfig:`colors` + configuration option when :mconfig:`term_background` configuration option + equals ``light``. :mconfig:`colors` could be changed after installation with + the :subcmd:`config` sub-command. .. only:: html @@ -766,6 +879,9 @@ .. versionchanged:: 4.8 Output item for module variant (``va``) added + .. versionchanged:: 5.1 + Output item for keep-loaded module tag (``kL``) added + .. instopt:: --with-list-output=LIST Specify the content to report on list sub-command regular output in addition @@ -774,6 +890,10 @@ separated by ``:``). The order of the elements in LIST does not matter. (default=\ ``header:idx:variant:sym:tag:key``) + This installation option defines the default value of the + :mconfig:`list_output` configuration option which could be changed after + installation with the :subcmd:`config` sub-command. + .. only:: html .. versionadded:: 4.7 @@ -789,6 +909,10 @@ separated by ``:``). The order of the elements in LIST does not matter. (default=\ ``header``) + This installation option defines the default value of the + :mconfig:`list_terse_output` configuration option which could be changed + after installation with the :subcmd:`config` sub-command. + .. only:: html .. versionadded:: 4.7 @@ -801,7 +925,7 @@ Default modulefiles to load at Modules initialization time. Each modulefile in this list should be separated by ``:``. Defined value is registered in the :file:`initrc` configuration file or in the ``modulerc`` file if - :instopt:`--with-initconf-in` is set to ``initdir``. (default=no) + :instopt:`--with-initconf-in` is set to ``initdir``. (default=) .. only:: html @@ -812,7 +936,11 @@ Ignore environment variable superseding value for the listed configuration options. Accepted option names in CONFIGLIST are :mconfig:`extra_siteconfig` and :mconfig:`implicit_default` (each option name should be separated by - whitespace character). (default=no) + whitespace character). (default=) + + This installation option defines the default value of the + :mconfig:`locked_configs` configuration option which cannot not be changed + after installation. .. only:: html @@ -840,6 +968,10 @@ Location of the main Modules package file directory (default=\ ``PREFIX``) + This installation option defines the default value of the :mconfig:`home` + configuration option which could be changed after installation with the + :subcmd:`config` sub-command. + .. only:: html .. versionadded:: 4.4 @@ -850,6 +982,10 @@ reaching its expiry date. VALUE should be an integer comprised between 0 and 365. (default=\ ``14``) + This installation option defines the default value of the + :mconfig:`nearly_forbidden_days` configuration option which could be changed + after installation with the :subcmd:`config` sub-command. + .. only:: html .. versionadded:: 4.6 @@ -860,6 +996,10 @@ message output (can be superseded at run-time by environment variable) (default=\ ``less``) + This installation option and :instopt:`--with-pager-opt` define the default + value of the :mconfig:`pager` configuration option which could be changed + after installation with the :subcmd:`config` sub-command. + .. only:: html .. versionadded:: 4.1 @@ -868,6 +1008,10 @@ Settings to apply to default pager program (default=\ ``-eFKRX``) + This installation option and :instopt:`--with-pager` define the default value + of the :mconfig:`pager` configuration option which could be changed after + installation with the :subcmd:`config` sub-command. + .. only:: html .. versionadded:: 4.1 @@ -886,7 +1030,13 @@ Environment variables to put in quarantine when running the module command to ensure it a sane execution environment (each variable should be separated by space character). A value can eventually be set to a quarantine variable - instead of emptying it. (default=no) + instead of emptying it. (default=) + + This installation option defines the default value of the + :envvar:`MODULES_RUN_QUARANTINE` and :envvar:`MODULES_RUNENV_\<VAR\>` + environment variables which could be changed after installation with the + :subcmd:`config` sub-command on :mconfig:`run_quarantine` configuration + option. .. only:: html @@ -898,6 +1048,10 @@ string against module name start (``starts_with``) or any part of module name string (``contains``). (default=\ ``starts_with``) + This installation option defines the default value of the + :mconfig:`search_match` configuration option which could be changed after + installation with the :subcmd:`config` sub-command. + .. only:: html .. versionadded:: 4.3 @@ -907,12 +1061,19 @@ Define the abbreviation to use when reporting each module tag. Each element in ABBRVLIST is a tag name associated to an abbreviation string (elements in ABBRVLIST are separated by ``:``). - (default=\ ``auto-loaded=aL:loaded=L:hidden=H:hidden-loaded=H:forbidden=F:nearly-forbidden=nF:sticky=S:super-sticky=sS``) + (default=\ ``auto-loaded=aL:loaded=L:hidden=H:hidden-loaded=H:forbidden=F:nearly-forbidden=nF:sticky=S:super-sticky=sS:keep-loaded=kL``) + + This installation option defines the default value of the + :mconfig:`tag_abbrev` configuration option which could be changed after + installation with the :subcmd:`config` sub-command. .. only:: html .. versionadded:: 4.7 + .. versionchanged:: 5.1 + Abbreviation for ``keep-loaded`` tag added + .. instopt:: --with-tag-color-name=TAGLIST Define the tags whose graphical rendering should be applied over their name @@ -920,6 +1081,10 @@ TAGLIST is a tag name or abbreviation (elements in TAGLIST are separated by ``:``). (default=) + This installation option defines the default value of the + :mconfig:`tag_color_name` configuration option which could be changed after + installation with the :subcmd:`config` sub-command. + .. only:: html .. versionadded:: 4.7 @@ -950,6 +1115,10 @@ default between the ``dark`` background colors or the ``light`` background colors (default=\ ``dark``) + This installation option defines the default value of the + :mconfig:`term_background` configuration option which could be changed after + installation with the :subcmd:`config` sub-command. + .. only:: html .. versionadded:: 4.3 @@ -960,6 +1129,10 @@ module loaded first (``returnfirst``) or module loaded last (``returnlast``) (default=\ ``returnlast``) + This installation option defines the default value of the + :mconfig:`unload_match_order` configuration option which could be changed + after installation with the :subcmd:`config` sub-command. + .. only:: html .. versionadded:: 4.3 @@ -973,6 +1146,10 @@ already a special meaning (+~/@=-). Elements in SHORTCUTLIST are separated by ``:``. (default=) + This installation option defines the default value of the + :mconfig:`variant_shortcut` configuration option which could be changed after + installation with the :subcmd:`config` sub-command. + .. only:: html .. versionadded:: 4.8 @@ -983,6 +1160,182 @@ ``concise``, ``normal``, ``verbose``, ``verbose2``, ``trace``, ``debug`` and ``debug2``. (default=\ ``normal``) + This installation option defines the default value of the + :mconfig:`verbosity` configuration option which could be changed after + installation with the :subcmd:`config` sub-command. + .. only:: html .. versionadded:: 4.3 + +.. instopt:: --with-zshcompletiondir=DIR + + Directory for Zsh completion scripts. When this option is not set Zsh + completion script for Modules is installed in the initialization script + directory and :envvar:`FPATH` is set in Zsh initialization script to point to + this location. (default=) + + .. only:: html + + .. versionadded:: 5.1 + + +Configuration options +--------------------- + +Options available through the :subcmd:`config` sub-command are described +below. In addition to their default value, the related installation option, +environment variable and command-line switch are listed for each configuration +option. This table also describes if each configuration option needs to be set +prior or during Modules initialization and if it can be modified after +installation. + ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| Configuration option | Default value | Related installation option, environment | Set prior or | Cannot be | +| | | variable and command-line switch | during init\ | altered | +| | | | ialization | | ++===================================+==============================================+==============================================+==============+===========+ +| :mconfig:`advanced_version_spec` | ``1`` | :instopt:`--enable-advanced-version-spec`, | | | +| | | :envvar:`MODULES_ADVANCED_VERSION_SPEC` | | | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`auto_handling` | ``1`` | :instopt:`--enable-auto-handling`, | | | +| | | :envvar:`MODULES_AUTO_HANDLING`, | | | +| | | :option:`--auto`, :option:`--no-auto` | | | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`avail_indepth` | ``1`` | :instopt:`--enable-avail-indepth`, | | | +| | | :envvar:`MODULES_AVAIL_INDEPTH`, | | | +| | | :option:`--indepth`, :option:`--no-indepth` | | | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`avail_output` | ``modulepath:alias:dirwsym:sym:tag:key`` | :instopt:`--with-avail-output`, | | | +| | | :envvar:`MODULES_AVAIL_OUTPUT`, | | | +| | | :option:`--output` | | | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`avail_terse_output` | ``modulepath:alias:dirwsym:sym:tag`` | :instopt:`--with-avail-terse-output`, | | | +| | | :envvar:`MODULES_AVAIL_TERSE_OUTPUT`, | | | +| | | :option:`--output` | | | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`collection_pin_version` | ``0`` | :envvar:`MODULES_COLLECTION_PIN_VERSION` | | | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`collection_pin_tag` | ``0`` | :envvar:`MODULES_COLLECTION_PIN_TAG` | | | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`collection_target` | *Unset by default* | :envvar:`MODULES_COLLECTION_TARGET` | | | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`color` | ``auto`` | :instopt:`--enable-color`, | | | +| | | :envvar:`MODULES_COLOR`, | | | +| | | :option:`--color` | | | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`colors` | hi=1:db=2:tr=2:se=2:er=91:wa=93:\ | :instopt:`--with-dark-background-colors`, | | | +| | me=95:in=94:mp=1;94:di=94:al=96:va=93:sy=95\ | :instopt:`--with-light-background-colors`, | | | +| | :de=4:cm=92:aL=100:L=90;47:H=2:F=41:nF=43:\ | :envvar:`MODULES_COLORS` | | | +| | S=46:sS=44:kL=30;48;5;109 | | | | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`contact` | ``root@localhost`` | :envvar:`MODULECONTACT` | | | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`extended_default` | ``1`` | :instopt:`--enable-extended-default`, | | | +| | | :envvar:`MODULES_EXTENDED_DEFAULT` | | | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`editor` | ``vi`` | :instopt:`--with-editor`, | | | +| | | :envvar:`MODULES_EDITOR` | | | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`extra_siteconfig` | *Unset by default* | :envvar:`MODULES_SITECONFIG` | | | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`home` | |file prefix| | :instopt:`--prefix`, | | | +| | | :instopt:`--with-moduleshome`, | | | +| | | :envvar:`MODULESHOME` | | | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`icase` | ``search`` | :instopt:`--with-icase`, | | | +| | | :envvar:`MODULES_ICASE`, | | | +| | | :option:`--icase` | | | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`ignored_dirs` | ``CVS RCS SCCS .svn .git .SYNC .sos`` | | | X | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`implicit_default` | ``1`` | :instopt:`--enable-implicit-default`, | | | +| | | :envvar:`MODULES_IMPLICIT_DEFAULT` | | | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`implicit_requirement` | ``1`` | :instopt:`--enable-implicit-requirement`, | | | +| | | :envvar:`MODULES_IMPLICIT_REQUIREMENT` | | | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`list_output` | ``header:idx:variant:sym:tag:key`` | :instopt:`--with-list-output`, | | | +| | | :envvar:`MODULES_LIST_OUTPUT`, | | | +| | | :option:`--output` | | | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`list_terse_output` | ``header`` | :instopt:`--with-list-terse-output`, | | | +| | | :envvar:`MODULES_LIST_TERSE_OUTPUT`, | | | +| | | :option:`--output` | | | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`locked_configs` | *Empty by default* | :instopt:`--with-locked-configs` | | X | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`mcookie_check` | ``always`` | :envvar:`MODULES_MCOOKIE_CHECK` | | | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`mcookie_version_check` | ``1`` | :instopt:`--enable-mcookie-version-check`, | | | +| | | :envvar:`MODULES_MCOOKIE_VERSION_CHECK` | | | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`ml` | ``1`` | :instopt:`--enable-ml`, | X | | +| | | :envvar:`MODULES_ML` | | | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`nearly_forbidden_days` | ``14`` | :instopt:`--with-nearly-forbidden-days`, | | | +| | | :envvar:`MODULES_NEARLY_FORBIDDEN_DAYS` | | | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`pager` | ``less -eFKRX`` | :instopt:`--with-pager`, | | | +| | | :instopt:`--with-pager-opts`, | | | +| | | :envvar:`MODULES_PAGER`, | | | +| | | :option:`--paginate`, :option:`--no-pager` | | | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`quarantine_support` | ``0`` | :instopt:`--enable-quarantine-support`, | X | | +| | | :envvar:`MODULES_QUARANTINE_SUPPORT` | | | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`rcfile` | *Unset by default* | :envvar:`MODULERCFILE` | | | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`redirect_output` | ``1`` | :envvar:`MODULES_REDIRECT_OUTPUT`, | | | +| | | :option:`--redirect`, | | | +| | | :option:`--no-redirect` | | | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`run_quarantine` | *Empty by default* | :instopt:`--with-quarantine-vars`, | | | +| | | :envvar:`MODULES_RUN_QUARANTINE` | | | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`search_match` | ``starts_with`` | :instopt:`--with-search-match`, | | | +| | | :envvar:`MODULES_SEARCH_MATCH`, | | | +| | | :option:`--contains`, | | | +| | | :option:`--starts-with` | | | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`set_shell_startup` | ``0`` | :instopt:`--enable-set-shell-startup`, | X | | +| | | :envvar:`MODULES_SET_SHELL_STARTUP` | | | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`shells_with_ksh_fpath` | *Empty by default* | :envvar:`MODULES_SHELLS_WITH_KSH_FPATH` | X | | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`silent_shell_debug` | ``0`` | :instopt:`--enable-silent-shell-debug-\ | X | | +| | | support`, | | | +| | | :envvar:`MODULES_SILENT_SHELL_DEBUG` | | | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`siteconfig` | |file etcdir_siteconfig| | :instopt:`--prefix`, :instopt:`--etcdir` | | X | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`tag_abbrev` | auto-loaded=aL:loaded=L:hidden=H:\ | :instopt:`--with-tag-abbrev`, | | | +| | hidden-loaded=H:forbidden=F:nearly-\ | :envvar:`MODULES_TAG_ABBREV` | | | +| | forbidden=nF:sticky=S:super-sticky=sS:\ | | | | +| | keep-loaded=kL | | | | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`tag_color_name` | *Empty by default* | :instopt:`--with-tag-color-name`, | | | +| | | :envvar:`MODULES_TAG_COLOR_NAME` | | | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`tcl_ext_lib` | |file libdir_tcl_ext_lib| | | | X | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`term_background` | ``dark`` | :instopt:`--with-terminal-background`, | | | +| | | :envvar:`MODULES_TERM_BACKGROUND` | | | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`term_width` | ``0`` | :envvar:`MODULES_TERM_WIDTH`, | | | +| | | :option:`--width` | | | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`unload_match_order` | ``returnlast`` | :instopt:`--with-unload-match-order`, | | | +| | | :envvar:`MODULES_UNLOAD_MATCH_ORDER` | | | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`variant_shortcut` | *Empty by default* | :instopt:`--with-variant-shortcut`, | | | +| | | :envvar:`MODULES_VARIANT_SHORTCUT` | | | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`verbosity` | ``normal`` | :instopt:`--with-verbosity`, | | | +| | | :envvar:`MODULES_VERBOSITY`, | | | +| | | :option:`--debug`, :option:`--silent`, | | | +| | | :option:`--trace`, :option:`--verbose` | | | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+ +| :mconfig:`wa_277` | ``1`` | :instopt:`--enable-wa-277`, | X | | +| | | :envvar:`MODULES_WA_277` | | | ++-----------------------------------+----------------------------------------------+----------------------------------------------+--------------+-----------+
View file
_service:tar_scm:modules-5.0.1.tar.bz2/MIGRATING.rst -> _service:tar_scm:modules-5.1.1.tar.bz2/MIGRATING.rst
Changed
@@ -8,6 +8,311 @@ that will be encountered when upgrading. +v5.1 +==== + +This new version is backward-compatible with previous version 5 release. It +fixes bugs but also introduces new functionalities that are described in this +section. See the :ref:`5.1 release notes<5.1 release notes>` for a complete +list of the changes between Modules v5.0 and v5.1. + +Control output redirection +-------------------------- + +Since version 4.0, the :command:`module` function is initialized differently +on *sh*, *bash*, *ksh*, *zsh* and *fish* shells when their session is found +interactive. In such situation :command:`module` redirects its output from +*stderr* to *stdout*. Once initialized the redirection behavior is inherited +in sub-sessions. + +The :mconfig:`redirect_output` configuration option is introduced in version +5.1, to supersede the default behavior set at initialization time. + +.. parsed-literal:: + + :ps:`$` module load unknown >/dev/null + :ps:`$` module config redirect_output 0 + :ps:`$` module load unknown >/dev/null + :sgrer:`ERROR`: Unable to locate a modulefile for 'unknown' + +The :option:`--redirect` and :option:`--no-redirect` command-line switches are +also added to change the output redirection behavior for a single command: + +.. parsed-literal:: + + :ps:`$` module load unknown --redirect >/dev/null + :ps:`$` module load unknown --no-redirect >/dev/null + :sgrer:`ERROR`: Unable to locate a modulefile for 'unknown' + +Change modulefile command behavior +---------------------------------- + +Depending on the evaluation mode of the modulefile (e.g. *load*, *unload*, +*display*, etc) commands have different behavior. Most common example is the +:mfcmd:`setenv` command that sets an environment variable when modulefile is +loaded and unsets it when it is unloaded. A different behavior may be wished +sometimes for commands. This is why options are introduced for some modulefile +commands to control what happens on particular evaluation mode. + +The ``--return-value`` option is added to the :mfcmd:`getenv` and +:mfcmd:`getvariant` modulefile commands to ensure that the value of the +designated environment variable or variant is returned even if modulefile is +evaluated in *display* mode: + +.. parsed-literal:: + + :ps:`$` cat /path/to/modulefiles/foo/1.0 + #%Module5.1 + if {getenv --return-value VAR eq {}} { + setenv VAR value + } + :ps:`$` module display foo/1.0 + ------------------------------------------------------------------- + :sgrhi:`/path/to/modulefiles/foo/1.0`: + + :sgrcm:`setenv` VAR value + ------------------------------------------------------------------- + +``--remove-on-unload``, ``--append-on-unload``, ``--prepend-on-unload`` and +``--noop-on-unload`` options are added to the :mfcmd:`remove-path` and +:mfcmd:`module unuse<module>` modulefile commands to control the behavior +applied when modulefile is unloaded. With these options it is possible for +instance to restore the paths unset at load time or to set other paths: + +.. parsed-literal:: + + :ps:`$` module display bar/1.0 + ------------------------------------------------------------------- + :sgrhi:`/path/to/modulefiles/bar/1.0`: + + :sgrcm:`module` unuse --prepend-on-unload /path/to/dir1 + :sgrcm:`module` use /path/to/dir2 + ------------------------------------------------------------------- + :ps:`$` module use + Search path for module files (in search order): + :sgrmp:`/path/to/dir1` + :sgrmp:`/path/to/modulefiles` + :ps:`$` module bar/1.0 + :ps:`$` module use + Search path for module files (in search order): + :sgrmp:`/path/to/dir2` + :sgrmp:`/path/to/modulefiles` + :ps:`$` module unload bar/1.0 + :ps:`$` module use + Search path for module files (in search order): + :sgrmp:`/path/to/dir1` + :sgrmp:`/path/to/modulefiles` + +Following the same trend, the ``--unset-on-unload`` and ``--noop-on-unload`` +options are added to the :mfcmd:`unsetenv` modulefile command to be able to +choose between unsetting variable, setting a value or performing no operation +when modulefile is unloaded. + +Reducing number of I/O operations +--------------------------------- + +A new configuration option named :mconfig:`mcookie_check` is introduced to +control the verification made to files to determine if they are modulefiles. +By default this configuration option is set to ``always`` and when searching +for modulefiles within enabled modulepaths each file below these directories +is opened to check if it starts with the Modules magic cookie (i.e., +``#%Module`` file signature). + +These historical checks lead to a large number of I/O operations on large +module setup like in the below example where a total of 1098 modulefiles are +available: + + .. parsed-literal:: + + :ps:`$` module -o "" avail -t | wc -l + 1098 + :ps:`$` module config mcookie_check always + :ps:`$` strace -f -e open,openat,read,close -c $MODULES_CMD bash avail + ... + % time seconds usecs/call calls errors syscall + ------ ----------- ----------- --------- --------- ---------------- + 44.29 0.044603 25 1734 166 open + 34.15 0.034389 16 2056 close + 11.87 0.011949 24 483 5 openat + 9.69 0.009761 4 2146 read + ------ ----------- ----------- --------- --------- ---------------- + 100.00 0.100702 6419 171 total + +For each file, 3 I/O operations (``open``, ``read`` and ``close``) are +achieved to determine if it is a modulefile and include it in search results. +When modulefiles are located in a shared filesystem concurrently accessed by +hundreds of users, a ``module avail`` command may take some time to finish. + +When setting the :mconfig:`mcookie_check` configuration option to the ``eval`` +value, files are not checked anymore when searching for modulefiles, only when +evaluating them. All files under modulepaths are considered modulefiles, so +the content of these directories must be carefully checked to use this +:mconfig:`mcookie_check` mode which lead to a significant reduction of I/O +operations: + + .. parsed-literal:: + + :ps:`$` module config mcookie_check eval + :ps:`$` strace -f -e open,openat,read,close -c $MODULES_CMD bash avail + ... + % time seconds usecs/call calls errors syscall + ------ ----------- ----------- --------- --------- ---------------- + 30.56 0.013717 14 944 close + 28.76 0.012911 21 612 156 open + 26.41 0.011857 24 483 5 openat + 14.26 0.006403 6 1034 read + ------ ----------- ----------- --------- --------- ---------------- + 100.00 0.044888 3073 161 total + +A substantial reduction of execution time may be noticed depending on the +storage setup used to host the modulepath directories. A special care should +be given to the content of these directories to ensure they only contain +modulefiles (see :envvar:`MODULES_MCOOKIE_CHECK`). + +See the :ref:`reduce-io-load` cookbook recipe to learn additional features of +Modules that could be leveraged to lower the number of I/O operations. + +Shell command completion +------------------------ + +New modulefile commands :mfcmd:`complete` and :mfcmd:`uncomplete` are added to +get the ability to respectively define and unset command completion. *bash*, +*tcsh* and *fish* shells are supported. + +.. parsed-literal:: + + :ps:`>` module display foo + ------------------------------------------------------------------- + :sgrhi:`/path/to/modulefiles/foo/1.0`: + + :sgrcm:`append-path` PATH /path/to/foo-1.0/bin + :sgrcm:`complete` fish foo {-s V -l version --description 'Command version'} + :sgrcm:`complete` fish foo {-s h -l help --description 'Command help'} + ------------------------------------------------------------------- + :ps:`>` module load foo + :ps:`>` foo -<TAB> + -h --help (Command help) -V --version (Command version) + +:subcmd:`sh-to-mod` sub-command and :mfcmd:`source-sh` modulefile command have +also been updated to track shell completion changes. + +.. parsed-literal:: + + :ps:`$` module sh-to-mod bash /path/to/foo-1.0/share/setup-env.sh + #%Module + :sgrcm:`complete` bash foo {-o default -F _foo} + :sgrcm:`append-path` PATH /path/to/foo-1.0/bin + :sgrcm:`set-function` _foo { + ...bash completion code...} + +Lmod Tcl modulefile support +--------------------------- + +With this new version, Modules now supports Tcl modulefiles written for +`Lmod`_, the alternative :command:`module` implementation developed in Lua. +Such modulefiles can be safely evaluated by Modules without raising error. + +Support has been added for the following modulefile commands introduced by +Lmod: :mfcmd:`depends-on`, :mfcmd:`prereq-any`, :mfcmd:`always-load`, +:mfcmd:`module load-any<module>`, :mfcmd:`pushenv`, :mfcmd:`require-fullname` +and :mfcmd:`family`. + +The :ref:`Compatibility with Lmod Tcl modulefile` section in the +:ref:`modulefile(4)` man page describes the differences existing between the +two implementations. + +Note that when processing a :mfcmd:`family` command, the +:envvar:`LMOD_FAMILY_\<NAME\>` environment variable is defined by Modules to +be compatible with existing modulefiles or scripts relying on such variable. + +More tagging capabilities +------------------------- + +The new :option:`--tag` option helps to define extra tags onto a loading +module. These tags comes in addition to those inherited from the module state +or those associated with the :mfcmd:`module-tag` modulefile command. + +The :option:`--tag` option is available on :subcmd:`load`, :subcmd:`load-any`, +:subcmd:`switch` and :subcmd:`try-load` sub-commands and on +:mfcmd:`always-load`, :mfcmd:`depends-on`, :mfcmd:`module`, :mfcmd:`prereq`, +:mfcmd:`prereq-all` and :mfcmd:`prereq-any` modulefile commands. + +Informational messages of module evaluation have been updated to mention in +module denomination the tags applying to it, as it is done in :subcmd:`list` +sub-command output: + +.. parsed-literal:: + + :ps:`$` module load -v --tag=sticky:bar foo/1.0 + Loading :sgrshi:`foo/1.0` <bar> + +In case the designated module is already loaded, the additional tags are added +to the list of tags already applied to this module. + +.. parsed-literal:: + + :ps:`$` module list + Currently Loaded Modulefiles: + 1) foo/1.0 + :ps:`$` module load -v --tag=sticky:bar foo/1.0 + Tagging :sgrshi:`foo/1.0` <bar> + +The ``keep-loaded`` tag is introduced in this version. It avoids an +auto-loaded module to get automatically unloaded when its dependent modules +are unloaded. This new tag can be set with the :mfcmd:`module-tag` modulefile +command or when module is loaded with the :mfcmd:`always-load` modulefile +command. Default :mconfig:`tag_abbrev` configuration option has been updated +to add the ``kL`` abbreviation for ``keep-loaded`` tag. Default dark and light +color palettes have been updated too. + +.. parsed-literal:: + + :ps:`$` module show bar/1.0 + ------------------------------------------------------------------- + :sgrhi:`/path/to/modulefiles/bar/1.0`: + + :sgrcm:`always-load` foo/1.0 + ------------------------------------------------------------------- + :ps:`$` module load bar/1.0 + Loading :sgrhi:`bar/1.0` + :sgrin:`Loading requirement`: foo/1.0 + :ps:`$` module unload bar/1.0 + :ps:`$` module list + Currently Loaded Modulefiles: + 1) :sgral:`foo`:sgrkl:`/1.0` + + Key: + :sgral:`auto-loaded` :sgrkl:`keep-loaded` + +When saving a collection, the tags defined with :option:`--tag` option are +recorded to set them again when collection is restored. Tags resulting from +module load state, like ``auto-loaded`` and ``keep-loaded``, are also +recorded. + +.. parsed-literal:: + + :ps:`$` module load --tag=sticky bar/1.0 + Loading :sgrshi:`bar/1.0` + :sgrin:`Loading requirement`: foo/1.0 + :ps:`$` module save + :ps:`$` module saveshow + ------------------------------------------------------------------- + :sgrhi:`/home/user/.module/default`: + + :sgrcm:`module` use --append /path/to/modulefiles + :sgrcm:`module` load --tag=auto-loaded:keep-loaded foo + :sgrcm:`module` load --tag=sticky bar + + ------------------------------------------------------------------- + +The :mconfig:`collection_pin_tag` configuration option is added to record in +collection all tags set on loaded modules. This configuration option is +disabled by default. + +.. note:: Collection saved now starts with a ``#%Module5.1`` file signature if + :option:`--tag` option is recorded in it. Such collection could only be + handled by Modules version 5.1 and above. + v5.0 ==== @@ -124,10 +429,10 @@ When both files exist, now they are both evaluated instead of just the :file:`modulespath` file. -Module magic cookie (i.e., ``#%Module``) is now required at the start of -:file:`initrc`. An error is produced if the magic cookie is missing or if the -optional version number placed after the cookie string is higher than the -version of the :file:`modulecmd.tcl` script in use. +Modules magic cookie (i.e., ``#%Module`` file signature) is now required at +the start of :file:`initrc`. An error is produced if the magic cookie is +missing or if the optional version number placed after the cookie string is +higher than the version of the :file:`modulecmd.tcl` script in use. Note that :file:`initrc` configuration file can host more than :subcmd:`module use<use>` and :subcmd:`module load<load>` commands. @@ -415,7 +720,7 @@ :ps:`$` module show foo/2.1 toolchain=c ------------------------------------------------------------------- - :sgrhi:`/path/to/modulfiles/foo/2.1`: + :sgrhi:`/path/to/modulefiles/foo/2.1`: :sgrcm:`variant` toolchain a b c :sgrcm:`prereq` :noparse:`bar@1.2 toolchain=`:sgrva:`{toolchain}` @@ -693,7 +998,7 @@ Sticky modules -------------- -Module stickyness is introduced, in a similar fashion than on the `Lmod`_ +Module stickiness is introduced, in a similar fashion than on the `Lmod`_ project, to allow to glue modules to the loaded environment. A sticky module cannot be unloaded, unless if the unload action is forced or if the module reloads after being unloaded. @@ -749,9 +1054,9 @@ applies. If colored output is disabled a tag abbreviation is reported along module designation (respectively ``S`` and ``sS``). -In case the stickyness applies to the generic module name (and does not target +In case the stickiness applies to the generic module name (and does not target a specific module version or version-set), one version of the sticky or -super-sticty module can be swapped by another version of this same module: +super-sticky module can be swapped by another version of this same module: .. parsed-literal:: @@ -2275,10 +2580,10 @@ Express Modules compatibility of modulefile with versioned magic cookie ----------------------------------------------------------------------- -Any modulefile should start with the ``#%Module`` magic cookie and sometimes -a version number may be placed right after this string. Until now this -version number corresponded to a modulefile format version but it was never -checked. +Any modulefile should start with the ``#%Module`` file signature (also called +the Modules magic cookie) and sometimes a version number may be placed right +after this string. Until now this version number corresponded to a modulefile +format version but it was never checked. Starting with this new Modules release, this version number reflects the minimum version of Modules required to interpret the modulefile. If the @@ -2312,7 +2617,7 @@ HINT: the following module must be loaded first: bar/4.5 In addition, foreground ``load``, ``unload``, ``switch`` and ``restore`` -actions (ie. asked on the command-line) now report a summary of the +actions (i.e., asked on the command-line) now report a summary of the additional load and unload evaluations that were eventually triggered in the process:
View file
_service:tar_scm:modules-5.0.1.tar.bz2/Makefile -> _service:tar_scm:modules-5.1.1.tar.bz2/Makefile
Changed
@@ -22,6 +22,13 @@ TCL_DISTSUM83 := 5cb79f8b90cf1322cb1286b9fe67f7a2 TCLSH83 := $(TCL_RELEASE83)/unix/tclsh +# third-party definitions for source-sh testing +SPACK_REPOURL := https://github.com/spack/spack.git +MINICONDA_DLSRC := https://repo.anaconda.com/miniconda/ +MINICONDA_DIST := Miniconda3-py38_4.11.0-Linux-x86_64.sh +MINICONDA_DISTSUM := 252d3b0c863333639f99fbc465ee1d61 +OPENFOAM_REPOURL := https://github.com/OpenFOAM/OpenFOAM-dev.git + # specific modulecmd script for test MODULECMDTEST := modulecmd-test.tcl @@ -54,7 +61,8 @@ lib/libtestutil-dupgetgroups$(SHLIB_SUFFIX) \ lib/libtestutil-getgrgid$(SHLIB_SUFFIX) \ lib/libtestutil-time$(SHLIB_SUFFIX) \ - lib/libtestutil-mktime$(SHLIB_SUFFIX) + lib/libtestutil-mktime$(SHLIB_SUFFIX) \ + lib/libtestutil-sysconf$(SHLIB_SUFFIX) endif endif @@ -63,12 +71,28 @@ TEST_PREREQ += tclsh83 endif +# install extra software to test source-sh against their scripts +ifeq ($(EXTRATEST_SOURCESH),y) +TEST_PREREQ += spack miniconda3 OpenFOAM-dev +endif + # define rule prereq when target need to be rebuilt when git repository change ifeq ($(wildcard .git),.git) -GIT_DIR := $(shell git rev-parse --git-dir) -GIT_REFRESH_PREREQ := $(GIT_DIR)/index +GIT_REFRESH_PREREQ := .git/objects + +# determine if version.inc needs to get updated as git repository has changed +ifeq ($(wildcard version.inc), version.inc) +MTIME_VERSION := $(shell date +%s -r version.inc) +MTIME_GIT_REPO := $(shell date +%s -r $(GIT_REFRESH_PREREQ)) +REFRESH_VERSION_INC := $(shell if $(MTIME_GIT_REPO) -gt $(MTIME_VERSION) ; \ + then echo y; else echo n; fi) +else +REFRESH_VERSION_INC := y +endif + else -GIT_REFRESH_PREREQ := +GIT_REFRESH_PREREQ := +REFRESH_VERSION_INC := n endif # setup summary echo rules unless silent mode set @@ -87,7 +111,7 @@ all: pkgdoc endif -initdir: version.inc +initdir: $(MAKE) --no-print-directory -C init all pkgdoc: version.inc @@ -96,6 +120,11 @@ doc: version.inc $(MAKE) --no-print-directory -C doc all +# source version definitions if built and no need to get refreshed +# skip calls to git command if this file is available +ifeq ($(wildcard version.inc) $(REFRESH_VERSION_INC), version.inc n) +-include version.inc +else # build version.inc shared definitions from git repository info ifeq ($(wildcard .git) $(wildcard version.inc.in),.git version.inc.in) GIT_CURRENT_TAG := $(shell git describe --tags --abbrev=0) @@ -142,6 +171,9 @@ endif endif endif +# no need to include generated version.inc file as the MODULES_* variables +# have just been computed +endif # determine RPM release # use last release if we currently sat on tag, append build number to it elsewhere @@ -336,14 +368,12 @@ version.inc: version.inc.in $(GIT_REFRESH_PREREQ) $(translate-in-script) -# source version definitions shared across the Makefiles of this project -ifeq ($(findstring clean,$(MAKECMDGOALS)),) --include version.inc -endif - contrib/rpm/environment-modules.spec: contrib/rpm/environment-modules.spec.in $(GIT_REFRESH_PREREQ) $(translate-in-script) +tcl/coll.tcl: tcl/coll.tcl.in version.inc + $(translate-in-script) + tcl/envmngt.tcl: tcl/envmngt.tcl.in version.inc $(translate-in-script) @@ -412,7 +442,7 @@ README: $(ECHO_GEN) - sed -e '173,176d' -e '1,10d' -e 's|\\(.*\?\)\\0-9\|\1|' $@.md > $@ + sed -e '181,187d' -e '1,10d' -e 's|\\(.*\?\)\\0-9\|\1|' $@.md > $@ script/add.modules: script/add.modules.in $(translate-in-script) @@ -454,6 +484,9 @@ lib/libtestutil-mktime$(SHLIB_SUFFIX): $(MAKE) --no-print-directory -C lib $(@F) +lib/libtestutil-sysconf$(SHLIB_SUFFIX): + $(MAKE) --no-print-directory -C lib $(@F) + # example configs for test rules testsuite/example/.modulespath: testsuite/example/.modulespath.in $(translate-in-script) @@ -611,6 +644,14 @@ rmdir $(DESTDIR)$(datarootdir) $(RMDIR_IGN_NON_EMPTY) $(DESTDIR)$(prefix) || true +# include config.{guess,sub} scripts in dist if generated by autoreconf +ifeq ($(wildcard lib/config.guess),lib/config.guess) +DIST_AUTORECONF_EXTRA += lib/config.guess +endif +ifeq ($(wildcard lib/config.sub),lib/config.sub) +DIST_AUTORECONF_EXTRA += lib/config.sub +endif + # include pre-generated documents not to require documentation build # tools when installing from dist tarball dist-tar: ChangeLog contrib/rpm/environment-modules.spec pkgdoc @@ -618,10 +659,11 @@ git archive --prefix=$(DIST_PREFIX)/ --worktree-attributes \ -o $(DIST_PREFIX).tar HEAD tar -rf $(DIST_PREFIX).tar --transform 's,^,$(DIST_PREFIX)/,' \ - lib/configure lib/config.h.in ChangeLog doc/build/MIGRATING.txt \ - doc/build/changes.txt doc/build/INSTALL.txt doc/build/INSTALL-win.txt \ - doc/build/NEWS.txt doc/build/CONTRIBUTING.txt doc/build/module.1.in \ - doc/build/ml.1 doc/build/modulefile.4 contrib/rpm/environment-modules.spec + lib/configure lib/config.h.in $(DIST_AUTORECONF_EXTRA) ChangeLog \ + doc/build/MIGRATING.txt doc/build/changes.txt doc/build/INSTALL.txt \ + doc/build/INSTALL-win.txt doc/build/NEWS.txt doc/build/CONTRIBUTING.txt \ + doc/build/module.1.in doc/build/ml.1 doc/build/modulefile.4 \ + contrib/rpm/environment-modules.spec dist-gzip: dist-tar $(ECHO_GEN2) $(DIST_PREFIX).tar.gz @@ -677,6 +719,7 @@ rm -f README rm -f modulecmd.tcl rm -f $(MODULECMDTEST) $(MODULECMDTEST)_i + rm -f tcl/coll.tcl rm -f tcl/envmngt.tcl rm -f tcl/init.tcl rm -f tcl/main.tcl @@ -709,6 +752,9 @@ rm -rf $(NAGELFAR_RELEASE) rm -rf $(TCL_RELEASE83) rm -f tclsh83 + rm -rf spack + rm -rf miniconda3 + rm -rf OpenFOAM-dev rm -f tcl/tags rm -f tcl/GTAGS tcl/GRTAGS tcl/GPATH tcl/gtags.file ifneq ($(wildcard lib/Makefile),) @@ -803,6 +849,22 @@ chmod +x $@ rm $(TCL_DIST83) +# fetch spack repository (for source-sh test purpose) +spack: + git clone --depth 1 $(SPACK_REPOURL) + +# install Conda (for source-sh test purpose) +miniconda3: + $(WGET) $(MINICONDA_DLSRC)$(MINICONDA_DIST) || true + echo "$(MINICONDA_DISTSUM) $(MINICONDA_DIST)" | md5sum --status -c - || \ + md5 -c $(MINICONDA_DISTSUM) $@ || (rm -f $(MINICONDA_DIST) && false) + bash $(MINICONDA_DIST) -b -s -p ./miniconda3 + rm $(MINICONDA_DIST) + +# fetch OpenFOAM repository (for source-sh test purpose) +OpenFOAM-dev: + git clone --depth 1 $(OPENFOAM_REPOURL) + # install code coverage tool # download from alt. source if correct tarball not retrieved from primary location $(NAGELFAR): @@ -818,17 +880,17 @@ $(NAGELFAR) -len 78 $< # build Ctags index -tcl/tags: tcl/coll.tcl tcl/envmngt.tcl.in tcl/init.tcl.in tcl/main.tcl.in \ +tcl/tags: tcl/coll.tcl.in tcl/envmngt.tcl.in tcl/init.tcl.in tcl/main.tcl.in \ tcl/mfinterp.tcl.in tcl/modeval.tcl tcl/modfind.tcl.in tcl/modspec.tcl \ tcl/report.tcl.in tcl/subcmd.tcl.in tcl/util.tcl - ctags --tag-relative -f $@ --langmap=tcl:.tcl.in tcl/coll.tcl \ + ctags --tag-relative -f $@ --langmap=tcl:.tcl.in tcl/coll.tcl.in \ tcl/envmngt.tcl.in tcl/init.tcl.in tcl/main.tcl.in tcl/mfinterp.tcl.in \ tcl/modeval.tcl tcl/modfind.tcl.in tcl/modspec.tcl tcl/report.tcl.in \ tcl/subcmd.tcl.in tcl/util.tcl # build Gtags target files tcl/gtags.file: - echo coll.tcl > $@ + echo coll.tcl.in > $@ echo envmngt.tcl.in >> $@ echo init.tcl.in >> $@ echo main.tcl.in >> $@ @@ -841,7 +903,7 @@ echo util.tcl >> $@ # build Gtags tag file -tcl/GTAGS: tcl/coll.tcl tcl/envmngt.tcl.in tcl/init.tcl.in tcl/main.tcl.in \ +tcl/GTAGS: tcl/coll.tcl.in tcl/envmngt.tcl.in tcl/init.tcl.in tcl/main.tcl.in \ tcl/mfinterp.tcl.in tcl/modeval.tcl tcl/modfind.tcl.in tcl/modspec.tcl \ tcl/report.tcl.in tcl/subcmd.tcl.in tcl/util.tcl tcl/gtags.file gtags -C tcl --gtagsconf ../.globalrc @@ -853,14 +915,15 @@ endif # let verbose by default the install/clean/test and other specific non-build targets $(V).SILENT: initdir pkgdoc doc version.inc contrib/rpm/environment-modules.spec \ - modulecmd.tcl tcl/envmngt.tcl tcl/init.tcl tcl/main.tcl tcl/mfinterp.tcl \ - tcl/modfind.tcl tcl/report.tcl tcl/subcmd.tcl tcl/coll.tcl_i tcl/envmngt.tcl_i \ - tcl/init.tcl_i tcl/main.tcl_i tcl/mfinterp.tcl_i tcl/modfind.tcl_i tcl/modeval.tcl_i \ - tcl/modspec.tcl_i tcl/report.tcl_i tcl/subcmd.tcl_i tcl/util.tcl_i ChangeLog README \ - script/add.modules script/gitlog2changelog.py script/modulecmd \ + modulecmd.tcl tcl/coll.tcl tcl/envmngt.tcl tcl/init.tcl tcl/main.tcl \ + tcl/mfinterp.tcl tcl/modfind.tcl tcl/report.tcl tcl/subcmd.tcl tcl/coll.tcl_i \ + tcl/envmngt.tcl_i tcl/init.tcl_i tcl/main.tcl_i tcl/mfinterp.tcl_i \ + tcl/modfind.tcl_i tcl/modeval.tcl_i tcl/modspec.tcl_i tcl/report.tcl_i \ + tcl/subcmd.tcl_i tcl/util.tcl_i ChangeLog README script/add.modules \ + script/gitlog2changelog.py script/modulecmd \ lib/libtclenvmodules$(SHLIB_SUFFIX) lib/libtestutil-closedir$(SHLIB_SUFFIX) \ lib/libtestutil-getpwuid$(SHLIB_SUFFIX) lib/libtestutil-getgroups$(SHLIB_SUFFIX) \ - lib/libtestutil-0getgroups$(SHLIB_SUFFIX) \ + lib/libtestutil-0getgroups$(SHLIB_SUFFIX) lib/libtestutil-sysconf$(SHLIB_SUFFIX) \ lib/libtestutil-dupgetgroups$(SHLIB_SUFFIX) lib/libtestutil-getgrgid$(SHLIB_SUFFIX) \ lib/libtestutil-time$(SHLIB_SUFFIX) lib/libtestutil-mktime$(SHLIB_SUFFIX) \ testsuite/example/.modulespath testsuite/example/modulespath-wild \
View file
_service:tar_scm:modules-5.0.1.tar.bz2/Makefile.inc.in -> _service:tar_scm:modules-5.1.1.tar.bz2/Makefile.inc.in
Changed
@@ -65,7 +65,7 @@ pager := @pager@ pageropts := @pageropts@ -# defaut verbosity +# default verbosity verbosity := @verbosity@ # color setup @@ -135,6 +135,11 @@ # editor editor := @editor@ +# shell completion location +bashcompletiondir := @bashcompletiondir@ +fishcompletiondir := @fishcompletiondir@ +zshcompletiondir := @zshcompletiondir@ + # command location TCLSH := @TCLSH@ PYTHON := @PYTHON@
View file
_service:tar_scm:modules-5.0.1.tar.bz2/NEWS.rst -> _service:tar_scm:modules-5.1.1.tar.bz2/NEWS.rst
Changed
@@ -6,6 +6,263 @@ This file describes changes in recent versions of Modules. It primarily documents those changes that are of interest to users and admins. +.. _5.1 release notes: + +Modules 5.1.1 (2022-05-31) +-------------------------- + +* Install: add :command:`rpmlint` rc configuration file to filter false + positive warning messages. +* Install: better guess ``libdir64`` and ``libdir32`` directory locations + when ``libdir`` does not end with *64* but contains *64*. +* Install: update RPM spec file to move libtclenvmodules in an + environment-modules directory under ``libdir``. +* Fix rendering of loading or unloading module designation when configured + color palette does not set the ``hi`` color key. (fix issue #455) +* Remove the *already loaded* message displayed when verbosity level is higher + or equal to ``verbose2`` if new tags are applied to the loaded module. (fix + issue #456) +* Report a global known error when current working directory cannot be + retrieved due to the removal of this directory. (fix issue #457) +* Update tags set through :mfcmd:`prereq` command on all already loaded + requirements. (fix issue #459) +* Update module designation with the tags set by reloading dependent module. + (fix issue #460) +* Install: include the ``lib/config.guess`` and ``lib/config.sub`` scripts in + distribution tarball if generated by :command:`autoreconf`. +* Install: call ``git`` command in ``Makefile`` only if the definitions of + ``version.inc`` need to get built or refreshed. + + +Modules 5.1.0 (2022-04-30) +-------------------------- + +* Allow to declare :mfcmd:`variant` with no list of accepted value. Such + variant accepts any value specified. (fix issue #405) +* Add the :mconfig:`redirect_output` configuration option to control on *sh*, + *bash*, *ksh*, *zsh* and *fish* shells whether or not the output of the + :command:`module` function should be redirected from stderr to stdout. When + set, :mconfig:`redirect_output` defines :envvar:`MODULES_REDIRECT_OUTPUT` + environment variable. +* Introduce the :option:`--redirect`/:option:`--no-redirect` command-line + switches to supersede the value of the :mconfig:`redirect_output` + configuration option on *sh*, *bash*, *ksh*, *zsh* and *fish* shells. (fix + issue #410) +* Add the ``--return-value`` option to the :mfcmd:`getenv` and + :mfcmd:`getvariant` modulefile commands to force to return the value of + respectively designated environment variable or variant when modulefile is + evaluated in *display* mode. (fix issue #422) +* Introduce the :subcmd:`state` sub-command to display Modules states. +* Add the ``supported_shells`` state to get the list of the shells that are + supported by :file:`modulecmd.tcl` through the :subcmd:`state` sub-command . + (fix issue #426) +* Filter out the variables intended for Modules private usage when processing + the environment changes made by a script evaluated by :subcmd:`sh-to-mod` + sub-command or :mfcmd:`source-sh` modulefile command. (fix issue #427) +* Doc: add :ref:`control-mode-behaviors` design notes. +* Doc: add :ref:`add-new-config-option` design notes. +* Set a `Code of conduct`_ for the project and its community based on the + widely adopted Contributor Covenant. +* Doc: add :ref:`add-new-sub-command` design notes. +* Add the ``--remove-on-unload`` option to the :mfcmd:`remove-path` to also + remove value when modulefile is unloaded. +* Raise error when an unknown option is set on :mfcmd:`module use<module>` or + :mfcmd:`module unuse<module>` modulefile command. +* Rework emitted debug messages to remove obvious ones and systematically + report each modulefile command processed with their arguments. +* Add the ``--append-on-unload`` option to the :mfcmd:`remove-path` and + :mfcmd:`module unuse<module>` modulefile commands to append back when + modulefile is unloaded the value removed at load time or a specific value + set after this option. +* Add the ``--prepend-on-unload`` option to the :mfcmd:`remove-path` and + :mfcmd:`module unuse<module>` modulefile commands to prepend back when + modulefile is unloaded the value removed at load time or a specific value + set after this option. +* Add the ``--noop-on-unload`` option to the :mfcmd:`unsetenv`, + :mfcmd:`remove-path` and :mfcmd:`module unuse<module>` modulefile commands + to perform no operation when modulefile is unloaded. +* Add the ``--unset-on-unload`` option to the :mfcmd:`unsetenv` modulefile + command to also unset environment variable when modulefile is unloaded. +* Add the ``--set-if-undef`` option to the :mfcmd:`setenv` modulefile command + to set environment variable when modulefile is loaded only this variable is + not yet defined. +* Install: add the :instopt:`--with-bashcompletiondir`, + :instopt:`--with-fishcompletiondir` and :instopt:`--with-zshcompletiondir` + installation options to install shell completion scripts in their + system-wide location. (fix issue #428) +* Doc: add :ref:`lmod-tcl-modulefile-compat` design notes. +* Introduce the ``add-property``, ``remove-property`` and ``extensions`` + modulefile commands for compatibility with Lmod Tcl modulefiles. These + commands are evaluated as a *no-operation* command. +* Introduce the :mfcmd:`prereq-any` modulefile command for compatibility with + Lmod Tcl modulefiles. :mfcmd:`prereq-any` is an alias of :mfcmd:`prereq` + command. +* Produce a clear error message when wrong number of argument is received by + :mfcmd:`prereq` command. +* Doc: describe :mfvar:`ModulesVersion` in *Modules Variables* section in + :ref:`modulefile(4)` man page. +* Set ``ModuleVersion`` as an alias over :mfvar:`ModulesVersion` modulefile + variable for compatibility with Lmod Tcl modulefiles. +* Doc: describe :mfcmd:`reportError` and :mfcmd:`reportWarning` modulefile + commands. +* Add the :mfcmd:`require-fullname` modulefile command for compatibility with + Lmod Tcl modulefiles. This command aborts modulefile *load* evaluation if + modulefile's name is not fully specified. +* Add the :mfcmd:`prereq-all` modulefile command, alias over the + :mfcmd:`prereq` command which acts as an *AND* operation when multiple + modulefiles are specified. +* Add the :mfcmd:`depends-on` modulefile command, alias over the + :mfcmd:`prereq-all` command for compatibility with Lmod Tcl modulefiles. +* Introduce the ``keep-loaded`` :ref:`module tag<Module tags>` that avoids an + auto-loaded module to get automatically unloaded when its dependent modules + are getting unloaded. Update default :mconfig:`tag_abbrev` configuration + option to add an abbreviation for the new tag (``kL``) and default light and + dark color palettes. +* Add the :mfcmd:`always-load` modulefile command for compatibility with Lmod + Tcl modulefiles. This command loads designated modulefile and applies the + ``keep-loaded`` tag to it. +* Add the :subcmd:`load-any` sub-command and :mfcmd:`module load-any<module>` + modulefile command for compatibility with Lmod Tcl modulefiles. This command + loads one modulefile from specified list. +* Add support for ``--not-req`` option on :mfcmd:`module try-load<module>` and + :mfcmd:`module load-any<module>` modulefile commands. +* Doc: add :ref:`magic-cookie-check` design notes. +* Add the :mconfig:`mcookie_check` configuration option that control whether + the magic cookie at the start of modulefile (i.e., ``#%Module`` file + signature) need to get checked or not. When set to ``eval`` the number of + file checks is significantly reduced when walking through modulepaths to + search for modulefiles. Default value for this option is overridden by the + :envvar:`MODULES_MCOOKIE_CHECK` environment variable. +* Doc: describe :mfcmd:`puts` Tcl command and its specific feature when used + in modulefile. +* Create the ``prestdout`` channel for :mfcmd:`puts` modulefile command to be + able to send content that will be evaluated in current shell session prior + any other content. (fix issue #432) +* Add the :mfcmd:`family` modulefile command for compatibility with Lmod Tcl + modulefiles. This command defines family name as a module alias over + currently loading module and express a conflict over this name to ensure + only one member of a family can be loaded in user environment. + :mfcmd:`family` also defines the :envvar:`MODULES_FAMILY_\<NAME\>` and + :envvar:`LMOD_FAMILY_\<NAME\>` environment variables. +* Doc: add :ref:`reduce-io-load` cookbook recipe. +* Add the ability to filter the list of loaded modules returned by + :subcmd:`list` sub-command. Filtering pattern could be part of module name, + symbolic version or alias and is matched in a case insensitive manner by + default. It could also leverage the :ref:`Advanced module version + specifiers` syntax. +* Add support for :option:`--starts-with` and :option:`--contains` options on + :subcmd:`list` sub-command. +* Doc: add :ref:`shell-completion` design notes. +* Introduce :mfcmd:`complete` and :mfcmd:`uncomplete` modulefile commands to + respectively enable and disable shell completion for a given command name. + *bash*, *tcsh* and *fish* shells are supported. +* Track shell completion changes of *bash*, *tcsh* and *fish* shell scripts on + :subcmd:`sh-to-mod` sub-command and :mfcmd:`source-sh` modulefile command. +* Fix typos found in code, tests and documentation. (contribution from Dimitri + Papadopoulos Orfanos) +* Update the :subcmd:`sh-to-mod` and :mfcmd:`source-sh` mechanisms to support + nested function definition on fish shell. +* Fix the :subcmd:`sh-to-mod` and :mfcmd:`source-sh` mechanisms to correctly + detect functions with a ``_`` character in their name on fish shell. +* Update the :command:`module` shell function definition for sh-kind shell to + enclose the output generated by :file:`modulecmd.tcl` in quotes in order to + pass it to the eval command. This change fixes definition of shell function, + especially when coming from shell script evaluation over the + :subcmd:`sh-to-mod` and :mfcmd:`source-sh` mechanisms. (fix issue #434) +* Fix csh shell alias detection on :subcmd:`sh-to-mod` and :mfcmd:`source-sh` + mechanisms when enclosed in parenthesis. (fix issue #434) +* Include for fish shell environment analysis on :subcmd:`sh-to-mod` and + :mfcmd:`source-sh` mechanisms the private functions defined by evaluated + script, in order to catch all definitions that may be useful for shell + completion. +* Fix the :subcmd:`sh-to-mod` and :mfcmd:`source-sh` mechanisms to correctly + detect empty function on fish shell. +* Script: add :command:`pre-commit` git hook script to help verify if commits + are free of misspellings (with `codespell`_ tool) and trailing spaces. +* Doc: fix typos found in documentation with Aspell utility. +* Doc: describe :ref:`Dependencies between modulefiles` in + :ref:`modulefile(4)` man page. (fix issues #431 and #433) +* Script: update :command:`pre-commit` git hook script to spell check + documentation files with `Aspell`_ tool. +* Script: add :command:`commit-msg` git hook script to spell check commit + message with `Aspell`_ tool. +* Doc: clarify that ``#%Module`` is a file signature also called Modules magic + cookie. +* Doc: update the :ref:`module ENVIRONMENT` section in :ref:`module(1)` man + page to provide for each Modules environment variable the name of the + configuration option that could be used to set the variable with the + :subcmd:`config` sub-command. +* Doc: clarify in :ref:`module(1)` man page that + :envvar:`MODULES_SET_SHELL_STARTUP`, :envvar:`MODULES_SHELLS_WITH_KSH_FPATH` + and :envvar:`MODULES_WA_277` should be set prior Modules initialization to + get taken into account. +* Doc: update :ref:`INSTALL` document to provide the name of the configuration + option linked the installation options. +* Doc: describe in :ref:`module(1)` man page the default value of each + configuration option and linked installation option and command-line + switches. +* Doc: add *Configuration options* section in :ref:`INSTALL` document with a + table summarizing all configuration options and their relative installation + options and environment variables. +* Add the :mfcmd:`pushenv` modulefile command for compatibility with Lmod Tcl + modulefiles. This command sets designated environment variable with + specified value and save the previous value set to restore it when the + modulefile is unloaded. Previous values are saved in a + :envvar:`__MODULES_PUSHENV_\<VAR\>` environment variable. +* Doc: add :ref:`Compatibility with Lmod Tcl modulefile` section in + :ref:`modulefile(4)` man page. +* Update definition of the ``module()`` python function and python + initialization script to explicitly send output to ``sys.stderr`` to get the + ability to catch this content. +* Lib: handle ``sysconf`` error in function implementing the + ``initStateUsergroups`` procedure. (contribution from Lukáš Zaoral) +* Introduce the :option:`--tag` option for the :subcmd:`load`, + :subcmd:`try-load`, :subcmd:`load-any`, :subcmd:`switch` sub-commands and + associated :mfcmd:`module` modulefile commands and :mfcmd:`prereq`, + :mfcmd:`prereq-all`, :mfcmd:`depends-on` and :mfcmd:`always-load` modulefile + commands. This new option applies specified tags to the module to load. +* Record tags set to loaded modules with the :option:`--tag` option in the + :envvar:`__MODULES_LMEXTRATAG` environment variable to make this information + persists after module being loaded. +* When saving a collection, record loaded module tags set with the + :option:`--tag` option and those resulting from module load states (like + ``auto-loaded`` and ``keep-loaded``). The ``--notuasked`` string previously + used to designate auto-loaded modules in collection is changed into the + ``--tag=auto-loaded`` option. +* Introduce the :mconfig:`collection_pin_tag` configuration option, that + records in collection all tags set on loaded modules when enabled. Option is + disabled by default and when set it defines the :envvar:`MODULES_COLLECTION\ + _PIN_TAG` environment variable. +* When a collection is saved, its content starts with a ``#%Module5.1`` file + signature if :option:`--tag` option is recorded in it. +* Update the :subcmd:`restore`, :subcmd:`savelist`, :subcmd:`saveshow` and + :subcmd:`is-saved` sub-commands to exclude from result or return an error + when checking a collection expressing a higher Modules version requirement + in its header signature than the one currently in use. +* Doc: describe :ref:`differences between run-command file and modulefile + interpretation<Modulefile and run-command interp diff>` in + :ref:`modulefile(4)` man page. +* Doc: describe :mfcmd:`module` sub-commands available as modulefile Tcl + command for each interpretation context in :ref:`modulefile(4)` man page. +* When loading a module with some extra tags defined through the + :option:`--tag` option, if this module is already loaded the new tags are + added to those already set. +* When reporting result of :subcmd:`avail` or :subcmd:`list` sub-commands, + enclose module names in single quotes if they contain a space character. +* When mentioning the loading, unloading or refreshing evaluation of a module, + report the tags associated to this module as done when printing results of + :subcmd:`list` sub-command. +* Fix :ref:`log-module-command` cookbook recipe not to break Modules + initialization when using provided :file:`siteconfig.tcl` file. (fix issue + #453 with contribution from Eric Burgueño) +* Mention tagging evaluation of a module, when tag list of an already loaded + module is updated. + +.. _Code of conduct: https://github.com/cea-hpc/modules/blob/master/CODE_OF_CONDUCT.md +.. _codespell: https://github.com/codespell-project/codespell +.. _Aspell: http://aspell.net/ + + .. _5.0 release notes: Modules 5.0.1 (2021-10-16) @@ -90,7 +347,7 @@ of :instopt:`--with-initconf-in` option). Configuration files were previously searched in both locations. * Install: remove installation option ``--enable-compat-version``. - Compatiblity version co-installation is discontinued. :command:`switchml` + Compatibility version co-installation is discontinued. :command:`switchml` shell function and :envvar:`MODULES_USE_COMPAT_VERSION` are thus removed as well. * Testsuite: introduce the non-regression quick test mode. When the @@ -149,7 +406,7 @@ the reference counter of a path entry already defined and a :subcmd:`module remove-path<remove-path>` will remove specified path whatever its reference counter value. -* Fix :subcmd:`unuse` sub-command when sereval modulepaths are specified as a +* Fix :subcmd:`unuse` sub-command when several modulepaths are specified as a single argument (i.e., ``/path/to/dir1:/path/to/dir2``). Enabled modulepaths were not correctly detected when specified this way. * Doc: clarify that an already defined path is not added again or moved when @@ -388,7 +645,7 @@ #389) * Revert "Install: have :file:`configure` script assume the ``.`` dot directory when invoked without the prepended ``./``" as consent was not - obtained from author to relicense the contribution to GPLv2+. + obtained from author to re-license the contribution to GPLv2+. * Doc: fixes few typos in :ref:`module(1)` and :ref:`modulefile(4)`. * Update the :subcmd:`sh-to-mod` mechanism to support version 3.2 of the fish shell. Fish 3.2 introduces the ``.`` builtin command that should be @@ -459,7 +716,7 @@ given state. * Remove the pre-definition of runtime states with no specific property. These basic states are defined on-the-fly which implied they are not reported on a - :subcmd:`module config --dump-state<config>` command unless if instanciated. + :subcmd:`module config --dump-state<config>` command unless if instantiated. * Introduce the ``loaded`` symbolic version among advanced version specifiers (e.g. ``foo@loaded``) to designate the currently loaded version of specified module. (fix issue #366) @@ -533,14 +790,14 @@ ``verbose2`` or any higher level. (fix issue #187) * Doc: improve readability of version 4 improvements in :ref:`changes` document. -* Introduce stickyness: module tagged ``sticky`` with :mfcmd:`module-tag` +* Introduce stickiness: module tagged ``sticky`` with :mfcmd:`module-tag` command cannot be unloaded unless if the unload is forced or if the module is reloaded. (fix issue #269) -* Introduce super-stickyness: module tagged ``super-sticky`` with +* Introduce super-stickiness: module tagged ``super-sticky`` with :mfcmd:`module-tag` command cannot be unloaded even if the unload is forced unless if the module is reloaded. (fix issue #269) * Allow swap of sticky or super-sticky modules by another modulefile version - if stickyness definition applies to module parent name. E.g., *foo/1.0* can + if stickiness definition applies to module parent name. E.g., *foo/1.0* can be swapped by *foo/2.0* if sticky tag applies to *foo*. * When forcing purge with a :subcmd:`purge --force<purge>` sub-command, also unload the modules that are depended by unloadable modules. @@ -564,7 +821,7 @@ sub-commands to explain the meaning of graphical renditions or of elements set in parentheses or chevrons along module name. * Fix output of :subcmd:`avail` and :subcmd:`list` sub-commands on very small - termminal width. (fix issue #378) + terminal width. (fix issue #378) * Add :mconfig:`mcookie_version_check` configuration to define if version set in modulefile magic cookie should be checked against :command:`module` current version to determine if modulefile can be evaluated. The new @@ -1822,7 +2079,7 @@ (fix issue#189) * Register all alternative names of loaded modules in environment with ``MODULES_LMALTNAME`` variable. These names correspond to the symbolic - versions and aliases resolving to the loaded modules. Helps to consistenly + versions and aliases resolving to the loaded modules. Helps to consistently solve ``conflict`` or ``prereq`` constraints set over these alternative names. (fix issue#143 / see :ref:`v42-consistency-module-load-unload-commands` section in MIGRATING @@ -1857,13 +2114,13 @@ modulefile does not produce an error anymore. (fix issue#199) * Report error raised from modulefile evaluation as ``ERROR`` rather ``WARNING``, like when a conflict constraint is hit. Moreover this kind of - evaluation error is now silenced on global evaluation like when proceding + evaluation error is now silenced on global evaluation like when processing ``avail`` or ``search`` sub-commands. * Record messages to report them by block on when processing a ``load`` or an ``unload`` modulefile evaluation to improve readability on these evaluating modes that may cascade additional actions. (see :ref:`v42-module-message-report` section in MIGRATING document) -* Foreground ``load``, ``unload``, ``switch`` and ``restore`` actions (ie. +* Foreground ``load``, ``unload``, ``switch`` and ``restore`` actions (i.e., asked on the command-line) now report a summary of the additional load and unload evaluations that were eventually triggered in the process. * Support ``del`` and ``remove`` aliases for ``unload`` sub-command like on
View file
_service:tar_scm:modules-5.0.1.tar.bz2/README.md -> _service:tar_scm:modules-5.1.1.tar.bz2/README.md
Changed
@@ -29,7 +29,7 @@ python, ruby, cmake and r. Modules are useful in managing different versions of applications. Modules -can also be bundled into metamodules that will load an entire suite of +can also be bundled into meta-modules that will load an entire suite of different applications. @@ -117,7 +117,7 @@ ---------- Regression testing scripts are available in the `testsuite` directory (you -need dejagnu to run the test suite): +need DejaGnu to run the test suite): $ ./configure $ make test @@ -139,7 +139,7 @@ > https://modules.readthedocs.io -GitHub source respository: +GitHub source repository: > https://github.com/cea-hpc/modules @@ -152,6 +152,13 @@ > http://sourceforge.net/projects/modules/ +Code of conduct +--------------- + +Please note that Modules has a Code of conduct6. By participating in the +Modules community, you agree to abide by its rules. + + Authors ------- @@ -177,3 +184,4 @@ 3: https://modules.readthedocs.io/en/stable/MIGRATING.html 4: https://modules.readthedocs.io/en/stable/NEWS.html 5: https://modules.readthedocs.io/en/stable/changes.html +6: CODE_OF_CONDUCT.md
View file
_service:tar_scm:modules-5.0.1.tar.bz2/configure -> _service:tar_scm:modules-5.1.1.tar.bz2/configure
Changed
@@ -1,7 +1,7 @@ #!/usr/bin/env bash # # CONFIGURE, check requirements then set variables and create Makefiles -# Copyright (C) 2017-2021 Xavier Delaruelle +# Copyright (C) 2017-2022 Xavier Delaruelle # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -38,7 +38,8 @@ searchmatch modulepath loadedmodules quarantinevars wa277 advversspec ml \ windowssupport nearlyforbiddendays implicitrequirement tagabbrev \ tagcolorname mcookieversioncheck availoutput availterseoutput listoutput \ -listterseoutput editor variantshortcut" +listterseoutput editor variantshortcut bashcompletiondir fishcompletiondir \ +zshcompletiondir" libarglist= # flags to know if argument has been specified on command-line @@ -91,8 +92,8 @@ pageropts='-eFKRX' verbosity=normal color=y -darkbgcolors='hi=1:db=2:tr=2:se=2:er=91:wa=93:me=95:in=94:mp=1;94:di=94:al=96:va=93:sy=95:de=4:cm=92:aL=100:L=90;47:H=2:F=41:nF=43:S=46:sS=44' -lightbgcolors='hi=1:db=2:tr=2:se=2:er=31:wa=33:me=35:in=34:mp=1;34:di=34:al=36:va=33:sy=35:de=4:cm=32:aL=107:L=47:H=2:F=101:nF=103:S=106:sS=104' +darkbgcolors='hi=1:db=2:tr=2:se=2:er=91:wa=93:me=95:in=94:mp=1;94:di=94:al=96:va=93:sy=95:de=4:cm=92:aL=100:L=90;47:H=2:F=41:nF=43:S=46:sS=44:kL=30;48;5;109' +lightbgcolors='hi=1:db=2:tr=2:se=2:er=31:wa=33:me=35:in=34:mp=1;34:di=34:al=36:va=33:sy=35:de=4:cm=32:aL=107:L=47:H=2:F=101:nF=103:S=106:sS=104:kL=48;5;109' termbg=dark lockedconfigs= unloadmatchorder=returnlast @@ -114,7 +115,7 @@ modulepath= windowssupport=n nearlyforbiddendays=14 -tagabbrev='auto-loaded=aL:loaded=L:hidden=H:hidden-loaded=H:forbidden=F:nearly-forbidden=nF:sticky=S:super-sticky=sS' +tagabbrev='auto-loaded=aL:loaded=L:hidden=H:hidden-loaded=H:forbidden=F:nearly-forbidden=nF:sticky=S:super-sticky=sS:keep-loaded=kL' tagcolorname= mcookieversioncheck=y availoutput='modulepath:alias:dirwsym:sym:tag:key' @@ -123,6 +124,9 @@ listterseoutput='header' editor='vi' variantshortcut= +bashcompletiondir= +fishcompletiondir= +zshcompletiondir= # check if output/error channels are attached to terminal @@ -333,7 +337,7 @@ $unloadmatchorder --with-search-match=VALUE when searching for a module, query string should - match the begining of module name (\`starts_with') + match the beginning of module name (\`starts_with') or any part of module name (\`contains') $searchmatch --with-icase=VALUE apply a case insensitive match to module @@ -408,6 +412,12 @@ --with-tclinclude directory containing the Tcl header files. --with-python=BIN name or full path of Python interpreter command to use as shebang for helper scripts $PYTHON + --with-bashcompletiondir=DIR + Bash completions directory + --with-fishcompletiondir=DIR + Fish completions directory + --with-zshcompletiondir=DIR + Zsh completions directory Depending on the above configuration options the files are approximately placed in the following directory structure: @@ -756,6 +766,12 @@ loadedmodules=$(get_package_value "$arg") ;; --with-quarantine-vars=*|--without-quarantine-vars) quarantinevars=$(get_package_value "$arg") ;; + --with-bashcompletiondir=*|--without-bashcompletiondir) + bashcompletiondir=$(get_package_value "$arg" "") ;; + --with-fishcompletiondir=*|--without-fishcompletiondir) + fishcompletiondir=$(get_package_value "$arg" "") ;; + --with-zshcompletiondir=*|--without-zshcompletiondir) + zshcompletiondir=$(get_package_value "$arg" "") ;; --with-tcl=*|--without-tcl|--with-tclinclude=*|--without-tclinclude) libarglist+="$arg " ;; --with-python=*|--without-python) @@ -831,7 +847,7 @@ RMDIR_IGN_NON_EMPTY='rmdir' fi -# sed -E option may not be availble, use -r option otherwise +# sed -E option may not be available, use -r option otherwise if "$(echo foo | $SED_ERE 's|foo|bar|' 2>/dev/null)" != 'bar' ; then SED_ERE='sed -r' fi @@ -995,11 +1011,11 @@ # define libdir64 and libdir32 based on libdir if multilib support enabled if "$multilibsupport" = 'y' ; then case "$libdir" in - *64) + *64*) libdir64=$libdir ; - libdir32=${libdir%64} ;; + libdir32=${libdir/64} ;; *) - libdir64=${libdir}64 ; + libdir64=${libdir/lib/lib64} ; libdir32=$libdir ;; esac fi
View file
_service:tar_scm:modules-5.0.1.tar.bz2/contrib/guide/get_started/08-guide_modulefile_search-alias.sh -> _service:tar_scm:modules-5.1.1.tar.bz2/contrib/guide/get_started/08-guide_modulefile_search-alias.sh
Changed
@@ -3,5 +3,5 @@ cat <<EOF >>/apps/userenv/modules/applications/bar/.modulerc module-alias bar/subdir/last foo/1.6 -module-alias foo/lastest foo/1.6 +module-alias foo/latest foo/1.6 EOF
View file
_service:tar_scm:modules-5.0.1.tar.bz2/contrib/modulefiles/gnu -> _service:tar_scm:modules-5.1.1.tar.bz2/contrib/modulefiles/gnu
Changed
@@ -5,7 +5,7 @@ proc ModulesHelp { } { puts stderr "\tGNU Software\n" puts stderr "\tThe GNU software package contains a variety of UNIX programs like cp, ls, rm, etc. It also contains more powerful tools like tar, and emacs." - puts stderr "\tBe advised that if you have this module loaded before the 'system' module, that you will be using the GNU versions of common UNIX commands." + puts stderr "\tBe advised that if you have this module loaded before the 'system' module, you will be using the GNU versions of common UNIX commands." puts stderr "\tWebsite: http://www.gnu.org/" }
View file
_service:tar_scm:modules-5.0.1.tar.bz2/contrib/modulefiles/java/6/35 -> _service:tar_scm:modules-5.1.1.tar.bz2/contrib/modulefiles/java/6/35
Changed
@@ -14,7 +14,7 @@ if { string compare $sys "Darwin" != 0 } { -# OS independant +# OS independent append-path CLASSPATH /soft/java/JGL-3.1.0-for-JDK-1.1/lib/jgl3.1.0.jar append-path CLASSPATH . append-path CLASSPATH /soft/java/aspectj1.0/lib/aspectjrt.jar
View file
_service:tar_scm:modules-5.0.1.tar.bz2/contrib/modulefiles/java/6/38 -> _service:tar_scm:modules-5.1.1.tar.bz2/contrib/modulefiles/java/6/38
Changed
@@ -14,7 +14,7 @@ if { string compare $sys "Darwin" != 0 } { -# OS independant +# OS independent append-path CLASSPATH /soft/java/JGL-3.1.0-for-JDK-1.1/lib/jgl3.1.0.jar append-path CLASSPATH . append-path CLASSPATH /soft/java/aspectj1.0/lib/aspectjrt.jar
View file
_service:tar_scm:modules-5.0.1.tar.bz2/contrib/modulefiles/java/7/07 -> _service:tar_scm:modules-5.1.1.tar.bz2/contrib/modulefiles/java/7/07
Changed
@@ -14,7 +14,7 @@ if { string compare $sys "Darwin" != 0 } { -# OS independant +# OS independent append-path CLASSPATH /soft/java/JGL-3.1.0-for-JDK-1.1/lib/jgl3.1.0.jar append-path CLASSPATH . append-path CLASSPATH /soft/java/aspectj1.0/lib/aspectjrt.jar
View file
_service:tar_scm:modules-5.0.1.tar.bz2/contrib/modulefiles/java/7/11 -> _service:tar_scm:modules-5.1.1.tar.bz2/contrib/modulefiles/java/7/11
Changed
@@ -14,7 +14,7 @@ if { string compare $sys "Darwin" != 0 } { -# OS independant +# OS independent append-path CLASSPATH /soft/java/JGL-3.1.0-for-JDK-1.1/lib/jgl3.1.0.jar append-path CLASSPATH . append-path CLASSPATH /soft/java/aspectj1.0/lib/aspectjrt.jar
View file
_service:tar_scm:modules-5.0.1.tar.bz2/contrib/modulefiles/openwin -> _service:tar_scm:modules-5.1.1.tar.bz2/contrib/modulefiles/openwin
Changed
@@ -1,12 +1,12 @@ #%Module###################################################################### ## -## <module-name> Module +## OpenWindows Module ## proc ModulesHelp { } { - puts stderr "\tThe Openwin Module\n" + puts stderr "\tThe OpenWindows Module\n" puts stderr "\tThis module sets paths and other environment variables\n" - puts stderr "\tthat allow you to use the openwindows enironment and\n" - puts stderr "\topenwindows based programs. Available on Sun Workstations.\n" + puts stderr "\tthat allow you to use the OpenWindows environment and\n" + puts stderr "\tOpenWindows based programs. Available on Sun Workstations.\n" puts stderr "\tFor more info: http://docs.sun.com/db/doc/806-2901\n" }
View file
_service:tar_scm:modules-5.0.1.tar.bz2/contrib/modulefiles/scheme/racket/5.0.2 -> _service:tar_scm:modules-5.1.1.tar.bz2/contrib/modulefiles/scheme/racket/5.0.2
Changed
@@ -3,7 +3,7 @@ ## GNU Module ## proc ModulesHelp { } { - puts stderr "\tRacket (forermly Dr Scheme) is an interactive, integrated,\n" + puts stderr "\tRacket (formerly Dr Scheme) is an interactive, integrated,\n" puts stderr "\tgraphical programming environment for Scheme.\n" puts stderr "\tIt is available on all machines in CS and IT. To use it,\n" puts stderr "\tload this module and type: drracket\n"
View file
_service:tar_scm:modules-5.0.1.tar.bz2/contrib/readme.txt -> _service:tar_scm:modules-5.1.1.tar.bz2/contrib/readme.txt
Changed
@@ -1,11 +1,11 @@ -Brief overview of whats here: +Brief overview of what's here: template: contains a template user we use at the University of - Minnesota. It has initalization files for both bash + Minnesota. It has initialization files for both bash and tcsh. modulefiles: contains the basic modulefiles we use at the University of Minnesota, for our template user. These are not being - kept upto date, but they are some simple examples to get + kept up to date, but they are some simple examples to get you started. scripts:
View file
_service:tar_scm:modules-5.1.1.tar.bz2/contrib/rpm/environment-modules.rpmlintrc
Added
@@ -0,0 +1,2 @@ +# generic environment(modules) provides statement +addFilter("W: unversioned-explicit-provides environment\(modules\)")
View file
_service:tar_scm:modules-5.0.1.tar.bz2/contrib/rpm/environment-modules.spec -> _service:tar_scm:modules-5.1.1.tar.bz2/contrib/rpm/environment-modules.spec
Changed
@@ -2,13 +2,13 @@ %global vimdatadir %{_datadir}/vim/vimfiles Name: environment-modules -Version: 5.0.1 +Version: 5.1.1 Release: 1%{?dist} Summary: Provides dynamic modification of a user's environment License: GPLv2+ URL: http://modules.sourceforge.net/ -Source0: http://downloads.sourceforge.net/modules/modules-5.0.1.tar.bz2 +Source0: http://downloads.sourceforge.net/modules/modules-5.1.1.tar.bz2 BuildRequires: tcl BuildRequires: dejagnu @@ -39,11 +39,7 @@ Requires(post): coreutils Requires(post): %{_sbindir}/update-alternatives Requires(postun): %{_sbindir}/update-alternatives -%if 0%{?fedora} Provides: environment(modules) -%else -Provides: environment-modules -%endif Obsoletes: modules-tcl <= 1.923 Obsoletes: environment-modules-compat <= 4.8.99 @@ -73,7 +69,7 @@ %prep -%setup -q -n modules-5.0.1 +%setup -q -n modules-5.1.1 %build @@ -84,12 +80,15 @@ %endif %configure --prefix=%{_datadir}/Modules \ - --libdir=%{_libdir} \ + --libdir=%{_libdir}/%{name} \ --etcdir=%{_sysconfdir}/%{name} \ --bindir=%{_datadir}/Modules/bin \ --libexecdir=%{_datadir}/Modules/libexec \ --mandir=%{_mandir} \ --vimdatadir=%{vimdatadir} \ + --with-bashcompletiondir=%{_datadir}/bash-completion/completions \ + --with-fishcompletiondir=%{_datadir}/fish/vendor_completions.d \ + --with-zshcompletiondir=%{_datadir}/zsh/site-functions \ --enable-multilib-support \ --disable-doc-install \ --enable-modulespath \ @@ -188,13 +187,22 @@ %{_bindir}/modulecmd %endif %{_bindir}/envml -%{_libdir}/libtclenvmodules.so +%dir %{_libdir}/%{name} +%{_libdir}/%{name}/libtclenvmodules.so %dir %{_datadir}/Modules %{_datadir}/Modules/bin %dir %{_datadir}/Modules/libexec %{_datadir}/Modules/libexec/modulecmd.tcl %dir %{_datadir}/Modules/init %{_datadir}/Modules/init/* +# do not need to require shell package as we "own" completion dir +%dir %{_datadir}/bash-completion/completions +%{_datadir}/bash-completion/completions/module +%{_datadir}/bash-completion/completions/ml +%dir %{_datadir}/zsh/site-functions +%{_datadir}/zsh/site-functions/_module +%dir %{_datadir}/fish/vendor_completions.d +%{_datadir}/fish/vendor_completions.d/module.fish %dir %{_sysconfdir}/%{name} %config(noreplace) %{_sysconfdir}/%{name}/initrc %config(noreplace) %{_sysconfdir}/%{name}/modulespath @@ -211,6 +219,14 @@ %changelog +* Tue May 31 2022 Xavier Delaruelle <xavier.delaruelle@cea.fr> - 5.1.1-1 +- Update to 5.1.1 +- Move libtclenvmodules in an environment-modules directory under libdir + +* Sat Apr 30 2022 Xavier Delaruelle <xavier.delaruelle@cea.fr> - 5.1.0-1 +- Update to 5.1.0 +- Install shell completion scripts in system-wide shell-specific locations + * Sat Oct 16 2021 Xavier Delaruelle <xavier.delaruelle@cea.fr> - 5.0.1-1 - Update to 5.0.1 @@ -245,7 +261,7 @@ * Wed Sep 16 2020 Xavier Delaruelle <xavier.delaruelle@cea.fr> - 4.6.0-1 - Update to 4.6.0 - Enable multilib support -- Specifically enable compatiblity version build to make compat package +- Specifically enable compatibility version build to make compat package * Mon Aug 31 2020 Xavier Delaruelle <xavier.delaruelle@cea.fr> - 4.5.3-1 - Update to 4.5.3 @@ -336,7 +352,7 @@ * Mon Sep 25 2017 Xavier Delaruelle <xavier.delaruelle@cea.fr> - 4.0.0-0.1.beta - Update to 4.0.0-beta -- Define compat subpackage to provide 3.2 compatiblity version also +- Define compat subpackage to provide 3.2 compatibility version also provided in source tarball - Add condition statements to either build on Fedora and EL systems
View file
_service:tar_scm:modules-5.0.1.tar.bz2/contrib/rpm/environment-modules.spec.in -> _service:tar_scm:modules-5.1.1.tar.bz2/contrib/rpm/environment-modules.spec.in
Changed
@@ -2,7 +2,7 @@ %global vimdatadir %{_datadir}/vim/vimfiles Name: environment-modules -Version: 5.0.1 +Version: 5.1.1 Release: @MODULES_RPM_RELEASE@%{?dist} Summary: Provides dynamic modification of a user's environment @@ -39,11 +39,7 @@ Requires(post): coreutils Requires(post): %{_sbindir}/update-alternatives Requires(postun): %{_sbindir}/update-alternatives -%if 0%{?fedora} Provides: environment(modules) -%else -Provides: environment-modules -%endif Obsoletes: modules-tcl <= 1.923 Obsoletes: environment-modules-compat <= 4.8.99 @@ -84,12 +80,15 @@ %endif %configure --prefix=%{_datadir}/Modules \ - --libdir=%{_libdir} \ + --libdir=%{_libdir}/%{name} \ --etcdir=%{_sysconfdir}/%{name} \ --bindir=%{_datadir}/Modules/bin \ --libexecdir=%{_datadir}/Modules/libexec \ --mandir=%{_mandir} \ --vimdatadir=%{vimdatadir} \ + --with-bashcompletiondir=%{_datadir}/bash-completion/completions \ + --with-fishcompletiondir=%{_datadir}/fish/vendor_completions.d \ + --with-zshcompletiondir=%{_datadir}/zsh/site-functions \ --enable-multilib-support \ --disable-doc-install \ --enable-modulespath \ @@ -188,13 +187,22 @@ %{_bindir}/modulecmd %endif %{_bindir}/envml -%{_libdir}/libtclenvmodules.so +%dir %{_libdir}/%{name} +%{_libdir}/%{name}/libtclenvmodules.so %dir %{_datadir}/Modules %{_datadir}/Modules/bin %dir %{_datadir}/Modules/libexec %{_datadir}/Modules/libexec/modulecmd.tcl %dir %{_datadir}/Modules/init %{_datadir}/Modules/init/* +# do not need to require shell package as we "own" completion dir +%dir %{_datadir}/bash-completion/completions +%{_datadir}/bash-completion/completions/module +%{_datadir}/bash-completion/completions/ml +%dir %{_datadir}/zsh/site-functions +%{_datadir}/zsh/site-functions/_module +%dir %{_datadir}/fish/vendor_completions.d +%{_datadir}/fish/vendor_completions.d/module.fish %dir %{_sysconfdir}/%{name} %config(noreplace) %{_sysconfdir}/%{name}/initrc %config(noreplace) %{_sysconfdir}/%{name}/modulespath @@ -211,6 +219,14 @@ %changelog +* Tue May 31 2022 Xavier Delaruelle <xavier.delaruelle@cea.fr> - 5.1.1-1 +- Update to 5.1.1 +- Move libtclenvmodules in an environment-modules directory under libdir + +* Sat Apr 30 2022 Xavier Delaruelle <xavier.delaruelle@cea.fr> - 5.1.0-1 +- Update to 5.1.0 +- Install shell completion scripts in system-wide shell-specific locations + * Sat Oct 16 2021 Xavier Delaruelle <xavier.delaruelle@cea.fr> - 5.0.1-1 - Update to 5.0.1 @@ -245,7 +261,7 @@ * Wed Sep 16 2020 Xavier Delaruelle <xavier.delaruelle@cea.fr> - 4.6.0-1 - Update to 4.6.0 - Enable multilib support -- Specifically enable compatiblity version build to make compat package +- Specifically enable compatibility version build to make compat package * Mon Aug 31 2020 Xavier Delaruelle <xavier.delaruelle@cea.fr> - 4.5.3-1 - Update to 4.5.3 @@ -336,7 +352,7 @@ * Mon Sep 25 2017 Xavier Delaruelle <xavier.delaruelle@cea.fr> - 4.0.0-0.1.beta - Update to 4.0.0-beta -- Define compat subpackage to provide 3.2 compatiblity version also +- Define compat subpackage to provide 3.2 compatibility version also provided in source tarball - Add condition statements to either build on Fedora and EL systems
View file
_service:tar_scm:modules-5.0.1.tar.bz2/contrib/vim/syntax/modulefile.vim -> _service:tar_scm:modules-5.1.1.tar.bz2/contrib/vim/syntax/modulefile.vim
Changed
@@ -27,13 +27,19 @@ " Modulefile commands: https://modules.readthedocs.io/en/stable/modulefile.html syn match modCommand "\v<(append|prepend|remove)-path>" -syn match modCommand "\v<prereq>" +syn match modCommand "\v<(prereq|prereq-all|prereq-any)>" syn match modCommand "\v<(module|conflict|chdir|prereq)>" syn match modCommand "\v<module-(alias|forbid|hide|info|log|tag|trace|user|verbosity|version|virtual|whatis)>" syn match modCommand "\v<(un)?set-(alias|function)>" syn match modCommand "\v<(un)?setenv>" +syn match modCommand "\v<(un)?complete>" syn match modCommand "\v<get(env|variant)>" syn match modCommand "\v<source-sh>" +syn match modCommand "\v<require-filename>" +syn match modCommand "\v<depends-on>" +syn match modCommand "\v<family>" +syn match modCommand "\v<pushenv>" +syn match modCommand "\v<always-load>" syn match modCommand "\v<(system|uname|x-resource)>" syn match modCommand "\v<variant>"
View file
_service:tar_scm:modules-5.0.1.tar.bz2/doc/build/CONTRIBUTING.txt -> _service:tar_scm:modules-5.1.1.tar.bz2/doc/build/CONTRIBUTING.txt
Changed
@@ -71,6 +71,17 @@ * Push your commits to GitHub and create a pull request. +Design notes +------------ + +See the Design notes for recent feature specifications. You may also +find there some development howtos: + +* Add new module sub-command + +* Add new configuration option + + Running the tests ----------------- @@ -132,11 +143,33 @@ setState already_report 1 } +* No trailing space nor misspelling + + +Commit hooks +------------ + +A **pre-commit** hook script is provided in the "script" directory of +the project to help you check that the contribution made is free of +misspellings and trailing spaces. It requires the codespell utility +that checks for typos in any kind of files and the Aspell utility that +spell checks documentation files. The **pre-commit** could be enabled +in your local repository with following command: + + ln -s ../../script/pre-commit .git/hooks/pre-commit + +A **commit-msg** hook script is also provided in the "script" +directory of the project to help you check that your commit messages +are free of misspellings. It requires the Aspell utility and could be +enabled in your local repository with following command: + + ln -s ../../script/commit-msg .git/hooks/commit-msg + Emacs settings for coding conventions ------------------------------------- -This is an example emacs configuration that adheres to the first two +This is an example Emacs configuration that adheres to the first two coding conventions. You may wish to add this to your ".emacs" or ".emacs.d/" to modify your tcl-mode:
View file
_service:tar_scm:modules-5.0.1.tar.bz2/doc/build/INSTALL.txt -> _service:tar_scm:modules-5.1.1.tar.bz2/doc/build/INSTALL.txt
Changed
@@ -71,8 +71,8 @@ For instance to download then unpack the last release of Modules: - $ curl -LJO https://github.com/cea-hpc/modules/releases/download/v5.0.1/modules-5.0.1.tar.gz - $ tar xfz modules-5.0.1.tar.gz + $ curl -LJO https://github.com/cea-hpc/modules/releases/download/v5.1.1/modules-5.1.1.tar.gz + $ tar xfz modules-5.1.1.tar.gz Installation instructions @@ -229,6 +229,10 @@ recommended over directly modifying the shell initialization scripts. +See the Configuration options section to discover all Modules "config" +options available, their default value and the installation options +linked to them. + If you go through the above steps you should have a valid setup tuned to your needs. After that you still have to write modulefiles to get something to load and unload in your newly configured Modules setup. @@ -263,6 +267,11 @@ module aliases, virtual modules or module properties such as tags, forbidding rules, etc. + Note: + + Run-command files are intended to set parameters for modulefiles, + not to configure the **module** command itself. + To learn more about siteconfig and run-command files, see the Modulecmd startup section in module reference manual. You may also look at the available setup recipes to get concrete deployment @@ -278,7 +287,7 @@ options by typing "./configure --help". Fine tuning of the installation directories (the default value for -each option is displayed within brakets): +each option is displayed within brackets): --bindir=DIR @@ -340,6 +349,10 @@ version constraint prefixed by the "@" character. This option also allows to specify module variants. (default=yes) + This installation option defines the default value of the + "advanced_version_spec" configuration option which could be changed + after installation with the "config" sub-command. + --enable-append-binpath Append rather prepend binary directory to the PATH environment @@ -358,6 +371,10 @@ handling actions, like loading the pre-requisites of a modulefile when loading this modulefile. (default=yes) + This installation option defines the default value of the + "auto_handling" configuration option which could be changed after + installation with the "config" sub-command. + --enable-avail-indepth When performing an "avail" sub-command, include in search results @@ -367,12 +384,20 @@ and directories found at the depth level expressed by the search query if disabled. (default=yes) + This installation option defines the default value of the + "avail_indepth" configuration option which could be changed after + installation with the "config" sub-command. + --enable-color Control if output should be colored by default or not. A value of "yes" equals to the "auto" color mode. "no" equals to the "never" color mode. (default=yes) + This installation option defines the default value of the "color" + configuration option which could be changed after installation with + the "config" sub-command. + --enable-doc-install Install the documentation files in the documentation directory @@ -394,6 +419,10 @@ substring separated from the rest of the version string by a "." character. (default=yes) + This installation option defines the default value of the + "extended_default" configuration option which could be changed + after installation with the "config" sub-command. + --enable-implicit-default Define an implicit default version, for modules with none @@ -403,12 +432,20 @@ evaluation should be fully qualified elsewhere an error is returned. (default=yes) + This installation option defines the default value of the + "implicit_default" configuration option which could be changed + after installation with the "config" sub-command. + --enable-implicit-requirement Implicitly define a prereq or a conflict requirement toward modules specified respectively on "module load" or "module unload" commands in modulefile. (default=yes) + This installation option defines the default value of the + "implicit_requirement" configuration option which could be changed + after installation with the "config" sub-command. + --enable-libtclenvmodules Build and install the Modules Tcl extension library which provides @@ -417,15 +454,23 @@ --enable-mcookie-version-check Enable check of the version specified right after Modules magic - cookie ("#%Module") in modulefiles, which defines the minimal - version of the Modules tool to use in order to evaluate the - modulefile. (default=yes) + cookie (i.e., "#%Module" file signature) in modulefiles, which + defines the minimal version of the Modules tool to use in order to + evaluate the modulefile. (default=yes) + + This installation option defines the default value of the + "mcookie_version_check" configuration option which could be changed + after installation with the "config" sub-command. --enable-ml Define the **ml** command, a handy frontend to the module command, when Modules initializes. (default=yes) + This installation option defines the default value of the "ml" + configuration option which could be changed after installation with + the "config" sub-command. + --enable-modulespath, --enable-dotmodulespath Set the module paths defined by "--with-modulepath" option in a @@ -453,6 +498,10 @@ Generate code in module function definition to add support for the environment variable quarantine mechanism (default=no) + This installation option defines the default value of the + "quarantine_support" configuration option which could be changed + after installation with the "config" sub-command. + --enable-set-binpath Prepend binary directory defined by the "--bindir" option to the @@ -471,11 +520,19 @@ ensure that the module function is still defined in sub-shells. (default=no) + This installation option defines the default value of the + "set_shell_startup" configuration option which could be changed + after installation with the "config" sub-command. + --enable-silent-shell-debug-support Generate code in module function definition to add support for silencing shell debugging properties (default=no) + This installation option defines the default value of the + "silent_shell_debug" configuration option which could be changed + after installation with the "config" sub-command. + --enable-versioning Append Modules version to installation prefix and deploy a @@ -497,6 +554,10 @@ issue but weakens shell evaluation of the code produced by modulefiles. (default=no) + This installation option defines the default value of the "wa_277" + configuration option which could be changed after installation with + the "config" sub-command. + --enable-windows-support Install all required files for Windows platform (**module**, **ml** @@ -516,6 +577,10 @@ in LIST does not matter. (default="modulepath:alias:dirwsym:sym:tag:key") + This installation option defines the default value of the + "avail_output" configuration option which could be changed after + installation with the "config" sub-command. + --with-avail-terse-output=LIST Specify the content to report on avail sub-command terse output in @@ -525,6 +590,17 @@ elements in LIST does not matter. (default="modulepath:alias:dirwsym:sym:tag") + This installation option defines the default value of the + "avail_terse_output" configuration option which could be changed + after installation with the "config" sub-command. + +--with-bashcompletiondir=DIR + + Directory for Bash completion scripts. When this option is not set + Bash completion script for Modules is installed in the + initialization script directory and is sourced from Modules Bash + initialization script. (default=) + --with-bin-search-path=PATHLIST List of paths to look at when searching the location of tools @@ -554,20 +630,36 @@ get a graphical rendering. Each basic tag has by default a key set in the color palette, based on its abbreviated string: auto-loaded ("aL"), forbidden ("F"), hidden and hidden-loaded ("H"), loaded - ("L"), nearly-forbidden ("nF"), sticky ("S") and super-sticky - ("sS"). + ("L"), nearly-forbidden ("nF"), sticky ("S"), super-sticky ("sS") + and keep-loaded ("kL"). For a complete SGR code reference, see https://en.wikipedia.org/wi ki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters. (de fault="hi=1:db=2:tr=2:se=2:er=91:wa=93:me=95:in=94:mp=1;94:di=94:a l=96:va=93:sy=95:de=4:cm=92:aL=100:L=90;47:H=2:F=41:nF=43:S=46:sS= - 44") + 44:kL=30;48;5;109") + + This installation option defines the default value of the "colors" + configuration option when "term_background" configuration option + equals "dark". "colors" could be changed after installation with + the "config" sub-command. --with-editor=BIN Name or full path of default editor program to use to open modulefile through the "edit" sub-command. (default="vi") + This installation option defines the default value of the "editor" + configuration option which could be changed after installation with + the "config" sub-command. + +--with-fishcompletiondir=DIR + + Directory for Fish completion scripts. When this option is not set + Fish completion script for Modules is installed in the + initialization script directory and is sourced from Modules Fish + initialization script. (default=) + --with-icase=VALUE Apply a case insensitive match to module specification on "avail", @@ -577,6 +669,10 @@ insensitive match is disabled when this option is set to "never". (default="search") + This installation option defines the default value of the "icase" + configuration option which could be changed after installation with + the "config" sub-command. + --with-initconf-in=VALUE Location where to install Modules initialization configuration @@ -588,7 +684,12 @@ to "light". Expect the same syntax than described for "--with-dark- background-colors". (default="hi=1:db=2:tr=2:se=2:er=31:wa=33:me=3 5:in=34:mp=1;34:di=34:al=36:va=33:sy=35:de=4:cm=32:aL=107:L=47:H=2 - :F=101:nF=103:S=106:sS=104") + :F=101:nF=103:S=106:sS=104:kL=48;5;109") + + This installation option defines the default value of the "colors" + configuration option when "term_background" configuration option + equals "light". "colors" could be changed after installation with + the "config" sub-command. --with-list-output=LIST @@ -598,6 +699,10 @@ LIST are separated by ":"). The order of the elements in LIST does not matter. (default="header:idx:variant:sym:tag:key") + This installation option defines the default value of the + "list_output" configuration option which could be changed after + installation with the "config" sub-command. + --with-list-terse-output=LIST Specify the content to report on list sub-command terse output in @@ -606,20 +711,28 @@ LIST are separated by ":"). The order of the elements in LIST does not matter. (default="header") + This installation option defines the default value of the + "list_terse_output" configuration option which could be changed + after installation with the "config" sub-command. + --with-loadedmodules=MODLIST Default modulefiles to load at Modules initialization time. Each modulefile in this list should be separated by ":". Defined value is registered in the "initrc" configuration file or in the "modulerc" file if "--with-initconf-in" is set to "initdir". - (default=no) + (default=) --with-locked-configs=CONFIGLIST Ignore environment variable superseding value for the listed configuration options. Accepted option names in CONFIGLIST are "extra_siteconfig" and "implicit_default" (each option name should - be separated by whitespace character). (default=no) + be separated by whitespace character). (default=) + + This installation option defines the default value of the + "locked_configs" configuration option which cannot not be changed + after installation. --with-modulepath=PATHLIST @@ -640,22 +753,38 @@ Location of the main Modules package file directory (default="PREFIX") + This installation option defines the default value of the "home" + configuration option which could be changed after installation with + the "config" sub-command. + --with-nearly-forbidden-days=VALUE Define the number of days a module is considered nearly forbidden prior reaching its expiry date. VALUE should be an integer comprised between 0 and 365. (default="14") + This installation option defines the default value of the + "nearly_forbidden_days" configuration option which could be changed + after installation with the "config" sub-command. + --with-pager=BIN Name or full path of default pager program to use to paginate informational message output (can be superseded at run-time by environment variable) (default="less") + This installation option and "--with-pager-opt" define the default + value of the "pager" configuration option which could be changed + after installation with the "config" sub-command. + --with-pager-opts=OPTLIST Settings to apply to default pager program (default="-eFKRX") + This installation option and "--with-pager" define the default + value of the "pager" configuration option which could be changed + after installation with the "config" sub-command. + --with-python=BIN Name or full path of Python interpreter command to set as shebang @@ -666,7 +795,12 @@ Environment variables to put in quarantine when running the module command to ensure it a sane execution environment (each variable should be separated by space character). A value can eventually be - set to a quarantine variable instead of emptying it. (default=no) + set to a quarantine variable instead of emptying it. (default=) + + This installation option defines the default value of the + "MODULES_RUN_QUARANTINE" and "MODULES_RUNENV_<VAR>" environment + variables which could be changed after installation with the + "config" sub-command on "run_quarantine" configuration option. --with-search-match=VALUE @@ -674,13 +808,21 @@ string against module name start ("starts_with") or any part of module name string ("contains"). (default="starts_with") + This installation option defines the default value of the + "search_match" configuration option which could be changed after + installation with the "config" sub-command. + --with-tag-abbrev=ABBRVLIST Define the abbreviation to use when reporting each module tag. Each element in ABBRVLIST is a tag name associated to an abbreviation string (elements in ABBRVLIST are separated by ":"). (default ="auto-loaded=aL:loaded=L:hidden=H:hidden-loaded=H:forbidden=F - :nearly-forbidden=nF:sticky=S:super-sticky=sS") + :nearly-forbidden=nF:sticky=S:super-sticky=sS:keep-loaded=kL") + + This installation option defines the default value of the + "tag_abbrev" configuration option which could be changed after + installation with the "config" sub-command. --with-tag-color-name=TAGLIST @@ -689,6 +831,10 @@ to. Each element in TAGLIST is a tag name or abbreviation (elements in TAGLIST are separated by ":"). (default=) + This installation option defines the default value of the + "tag_color_name" configuration option which could be changed after + installation with the "config" sub-command. + --with-tcl Directory containing the Tcl configuration script "tclConfig.sh". @@ -711,12 +857,20 @@ apply by default between the "dark" background colors or the "light" background colors (default="dark") + This installation option defines the default value of the + "term_background" configuration option which could be changed after + installation with the "config" sub-command. + --with-unload-match-order=VALUE When unloading a module if multiple loaded modules match the request, unload module loaded first ("returnfirst") or module loaded last ("returnlast") (default="returnlast") + This installation option defines the default value of the + "unload_match_order" configuration option which could be changed + after installation with the "config" sub-command. + --with-variant-shortcut=SHORTCUTLIST Define the shortcut characters that could be used to specify @@ -727,8 +881,163 @@ meaning (+~/@=-). Elements in SHORTCUTLIST are separated by ":". (default=) + This installation option defines the default value of the + "variant_shortcut" configuration option which could be changed + after installation with the "config" sub-command. + --with-verbosity=VALUE Specify default message verbosity. accepted values are "silent", "concise", "normal", "verbose", "verbose2", "trace", "debug" and "debug2". (default="normal") + + This installation option defines the default value of the + "verbosity" configuration option which could be changed after + installation with the "config" sub-command. + +--with-zshcompletiondir=DIR + + Directory for Zsh completion scripts. When this option is not set + Zsh completion script for Modules is installed in the + initialization script directory and "FPATH" is set in Zsh + initialization script to point to this location. (default=) + + +Configuration options +===================== + +Options available through the "config" sub-command are described +below. In addition to their default value, the related installation +option, environment variable and command-line switch are listed for +each configuration option. This table also describes if each +configuration option needs to be set prior or during Modules +initialization and if it can be modified after installation. + ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| Configuration option | Default value | Related installation option, environment | Set prior or | Cannot be | +| | | variable and command-line switch | during | altered | +| | | | initialization | | +|=====================================|================================================|================================================|================|=============| +| "advanced_version_spec" | "1" | "--enable-advanced-version-spec", | | | +| | | "MODULES_ADVANCED_VERSION_SPEC" | | | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "auto_handling" | "1" | "--enable-auto-handling", | | | +| | | "MODULES_AUTO_HANDLING", "--auto", "--no- | | | +| | | auto" | | | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "avail_indepth" | "1" | "--enable-avail-indepth", | | | +| | | "MODULES_AVAIL_INDEPTH", "--indepth", "--no- | | | +| | | indepth" | | | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "avail_output" | "modulepath:alias:dirwsym:sym:tag:key" | "--with-avail-output", "MODULES_AVAIL_OUTPUT", | | | +| | | "--output" | | | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "avail_terse_output" | "modulepath:alias:dirwsym:sym:tag" | "--with-avail-terse-output", | | | +| | | "MODULES_AVAIL_TERSE_OUTPUT", "--output" | | | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "collection_pin_version" | "0" | "MODULES_COLLECTION_PIN_VERSION" | | | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "collection_pin_tag" | "0" | "MODULES_COLLECTION_PIN_TAG" | | | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "collection_target" | *Unset by default* | "MODULES_COLLECTION_TARGET" | | | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "color" | "auto" | "--enable-color", "MODULES_COLOR", "--color" | | | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "colors" | hi=1:db=2:tr=2:se=2:er=91:wa=93:me=95:in=94:m | "--with-dark-background-colors", "--with- | | | +| | p=1;94:di=94:al=96:va=93 :sy=95:de=4:cm=92:aL | light-background-colors", "MODULES_COLORS" | | | +| | =100:L=90;47:H=2:F=41:nF=43:S=46:sS=44:kL=30; | | | | +| | 48;5 ;109 | | | | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "contact" | "root@localhost" | "MODULECONTACT" | | | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "extended_default" | "1" | "--enable-extended-default", | | | +| | | "MODULES_EXTENDED_DEFAULT" | | | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "editor" | "vi" | "--with-editor", "MODULES_EDITOR" | | | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "extra_siteconfig" | *Unset by default* | "MODULES_SITECONFIG" | | | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "home" | "/usr/share/Modules" | "--prefix", "--with-moduleshome", | | | +| | | "MODULESHOME" | | | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "icase" | "search" | "--with-icase", "MODULES_ICASE", "--icase" | | | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "ignored_dirs" | "CVS RCS SCCS .svn .git .SYNC .sos" | | | X | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "implicit_default" | "1" | "--enable-implicit-default", | | | +| | | "MODULES_IMPLICIT_DEFAULT" | | | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "implicit_requirement" | "1" | "--enable-implicit-requirement", | | | +| | | "MODULES_IMPLICIT_REQUIREMENT" | | | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "list_output" | "header:idx:variant:sym:tag:key" | "--with-list-output", "MODULES_LIST_OUTPUT", " | | | +| | | --output" | | | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "list_terse_output" | "header" | "--with-list-terse-output", | | | +| | | "MODULES_LIST_TERSE_OUTPUT", "--output" | | | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "locked_configs" | *Empty by default* | "--with-locked-configs" | | X | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "mcookie_check" | "always" | "MODULES_MCOOKIE_CHECK" | | | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "mcookie_version_check" | "1" | "--enable-mcookie-version-check", | | | +| | | "MODULES_MCOOKIE_VERSION_CHECK" | | | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "ml" | "1" | "--enable-ml", "MODULES_ML" | X | | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "nearly_forbidden_days" | "14" | "--with-nearly-forbidden-days", | | | +| | | "MODULES_NEARLY_FORBIDDEN_DAYS" | | | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "pager" | "less -eFKRX" | "--with-pager", "--with-pager-opts", | | | +| | | "MODULES_PAGER", "--paginate", " --no-pager" | | | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "quarantine_support" | "0" | "--enable-quarantine-support", | X | | +| | | "MODULES_QUARANTINE_SUPPORT" | | | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "rcfile" | *Unset by default* | "MODULERCFILE" | | | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "redirect_output" | "1" | "MODULES_REDIRECT_OUTPUT", "--redirect", "-- | | | +| | | no-redirect" | | | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "run_quarantine" | *Empty by default* | "--with-quarantine-vars", | | | +| | | "MODULES_RUN_QUARANTINE" | | | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "search_match" | "starts_with" | "--with-search-match", "MODULES_SEARCH_MATCH", | | | +| | | "--contains", "-- starts-with" | | | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "set_shell_startup" | "0" | "--enable-set-shell-startup", | X | | +| | | "MODULES_SET_SHELL_STARTUP" | | | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "shells_with_ksh_fpath" | *Empty by default* | "MODULES_SHELLS_WITH_KSH_FPATH" | X | | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "silent_shell_debug" | "0" | "--enable-silent-shell-debug-support", | X | | +| | | "MODULES_SILENT_SHELL_DEBUG" | | | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "siteconfig" | "/etc/environment-modules/siteconfig.tcl" | "--prefix", "--etcdir" | | X | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "tag_abbrev" | auto-loaded=aL:loaded=L:hidden=H:hidden- | "--with-tag-abbrev", "MODULES_TAG_ABBREV" | | | +| | loaded=H:forbidden=F:nearly- | | | | +| | forbidden=nF:sticky=S:super-sticky=sS:keep- | | | | +| | loaded=kL | | | | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "tag_color_name" | *Empty by default* | "--with-tag-color-name", | | | +| | | "MODULES_TAG_COLOR_NAME" | | | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "tcl_ext_lib" | "/usr/share/Modules/lib64/libtclenvmodules.so" | | | X | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "term_background" | "dark" | "--with-terminal-background", | | | +| | | "MODULES_TERM_BACKGROUND" | | | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "term_width" | "0" | "MODULES_TERM_WIDTH", "--width" | | | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "unload_match_order" | "returnlast" | "--with-unload-match-order", | | | +| | | "MODULES_UNLOAD_MATCH_ORDER" | | | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "variant_shortcut" | *Empty by default* | "--with-variant-shortcut", | | | +| | | "MODULES_VARIANT_SHORTCUT" | | | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "verbosity" | "normal" | "--with-verbosity", "MODULES_VERBOSITY", "-- | | | +| | | debug", "--silent", "-- trace", "--verbose" | | | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+ +| "wa_277" | "1" | "--enable-wa-277", "MODULES_WA_277" | X | | ++-------------------------------------+------------------------------------------------+------------------------------------------------+----------------+-------------+
View file
_service:tar_scm:modules-5.0.1.tar.bz2/doc/build/MIGRATING.txt -> _service:tar_scm:modules-5.1.1.tar.bz2/doc/build/MIGRATING.txt
Changed
@@ -6,6 +6,299 @@ behaviors that will be encountered when upgrading. +v5.1 +==== + +This new version is backward-compatible with previous version 5 +release. It fixes bugs but also introduces new functionalities that +are described in this section. See the 5.1 release notes for a +complete list of the changes between Modules v5.0 and v5.1. + + +Control output redirection +-------------------------- + +Since version 4.0, the **module** function is initialized differently +on *sh*, *bash*, *ksh*, *zsh* and *fish* shells when their session is +found interactive. In such situation **module** redirects its output +from *stderr* to *stdout*. Once initialized the redirection behavior +is inherited in sub-sessions. + +The "redirect_output" configuration option is introduced in version +5.1, to supersede the default behavior set at initialization time. + + $ module load unknown >/dev/null + $ module config redirect_output 0 + $ module load unknown >/dev/null + ERROR: Unable to locate a modulefile for 'unknown' + +The "--redirect" and "--no-redirect" command-line switches are also +added to change the output redirection behavior for a single command: + + $ module load unknown --redirect >/dev/null + $ module load unknown --no-redirect >/dev/null + ERROR: Unable to locate a modulefile for 'unknown' + + +Change modulefile command behavior +---------------------------------- + +Depending on the evaluation mode of the modulefile (e.g. *load*, +*unload*, *display*, etc) commands have different behavior. Most +common example is the "setenv" command that sets an environment +variable when modulefile is loaded and unsets it when it is unloaded. +A different behavior may be wished sometimes for commands. This is why +options are introduced for some modulefile commands to control what +happens on particular evaluation mode. + +The "--return-value" option is added to the "getenv" and "getvariant" +modulefile commands to ensure that the value of the designated +environment variable or variant is returned even if modulefile is +evaluated in *display* mode: + + $ cat /path/to/modulefiles/foo/1.0 + #%Module5.1 + if {getenv --return-value VAR eq {}} { + setenv VAR value + } + $ module display foo/1.0 + ------------------------------------------------------------------- + /path/to/modulefiles/foo/1.0: + + setenv VAR value + ------------------------------------------------------------------- + +"--remove-on-unload", "--append-on-unload", "--prepend-on-unload" and +"--noop-on-unload" options are added to the "remove-path" and "module +unuse" modulefile commands to control the behavior applied when +modulefile is unloaded. With these options it is possible for instance +to restore the paths unset at load time or to set other paths: + + $ module display bar/1.0 + ------------------------------------------------------------------- + /path/to/modulefiles/bar/1.0: + + module unuse --prepend-on-unload /path/to/dir1 + module use /path/to/dir2 + ------------------------------------------------------------------- + $ module use + Search path for module files (in search order): + /path/to/dir1 + /path/to/modulefiles + $ module bar/1.0 + $ module use + Search path for module files (in search order): + /path/to/dir2 + /path/to/modulefiles + $ module unload bar/1.0 + $ module use + Search path for module files (in search order): + /path/to/dir1 + /path/to/modulefiles + +Following the same trend, the "--unset-on-unload" and "--noop-on- +unload" options are added to the "unsetenv" modulefile command to be +able to choose between unsetting variable, setting a value or +performing no operation when modulefile is unloaded. + + +Reducing number of I/O operations +--------------------------------- + +A new configuration option named "mcookie_check" is introduced to +control the verification made to files to determine if they are +modulefiles. By default this configuration option is set to "always" +and when searching for modulefiles within enabled modulepaths each +file below these directories is opened to check if it starts with the +Modules magic cookie (i.e., "#%Module" file signature). + +These historical checks lead to a large number of I/O operations on +large module setup like in the below example where a total of 1098 +modulefiles are available: + + $ module -o "" avail -t | wc -l + 1098 + $ module config mcookie_check always + $ strace -f -e open,openat,read,close -c $MODULES_CMD bash avail + ... + % time seconds usecs/call calls errors syscall + ------ ----------- ----------- --------- --------- ---------------- + 44.29 0.044603 25 1734 166 open + 34.15 0.034389 16 2056 close + 11.87 0.011949 24 483 5 openat + 9.69 0.009761 4 2146 read + ------ ----------- ----------- --------- --------- ---------------- + 100.00 0.100702 6419 171 total + +For each file, 3 I/O operations ("open", "read" and "close") are +achieved to determine if it is a modulefile and include it in search +results. When modulefiles are located in a shared filesystem +concurrently accessed by hundreds of users, a "module avail" command +may take some time to finish. + +When setting the "mcookie_check" configuration option to the "eval" +value, files are not checked anymore when searching for modulefiles, +only when evaluating them. All files under modulepaths are considered +modulefiles, so the content of these directories must be carefully +checked to use this "mcookie_check" mode which lead to a significant +reduction of I/O operations: + + $ module config mcookie_check eval + $ strace -f -e open,openat,read,close -c $MODULES_CMD bash avail + ... + % time seconds usecs/call calls errors syscall + ------ ----------- ----------- --------- --------- ---------------- + 30.56 0.013717 14 944 close + 28.76 0.012911 21 612 156 open + 26.41 0.011857 24 483 5 openat + 14.26 0.006403 6 1034 read + ------ ----------- ----------- --------- --------- ---------------- + 100.00 0.044888 3073 161 total + +A substantial reduction of execution time may be noticed depending on +the storage setup used to host the modulepath directories. A special +care should be given to the content of these directories to ensure +they only contain modulefiles (see "MODULES_MCOOKIE_CHECK"). + +See the Reduce I/O load cookbook recipe to learn additional features +of Modules that could be leveraged to lower the number of I/O +operations. + + +Shell command completion +------------------------ + +New modulefile commands "complete" and "uncomplete" are added to get +the ability to respectively define and unset command completion. +*bash*, *tcsh* and *fish* shells are supported. + + > module display foo + ------------------------------------------------------------------- + /path/to/modulefiles/foo/1.0: + + append-path PATH /path/to/foo-1.0/bin + complete fish foo {-s V -l version --description 'Command version'} + complete fish foo {-s h -l help --description 'Command help'} + ------------------------------------------------------------------- + > module load foo + > foo -<TAB> + -h --help (Command help) -V --version (Command version) + +"sh-to-mod" sub-command and "source-sh" modulefile command have also +been updated to track shell completion changes. + + $ module sh-to-mod bash /path/to/foo-1.0/share/setup-env.sh + #%Module + complete bash foo {-o default -F _foo} + append-path PATH /path/to/foo-1.0/bin + set-function _foo { + ...bash completion code...} + + +Lmod Tcl modulefile support +--------------------------- + +With this new version, Modules now supports Tcl modulefiles written +for Lmod, the alternative **module** implementation developed in Lua. +Such modulefiles can be safely evaluated by Modules without raising +error. + +Support has been added for the following modulefile commands +introduced by Lmod: "depends-on", "prereq-any", "always-load", "module +load-any", "pushenv", "require-fullname" and "family". + +The Compatibility with Lmod Tcl modulefile section in the modulefile +man page describes the differences existing between the two +implementations. + +Note that when processing a "family" command, the "LMOD_FAMILY_<NAME>" +environment variable is defined by Modules to be compatible with +existing modulefiles or scripts relying on such variable. + + +More tagging capabilities +------------------------- + +The new "--tag" option helps to define extra tags onto a loading +module. These tags comes in addition to those inherited from the +module state or those associated with the "module-tag" modulefile +command. + +The "--tag" option is available on "load", "load-any", "switch" and +"try-load" sub-commands and on "always-load", "depends-on", "module", +"prereq", "prereq-all" and "prereq-any" modulefile commands. + +Informational messages of module evaluation have been updated to +mention in module denomination the tags applying to it, as it is done +in "list" sub-command output: + + $ module load -v --tag=sticky:bar foo/1.0 + Loading foo/1.0 <bar> + +In case the designated module is already loaded, the additional tags +are added to the list of tags already applied to this module. + + $ module list + Currently Loaded Modulefiles: + 1) foo/1.0 + $ module load -v --tag=sticky:bar foo/1.0 + Tagging foo/1.0 <bar> + +The "keep-loaded" tag is introduced in this version. It avoids an +auto-loaded module to get automatically unloaded when its dependent +modules are unloaded. This new tag can be set with the "module-tag" +modulefile command or when module is loaded with the "always-load" +modulefile command. Default "tag_abbrev" configuration option has been +updated to add the "kL" abbreviation for "keep-loaded" tag. Default +dark and light color palettes have been updated too. + + $ module show bar/1.0 + ------------------------------------------------------------------- + /path/to/modulefiles/bar/1.0: + + always-load foo/1.0 + ------------------------------------------------------------------- + $ module load bar/1.0 + Loading bar/1.0 + Loading requirement: foo/1.0 + $ module unload bar/1.0 + $ module list + Currently Loaded Modulefiles: + 1) foo/1.0 + + Key: + auto-loaded keep-loaded + +When saving a collection, the tags defined with "--tag" option are +recorded to set them again when collection is restored. Tags resulting +from module load state, like "auto-loaded" and "keep-loaded", are also +recorded. + + $ module load --tag=sticky bar/1.0 + Loading bar/1.0 + Loading requirement: foo/1.0 + $ module save + $ module saveshow + ------------------------------------------------------------------- + /home/user/.module/default: + + module use --append /path/to/modulefiles + module load --tag=auto-loaded:keep-loaded foo + module load --tag=sticky bar + + ------------------------------------------------------------------- + +The "collection_pin_tag" configuration option is added to record in +collection all tags set on loaded modules. This configuration option +is disabled by default. + +Note: + + Collection saved now starts with a "#%Module5.1" file signature if " + --tag" option is recorded in it. Such collection could only be + handled by Modules version 5.1 and above. + + v5.0 ==== @@ -116,10 +409,11 @@ "modulespath". When both files exist, now they are both evaluated instead of just the "modulespath" file. -Module magic cookie (i.e., "#%Module") is now required at the start of -"initrc". An error is produced if the magic cookie is missing or if -the optional version number placed after the cookie string is higher -than the version of the "modulecmd.tcl" script in use. +Modules magic cookie (i.e., "#%Module" file signature) is now required +at the start of "initrc". An error is produced if the magic cookie is +missing or if the optional version number placed after the cookie +string is higher than the version of the "modulecmd.tcl" script in +use. Note that "initrc" configuration file can host more than "module use" and "module load" commands. **module** configuration can also be @@ -389,7 +683,7 @@ $ module show foo/2.1 toolchain=c ------------------------------------------------------------------- - /path/to/modulfiles/foo/2.1: + /path/to/modulefiles/foo/2.1: variant toolchain a b c prereq bar@1.2 toolchain={toolchain} @@ -645,7 +939,7 @@ Sticky modules -------------- -Module stickyness is introduced, in a similar fashion than on the Lmod +Module stickiness is introduced, in a similar fashion than on the Lmod project, to allow to glue modules to the loaded environment. A sticky module cannot be unloaded, unless if the unload action is forced or if the module reloads after being unloaded. @@ -697,9 +991,9 @@ applies. If colored output is disabled a tag abbreviation is reported along module designation (respectively "S" and "sS"). -In case the stickyness applies to the generic module name (and does +In case the stickiness applies to the generic module name (and does not target a specific module version or version-set), one version of -the sticky or super-sticty module can be swapped by another version of +the sticky or super-sticky module can be swapped by another version of this same module: $ cat mp/baz/.modulerc @@ -2173,10 +2467,10 @@ Express Modules compatibility of modulefile with versioned magic cookie ----------------------------------------------------------------------- -Any modulefile should start with the "#%Module" magic cookie and -sometimes a version number may be placed right after this string. -Until now this version number corresponded to a modulefile format -version but it was never checked. +Any modulefile should start with the "#%Module" file signature (also +called the Modules magic cookie) and sometimes a version number may be +placed right after this string. Until now this version number +corresponded to a modulefile format version but it was never checked. Starting with this new Modules release, this version number reflects the minimum version of Modules required to interpret the modulefile. @@ -2208,7 +2502,7 @@ HINT: the following module must be loaded first: bar/4.5 In addition, foreground "load", "unload", "switch" and "restore" -actions (ie. asked on the command-line) now report a summary of the +actions (i.e., asked on the command-line) now report a summary of the additional load and unload evaluations that were eventually triggered in the process:
View file
_service:tar_scm:modules-5.0.1.tar.bz2/doc/build/NEWS.txt -> _service:tar_scm:modules-5.1.1.tar.bz2/doc/build/NEWS.txt
Changed
@@ -6,6 +6,345 @@ admins. +Modules 5.1.1 (2022-05-31) +========================== + +* Install: add **rpmlint** rc configuration file to filter false + positive warning messages. + +* Install: better guess "libdir64" and "libdir32" directory locations + when "libdir" does not end with *64* but contains *64*. + +* Install: update RPM spec file to move libtclenvmodules in an + environment-modules directory under "libdir". + +* Fix rendering of loading or unloading module designation when + configured color palette does not set the "hi" color key. (fix issue + #455) + +* Remove the *already loaded* message displayed when verbosity level + is higher or equal to "verbose2" if new tags are applied to the + loaded module. (fix issue #456) + +* Report a global known error when current working directory cannot be + retrieved due to the removal of this directory. (fix issue #457) + +* Update tags set through "prereq" command on all already loaded + requirements. (fix issue #459) + +* Update module designation with the tags set by reloading dependent + module. (fix issue #460) + +* Install: include the "lib/config.guess" and "lib/config.sub" scripts + in distribution tarball if generated by **autoreconf**. + +* Install: call "git" command in "Makefile" only if the definitions of + "version.inc" need to get built or refreshed. + + +Modules 5.1.0 (2022-04-30) +========================== + +* Allow to declare "variant" with no list of accepted value. Such + variant accepts any value specified. (fix issue #405) + +* Add the "redirect_output" configuration option to control on *sh*, + *bash*, *ksh*, *zsh* and *fish* shells whether or not the output of + the **module** function should be redirected from stderr to stdout. + When set, "redirect_output" defines "MODULES_REDIRECT_OUTPUT" + environment variable. + +* Introduce the "--redirect"/"--no-redirect" command-line switches to + supersede the value of the "redirect_output" configuration option on + *sh*, *bash*, *ksh*, *zsh* and *fish* shells. (fix issue #410) + +* Add the "--return-value" option to the "getenv" and "getvariant" + modulefile commands to force to return the value of respectively + designated environment variable or variant when modulefile is + evaluated in *display* mode. (fix issue #422) + +* Introduce the "state" sub-command to display Modules states. + +* Add the "supported_shells" state to get the list of the shells that + are supported by "modulecmd.tcl" through the "state" sub-command . + (fix issue #426) + +* Filter out the variables intended for Modules private usage when + processing the environment changes made by a script evaluated by + "sh-to-mod" sub-command or "source-sh" modulefile command. (fix + issue #427) + +* Doc: add Control mode behaviors design notes. + +* Doc: add Add new configuration option design notes. + +* Set a Code of conduct for the project and its community based on the + widely adopted Contributor Covenant. + +* Doc: add Add new module sub-command design notes. + +* Add the "--remove-on-unload" option to the "remove-path" to also + remove value when modulefile is unloaded. + +* Raise error when an unknown option is set on "module use" or "module + unuse" modulefile command. + +* Rework emitted debug messages to remove obvious ones and + systematically report each modulefile command processed with their + arguments. + +* Add the "--append-on-unload" option to the "remove-path" and "module + unuse" modulefile commands to append back when modulefile is + unloaded the value removed at load time or a specific value set + after this option. + +* Add the "--prepend-on-unload" option to the "remove-path" and + "module unuse" modulefile commands to prepend back when modulefile + is unloaded the value removed at load time or a specific value set + after this option. + +* Add the "--noop-on-unload" option to the "unsetenv", "remove-path" + and "module unuse" modulefile commands to perform no operation when + modulefile is unloaded. + +* Add the "--unset-on-unload" option to the "unsetenv" modulefile + command to also unset environment variable when modulefile is + unloaded. + +* Add the "--set-if-undef" option to the "setenv" modulefile command + to set environment variable when modulefile is loaded only this + variable is not yet defined. + +* Install: add the "--with-bashcompletiondir", "--with- + fishcompletiondir" and "--with-zshcompletiondir" installation + options to install shell completion scripts in their system-wide + location. (fix issue #428) + +* Doc: add Lmod Tcl modulefile compatibility design notes. + +* Introduce the "add-property", "remove-property" and "extensions" + modulefile commands for compatibility with Lmod Tcl modulefiles. + These commands are evaluated as a *no-operation* command. + +* Introduce the "prereq-any" modulefile command for compatibility with + Lmod Tcl modulefiles. "prereq-any" is an alias of "prereq" command. + +* Produce a clear error message when wrong number of argument is + received by "prereq" command. + +* Doc: describe "ModulesVersion" in *Modules Variables* section in + modulefile man page. + +* Set "ModuleVersion" as an alias over "ModulesVersion" modulefile + variable for compatibility with Lmod Tcl modulefiles. + +* Doc: describe "reportError" and "reportWarning" modulefile commands. + +* Add the "require-fullname" modulefile command for compatibility with + Lmod Tcl modulefiles. This command aborts modulefile *load* + evaluation if modulefile's name is not fully specified. + +* Add the "prereq-all" modulefile command, alias over the "prereq" + command which acts as an *AND* operation when multiple modulefiles + are specified. + +* Add the "depends-on" modulefile command, alias over the "prereq-all" + command for compatibility with Lmod Tcl modulefiles. + +* Introduce the "keep-loaded" module tag that avoids an auto-loaded + module to get automatically unloaded when its dependent modules are + getting unloaded. Update default "tag_abbrev" configuration option + to add an abbreviation for the new tag ("kL") and default light and + dark color palettes. + +* Add the "always-load" modulefile command for compatibility with Lmod + Tcl modulefiles. This command loads designated modulefile and + applies the "keep-loaded" tag to it. + +* Add the "load-any" sub-command and "module load-any" modulefile + command for compatibility with Lmod Tcl modulefiles. This command + loads one modulefile from specified list. + +* Add support for "--not-req" option on "module try-load" and "module + load-any" modulefile commands. + +* Doc: add Module magic cookie check design notes. + +* Add the "mcookie_check" configuration option that control whether + the magic cookie at the start of modulefile (i.e., "#%Module" file + signature) need to get checked or not. When set to "eval" the number + of file checks is significantly reduced when walking through + modulepaths to search for modulefiles. Default value for this option + is overridden by the "MODULES_MCOOKIE_CHECK" environment variable. + +* Doc: describe "puts" Tcl command and its specific feature when used + in modulefile. + +* Create the "prestdout" channel for "puts" modulefile command to be + able to send content that will be evaluated in current shell session + prior any other content. (fix issue #432) + +* Add the "family" modulefile command for compatibility with Lmod Tcl + modulefiles. This command defines family name as a module alias over + currently loading module and express a conflict over this name to + ensure only one member of a family can be loaded in user + environment. "family" also defines the "MODULES_FAMILY_<NAME>" and + "LMOD_FAMILY_<NAME>" environment variables. + +* Doc: add Reduce I/O load cookbook recipe. + +* Add the ability to filter the list of loaded modules returned by + "list" sub-command. Filtering pattern could be part of module name, + symbolic version or alias and is matched in a case insensitive + manner by default. It could also leverage the Advanced module + version specifiers syntax. + +* Add support for "--starts-with" and "--contains" options on "list" + sub-command. + +* Doc: add Shell completion design notes. + +* Introduce "complete" and "uncomplete" modulefile commands to + respectively enable and disable shell completion for a given command + name. *bash*, *tcsh* and *fish* shells are supported. + +* Track shell completion changes of *bash*, *tcsh* and *fish* shell + scripts on "sh-to-mod" sub-command and "source-sh" modulefile + command. + +* Fix typos found in code, tests and documentation. (contribution from + Dimitri Papadopoulos Orfanos) + +* Update the "sh-to-mod" and "source-sh" mechanisms to support nested + function definition on fish shell. + +* Fix the "sh-to-mod" and "source-sh" mechanisms to correctly detect + functions with a "_" character in their name on fish shell. + +* Update the **module** shell function definition for sh-kind shell to + enclose the output generated by "modulecmd.tcl" in quotes in order + to pass it to the eval command. This change fixes definition of + shell function, especially when coming from shell script evaluation + over the "sh-to-mod" and "source-sh" mechanisms. (fix issue #434) + +* Fix csh shell alias detection on "sh-to-mod" and "source-sh" + mechanisms when enclosed in parenthesis. (fix issue #434) + +* Include for fish shell environment analysis on "sh-to-mod" and + "source-sh" mechanisms the private functions defined by evaluated + script, in order to catch all definitions that may be useful for + shell completion. + +* Fix the "sh-to-mod" and "source-sh" mechanisms to correctly detect + empty function on fish shell. + +* Script: add **pre-commit** git hook script to help verify if commits + are free of misspellings (with codespell tool) and trailing spaces. + +* Doc: fix typos found in documentation with Aspell utility. + +* Doc: describe Dependencies between modulefiles in modulefile man + page. (fix issues #431 and #433) + +* Script: update **pre-commit** git hook script to spell check + documentation files with Aspell tool. + +* Script: add **commit-msg** git hook script to spell check commit + message with Aspell tool. + +* Doc: clarify that "#%Module" is a file signature also called Modules + magic cookie. + +* Doc: update the ENVIRONMENT section in module man page to provide + for each Modules environment variable the name of the configuration + option that could be used to set the variable with the "config" sub- + command. + +* Doc: clarify in module man page that "MODULES_SET_SHELL_STARTUP", + "MODULES_SHELLS_WITH_KSH_FPATH" and "MODULES_WA_277" should be set + prior Modules initialization to get taken into account. + +* Doc: update Installing Modules on Unix document to provide the name + of the configuration option linked the installation options. + +* Doc: describe in module man page the default value of each + configuration option and linked installation option and command-line + switches. + +* Doc: add *Configuration options* section in Installing Modules on + Unix document with a table summarizing all configuration options and + their relative installation options and environment variables. + +* Add the "pushenv" modulefile command for compatibility with Lmod Tcl + modulefiles. This command sets designated environment variable with + specified value and save the previous value set to restore it when + the modulefile is unloaded. Previous values are saved in a + "__MODULES_PUSHENV_<VAR>" environment variable. + +* Doc: add Compatibility with Lmod Tcl modulefile section in + modulefile man page. + +* Update definition of the "module()" python function and python + initialization script to explicitly send output to "sys.stderr" to + get the ability to catch this content. + +* Lib: handle "sysconf" error in function implementing the + "initStateUsergroups" procedure. (contribution from Lukáš Zaoral) + +* Introduce the "--tag" option for the "load", "try-load", "load-any", + "switch" sub-commands and associated "module" modulefile commands + and "prereq", "prereq-all", "depends-on" and "always-load" + modulefile commands. This new option applies specified tags to the + module to load. + +* Record tags set to loaded modules with the "--tag" option in the + "__MODULES_LMEXTRATAG" environment variable to make this information + persists after module being loaded. + +* When saving a collection, record loaded module tags set with the "-- + tag" option and those resulting from module load states (like "auto- + loaded" and "keep-loaded"). The "--notuasked" string previously used + to designate auto-loaded modules in collection is changed into the " + --tag=auto-loaded" option. + +* Introduce the "collection_pin_tag" configuration option, that + records in collection all tags set on loaded modules when enabled. + Option is disabled by default and when set it defines the + "MODULES_COLLECTION_PIN_TAG" environment variable. + +* When a collection is saved, its content starts with a "#%Module5.1" + file signature if "--tag" option is recorded in it. + +* Update the "restore", "savelist", "saveshow" and "is-saved" sub- + commands to exclude from result or return an error when checking a + collection expressing a higher Modules version requirement in its + header signature than the one currently in use. + +* Doc: describe differences between run-command file and modulefile + interpretation in modulefile man page. + +* Doc: describe "module" sub-commands available as modulefile Tcl + command for each interpretation context in modulefile man page. + +* When loading a module with some extra tags defined through the "-- + tag" option, if this module is already loaded the new tags are added + to those already set. + +* When reporting result of "avail" or "list" sub-commands, enclose + module names in single quotes if they contain a space character. + +* When mentioning the loading, unloading or refreshing evaluation of a + module, report the tags associated to this module as done when + printing results of "list" sub-command. + +* Fix Log module command cookbook recipe not to break Modules + initialization when using provided "siteconfig.tcl" file. (fix issue + #453 with contribution from Eric Burgueño) + +* Mention tagging evaluation of a module, when tag list of an already + loaded module is updated. + + Modules 5.0.1 (2021-10-16) ========================== @@ -112,7 +451,7 @@ searched in both locations. * Install: remove installation option "--enable-compat-version". - Compatiblity version co-installation is discontinued. **switchml** + Compatibility version co-installation is discontinued. **switchml** shell function and "MODULES_USE_COMPAT_VERSION" are thus removed as well. @@ -184,7 +523,7 @@ already defined and a "module remove-path" will remove specified path whatever its reference counter value. -* Fix "unuse" sub-command when sereval modulepaths are specified as a +* Fix "unuse" sub-command when several modulepaths are specified as a single argument (i.e., "/path/to/dir1:/path/to/dir2"). Enabled modulepaths were not correctly detected when specified this way. @@ -493,7 +832,7 @@ * Revert "Install: have "configure" script assume the "." dot directory when invoked without the prepended "./"" as consent was - not obtained from author to relicense the contribution to GPLv2+. + not obtained from author to re-license the contribution to GPLv2+. * Doc: fixes few typos in module and modulefile. @@ -585,7 +924,7 @@ * Remove the pre-definition of runtime states with no specific property. These basic states are defined on-the-fly which implied they are not reported on a "module config --dump-state" command - unless if instanciated. + unless if instantiated. * Introduce the "loaded" symbolic version among advanced version specifiers (e.g. "foo@loaded") to designate the currently loaded @@ -680,16 +1019,16 @@ * Doc: improve readability of version 4 improvements in Changes between versions document. -* Introduce stickyness: module tagged "sticky" with "module-tag" +* Introduce stickiness: module tagged "sticky" with "module-tag" command cannot be unloaded unless if the unload is forced or if the module is reloaded. (fix issue #269) -* Introduce super-stickyness: module tagged "super-sticky" with +* Introduce super-stickiness: module tagged "super-sticky" with "module-tag" command cannot be unloaded even if the unload is forced unless if the module is reloaded. (fix issue #269) * Allow swap of sticky or super-sticky modules by another modulefile - version if stickyness definition applies to module parent name. + version if stickiness definition applies to module parent name. E.g., *foo/1.0* can be swapped by *foo/2.0* if sticky tag applies to *foo*. @@ -726,8 +1065,8 @@ explain the meaning of graphical renditions or of elements set in parentheses or chevrons along module name. -* Fix output of "avail" and "list" sub-commands on very small - termminal width. (fix issue #378) +* Fix output of "avail" and "list" sub-commands on very small terminal + width. (fix issue #378) * Add "mcookie_version_check" configuration to define if version set in modulefile magic cookie should be checked against **module** @@ -2400,7 +2739,7 @@ * Register all alternative names of loaded modules in environment with "MODULES_LMALTNAME" variable. These names correspond to the symbolic versions and aliases resolving to the loaded modules. Helps to - consistenly solve "conflict" or "prereq" constraints set over these + consistently solve "conflict" or "prereq" constraints set over these alternative names. (fix issue#143 / see Consistency of module load/unload commands in modulefile section in MIGRATING document) @@ -2445,14 +2784,14 @@ * Report error raised from modulefile evaluation as "ERROR" rather "WARNING", like when a conflict constraint is hit. Moreover this kind of evaluation error is now silenced on global evaluation like - when proceding "avail" or "search" sub-commands. + when processing "avail" or "search" sub-commands. * Record messages to report them by block on when processing a "load" or an "unload" modulefile evaluation to improve readability on these evaluating modes that may cascade additional actions. (see Improved module message report section in MIGRATING document) -* Foreground "load", "unload", "switch" and "restore" actions (ie. +* Foreground "load", "unload", "switch" and "restore" actions (i.e., asked on the command-line) now report a summary of the additional load and unload evaluations that were eventually triggered in the process.
View file
_service:tar_scm:modules-5.0.1.tar.bz2/doc/build/changes.txt -> _service:tar_scm:modules-5.1.1.tar.bz2/doc/build/changes.txt
Changed
@@ -106,7 +106,7 @@ This command line switch was not supported starting Modules version "4.0" but reintroduced starting version "4.4". When "--icase" switch is now set it applies to search query string and module - specificiation on all sub-commands and modulefile Tcl commands. + specification on all sub-commands and modulefile Tcl commands. Module Sub-Commands @@ -213,7 +213,7 @@ Modules 4 enables to pass a module alias or symbolic version name to unload a loaded modulefile referred by this name. - On versions "4.0" and "4.1", unloading an unexistent modulefile + On versions "4.0" and "4.1", unloading an nonexistent modulefile generates an *Unable to locate modulefile* error. Starting with version "4.2", unloading a module only looks at loaded module list and does not trigger a modulefile search. So starting version "4.2" @@ -657,7 +657,7 @@ | Introduced | New modulefile Tcl commands | | in version | | |==============|===================================================================| -| 4.0 | "module-info command", "getenv" | +| 4.0 | "module-info command", "getenv", "reportError", "reportWarning" | +--------------+-------------------------------------------------------------------+ | 4.1 | "module-info loaded", "is-saved", "is-used", "is-avail", "module- | | | virtual" | @@ -753,7 +753,8 @@ +--------------+-------------------------------------------------------------------+ | 4.7 | "avail_output", "avail_terse_output", "implicit_requirement", | | | "list_output", "list_terse_output", "mcookie_version_check", | -| | "shells_with_ksh_fpath", "tag_color_name", "term_width" | +| | "shells_with_ksh_fpath", "tag_abbrev", "tag_color_name", | +| | "term_width" | +--------------+-------------------------------------------------------------------+ | 4.8 | "editor", "variant_shortcut" | +--------------+-------------------------------------------------------------------+ @@ -794,11 +795,11 @@ "initrc" configuration file. These report messages are disabled when the "verbosity" configuration option is set to "concise" or "silent". -Enforce use of the module magic cookie (i.e., "#%Module") at the start -of "initrc" configuration file. No evaluation occurs and an error is -produced if the magic cookie is missing or if the optional version -number placed after the cookie string is higher than the version of -the "modulecmd.tcl" script in use. +Enforce use of the Modules magic cookie (i.e., "#%Module" file +signature) at the start of "initrc" configuration file. No evaluation +occurs and an error is produced if the magic cookie is missing or if +the optional version number placed after the cookie string is higher +than the version of the "modulecmd.tcl" script in use. Quarantine mechanism code in the Modules shell initialization scripts is now always defined and mechanism always applies if some environment @@ -830,11 +831,11 @@ Modulecmd startup ~~~~~~~~~~~~~~~~~ -Enforce use of the module magic cookie (i.e., "#%Module") at the start -of global or user rc files. These files are not evaluated and an error -is produced if the magic cookie is missing or if the optional version -number placed after the cookie string is higher than the version of -the "modulecmd.tcl" script in use. +Enforce use of the Modules magic cookie (i.e., "#%Module" file +signature) at the start of global or user rc files. These files are +not evaluated and an error is produced if the magic cookie is missing +or if the optional version number placed after the cookie string is +higher than the version of the "modulecmd.tcl" script in use. Module Sub-Commands @@ -880,12 +881,12 @@ "source" - Enforce use of the module magic cookie (i.e., "#%Module") at the - start of any scriptfile passed for evaluation to the "source" sub- - command. These files are not evaluated and an error is produced if - the magic cookie is missing or if the optional version number - placed after the cookie string is higher than the version of the - "modulecmd.tcl" script in use. + Enforce use of the Modules magic cookie (i.e., "#%Module" file + signature) at the start of any scriptfile passed for evaluation to + the "source" sub-command. These files are not evaluated and an + error is produced if the magic cookie is missing or if the optional + version number placed after the cookie string is higher than the + version of the "modulecmd.tcl" script in use. "use" @@ -931,12 +932,40 @@ When passed environment variable is not defined, an empty string is returned by default rather "_UNDEFINED_". + Starting version 5.1, the "--return-value" option is added to + return environment variable value or its fallback when modulefile + is evaluated in *display* mode. + "module" Forbid use of "module source" command in modulefile or in an initialization rc file, the "source" Tcl command should be used instead. + Starting version "5.1", an error is raised when an unused option is + set on "module use" or "module unuse" commands. + + Starting version "5.1", options "--*-on-unload" added to the + "remove-path" command are also added to the "module unuse" command. + +"remove-path" + + Starting with version "5.1", the "--remove-on-unload" option is + added to also remove value when modulefile is unloaded. + + Starting with version "5.1", the "--append-on-unload" and "-- + prepend-on-unload" options are added to restore when modulefile is + unloaded the value list unset at load time. + + Starting with version "5.1", the "--noop-on-unload" option is added + to perform no operation when modulefile is unloaded. + +"setenv" + + Starting with version "5.1", the "--set-if-undef" option is added + to set environment variable when modulefile is loaded only if not + yet defined. + "unsetenv" When running on an unload evaluation, do not unset designated @@ -945,6 +974,22 @@ Distinguish between being called on a unload evaluation without a value to restore or with an empty string value to restore. + Starting with version "5.1", the "--noop-on-unload" option is added + to perform no operation when modulefile is unloaded. + + Starting with version "5.1", the "--unset-on-unload" option is + added to also unset variable when modulefile is unloaded. + +"variant" + + Starting version 5.1, "variant" command accepts being called + without a list of accepted value defined. In this case, any value + specified is accepted. + + Starting version 5.1, the "--return-value" option is added to + return variant value or its fallback when modulefile is evaluated + in *display* mode. + Locating Modulefiles ~~~~~~~~~~~~~~~~~~~~ @@ -1005,7 +1050,7 @@ +-----------------------------------+--------------------------+---------------------+ | "color" | "never" | "auto" | +-----------------------------------+--------------------------+---------------------+ -| "icase" | "never" | "icase" | +| "icase" | "never" | "search" | +-----------------------------------+--------------------------+---------------------+ | "set_shell_startup" | "1" | "0" | +-----------------------------------+--------------------------+---------------------+ @@ -1024,6 +1069,46 @@ user environment is already configured. +Command line switches +~~~~~~~~~~~~~~~~~~~~~ + +The following command line switches appeared on Modules 5. + ++--------------+-------------------------------------------------------------------+ +| Introduced | New command line switches | +| in version | | +|==============|===================================================================| +| 5.1 | "--redirect", "--no-redirect", "--tag" | ++--------------+-------------------------------------------------------------------+ + + +Module Sub-Commands +~~~~~~~~~~~~~~~~~~~ + +The following module sub-commands appeared on Modules 5. + ++--------------+-------------------------------------------------------------------+ +| Introduced | New module sub-commands | +| in version | | +|==============|===================================================================| +| 5.1 | "state", "load-any" | ++--------------+-------------------------------------------------------------------+ + +"list" + + Starting Modules 5.1, this sub-command accepts patterns to filter + the loaded modules to list. + + Starting Modules 5.1, the "--starts-with" and "--contains" options + are supported on this sub-command to provide the regular search + match capabilities. + +"sh-to-mod" + + Starting Modules 5.1, this sub-command also tracks shell completion + changes for bash, tcsh and fish shells. + + Environment ~~~~~~~~~~~ @@ -1036,16 +1121,65 @@ | 5.0 | "MODULES_QUARANTINE_SUPPORT", "__MODULES_QUARANTINE_SET", | | | "__MODULES_AUTOINIT_INPROGRESS" | +--------------+-------------------------------------------------------------------+ +| 5.1 | "MODULES_REDIRECT_OUTPUT", "MODULES_MCOOKIE_CHECK", | +| | "MODULES_FAMILY_<NAME>", "__MODULES_PUSHENV_<VAR>", | +| | "__MODULES_LMEXTRATAG", "MODULES_COLLECTION_PIN_TAG" | ++--------------+-------------------------------------------------------------------+ Modules Specific Tcl Commands ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The following modulefile Tcl commands appeared on Modules 5. + ++--------------+-------------------------------------------------------------------+ +| Introduced | New modulefile Tcl commands | +| in version | | +|==============|===================================================================| +| 5.1 | "add-property", "remove-property", "extensions", "prereq-any", | +| | "require-fullname", "depends-on", "prereq-all", "always-load", | +| | "module load-any", "family", "complete", "uncomplete", "pushenv" | ++--------------+-------------------------------------------------------------------+ + "system", "is-used" Starting Modules 5.0, these modulefile commands are available from a modulerc evaluation context. +"prereq", "module load/try-load/load-any/switch" + + Starting Modules 5.1, these modulefile commands accept the "--tag" + option. + +"module try-load/load-any" + + Starting Modules 5.1, these modulefile commands accept the "--not- + req" option. + +"puts" + + Starting Modules 5.1, if content is sent to the "prestdout" + channel, it is rendered as command to evaluate in current shell + session and prior any other environment changes. + +"source-sh" + + Starting Modules 5.1, this modulefile command also tracks shell + completion changes for bash, tcsh and fish shells. + + +Modules Variables +~~~~~~~~~~~~~~~~~ + +The following Modules-specific Tcl variables appeared on Modules 5. + ++--------------+-------------------------------------------------------------------+ +| Introduced | New Modules-specific Tcl variables | +| in version | | +|==============|===================================================================| +| 5.1 | "ModuleVersion" | ++--------------+-------------------------------------------------------------------+ + Modules configuration options ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -1059,3 +1193,5 @@ |==============|===================================================================| | 5.0 | "quarantine_support" | +--------------+-------------------------------------------------------------------+ +| 5.1 | "redirect_output", "mcookie_check", "collection_pin_tag" | ++--------------+-------------------------------------------------------------------+
View file
_service:tar_scm:modules-5.0.1.tar.bz2/doc/build/ml.1 -> _service:tar_scm:modules-5.1.1.tar.bz2/doc/build/ml.1
Changed
@@ -1,8 +1,5 @@ .\" Man page generated from reStructuredText. . -.TH "ML" "1" "2021-10-16" "5.0.1" "Modules" -.SH NAME -ml \- handy command interface to the Modules package . .nr rst2man-indent-level 0 . @@ -30,6 +27,9 @@ .\" new: \\nrst2man-indent\\nrst2man-indent-level .in \\nrst2man-indent\\nrst2man-indent-levelu .. +.TH "ML" "1" "2022-05-31" "5.1.1" "Modules" +.SH NAME +ml \- handy command interface to the Modules package .SH SYNOPSIS .sp \fBml\fP \fIswitches\fP \fIsub\-command\fP \fIsub\-command\-args\fP @@ -125,6 +125,6 @@ .sp module(1), modulefile(4) .SH COPYRIGHT -1996-1999 John L. Furlani & Peter W. Osel, 1998-2017 R.K.Owen, 2002-2004 Mark Lakata, 2004-2017 Kent Mein, 2016-2021 Xavier Delaruelle +1996-1999 John L. Furlani & Peter W. Osel, 1998-2017 R.K.Owen, 2002-2004 Mark Lakata, 2004-2017 Kent Mein, 2016-2022 Xavier Delaruelle .\" Generated by docutils manpage writer. .
View file
_service:tar_scm:modules-5.0.1.tar.bz2/doc/build/module.1.in -> _service:tar_scm:modules-5.1.1.tar.bz2/doc/build/module.1.in
Changed
@@ -1,8 +1,5 @@ .\" Man page generated from reStructuredText. . -.TH "MODULE" "1" "2021-10-16" "5.0.1" "Modules" -.SH NAME -module \- command interface to the Modules package . .nr rst2man-indent-level 0 . @@ -30,6 +27,9 @@ .\" new: \\nrst2man-indent\\nrst2man-indent-level .in \\nrst2man-indent\\nrst2man-indent-levelu .. +.TH "MODULE" "1" "2022-05-31" "5.1.1" "Modules" +.SH NAME +module \- command interface to the Modules package .SH SYNOPSIS .sp \fBmodule\fP \fIswitches\fP \fIsub\-command\fP \fIsub\-command\-args\fP @@ -159,7 +159,7 @@ .sp .nf .ft C -eval "\(ga@libexecdir@/modulecmd.tcl sh autoinit\(ga" +eval "$(@libexecdir@/modulecmd.tcl sh autoinit)" .ft P .fi .UNINDENT @@ -193,16 +193,25 @@ seeking. .UNINDENT .sp -These module run\-command files must begins like \fImodulefiles\fP with the magic -cookie \fB#%Module\fP\&. A version number may be placed after this string. The -version number reflects the minimum version of \fBmodulecmd.tcl\fP required -to interpret the run\-command file. If a version number doesn\(aqt exist, then -\fBmodulecmd.tcl\fP will assume the run\-command file is compatible. Files -without the magic cookie or with a version number greater than the current -version of \fBmodulecmd.tcl\fP will not be interpreted and an error is -reported. Such error does not abort the whole \fBmodule\fP evaluation. If -the \fI\%mcookie_version_check\fP configuration is disabled the version -number set is not checked. +These module run\-command files must begins like \fImodulefiles\fP with the +\fB#%Module\fP file signature, also called the Modules magic cookie. A version +number may be placed after this string. The version number reflects the +minimum version of \fBmodulecmd.tcl\fP required to interpret the run\-command +file. If a version number doesn\(aqt exist, then \fBmodulecmd.tcl\fP will +assume the run\-command file is compatible. Files without the magic cookie or +with a version number greater than the current version of +\fBmodulecmd.tcl\fP will not be interpreted and an error is reported. Such +error does not abort the whole \fBmodule\fP evaluation. If the +\fI\%mcookie_version_check\fP configuration is disabled the version number +set is not checked. +.sp +\fBNOTE:\fP +.INDENT 0.0 +.INDENT 3.5 +Run\-command files are intended to set parameters for modulefiles, +not to configure the \fBmodule\fP command itself. +.UNINDENT +.UNINDENT .SS Command line switches .sp The \fBmodule\fP command accepts command line switches as its first @@ -235,8 +244,8 @@ .INDENT 0.0 .TP .B \-\-contains, \-C -On \fI\%avail\fP sub\-command, return modules whose fully qualified name -contains search query string. +On \fI\%avail\fP and \fI\%list\fP sub\-commands, return modules whose +fully qualified name contains search query string. .UNINDENT .INDENT 0.0 .TP @@ -325,6 +334,11 @@ .UNINDENT .INDENT 0.0 .TP +.B \-\-no\-redirect +Do not send message output to stdout. Keep it on stderr. +.UNINDENT +.INDENT 0.0 +.TP .B \-\-output=LIST, \-o LIST Define the content to report in addition to module names. This option is supported by \fI\%avail\fP and \fI\%list\fP sub\-commands on their regular @@ -352,6 +366,12 @@ .UNINDENT .INDENT 0.0 .TP +.B \-\-redirect +Send message output to stdout instead of stderr. Only supported on sh, bash, +ksh, zsh and fish shells. +.UNINDENT +.INDENT 0.0 +.TP .B \-\-silent, \-s Turn off error, warning and informational messages. \fBmodule\fP command output result is not affected by silent mode. @@ -359,8 +379,19 @@ .INDENT 0.0 .TP .B \-\-starts\-with, \-S -On \fI\%avail\fP sub\-command, return modules whose name starts with search -query string. +On \fI\%avail\fP and \fI\%list\fP sub\-commands, return modules whose name +starts with search query string. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-tag=LIST +On \fI\%load\fP, \fI\%load\-any\fP, \fI\%switch\fP and +\fI\%try\-load\fP sub\-commands, apply LIST of module tags to the loading +\fImodulefile\fP\&. \fILIST\fP corresponds to the concatenation of multiple tags +separated by colon character (\fB:\fP). \fILIST\fP should not contain tags +inherited from \fImodulefile\fP state or from other modulefile commands. If +module is already loaded, tags from \fILIST\fP are added to the list of tags +already applied to this module. .UNINDENT .INDENT 0.0 .TP @@ -395,11 +426,16 @@ .SS Module Sub\-Commands .INDENT 0.0 .TP -.B add \-\-auto|\-\-no\-auto \-f modulefile... +.B add options modulefile... See \fI\%load\fP\&. .UNINDENT .INDENT 0.0 .TP +.B add\-any options modulefile... +See \fI\%load\-any\fP\&. +.UNINDENT +.INDENT 0.0 +.TP .B aliases \-a List all available symbolic version\-names and aliases in the current \fI\%MODULEPATH\fP\&. All directories in the \fI\%MODULEPATH\fP are @@ -426,15 +462,15 @@ .UNINDENT .INDENT 0.0 .TP -.B avail \-d|\-L \-t|\-l|\-j \-a \-o LIST \-S|\-C \-\-indepth|\-\-no\-indepth path... +.B avail \-d|\-L \-t|\-l|\-j \-a \-o LIST \-S|\-C \-\-indepth|\-\-no\-indepth pattern... List all available \fImodulefiles\fP in the current \fI\%MODULEPATH\fP\&. All directories in the \fI\%MODULEPATH\fP are recursively searched for files -containing the \fImodulefile\fP magic cookie. If an argument is given, then +containing the Modules magic cookie. If a \fIpattern\fP argument is given, then each directory in the \fI\%MODULEPATH\fP is searched for \fImodulefiles\fP -whose pathname, symbolic version\-name or alias match the argument. Argument -may contain wildcard characters. Multiple versions of an application can -be supported by creating a subdirectory for the application containing -\fImodulefiles\fP for each version. +whose pathname, symbolic version\-name or alias match \fIpattern\fP in a case +insensitive manner by default. \fIpattern\fP may contain wildcard characters. +Multiple versions of an application can be supported by creating a +subdirectory for the application containing \fImodulefiles\fP for each version. .sp Symbolic version\-names and aliases found in the search are displayed in the result of this sub\-command. Symbolic version\-names are displayed next to @@ -459,10 +495,10 @@ .sp A \fIKey\fP section is added at the end of the output in case some elements are reported in parentheses or chevrons along module name or if some graphical -rendition is made over some outputed elements. This \fIKey\fP section gives hints +rendition is made over some output elements. This \fIKey\fP section gives hints on the meaning of such elements. .sp -The parameter \fIpath\fP may also refer to a symbolic modulefile name or a +The parameter \fIpattern\fP may also refer to a symbolic modulefile name or a modulefile alias. It may also leverage a specific syntax to finely select module version (see \fI\%Advanced module version specifiers\fP section below). .UNINDENT @@ -499,119 +535,255 @@ .INDENT 7.0 .TP .B advanced_version_spec -Advanced module version specification to finely select modulefiles. Defines -environment variable \fI\%MODULES_ADVANCED_VERSION_SPEC\fP when set. +Advanced module version specification to finely select modulefiles. +.sp +Default value is \fB1\fP\&. It can be changed at installation time with +\fB\-\-disable\-advanced\-version\-spec\fP +option. The \fI\%MODULES_ADVANCED_VERSION_SPEC\fP environment variable is +defined by \fI\%config\fP sub\-command when changing this configuration +option from its default value. See \fI\%MODULES_ADVANCED_VERSION_SPEC\fP +description for details. .UNINDENT .INDENT 7.0 .TP .B auto_handling -Automated module handling mode. Defines \fI\%MODULES_AUTO_HANDLING\fP\&. +Automated module handling mode. +.sp +Default value is \fB1\fP\&. It can be changed at installation time with +\fB\-\-disable\-auto\-handling\fP option. The +\fI\%MODULES_AUTO_HANDLING\fP environment variable is defined by +\fI\%config\fP sub\-command when changing this configuration option from +its default value. The \fI\%\-\-auto\fP and \fI\%\-\-no\-auto\fP +command line switches change the value of this configuration option. See +\fI\%MODULES_AUTO_HANDLING\fP description for details. .UNINDENT .INDENT 7.0 .TP .B avail_indepth -\fI\%avail\fP sub\-command in depth search mode. Defines -\fI\%MODULES_AVAIL_INDEPTH\fP\&. +\fI\%avail\fP sub\-command in depth search mode. +.sp +Default value is \fB1\fP\&. It can be changed at installation time with +\fB\-\-disable\-avail\-indepth\fP option. The +\fI\%MODULES_AVAIL_INDEPTH\fP environment variable is defined by +\fI\%config\fP sub\-command when changing this configuration option from +its default value. The \fI\%\-\-indepth\fP and \fI\%\-\-no\-indepth\fP +command line switches change the value of this configuration option. See +\fI\%MODULES_AVAIL_INDEPTH\fP description for details. .UNINDENT .INDENT 7.0 .TP .B avail_output Content to report in addition to module names on \fI\%avail\fP sub\-command -regular output mode. Defines \fI\%MODULES_AVAIL_OUTPUT\fP\&. +regular output mode. +.sp +Default value is \fBmodulepath:alias:dirwsym:sym:tag:key\fP\&. It can be changed +at installation time with \fB\-\-with\-avail\-output\fP option. The +\fI\%MODULES_AVAIL_OUTPUT\fP environment variable is defined by +\fI\%config\fP sub\-command when changing this configuration option from +its default value. The \fI\%\-\-output\fP/\fI\%\-o\fP command line switches +change the value of this configuration option. See +\fI\%MODULES_AVAIL_OUTPUT\fP description for details. .UNINDENT .INDENT 7.0 .TP .B avail_terse_output Content to report in addition to module names on \fI\%avail\fP sub\-command -terse output mode. Defines \fI\%MODULES_AVAIL_TERSE_OUTPUT\fP\&. +terse output mode. +.sp +Default value is \fBmodulepath:alias:dirwsym:sym:tag\fP\&. It can be changed at +installation time with \fB\-\-with\-avail\-terse\-output\fP option. The +\fI\%MODULES_AVAIL_TERSE_OUTPUT\fP environment variable is defined by +\fI\%config\fP sub\-command when changing this configuration option from +its default value. The \fI\%\-\-output\fP/\fI\%\-o\fP command line switches +change the value of this configuration option. See +\fI\%MODULES_AVAIL_TERSE_OUTPUT\fP description for details. .UNINDENT .INDENT 7.0 .TP .B collection_pin_version -Register exact modulefile version in collection. Defines -\fI\%MODULES_COLLECTION_PIN_VERSION\fP\&. +Register exact modulefile version in collection. +.sp +Default value is \fB0\fP\&. The \fI\%MODULES_COLLECTION_PIN_VERSION\fP +environment variable is defined by \fI\%config\fP sub\-command when +changing this configuration option from its default value. See +\fI\%MODULES_COLLECTION_PIN_VERSION\fP description for details. +.UNINDENT +.INDENT 7.0 +.TP +.B collection_pin_tag +Register full tag list applying to modulefiles in collection. +.sp +Default value is \fB0\fP\&. The \fI\%MODULES_COLLECTION_PIN_TAG\fP +environment variable is defined by \fI\%config\fP sub\-command when +changing this configuration option from its default value. See +\fI\%MODULES_COLLECTION_PIN_TAG\fP description for details. .UNINDENT .INDENT 7.0 .TP .B collection_target -Collection target which is valid for current system. Defines -\fI\%MODULES_COLLECTION_TARGET\fP\&. +Collection target which is valid for current system. +.sp +This configuration option is unset by default. The +\fI\%MODULES_COLLECTION_TARGET\fP environment variable is defined by +\fI\%config\fP sub\-command when changing this configuration option from +its default value. See \fI\%MODULES_COLLECTION_TARGET\fP description for +details. .UNINDENT .INDENT 7.0 .TP .B color -Colored output mode. Defines \fI\%MODULES_COLOR\fP\&. +Colored output mode. +.sp +Default value is \fBauto\fP\&. It can be changed at installation time with +\fB\-\-disable\-color\fP option. The +\fI\%MODULES_COLOR\fP environment variable is defined by +\fI\%config\fP sub\-command when changing this configuration option from +its default value. The \fI\%\-\-color\fP command line switches changes the +value of this configuration option. See \fI\%MODULES_COLOR\fP description +for details. .UNINDENT .INDENT 7.0 .TP .B colors -Chosen colors to highlight output items. Defines -\fI\%MODULES_COLORS\fP\&. +Chosen colors to highlight output items. +.sp +Default value is \fBhi=1:db=2:tr=2:se=2:er=91:wa=93:me=95:in=94:mp=1;94:di=94:al=96:va=93:sy=95:de=4:cm=92:aL=100:L=90;47:H=2:F=41:nF=43:S=46:sS=44:kL=30;48;5;109\fP\&. +It can be changed at installation time with +\fB\-\-with\-dark\-background\-colors\fP or +\fB\-\-with\-light\-background\-colors\fP options in conjunction with +\fB\-\-with\-terminal\-background\fP\&. The \fI\%MODULES_COLORS\fP +environment variable is defined by \fI\%config\fP sub\-command when +changing this configuration option from its default value. See +\fI\%MODULES_COLORS\fP description for details. .UNINDENT .INDENT 7.0 .TP .B contact -Modulefile contact address. Defines \fI\%MODULECONTACT\fP\&. +Modulefile contact address. +.sp +Default value is \fBroot@localhost\fP\&. The \fI\%MODULECONTACT\fP environment +variable is defined by \fI\%config\fP sub\-command when changing this +configuration option from its default value. See \fI\%MODULECONTACT\fP +description for details. .UNINDENT .INDENT 7.0 .TP .B extended_default -Allow partial module version specification. Defines -\fI\%MODULES_EXTENDED_DEFAULT\fP\&. +Allow partial module version specification. +.sp +Default value is \fB1\fP\&. It can be changed at installation time with +\fB\-\-disable\-extended\-default\fP option. The +\fI\%MODULES_EXTENDED_DEFAULT\fP environment variable is defined by +\fI\%config\fP sub\-command when changing this configuration option from +its default value. See \fI\%MODULES_EXTENDED_DEFAULT\fP description for +details. .UNINDENT .INDENT 7.0 .TP .B editor Text editor command to open modulefile with through \fI\%edit\fP -sub\-command. Defines \fI\%MODULES_EDITOR\fP\&. +sub\-command. +.sp +Default value is \fBvi\fP\&. It can be changed at installation time with +\fB\-\-with\-editor\fP option. The \fI\%MODULES_EDITOR\fP environment +variable is defined by \fI\%config\fP sub\-command when changing this +configuration option from its default value. See \fI\%MODULES_EDITOR\fP +description for details. .UNINDENT .INDENT 7.0 .TP .B extra_siteconfig -Additional site\-specific configuration script location. Defines -\fI\%MODULES_SITECONFIG\fP\&. +Additional site\-specific configuration script location. +.sp +This configuration option is unset by default. The +\fI\%MODULES_SITECONFIG\fP environment variable is defined by +\fI\%config\fP sub\-command when changing this configuration option from +its default value. See \fI\%MODULES_SITECONFIG\fP description for details. .UNINDENT .INDENT 7.0 .TP .B home -Location of Modules package main directory. Defines -\fI\%MODULESHOME\fP\&. +Location of Modules package main directory. +.sp +Default value is \fB@prefix@\fP\&. It can be changed at installation time with +\fB\-\-prefix\fP or \fB\-\-with\-moduleshome\fP options. The +\fI\%MODULESHOME\fP environment variable is defined by \fI\%config\fP +sub\-command when changing this configuration option from its default value. +See \fI\%MODULESHOME\fP description for details. .UNINDENT .INDENT 7.0 .TP .B icase -Enable case insensitive match. Defines \fI\%MODULES_ICASE\fP\&. +Enable case insensitive match. +.sp +Default value is \fBsearch\fP\&. It can be changed at installation time with +\fB\-\-with\-icase\fP option. The \fI\%MODULES_ICASE\fP environment +variable is defined by \fI\%config\fP sub\-command when changing this +configuration option from its default value. The +\fI\%\-\-icase\fP/\fI\%\-i\fP command line switches change the value of +this configuration option. See \fI\%MODULES_ICASE\fP description for +details. .UNINDENT .INDENT 7.0 .TP .B ignored_dirs Directories ignored when looking for modulefiles. .sp -The value of this option cannot be altered. +Default value is \fBCVS RCS SCCS .svn .git .SYNC .sos\fP\&. The value of this +option cannot be altered. .UNINDENT .INDENT 7.0 .TP .B implicit_default -Set an implicit default version for modules. Defines -\fI\%MODULES_IMPLICIT_DEFAULT\fP\&. +Set an implicit default version for modules. +.sp +Default value is \fB1\fP\&. It can be changed at installation time with +\fB\-\-disable\-implicit\-default\fP option. The +\fI\%MODULES_IMPLICIT_DEFAULT\fP environment variable is defined by +\fI\%config\fP sub\-command when changing this configuration option from +its default value. See \fI\%MODULES_IMPLICIT_DEFAULT\fP description for +details. .UNINDENT .INDENT 7.0 .TP .B implicit_requirement Implicitly define a requirement onto modules specified on \fBmodule\fP -commands in modulefile. Defines \fI\%MODULES_IMPLICIT_REQUIREMENT\fP\&. +commands in modulefile. +.sp +Default value is \fB1\fP\&. It can be changed at installation time with +\fB\-\-disable\-implicit\-requirement\fP +option. The \fI\%MODULES_IMPLICIT_REQUIREMENT\fP environment variable is +defined by \fI\%config\fP sub\-command when changing this configuration +option from its default value. See \fI\%MODULES_IMPLICIT_REQUIREMENT\fP +description for details. .UNINDENT .INDENT 7.0 .TP .B list_output Content to report in addition to module names on \fI\%list\fP sub\-command -regular output mode. Defines \fI\%MODULES_LIST_OUTPUT\fP\&. +regular output mode. +.sp +Default value is \fBheader:idx:variant:sym:tag:key\fP\&. It can be changed at +installation time with \fB\-\-with\-list\-output\fP option. The +\fI\%MODULES_LIST_OUTPUT\fP environment variable is defined by +\fI\%config\fP sub\-command when changing this configuration option from +its default value. The \fI\%\-\-output\fP/\fI\%\-o\fP command line switches +change the value of this configuration option. See +\fI\%MODULES_LIST_OUTPUT\fP description for details. .UNINDENT .INDENT 7.0 .TP .B list_terse_output Content to report in addition to module names on \fI\%list\fP sub\-command -terse output mode. Defines \fI\%MODULES_LIST_TERSE_OUTPUT\fP\&. +terse output mode. +.sp +Default value is \fBheader\fP\&. It can be changed at installation time with +\fB\-\-with\-list\-terse\-output\fP option. The +\fI\%MODULES_LIST_TERSE_OUTPUT\fP environment variable is defined by +\fI\%config\fP sub\-command when changing this configuration option from +its default value. The \fI\%\-\-output\fP/\fI\%\-o\fP command line switches +change the value of this configuration option. See +\fI\%MODULES_LIST_TERSE_OUTPUT\fP description for details. .UNINDENT .INDENT 7.0 .TP @@ -620,134 +792,282 @@ \fI\%locked_configs\fP value are locked, thus their value cannot be altered. .sp +This configuration option is set to an empty value by default. It can be +changed at installation time with \fB\-\-with\-locked\-configs\fP option. The value of this option cannot be altered. .UNINDENT .INDENT 7.0 .TP +.B mcookie_check +Defines if the Modules magic cookie (i.e., \fB#%Module\fP file signature) +should be checked to determine if a file is a modulefile. +.sp +Default value is \fBalways\fP\&. The \fI\%MODULES_MCOOKIE_CHECK\fP environment +variable is defined by \fI\%config\fP sub\-command when changing this +configuration option from its default value. See +\fI\%MODULES_MCOOKIE_CHECK\fP description for details. +.UNINDENT +.INDENT 7.0 +.TP .B mcookie_version_check Defines if the version set in the Modules magic cookie used in modulefile should be checked against the version of \fBmodulecmd.tcl\fP to determine -if the modulefile could be evaluated or not. Defines -\fI\%MODULES_MCOOKIE_VERSION_CHECK\fP\&. +if the modulefile could be evaluated or not. +.sp +Default value is \fB1\fP\&. It can be changed at installation time with +\fB\-\-disable\-mcookie\-version\-check\fP +option. The \fI\%MODULES_MCOOKIE_VERSION_CHECK\fP environment variable is +defined by \fI\%config\fP sub\-command when changing this configuration +option from its default value. See \fI\%MODULES_MCOOKIE_VERSION_CHECK\fP +description for details. .UNINDENT .INDENT 7.0 .TP .B ml -Define \fBml\fP command at initialization time. Defines -\fI\%MODULES_ML\fP\&. +Define \fBml\fP command at initialization time. +.sp +Default value is \fB1\fP\&. It can be changed at installation time with +\fB\-\-disable\-ml\fP option. The \fI\%MODULES_ML\fP +environment variable is defined by \fI\%config\fP sub\-command when +changing this configuration option from its default value. See +\fI\%MODULES_ML\fP description for details. .UNINDENT .INDENT 7.0 .TP .B nearly_forbidden_days Set the number of days a module should be considered \fInearly forbidden\fP -prior reaching its expiry date. Defines -\fI\%MODULES_NEARLY_FORBIDDEN_DAYS\fP\&. +prior reaching its expiry date. +.sp +Default value is \fB14\fP\&. It can be changed at installation time with +\fB\-\-with\-nearly\-forbidden\-days\fP option. The +\fI\%MODULES_NEARLY_FORBIDDEN_DAYS\fP environment variable is defined by +\fI\%config\fP sub\-command when changing this configuration option from +its default value. See \fI\%MODULES_NEARLY_FORBIDDEN_DAYS\fP description +for details. .UNINDENT .INDENT 7.0 .TP .B pager -Text viewer to paginate message output. Defines \fI\%MODULES_PAGER\fP\&. +Text viewer to paginate message output. +.sp +Default value is \fBless \-eFKRX\fP\&. It can be changed at installation time +with \fB\-\-with\-pager\fP and \fB\-\-with\-pager\-opts\fP options. The +\fI\%MODULES_PAGER\fP environment variable is defined by \fI\%config\fP +sub\-command when changing this configuration option from its default value. +See \fI\%MODULES_PAGER\fP description for details. .UNINDENT .INDENT 7.0 .TP .B quarantine_support Defines if code for quarantine mechanism support should be generated in -\fBmodule\fP shell function definition. Defines -\fI\%MODULES_QUARANTINE_SUPPORT\fP\&. +\fBmodule\fP shell function definition. +.sp +Default value is \fB0\fP\&. It can be changed at installation time with +\fB\-\-enable\-quarantine\-support\fP option. The +\fI\%MODULES_QUARANTINE_SUPPORT\fP environment variable is defined by +\fI\%config\fP sub\-command when changing this configuration option from +its default value. See \fI\%MODULES_QUARANTINE_SUPPORT\fP description for +details. .UNINDENT .INDENT 7.0 .TP .B rcfile -Global run\-command file location. Defines \fI\%MODULERCFILE\fP\&. +Global run\-command file location. +.sp +This configuration option is unset by default. The \fI\%MODULERCFILE\fP +environment variable is defined by \fI\%config\fP sub\-command when +changing this configuration option from its default value. See +\fI\%MODULERCFILE\fP description for details. .UNINDENT .INDENT 7.0 .TP -.B run_quarantine -Environment variables to indirectly pass to \fBmodulecmd.tcl\fP\&. Defines -\fI\%MODULES_RUN_QUARANTINE\fP\&. +.B redirect_output +Control whether or not the output of module command should be redirected +from stderr to stdout. +.sp +Default value is \fB1\fP\&. The \fI\%MODULES_REDIRECT_OUTPUT\fP environment +variable is defined by \fI\%config\fP sub\-command when changing this +configuration option from its default value. The \fI\%\-\-redirect\fP and +\fI\%\-\-no\-redirect\fP command line switches change the value of this +configuration option. See \fI\%MODULES_REDIRECT_OUTPUT\fP description for +details. .UNINDENT .INDENT 7.0 .TP -.B silent_shell_debug -Disablement of shell debugging property for the module command. Also defines -if code to silence shell debugging property should be generated in -\fBmodule\fP shell function definition. Defines -\fI\%MODULES_SILENT_SHELL_DEBUG\fP\&. +.B run_quarantine +Environment variables to indirectly pass to \fBmodulecmd.tcl\fP\&. +.sp +This configuration option is set to an empty value by default. It can be +changed at installation time with \fB\-\-with\-quarantine\-vars\fP option +that sets \fI\%MODULES_RUN_QUARANTINE\fP\&. This environment variable is +also defined by \fI\%config\fP sub\-command when changing this +configuration option. See \fI\%MODULES_RUN_QUARANTINE\fP description for +details. .UNINDENT .INDENT 7.0 .TP .B search_match -Module search match style. Defines \fI\%MODULES_SEARCH_MATCH\fP\&. +Module search match style. +.sp +Default value is \fBstarts_with\fP\&. It can be changed at installation time +with \fB\-\-with\-search\-match\fP option. The +\fI\%MODULES_SEARCH_MATCH\fP environment variable is defined by +\fI\%config\fP sub\-command when changing this configuration option from +its default value. The \fI\%\-\-contains\fP and \fI\%\-\-starts\-with\fP +command line switches change the value of this configuration option. See +\fI\%MODULES_SEARCH_MATCH\fP description for details. .UNINDENT .INDENT 7.0 .TP .B set_shell_startup -Ensure module command definition by setting shell startup file. Defines -\fI\%MODULES_SET_SHELL_STARTUP\fP\&. +Ensure module command definition by setting shell startup file. +.sp +Default value is \fB0\fP\&. It can be changed at installation time with +\fB\-\-enable\-set\-shell\-startup\fP option. The +\fI\%MODULES_SET_SHELL_STARTUP\fP environment variable is defined by +\fI\%config\fP sub\-command when changing this configuration option from +its default value. See \fI\%MODULES_SET_SHELL_STARTUP\fP description for +details. .UNINDENT .INDENT 7.0 .TP .B shells_with_ksh_fpath Ensure module command is defined in ksh when it is started as a sub\-shell -from the listed shells. Defines \fI\%MODULES_SHELLS_WITH_KSH_FPATH\fP\&. +from the listed shells. +.sp +This configuration option is set to an empty value by default. The +\fI\%MODULES_SHELLS_WITH_KSH_FPATH\fP environment variable is defined by +\fI\%config\fP sub\-command when changing this configuration option from +its default value. See \fI\%MODULES_SHELLS_WITH_KSH_FPATH\fP description +for details. +.UNINDENT +.INDENT 7.0 +.TP +.B silent_shell_debug +Disablement of shell debugging property for the module command. Also defines +if code to silence shell debugging property should be generated in +\fBmodule\fP shell function definition. +.sp +Default value is \fB0\fP\&. It can be changed at installation time with +\fB\-\-enable\-silent\-shell\-debug\-support\fP option. The +\fI\%MODULES_SILENT_SHELL_DEBUG\fP environment variable is defined by +\fI\%config\fP sub\-command when changing this configuration option from +its default value. See \fI\%MODULES_SILENT_SHELL_DEBUG\fP description for +details. .UNINDENT .INDENT 7.0 .TP .B siteconfig Primary site\-specific configuration script location. .sp -The value of this option cannot be altered. +Default value is \fB@etcdir@/siteconfig.tcl\fP\&. It can be changed at installation +time with \fB\-\-prefix\fP or \fB\-\-etcdir\fP options. The value of +this option cannot be altered. .UNINDENT .INDENT 7.0 .TP .B tag_abbrev -Abbreviations to use to report module tags. Defines -\fI\%MODULES_TAG_ABBREV\fP\&. +Abbreviations to use to report module tags. +.sp +Default value is \fBauto\-loaded=aL:loaded=L:hidden=H:hidden\-loaded=H:forbidden=F:nearly\-forbidden=nF:sticky=S:super\-sticky=sS:keep\-loaded=kL\fP\&. +It can be changed at installation time with \fB\-\-with\-tag\-abbrev\fP +option. The \fI\%MODULES_TAG_ABBREV\fP environment variable is defined by +\fI\%config\fP sub\-command when changing this configuration option from +its default value. See \fI\%MODULES_TAG_ABBREV\fP description for details. .UNINDENT .INDENT 7.0 .TP .B tag_color_name -Tags whose name should be colored instead of module name. Defines -\fI\%MODULES_TAG_COLOR_NAME\fP\&. +Tags whose name should be colored instead of module name. +.sp +This configuration option is set to an empty value by default. It can be +changed at installation time with \fB\-\-with\-tag\-color\-name\fP option. +The \fI\%MODULES_TAG_COLOR_NAME\fP environment variable is defined by +\fI\%config\fP sub\-command when changing this configuration option from +its default value. See \fI\%MODULES_TAG_COLOR_NAME\fP description for +details. .UNINDENT .INDENT 7.0 .TP .B tcl_ext_lib Modules Tcl extension library location. .sp +Default value is \fB@libdir@/libtclenvmodules.so\fP\&. It can be changed at +installation time with \fB\-\-prefix\fP or \fB\-\-libdir\fP options. The value of this option cannot be altered. .UNINDENT .INDENT 7.0 .TP .B term_background -Terminal background color kind. Defines \fI\%MODULES_TERM_BACKGROUND\fP\&. +Terminal background color kind. +.sp +Default value is \fBdark\fP\&. It can be changed at installation time with +\fB\-\-with\-terminal\-background\fP option. The +\fI\%MODULES_TERM_BACKGROUND\fP environment variable is defined by +\fI\%config\fP sub\-command when changing this configuration option from +its default value. See \fI\%MODULES_TERM_BACKGROUND\fP description for +details. .UNINDENT .INDENT 7.0 .TP .B term_width -Set the width of the output. Defines \fI\%MODULES_TERM_WIDTH\fP\&. +Set the width of the output. +.sp +Default value is \fB0\fP\&. The \fI\%MODULES_TERM_WIDTH\fP environment +variable is defined by \fI\%config\fP sub\-command when changing this +configuration option from its default value. The +\fI\%\-\-width\fP/\fI\%\-w\fP command line switches change the value of +this configuration option. See \fI\%MODULES_TERM_WIDTH\fP description for +details. .UNINDENT .INDENT 7.0 .TP .B unload_match_order -Unload firstly loaded or lastly loaded module matching request. Defines -\fI\%MODULES_UNLOAD_MATCH_ORDER\fP\&. +Unload firstly loaded or lastly loaded module matching request. +.sp +Default value is \fBreturnlast\fP\&. It can be changed at installation time with +\fB\-\-with\-unload\-match\-order\fP option. The +\fI\%MODULES_UNLOAD_MATCH_ORDER\fP environment variable is defined by +\fI\%config\fP sub\-command when changing this configuration option from +its default value. See \fI\%MODULES_UNLOAD_MATCH_ORDER\fP description for +details. .UNINDENT .INDENT 7.0 .TP .B variant_shortcut Shortcut characters that could be used to specify or report module variants. -Defines \fI\%MODULES_VARIANT_SHORTCUT\fP\&. +.sp +This configuration option is set to an empty value by default. It can be +changed at installation time with \fB\-\-with\-variant\-shortcut\fP option. +The \fI\%MODULES_VARIANT_SHORTCUT\fP environment variable is defined by +\fI\%config\fP sub\-command when changing this configuration option from +its default value. See \fI\%MODULES_VARIANT_SHORTCUT\fP description for +details. .UNINDENT .INDENT 7.0 .TP .B verbosity -Module command verbosity level. Defines \fI\%MODULES_VERBOSITY\fP\&. +Module command verbosity level. +.sp +Default value is \fBnormal\fP\&. It can be changed at installation time with +\fB\-\-with\-verbosity\fP option. The \fI\%MODULES_VERBOSITY\fP +environment variable is defined by \fI\%config\fP sub\-command when +changing this configuration option from its default value. The +\fI\%\-\-debug\fP/\fI\%\-D\fP, \fI\%\-\-silent\fP/\fI\%\-s\fP, +\fI\%\-\-trace\fP/\fI\%\-T\fP and \fI\%\-\-verbose\fP/\fI\%\-v\fP +command line switches change the value of this configuration option. See +\fI\%MODULES_VERBOSITY\fP description for details. .UNINDENT .INDENT 7.0 .TP .B wa_277 -Workaround for Tcsh history issue. Defines \fI\%MODULES_WA_277\fP\&. +Workaround for Tcsh history issue. +.sp +Default value is \fB0\fP\&. It can be changed at installation time with +\fB\-\-enable\-wa\-277\fP option. The \fI\%MODULES_WA_277\fP environment +variable is defined by \fI\%config\fP sub\-command when changing this +configuration option from its default value. See \fI\%MODULES_WA_277\fP +description for details. .UNINDENT .UNINDENT .INDENT 0.0 @@ -919,8 +1239,12 @@ .UNINDENT .INDENT 0.0 .TP -.B list \-a \-o LIST \-t|\-l|\-j -List loaded modules. +.B list \-t|\-l|\-j \-a \-o LIST \-S|\-C pattern... +List loaded modules. If a \fIpattern\fP is given, then the loaded modules are +filtered to only list those whose name match this \fIpattern\fP\&. It may contain +wildcard characters. \fIpattern\fP is matched in a case insensitive manner by +default. If multiple \fIpatterns\fP are given, loaded modules has to +match at least one of them to be listed. .sp Module tags applying to the loaded modules are reported along the module name they are associated to (see \fI\%Module tags\fP section). @@ -930,14 +1254,28 @@ .sp A \fIKey\fP section is added at the end of the output in case some elements are reported in parentheses or chevrons along module name or if some graphical -rendition is made over some outputed elements. This \fIKey\fP section gives hints +rendition is made over some output elements. This \fIKey\fP section gives hints on the meaning of such elements. +.sp +The parameter \fIpattern\fP may also refer to a symbolic modulefile name or a +modulefile alias. It may also leverage a specific syntax to finely select +module version (see \fI\%Advanced module version specifiers\fP section below). .UNINDENT .INDENT 0.0 .TP -.B load \-\-auto|\-\-no\-auto \-f modulefile... +.B load options modulefile... Load \fImodulefile\fP into the shell environment. .sp +\fI\%load\fP command accepts the following options: +.INDENT 7.0 +.IP \(bu 2 +\fB\-\-auto|\-\-no\-auto\fP +.IP \(bu 2 +\fB\-f|\-\-force\fP +.IP \(bu 2 +\fB\-\-tag=taglist\fP +.UNINDENT +.sp Once loaded, the \fBloaded\fP module tag is associated to the loaded module. If module has been automatically loaded by another module, the \fBauto\-loaded\fP tag is associated instead (see \fI\%Module tags\fP section). @@ -945,6 +1283,40 @@ The parameter \fImodulefile\fP may also be a symbolic modulefile name or a modulefile alias. It may also leverage a specific syntax to finely select module version (see \fI\%Advanced module version specifiers\fP section below). +.sp +The \fI\%\-\-tag\fP option accepts a list of module tags to apply to +\fImodulefile\fP once loaded. If module is already loaded, tags from \fItaglist\fP +are added to the list of tags already applied to this module. +.UNINDENT +.INDENT 0.0 +.TP +.B load\-any options modulefile... +Load into the shell environment one of the \fImodulefile\fP specified. Try to +load each \fImodulefile\fP specified in list from the left to the right until +one got loaded or is found already loaded. Do not complain if \fImodulefile\fP +cannot be found but if its evaluation fails an error is reported. +.sp +\fI\%load\-any\fP command accepts the following options: +.INDENT 7.0 +.IP \(bu 2 +\fB\-\-auto|\-\-no\-auto\fP +.IP \(bu 2 +\fB\-f|\-\-force\fP +.IP \(bu 2 +\fB\-\-tag=taglist\fP +.UNINDENT +.sp +Once loaded, the \fBloaded\fP module tag is associated to the loaded module. If +module has been automatically loaded by another module, the \fBauto\-loaded\fP +tag is associated instead (see \fI\%Module tags\fP section). +.sp +The parameter \fImodulefile\fP may also be a symbolic modulefile name or a +modulefile alias. It may also leverage a specific syntax to finely select +module version (see \fI\%Advanced module version specifiers\fP section below). +.sp +The \fI\%\-\-tag\fP option accepts a list of module tags to apply to +\fImodulefile\fP once loaded. If module is already loaded, tags from \fItaglist\fP +are added to the list of tags already applied to this module. .UNINDENT .INDENT 0.0 .TP @@ -1070,6 +1442,12 @@ \fI\%MODULES_COLLECTION_PIN_VERSION\fP is set to \fB1\fP, module version is always recorded even if it is the default version. .sp +By default, only the module tags specifically set with the \fI\%\-\-tag\fP +option or resulting from a specific module state (like \fBauto\-loaded\fP and +\fBkeep\-loaded\fP tags) are recorded in collection. If +\fI\%MODULES_COLLECTION_PIN_TAG\fP is set to \fB1\fP, all tags are recorded +in collection except \fBnearly\-forbidden\fP tag. +.sp No \fIcollection\fP is recorded and an error is returned if the loaded \fImodulefiles\fP have unsatisfied constraint corresponding to the \fBprereq\fP and \fBconflict\fP they declare. @@ -1117,8 +1495,11 @@ translated into \fImodulefile\fP commands to output the modulefile content equivalent to the evaluation of shell script. .sp -Changes on environment variables, shell aliases, shell functions and current -working directory are tracked. +Changes on environment variables, shell aliases, shell functions, shell +completions and current working directory are tracked. +.sp +Changes made on environment variable intended for Modules private use (e.g., +\fI\%LOADEDMODULES\fP, \fI\%_LMFILES_\fP, \fB__MODULES_*\fP) are ignored. .sp \fIShell\fP could be specified as a command name or a fully qualified pathname. The following shells are supported: sh, dash, csh, tcsh, bash, ksh, ksh93, @@ -1139,24 +1520,39 @@ .UNINDENT .INDENT 0.0 .TP -.B swap \-\-auto|\-\-no\-auto \-f modulefile1 modulefile2 +.B state name +Gets \fBmodulecmd.tcl\fP states. Reports the currently set value +of passed state \fIname\fP or all existing states if no \fIname\fP passed. +.UNINDENT +.INDENT 0.0 +.TP +.B swap options modulefile1 modulefile2 See \fI\%switch\fP\&. .UNINDENT .INDENT 0.0 .TP -.B switch \-\-auto|\-\-no\-auto \-f modulefile1 modulefile2 +.B switch options modulefile1 modulefile2 Switch loaded \fImodulefile1\fP with \fImodulefile2\fP\&. If \fImodulefile1\fP is not specified, then it is assumed to be the currently loaded module with the same root name as \fImodulefile2\fP\&. .sp +\fI\%switch\fP command accepts the following options: +.INDENT 7.0 +.IP \(bu 2 +\fB\-\-auto|\-\-no\-auto\fP +.IP \(bu 2 +\fB\-f|\-\-force\fP +.IP \(bu 2 +\fB\-\-tag=taglist\fP +.UNINDENT +.sp The parameter \fImodulefile\fP may also be a symbolic modulefile name or a modulefile alias. It may also leverage a specific syntax to finely select module version (see \fI\%Advanced module version specifiers\fP section below). -.UNINDENT -.INDENT 0.0 -.TP -.B try\-add \-\-auto|\-\-no\-auto \-f modulefile... -See \fI\%try\-load\fP\&. +.sp +The \fI\%\-\-tag\fP option accepts a list of module tags to apply to +\fImodulefile\fP once loaded. If module is already loaded, tags from \fItaglist\fP +are added to the list of tags already applied to this module. .UNINDENT .INDENT 0.0 .TP @@ -1170,11 +1566,26 @@ .UNINDENT .INDENT 0.0 .TP -.B try\-load \-\-auto|\-\-no\-auto \-f modulefile... +.B try\-add options modulefile... +See \fI\%try\-load\fP\&. +.UNINDENT +.INDENT 0.0 +.TP +.B try\-load options modulefile... Like \fI\%load\fP sub\-command, load \fImodulefile\fP into the shell environment, but do not complain if \fImodulefile\fP cannot be found. If \fImodulefile\fP is found but its evaluation fails, error is still reported. .sp +\fI\%try\-load\fP command accepts the following options: +.INDENT 7.0 +.IP \(bu 2 +\fB\-\-auto|\-\-no\-auto\fP +.IP \(bu 2 +\fB\-f|\-\-force\fP +.IP \(bu 2 +\fB\-\-tag=taglist\fP +.UNINDENT +.sp Once loaded, the \fBloaded\fP module tag is associated to the loaded module. If module has been automatically loaded by another module, the \fBauto\-loaded\fP tag is associated instead (see \fI\%Module tags\fP section). @@ -1182,6 +1593,10 @@ The parameter \fImodulefile\fP may also be a symbolic modulefile name or a modulefile alias. It may also leverage a specific syntax to finely select module version (see \fI\%Advanced module version specifiers\fP section below). +.sp +The \fI\%\-\-tag\fP option accepts a list of module tags to apply to +\fImodulefile\fP once loaded. If module is already loaded, tags from \fItaglist\fP +are added to the list of tags already applied to this module. .UNINDENT .INDENT 0.0 .TP @@ -1210,17 +1625,6 @@ .sp If \fIdirectory\fP corresponds to the concatenation of multiple paths separated by colon character, each path is treated separately. -.INDENT 7.0 -.INDENT 3.5 -Changed in version 5.0: \fIdirectory\fP is removed whatever its reference counter value if -\fI\%module unuse\fP is called from the command\-line or within -an initialization modulefile script - -.sp -Changed in version 5.0: Accept several modulepaths passed as a single string - -.UNINDENT -.UNINDENT .UNINDENT .INDENT 0.0 .TP @@ -1397,6 +1801,9 @@ meaning: .INDENT 0.0 .IP \(bu 2 +\fBkeep\-loaded\fP: auto\-loaded module cannot be automatically unloaded. This +tag is also set through the use of the \fBalways\-load\fP command. +.IP \(bu 2 \fBsticky\fP: module once loaded cannot be unloaded unless forced or reloaded (see \fI\%Sticky modules\fP section) .IP \(bu 2 @@ -1404,9 +1811,18 @@ module cannot be unloaded even if forced (see \fI\%Sticky modules\fP section) .UNINDENT .sp +The \fI\%\-\-tag\fP option helps to apply additional tags to modules. It is +available on \fI\%load\fP, \fI\%load\-any\fP, \fI\%switch\fP and +\fI\%try\-load\fP sub\-commands and on \fBalways\-load\fP, +\fBdepends\-on\fP, \fBmodule\fP, \fBprereq\fP, \fBprereq\-all\fP and +\fBprereq\-any\fP modulefile commands. In case the designated module is +already loaded, the additional tags are added to the list of tags already +applied to this module. +.sp Module tags are reported along the module they are associated to on -\fI\%avail\fP and \fI\%list\fP sub\-command results. Tags could be reported -either: +\fI\%avail\fP and \fI\%list\fP sub\-command results and also when module\(aqs +loading, unloading, refreshing or tagging evaluation is mentioned. Tags could +be reported either: .INDENT 0.0 .IP \(bu 2 along the module name, all tags set within angle brackets, each tag @@ -1445,7 +1861,7 @@ .SS Sticky modules .sp Modules are said \fIsticky\fP when they cannot be unloaded (they stick to the -loaded environment). Two kind of stickyness can be distinguished: +loaded environment). Two kind of stickiness can be distinguished: .INDENT 0.0 .IP \(bu 2 \fBsticky\fP module: cannot be unloaded unless if the unload is forced or if @@ -1460,11 +1876,11 @@ \fBsuper\-sticky\fP \fI\%module tag\fP with the \fBmodule\-tag\fP modulefile command. .sp -When stickyness is defined over the generic module name (and not over a +When stickiness is defined over the generic module name (and not over a specific module version, a version list or a version range), sticky or super\-sticky module can be swapped by another version of module. For instance if the \fBsticky\fP tag is defined over \fIfoo\fP module, loaded module \fIfoo/1.2\fP -can be swapped by \fIfoo/2.0\fP\&. Such stickyness definition means one version of +can be swapped by \fIfoo/2.0\fP\&. Such stickiness definition means one version of module should stay loaded whatever version it is. .SS Module variants .sp @@ -1495,9 +1911,9 @@ modulefile declares. When reaching the \fBvariant\fP modulefile command declaring a variant, an error is raised if no value is specified for this variant and if no default value is declared. Specified variant value should -match a value from the declared accepted value list otherwise an error is -raised. Additionally if a variant is specified but does not correspond to a -variant declared in modulefile, an error is raised. +match a value from the declared accepted value list if such list is defined +otherwise an error is raised. Additionally if a variant is specified but does +not correspond to a variant declared in modulefile, an error is raised. .sp Module variants are reported along the module they are associated to on \fI\%list\fP sub\-command results. Variants are reported within curly braces @@ -1623,6 +2039,19 @@ .UNINDENT .INDENT 0.0 .TP +.B __MODULES_LMEXTRATAG +A colon separated list of the tags corresponding to all loaded \fImodulefiles\fP +that have been set through the \fI\%\-\-tag\fP option. Each element in this +list starts by the name of the loaded \fImodulefile\fP followed by all explicitly +set tags applying to it. The loaded modulefile and its tags are separated by +the ampersand character. +.sp +This environment variable is intended for \fBmodule\fP command internal +use to distinguish from all tags those that have been specifically set with +\fI\%\-\-tag\fP option. +.UNINDENT +.INDENT 0.0 +.TP .B __MODULES_LMTAG A colon separated list of the tags corresponding to all loaded \fImodulefiles\fP that have been set through \fBmodule\-tag\fP statements or from other @@ -1660,6 +2089,19 @@ .UNINDENT .INDENT 0.0 .TP +.B __MODULES_PUSHENV_<VAR> +Stack of saved values for \fB<VAR>\fP environment variable. A colon\-separated list containing pairs of elements. A pair is formed by a loaded +module name followed by the value set to \fB<VAR>\fP in this module with +\fBpushenv\fP command. An ampersand character separates the two parts of +the pair. +.sp +First element in list corresponds to the lastly set value of \fB<VAR>\fP\&. +If a value were set to \fB<VAR>\fP prior the first evaluated +\fBpushenv\fP command, this value is associated to an empty module name to +record it as a pair element in \fI\%__MODULES_PUSHENV_<VAR>\fP\&. +.UNINDENT +.INDENT 0.0 +.TP .B __MODULES_QUAR_<VAR> Value of environment variable \fB<VAR>\fP passed to \fBmodulecmd.tcl\fP in order to restore \fB<VAR>\fP to this value once started. @@ -1696,17 +2138,27 @@ .TP .B _LMFILES_ A colon separated list of the full pathname for all loaded \fImodulefiles\fP\&. +.sp +This environment variable is generated by \fBmodule\fP command and +should not be modified externally. .UNINDENT .INDENT 0.0 .TP .B LOADEDMODULES A colon separated list of all loaded \fImodulefiles\fP\&. +.sp +This environment variable is generated by \fBmodule\fP command and +should not be modified externally. .UNINDENT .INDENT 0.0 .TP .B MODULECONTACT Email address to contact in case any issue occurs during the interpretation of modulefiles. +.sp +This environment variable value supersedes the default value set in the +\fI\%contact\fP configuration option. It can be defined with the +\fI\%config\fP sub\-command. .UNINDENT .INDENT 0.0 .TP @@ -1729,6 +2181,10 @@ .B MODULERCFILE The location of a global run\-command file containing \fImodulefile\fP specific setup. See \fI\%Modulecmd startup\fP section for detailed information. +.sp +This environment variable value supersedes the default value set in the +\fI\%rcfile\fP configuration option. It can be defined with the +\fI\%config\fP sub\-command. .UNINDENT .INDENT 0.0 .TP @@ -1737,11 +2193,9 @@ module version specifiers\fP section). If set to \fB0\fP, disable advanced module version specifiers. .sp -Advanced module version specifiers enablement is defined in the following -order of preference: \fI\%MODULES_ADVANCED_VERSION_SPEC\fP environment -variable then the default set in \fBmodulecmd.tcl\fP script configuration. -Which means \fI\%MODULES_ADVANCED_VERSION_SPEC\fP overrides default -configuration. +This environment variable value supersedes the default value set in the +\fI\%advanced_version_spec\fP configuration option. It can be defined with +the \fI\%config\fP sub\-command. .UNINDENT .INDENT 0.0 .TP @@ -1776,7 +2230,8 @@ have been automatically loaded for either the unloaded modulefile, an unloaded dependent modulefile or a modulefile part of this useless requirement unloading batch. Modulefiles are added to this unloading batch -only if they are not required by any other loaded modulefiles. +only if they are not required by any other loaded modulefiles and if they +are not tagged \fBkeep\-loaded\fP\&. .IP \(bu 2 Dependent Reload: reload of the modulefiles declaring a \fBconflict\fP or an optional \fBprereq\fP onto either the unloaded modulefile, an @@ -1794,13 +2249,10 @@ are merged into the Dependent modulefiles to Reload that are reloaded after the load of the switched\-to modulefile. .sp -Automated module handling mode enablement is defined in the following order -of preference: \fI\%\-\-auto\fP/\fI\%\-\-no\-auto\fP command line switches, -then \fI\%MODULES_AUTO_HANDLING\fP environment variable, then the default -set in \fBmodulecmd.tcl\fP script configuration. Which means -\fI\%MODULES_AUTO_HANDLING\fP overrides default configuration and -\fI\%\-\-auto\fP/\fI\%\-\-no\-auto\fP command line switches override every -other ways to enable or disable this mode. +This environment variable value supersedes the default value set on the +\fI\%auto_handling\fP configuration option. It can be defined with the +\fI\%config\fP sub\-command. The \fI\%\-\-auto\fP and \fI\%\-\-no\-auto\fP +command line switches override this environment variable. .UNINDENT .INDENT 0.0 .TP @@ -1814,13 +2266,11 @@ disabled these modulefiles and directories contained in matching directories are excluded. .sp -\fI\%avail\fP sub\-command in depth mode enablement is defined in the -following order of preference: \fI\%\-\-indepth\fP/\fI\%\-\-no\-indepth\fP -command line switches, then \fI\%MODULES_AVAIL_INDEPTH\fP environment -variable, then the default set in \fBmodulecmd.tcl\fP script configuration. -Which means \fI\%MODULES_AVAIL_INDEPTH\fP overrides default configuration -and \fI\%\-\-indepth\fP/\fI\%\-\-no\-indepth\fP command line switches override -every other ways to enable or disable this mode. +This environment variable value supersedes the default value set in the +\fI\%avail_indepth\fP configuration option. It can be defined with the +\fI\%config\fP sub\-command. The \fI\%\-\-indepth\fP and +\fI\%\-\-no\-indepth\fP command line switches override this environment +variable. .UNINDENT .INDENT 0.0 .TP @@ -1852,13 +2302,10 @@ modules from global/user rc and all enabled modulepaths are reported as a single list. .sp -\fI\%avail\fP sub\-command regular output content is defined in the -following order of preference: \fI\%\-\-output\fP/\fI\%\-o\fP command line -switches, then \fI\%MODULES_AVAIL_OUTPUT\fP environment variable, then the -default set in \fBmodulecmd.tcl\fP script configuration. Which means -\fI\%MODULES_AVAIL_OUTPUT\fP overrides default configuration and -\fI\%\-\-output\fP/\fI\%\-o\fP command line switches override every other -ways to configure regular output content. +This environment variable value supersedes the default value set in the +\fI\%avail_output\fP configuration option. It can be defined with +the \fI\%config\fP sub\-command. The \fI\%\-\-output\fP/\fI\%\-o\fP command +line switches override this environment variable. .UNINDENT .INDENT 0.0 .TP @@ -1872,18 +2319,18 @@ The order of the elements in the list does not matter. Module names are the only content reported when \fILIST\fP is set to an empty value. .sp -\fI\%avail\fP sub\-command terse output content is defined in the following -order of preference: \fI\%\-\-output\fP/\fI\%\-o\fP command line switches, -then \fI\%MODULES_AVAIL_TERSE_OUTPUT\fP environment variable, then the -default set in \fBmodulecmd.tcl\fP script configuration. Which means -\fI\%MODULES_AVAIL_TERSE_OUTPUT\fP overrides default configuration and -\fI\%\-\-output\fP/\fI\%\-o\fP command line switches override every other -ways to configure terse output content. +This environment variable value supersedes the default value set in the +\fI\%avail_terse_output\fP configuration option. It can be defined with +the \fI\%config\fP sub\-command. The \fI\%\-\-output\fP/\fI\%\-o\fP +command line switches override this environment variable. .UNINDENT .INDENT 0.0 .TP .B MODULES_CMD The location of the active module command script. +.sp +This environment variable is generated by \fBmodule\fP command and +should not be modified externally. .UNINDENT .INDENT 0.0 .TP @@ -1892,6 +2339,24 @@ collection. Otherwise modulefile version number is omitted if it corresponds to the explicitly set default version and also to the implicit default when the configuration option \fI\%implicit_default\fP is enabled. +.sp +This environment variable value supersedes the default value set in the +\fI\%collection_pin_version\fP configuration option. It can be defined +with the \fI\%config\fP sub\-command. +.UNINDENT +.INDENT 0.0 +.TP +.B MODULES_COLLECTION_PIN_TAG +If set to \fB1\fP, register all tags applying to modulefiles when saving a +collection. Otherwise only the extra tags set through the \fI\%\-\-tag\fP +option and tags resulting from specific module states (like \fBauto\-loaded\fP +and \fBkeep\-loaded\fP tags) are recorded in collection. Note that the +\fBnearly\-forbidden\fP tag due to its temporal meaning is not saved in +collection even when this configuration option is enabled. +.sp +This environment variable value supersedes the default value set in the +\fI\%collection_pin_tag\fP configuration option. It can be defined with +the \fI\%config\fP sub\-command. .UNINDENT .INDENT 0.0 .TP @@ -1915,6 +2380,10 @@ For example, the \fI\%MODULES_COLLECTION_TARGET\fP variable may be set with results from commands like \fBlsb_release\fP, \fBhostname\fP, \fBdnsdomainname\fP, etc. +.sp +This environment variable value supersedes the default value set in the +\fI\%collection_target\fP configuration option. It can be defined with +the \fI\%config\fP sub\-command. .UNINDENT .INDENT 0.0 .TP @@ -1925,15 +2394,10 @@ When color mode is set to \fBauto\fP, output is colored only if the standard error output channel is attached to a terminal. .sp -Colored output enablement is defined in the following order of preference: -\fI\%\-\-color\fP command line switch, then \fI\%MODULES_COLOR\fP -environment variable, then \fBNO_COLOR\fP, \fBCLICOLOR\fP and -\fBCLICOLOR_FORCE\fP environment variables, then the default set in -\fBmodulecmd.tcl\fP script configuration. Which means -\fI\%MODULES_COLOR\fP overrides default configuration and the -\fBNO_COLOR\fP and \fBCLICOLOR\fP/\fBCLICOLOR_FORCE\fP variables. -\fI\%\-\-color\fP command line switch overrides every other ways to enable or -disable this mode. +This environment variable value supersedes the default value set in the +\fI\%color\fP configuration option. It can be defined with the +\fI\%config\fP sub\-command. The \fI\%\-\-color\fP command line switch +overrides this environment variable. .sp \fBNO_COLOR\fP, \fBCLICOLOR\fP and \fBCLICOLOR_FORCE\fP environment variables are also honored to define color mode. The \fBnever\fP @@ -1943,7 +2407,8 @@ \fBCLICOLOR_FORCE\fP is set to a value different than \fB0\fP\&. \fBNO_COLOR\fP variable prevails over \fBCLICOLOR\fP and \fBCLICOLOR_FORCE\fP\&. Color mode set with these three variables is -superseded by mode set with \fI\%MODULES_COLOR\fP environment variable. +superseded by mode set with \fI\%MODULES_COLOR\fP environment variable or +with \fI\%\-\-color\fP command line switch.. .UNINDENT .INDENT 0.0 .TP @@ -1968,7 +2433,8 @@ abbreviation to get a graphical rendering. Each basic tag has by default a key set in the color palette, based on its abbreviated string: auto\-loaded (\fBaL\fP), forbidden (\fBF\fP), hidden and hidden\-loaded (\fBH\fP), loaded -(\fBL\fP), nearly\-forbidden (\fBnF\fP), sticky (\fBS\fP) and super\-sticky (\fBsS\fP). +(\fBL\fP), nearly\-forbidden (\fBnF\fP), sticky (\fBS\fP), super\-sticky (\fBsS\fP) and +keep\-loaded (\fBkL\fP). .sp See the Select Graphic Rendition (SGR) section in the documentation of the text terminal that is used for permitted values and their meaning as @@ -1984,10 +2450,9 @@ be colored but which is not defined in the color set. Thus if \fI\%MODULES_COLORS\fP is defined empty, no output will be colored at all. .sp -The color set is defined for Modules in the following order of preference: -\fI\%MODULES_COLORS\fP environment variable, then the default set in -\fBmodulecmd.tcl\fP script configuration. Which means -\fI\%MODULES_COLORS\fP overrides default configuration. +This environment variable value supersedes the default value set in the +\fI\%colors\fP configuration option. It can be defined with the +\fI\%config\fP sub\-command. .UNINDENT .INDENT 0.0 .TP @@ -1995,12 +2460,13 @@ Text editor command name or path for use to open modulefile through the \fI\%edit\fP sub\-command. .sp -Editor command is defined for Modules in the following order of preference: -\fI\%MODULES_EDITOR\fP, or \fBVISUAL\fP or \fBEDITOR\fP environment -variables, then the default set in \fBmodulecmd.tcl\fP script -configuration. Which means \fI\%MODULES_EDITOR\fP overrides -\fBVISUAL\fP or \fBEDITOR\fP environment variables and default -configuration. +This environment variable value supersedes the default value set in the +\fI\%editor\fP configuration option. It can be defined with the +\fI\%config\fP sub\-command. +.sp +Text editor could also be defined through the \fBVISUAL\fP or +\fBEDITOR\fP environment variables. These environment variables are +overridden by \fI\%MODULES_EDITOR\fP\&. .UNINDENT .INDENT 0.0 .TP @@ -2017,8 +2483,23 @@ matching modulefiles is returned if defined (see \fI\%MODULES_IMPLICIT_DEFAULT\fP section) .sp -This environment variable supersedes the value of the configuration option -\fI\%extended_default\fP set in \fBmodulecmd.tcl\fP script. +This environment variable value supersedes the default value set in the +\fI\%extended_default\fP configuration option. It can be defined with the +\fI\%config\fP sub\-command. +.UNINDENT +.INDENT 0.0 +.TP +.B MODULES_FAMILY_<NAME> +Module name minus version that provides for the \fIname\fP family in currently +loaded environment. This environment variable is defined through the use of +the \fBfamily\fP modulefile command. +.sp +For instance if loading modulefile \fBfoo/1.0\fP defines being member of the +\fBbar\fP family, the \fI\%MODULES_FAMILY_BAR\fP +will be set to the \fBfoo\fP value. +.sp +This environment variable is generated by \fBmodule\fP command and +should not be modified externally. .UNINDENT .INDENT 0.0 .TP @@ -2027,18 +2508,16 @@ modulefile Tcl commands, defines the case sensitiveness to apply to match them. When \fI\%MODULES_ICASE\fP is set to \fBnever\fP, a case sensitive match is applied in any cases. When set to \fBsearch\fP, a case insensitive -match is applied to the \fI\%avail\fP, \fI\%whatis\fP and \fI\%paths\fP -sub\-commands. When set to \fBalways\fP, a case insensitive match is also -applied to the other module sub\-commands and modulefile Tcl commands for the -module specification they receive as argument. -.sp -Case sensitiveness behavior is defined in the following order of preference: -\fI\%\-\-icase\fP command line switch, which corresponds to the \fBalways\fP -mode, then \fI\%MODULES_ICASE\fP environment variable, then the default set -in \fBmodulecmd.tcl\fP script configuration. Which means -\fI\%MODULES_ICASE\fP overrides default configuration and \fI\%\-\-icase\fP -command line switch overrides every other ways to set case sensitiveness -behavior. +match is applied to the \fI\%avail\fP, \fI\%list\fP, \fI\%whatis\fP and +\fI\%paths\fP sub\-commands. When set to \fBalways\fP, a case insensitive +match is also applied to the other module sub\-commands and modulefile Tcl +commands for the module specification they receive as argument. +.sp +This environment variable value supersedes the default value set in the +\fI\%icase\fP configuration option. It can be defined with the +\fI\%config\fP sub\-command. The \fI\%\-\-icase\fP/\fI\%\-i\fP command line +switches, which correspond to the \fBalways\fP mode, override this environment +variable. .UNINDENT .INDENT 0.0 .TP @@ -2067,10 +2546,11 @@ An error is returned in the above situations if either no explicit or implicit default version is defined. .sp -This environment variable supersedes the value of the configuration option -\fI\%implicit_default\fP set in \fBmodulecmd.tcl\fP script. This -environment variable is ignored if \fI\%implicit_default\fP has been -declared locked in \fI\%locked_configs\fP configuration option. +This environment variable value supersedes the default value set in the +\fI\%implicit_default\fP configuration option. It can be defined with the +\fI\%config\fP sub\-command. This environment variable is ignored if +\fI\%implicit_default\fP has been declared locked in +\fI\%locked_configs\fP configuration option. .UNINDENT .INDENT 0.0 .TP @@ -2082,11 +2562,10 @@ module and a prereq requirement onto switched\-on module are also defined for \fBmodule switch\fP commands used in modulefile. .sp -This environment variable supersedes the value of the configuration option -\fI\%implicit_requirement\fP set in \fBmodulecmd.tcl\fP script. -\fI\%MODULES_IMPLICIT_REQUIREMENT\fP is in turn superseded by the -\fB\-\-not\-req\fP option that applies to a \fBmodule\fP command in a -modulefile. +This environment variable value supersedes the default value set in the +\fI\%implicit_requirement\fP configuration option. It can be defined with +the \fI\%config\fP sub\-command. The \fB\-\-not\-req\fP option, applied to a +\fBmodule\fP command in a modulefile, overrides this environment variable. .UNINDENT .INDENT 0.0 .TP @@ -2114,13 +2593,10 @@ The order of the elements in the list does not matter. Module names are the only content reported when \fILIST\fP is set to an empty value. .sp -\fI\%list\fP sub\-command regular output content is defined in the following -order of preference: \fI\%\-\-output\fP/\fI\%\-o\fP command line switches, -then \fI\%MODULES_LIST_OUTPUT\fP environment variable, then the default set -in \fBmodulecmd.tcl\fP script configuration. Which means -\fI\%MODULES_LIST_OUTPUT\fP overrides default configuration and -\fI\%\-\-output\fP/\fI\%\-o\fP command line switches override every other -ways to configure regular output content. +This environment variable value supersedes the default value set in the +\fI\%list_output\fP configuration option. It can be defined with the +\fI\%config\fP sub\-command. The \fI\%\-\-output\fP/\fI\%\-o\fP command +line switches override this environment variable. .UNINDENT .INDENT 0.0 .TP @@ -2134,13 +2610,36 @@ The order of the elements in the list does not matter. Module names are the only content reported when \fILIST\fP is set to an empty value. .sp -\fI\%list\fP sub\-command regular output content is defined in the following -order of preference: \fI\%\-\-output\fP/\fI\%\-o\fP command line switches, -then \fI\%MODULES_LIST_TERSE_OUTPUT\fP environment variable, then the -default set in \fBmodulecmd.tcl\fP script configuration. Which means -\fI\%MODULES_LIST_TERSE_OUTPUT\fP overrides default configuration and -\fI\%\-\-output\fP/\fI\%\-o\fP command line switches override every other -ways to configure regular output content. +This environment variable value supersedes the default value set in the +\fI\%list_terse_output\fP configuration option. It can be defined with the +\fI\%config\fP sub\-command. The \fI\%\-\-output\fP/\fI\%\-o\fP command +line switches override this environment variable. +.UNINDENT +.INDENT 0.0 +.TP +.B MODULES_MCOOKIE_CHECK +If set to \fBeval\fP, the Modules magic cookie (i.e., \fB#%Module\fP +file signature) is only checked to determine if a file is a modulefile when +evaluating these files. If set to \fBalways\fP, the Modules magic cookie is +also checked when searching for modules. +.sp +The \fBeval\fP mode is made to significantly reduce file checks when walking +through modulepaths to search for \fImodulefiles\fP\&. Special care should be given +to the content of modulepaths when this \fBeval\fP mode is set as the following +kind of files are included in search results: +.INDENT 7.0 +.IP \(bu 2 +\fImodulefiles\fP with a magic cookie requiring a higher version of +\fBmodulecmd.tcl\fP +.IP \(bu 2 +files not beginning with the magic cookie \fB#%Module\fP +.IP \(bu 2 +read\-protected files +.UNINDENT +.sp +This environment variable value supersedes the default value set in the +\fI\%mcookie_check\fP configuration option. It can be defined with the +\fI\%config\fP sub\-command. .UNINDENT .INDENT 0.0 .TP @@ -2148,6 +2647,10 @@ If set to \fB1\fP, the version set in the Modules magic cookie in modulefile is checked against the current version of \fBmodulecmd.tcl\fP to determine if the modulefile can be evaluated. +.sp +This environment variable value supersedes the default value set in the +\fI\%mcookie_version_check\fP configuration option. It can be defined with +the \fI\%config\fP sub\-command. .UNINDENT .INDENT 0.0 .TP @@ -2156,10 +2659,13 @@ \fI\%Package Initialization\fP section). If set to \fB0\fP, \fBml\fP command is not defined. .sp -\fBml\fP command enablement is defined in the following order of -preference: \fI\%MODULES_ML\fP environment variable then the default set in -\fBmodulecmd.tcl\fP script configuration. Which means \fI\%MODULES_ML\fP -overrides default configuration. +This environment variable value supersedes the default value set in the +\fI\%ml\fP configuration option. It can be defined with the +\fI\%config\fP sub\-command. +.sp +To enable or disable \fBml\fP command, \fI\%MODULES_ML\fP should be set +prior Modules initialization or the \fI\%ml\fP configuration option should +be set in the \fBinitrc\fP configuration file. .UNINDENT .INDENT 0.0 .TP @@ -2170,10 +2676,9 @@ will soon be forbidden. If set to \fB0\fP, modules will never be considered \fInearly forbidden\fP\&. Accepted values are integers comprised between 0 and 365. .sp -This configuration is defined in the following order of preference: -\fI\%MODULES_NEARLY_FORBIDDEN_DAYS\fP environment variable then the default -set in \fBmodulecmd.tcl\fP script configuration. Which means -\fI\%MODULES_NEARLY_FORBIDDEN_DAYS\fP overrides default configuration. +This environment variable value supersedes the default value set in the +\fI\%nearly_forbidden_days\fP configuration option. It can be defined with +the \fI\%config\fP sub\-command. .UNINDENT .INDENT 0.0 .TP @@ -2182,10 +2687,9 @@ attached to a terminal. The value of this variable is composed of a pager command name or path eventually followed by command\-line options. .sp -Paging command and options are defined for Modules in the following order of -preference: \fI\%MODULES_PAGER\fP environment variable, then the default -set in \fBmodulecmd.tcl\fP script configuration. Which means -\fI\%MODULES_PAGER\fP overrides default configuration. +This environment variable value supersedes the default value set in the +\fI\%pager\fP configuration option. It can be defined with the +\fI\%config\fP sub\-command. .sp If \fI\%MODULES_PAGER\fP variable is set to an empty string or to the value \fBcat\fP, pager will not be launched. @@ -2212,10 +2716,21 @@ \fBmodulecmd.tcl\fP script to make it restore the environment variable put in quarantine. .sp -Quarantine mechanism support is defined for Modules in the following order of -preference: \fI\%MODULES_QUARANTINE_SUPPORT\fP environment variable, then -the default set in \fBmodulecmd.tcl\fP script configuration. Which means -\fI\%MODULES_QUARANTINE_SUPPORT\fP overrides default configuration. +This environment variable value supersedes the default value set in the +\fI\%quarantine_support\fP configuration option. It can be defined with +the \fI\%config\fP sub\-command. +.UNINDENT +.INDENT 0.0 +.TP +.B MODULES_REDIRECT_OUTPUT +If set to \fB0\fP, the output generated by module command is kept on stderr and +not redirected to stdout channel. +.sp +This environment variable value supersedes the default value set in the +\fI\%redirect_output\fP configuration option. It can be defined with +the \fI\%config\fP sub\-command. The \fI\%\-\-redirect\fP and +\fI\%\-\-no\-redirect\fP command line switches override this environment +variable. .UNINDENT .INDENT 0.0 .TP @@ -2232,6 +2747,10 @@ .sp Original values of these environment variables set in quarantine are passed to \fBmodulecmd.tcl\fP via \fI\%__MODULES_QUAR_<VAR>\fP variables. +.sp +This environment variable value supersedes the default value set in the +\fI\%run_quarantine\fP configuration option. It can be defined with the +\fI\%config\fP sub\-command. .UNINDENT .INDENT 0.0 .TP @@ -2249,13 +2768,11 @@ query string. When set to \fBcontains\fP, any modules whose fully qualified name contains search query string are returned. .sp -Module search match style is defined in the following order of preference: -\fI\%\-\-starts\-with\fP and \fI\%\-\-contains\fP command line switches, then -\fI\%MODULES_SEARCH_MATCH\fP environment variable, then the default set in -\fBmodulecmd.tcl\fP script configuration. Which means -\fI\%MODULES_SEARCH_MATCH\fP overrides default configuration and -\fI\%\-\-starts\-with\fP/\fI\%\-\-contains\fP command line switches override -every other ways to set search match style. +This environment variable value supersedes the default value set in the +\fI\%search_match\fP configuration option. It can be defined with the +\fI\%config\fP sub\-command. The \fI\%\-\-starts\-with\fP and +\fI\%\-\-contains\fP command line switches override this environment +variable. .UNINDENT .INDENT 0.0 .TP @@ -2265,6 +2782,15 @@ sub\-shells. Setting shell startup file means defining the \fBENV\fP and \fBBASH_ENV\fP environment variable to the Modules bourne shell initialization script. If set to \fB0\fP, shell startup file is not defined. +.sp +This environment variable value supersedes the default value set in the +\fI\%set_shell_startup\fP configuration option. It can be defined with the +\fI\%config\fP sub\-command. +.sp +To enable shell startup file, \fI\%MODULES_SET_SHELL_STARTUP\fP should be +set to \fB1\fP prior Modules initialization or the \fI\%set_shell_startup\fP +configuration option should be set to \fB1\fP in the \fBinitrc\fP +configuration file. .UNINDENT .INDENT 0.0 .TP @@ -2277,6 +2803,16 @@ .sp Accepted values are a list of shell among \fIsh\fP, \fIbash\fP, \fIcsh\fP, \fItcsh\fP and \fIfish\fP separated by colon character (\fB:\fP). +.sp +This environment variable value supersedes the default value set in the +\fI\%shells_with_ksh_fpath\fP configuration option. It can be defined with +the \fI\%config\fP sub\-command. +.sp +To enable the setup of \fBFPATH\fP for some shells, +\fI\%MODULES_SHELLS_WITH_KSH_FPATH\fP should be set to the list of these +shells prior Modules initialization or the \fI\%shells_with_ksh_fpath\fP +configuration option should be set to the list of these shells in the +\fBinitrc\fP configuration file. .UNINDENT .INDENT 0.0 .TP @@ -2286,6 +2822,10 @@ command or the module shell initialization script. Only applies to Bourne Shell (sh) and its derivatives. .sp +This environment variable value supersedes the default value set in the +\fI\%silent_shell_debug\fP configuration option. It can be defined with the +\fI\%config\fP sub\-command. +.sp To generate the code to silence shell debugging property in the \fBmodule\fP shell function, \fI\%MODULES_SILENT_SHELL_DEBUG\fP should be set to \fB1\fP prior Modules initialization or the @@ -2298,8 +2838,11 @@ Location of a site\-specific configuration script to source into \fBmodulecmd.tcl\fP\&. See also \fI\%Modulecmd startup\fP section. .sp -This environment variable is ignored if \fI\%extra_siteconfig\fP has been -declared locked in \fI\%locked_configs\fP configuration option. +This environment variable value supersedes the default value set in the +\fI\%extra_siteconfig\fP configuration option. It can be defined with the +\fI\%config\fP sub\-command. This environment variable is ignored if +\fI\%extra_siteconfig\fP has been declared locked in +\fI\%locked_configs\fP configuration option. .UNINDENT .INDENT 0.0 .TP @@ -2312,9 +2855,9 @@ reported. In case the whole \fI\%MODULES_TAG_ABBREV\fP environment variable is set to an empty string, tags are reported but not abbreviated. .sp -The tag abbreviation definition set in \fI\%MODULES_TAG_ABBREV\fP -environment variable supersedes the default configuration set in -\fBmodulecmd.tcl\fP script. +This environment variable value supersedes the default value set in the +\fI\%tag_abbrev\fP configuration option. It can be defined with the +\fI\%config\fP sub\-command. .UNINDENT .INDENT 0.0 .TP @@ -2331,8 +2874,9 @@ \fI\%MODULES_TAG_COLOR_NAME\fP environment variable, a tag name or abbreviation is displayed and select graphic rendition is applied over it. .sp -The definition set in \fI\%MODULES_TAG_COLOR_NAME\fP environment variable -supersedes the default configuration set in \fBmodulecmd.tcl\fP script. +This environment variable value supersedes the default value set in the +\fI\%tag_color_name\fP configuration option. It can be defined with the +\fI\%config\fP sub\-command. .UNINDENT .INDENT 0.0 .TP @@ -2342,6 +2886,10 @@ color output in case no specific color set is defined with the \fI\%MODULES_COLORS\fP variable. Accepted values are \fBdark\fP and \fBlight\fP\&. +.sp +This environment variable value supersedes the default value set in the +\fI\%term_background\fP configuration option. It can be defined with the +\fI\%config\fP sub\-command. .UNINDENT .INDENT 0.0 .TP @@ -2351,13 +2899,10 @@ the module command. Accepted values are integers comprised between 0 and 1000. .sp -This configuration is defined in the following order of preference: -\fI\%\-\-width\fP or \fI\%\-w\fP command line switches, then -\fI\%MODULES_TERM_WIDTH\fP environment variable, then the default set in -\fBmodulecmd.tcl\fP script configuration. Which means -\fI\%MODULES_TERM_WIDTH\fP overrides default configuration. -\fI\%\-\-width\fP or \fI\%\-w\fP command line switches override every other -configuration. +This environment variable value supersedes the default value set in the +\fI\%term_width\fP configuration option. It can be defined with the +\fI\%config\fP sub\-command. The \fI\%\-\-width\fP/\fI\%\-w\fP command line +switches override this environment variable. .UNINDENT .INDENT 0.0 .TP @@ -2365,6 +2910,10 @@ When a module unload request matches multiple loaded modules, unload firstly loaded module or lastly loaded module. Accepted values are \fBreturnfirst\fP and \fBreturnlast\fP\&. +.sp +This environment variable value supersedes the default value set in the +\fI\%unload_match_order\fP configuration option. It can be defined with +the \fI\%config\fP sub\-command. .UNINDENT .INDENT 0.0 .TP @@ -2380,9 +2929,9 @@ If a shortcut is associated to an empty string or an invalid character, this shortcut definition will be ignored. .sp -The variant shortcut definition set in \fI\%MODULES_VARIANT_SHORTCUT\fP -environment variable supersedes the default configuration set in -\fBmodulecmd.tcl\fP script. +This environment variable value supersedes the default value set in the +\fI\%variant_shortcut\fP configuration option. It can be defined with the +\fI\%config\fP sub\-command. .UNINDENT .INDENT 0.0 .TP @@ -2418,14 +2967,11 @@ printing debug messages. .UNINDENT .sp -Module command verbosity is defined in the following order of preference: -\fI\%\-\-silent\fP, \fI\%\-\-verbose\fP, \fI\%\-\-debug\fP and -\fI\%\-\-trace\fP command line switches, then \fI\%MODULES_VERBOSITY\fP -environment variable, then the default set in \fBmodulecmd.tcl\fP script -configuration. Which means \fI\%MODULES_VERBOSITY\fP overrides default -configuration and -\fI\%\-\-silent\fP/\fI\%\-\-verbose\fP/\fI\%\-\-debug\fP/\fI\%\-\-trace\fP -command line switches overrides every other ways to set verbosity level. +This environment variable value supersedes the default value set in the +\fI\%verbosity\fP configuration option. It can be defined with the +\fI\%config\fP sub\-command. The \fI\%\-\-silent\fP, \fI\%\-\-verbose\fP, +\fI\%\-\-debug\fP and \fI\%\-\-trace\fP command line switches override this +environment variable. .UNINDENT .INDENT 0.0 .TP @@ -2439,6 +2985,14 @@ Characters with a special meaning for Tcsh shell (like \fB{\fP and \fB}\fP) may not be used anymore in shell alias definition otherwise the evaluation of the code produced by modulefiles will return a syntax error. +.sp +This environment variable value supersedes the default value set in the +\fI\%wa_277\fP configuration option. It can be defined with the +\fI\%config\fP sub\-command. +.sp +To enable this workaround, \fI\%MODULES_WA_277\fP should be set to \fB1\fP +prior Modules initialization or the \fI\%wa_277\fP configuration option +should be set to \fB1\fP in the \fBinitrc\fP configuration file. .UNINDENT .INDENT 0.0 .TP @@ -2446,6 +3000,10 @@ The location of the main Modules package file directory containing module command initialization scripts, the executable program \fBmodulecmd.tcl\fP, and a directory containing a collection of main \fImodulefiles\fP\&. +.sp +This environment variable value supersedes the default value set in the +\fI\%home\fP configuration option. It can be defined with the +\fI\%config\fP sub\-command. .UNINDENT .SH FILES .sp @@ -2467,7 +3025,7 @@ defines modulepaths to enable with \fBmodule use\fP, modules to load with \fBmodule load\fP and configuration to apply with \fI\%module config\fP\&. As any modulefile \fBinitrc\fP must begin -with the magic cookie \fB#%Module\fP\&. +with the Modules magic cookie (i.e., \fB#%Module\fP file signature). .sp \fBinitrc\fP is optional. When this configuration file is present it is evaluated after the \fBmodulespath\fP configuration file. See the @@ -2546,6 +3104,6 @@ .sp ml(1), modulefile(4) .SH COPYRIGHT -1996-1999 John L. Furlani & Peter W. Osel, 1998-2017 R.K.Owen, 2002-2004 Mark Lakata, 2004-2017 Kent Mein, 2016-2021 Xavier Delaruelle +1996-1999 John L. Furlani & Peter W. Osel, 1998-2017 R.K.Owen, 2002-2004 Mark Lakata, 2004-2017 Kent Mein, 2016-2022 Xavier Delaruelle .\" Generated by docutils manpage writer. .
View file
_service:tar_scm:modules-5.0.1.tar.bz2/doc/build/modulefile.4 -> _service:tar_scm:modules-5.1.1.tar.bz2/doc/build/modulefile.4
Changed
@@ -1,8 +1,5 @@ .\" Man page generated from reStructuredText. . -.TH "MODULEFILE" "4" "2021-10-16" "5.0.1" "Modules" -.SH NAME -modulefile \- files containing Tcl code for the Modules package . .nr rst2man-indent-level 0 . @@ -30,6 +27,9 @@ .\" new: \\nrst2man-indent\\nrst2man-indent-level .in \\nrst2man-indent\\nrst2man-indent-levelu .. +.TH "MODULEFILE" "4" "2022-05-31" "5.1.1" "Modules" +.SH NAME +modulefile \- files containing Tcl code for the Modules package .SH DESCRIPTION .sp \fImodulefiles\fP are written in the Tool Command Language, \fBTcl(n)\fP and @@ -38,15 +38,16 @@ while the user is working; and can be used to implement site policies regarding the access and use of applications. .sp -A \fImodulefile\fP begins with the magic cookie, \fB#%Module\fP\&. A version number -may be placed after this string. The version number is useful as the -\fImodulefile\fP format may change thus it reflects the minimum version of -\fBmodulecmd.tcl\fP required to interpret the modulefile. If a version -number doesn\(aqt exist, then \fBmodulecmd.tcl\fP will assume the \fImodulefile\fP -is compatible. Files without the magic cookie or with a version number greater -than the current version of \fBmodulecmd.tcl\fP will not be interpreted. If -the \fBmcookie_version_check\fP configuration is disabled the version -number set is not checked. +A \fImodulefile\fP begins with the \fB#%Module\fP file signature, also called the +Modules magic cookie. A version number may be placed after this string. The +version number is useful as the \fImodulefile\fP format may change thus it +reflects the minimum version of \fBmodulecmd.tcl\fP required to interpret +the modulefile. If a version number doesn\(aqt exist, then \fBmodulecmd.tcl\fP +will assume the \fImodulefile\fP is compatible. Files without the magic cookie or +with a version number greater than the current version of +\fBmodulecmd.tcl\fP will not be interpreted. If the +\fBmcookie_version_check\fP configuration is disabled the version number +set is not checked. .sp Each \fImodulefile\fP contains the changes to a user\(aqs environment needed to access an application. Tcl is a simple programming language which permits @@ -87,6 +88,25 @@ the \fImodulefile\fP is being loaded. .INDENT 0.0 .TP +.B always\-load \-\-tag taglist modulefile... +Load \fImodulefile\fP and apply the \fBkeep\-loaded\fP tag to it in order to avoid +the automatic unload of this \fImodulefile\fP when modules dependent of it are +unloaded. +.sp +\fImodulefile\fP is declared as a requirement of currently loading module. This +command acts as an alias of \fI\%module load\fP command. If more +than one \fImodulefile\fP are specified, then this list acts as a Boolean AND +operation, which means all specified \fImodulefiles\fP are required. +.sp +The \fB\-\-tag\fP option accepts a list of module tags to apply to \fImodulefile\fP +once loaded in addition to the \fBkeep\-loaded\fP tag. \fItaglist\fP corresponds to +the concatenation of multiple tags separated by colon character. \fItaglist\fP +should not contain tags inherited from \fImodulefile\fP state or from other +modulefile commands. If module is already loaded, tags from \fItaglist\fP are +added to the list of tags already applied to this module. +.UNINDENT +.INDENT 0.0 +.TP .B append\-path \-d C|\-\-delim C|\-\-delim=C \-\-duplicates variable value... See \fI\%prepend\-path\fP\&. .UNINDENT @@ -137,22 +157,27 @@ .UNINDENT .INDENT 0.0 .TP -.B conflict modulefile... -\fI\%prereq\fP and \fI\%conflict\fP control whether or not the \fImodulefile\fP -will be loaded. The \fI\%prereq\fP command lists \fImodulefiles\fP which must -have been previously loaded before the current \fImodulefile\fP will be loaded. -Similarly, the \fI\%conflict\fP command lists \fImodulefiles\fP which -\fI\%conflict\fP with the current \fImodulefile\fP\&. If a list contains more than -one \fImodulefile\fP, then each member of the list acts as a Boolean OR -operation. Multiple \fI\%prereq\fP and \fI\%conflict\fP commands may be -used to create a Boolean AND operation. If one of the requirements have not -been satisfied, an error is reported and the current \fImodulefile\fP makes no -changes to the user\(aqs environment. +.B complete shell name body +Define shell completion for command \fIname\fP with specified \fIbody\fP if \fIshell\fP +is the current shell under which \fBmodulecmd.tcl\fP was invoked. \fIBody\fP +corresponds to argument options accepted by the shell command which +defines completion. When a \fImodulefile\fP is unloaded, \fI\%complete\fP +becomes \fI\%uncomplete\fP\&. .sp -If an argument for \fI\%prereq\fP is a directory and any \fImodulefile\fP from -the directory has been loaded, then the prerequisite is met. For example, -specifying X11 as a \fI\%prereq\fP means that any version of X11, X11/R4 or -X11/R5, must be loaded before proceeding. +The following \fIshells\fP are supported: bash, tcsh, bash and fish. Please refer +to the documentation of these shells to learn how to define completion. The +command is ignored if an unsupported shell is specified. +.UNINDENT +.INDENT 0.0 +.TP +.B conflict modulefile... +\fI\%conflict\fP controls whether or not the \fImodulefile\fP will be loaded. +The \fI\%conflict\fP command lists \fImodulefiles\fP which conflict with the +current \fImodulefile\fP\&. If a list contains more than one \fImodulefile\fP, then +each member of the list acts as a Boolean OR operation. Multiple +\fI\%conflict\fP commands may be used to create a Boolean AND operation. If +one of the requirements have not been satisfied, an error is reported and the +current \fImodulefile\fP makes no changes to the user\(aqs environment. .sp If an argument for \fI\%conflict\fP is a directory and any other \fImodulefile\fP from that directory has been loaded, then a conflict will occur. @@ -175,6 +200,11 @@ .UNINDENT .INDENT 0.0 .TP +.B depends\-on \-\-tag taglist modulefile... +Alias of \fI\%prereq\-all\fP command. +.UNINDENT +.INDENT 0.0 +.TP .B exit N This is not a modules specific command but another overloaded Tcl command and is similar to the \fI\%break\fP or \fI\%continue\fP commands. However, @@ -185,25 +215,54 @@ .UNINDENT .INDENT 0.0 .TP -.B getenv variable value +.B family name +Defines loading modulefile as a member of family \fIname\fP\&. Only one member of a +family could be loaded. Error is raised when attempting to load another +member of the same family \fIname\fP\&. +.sp +\fI\%family\fP corresponds to the definition of a \fI\%conflict\fP on +\fIname\fP and the definition of a \fI\%module\-alias\fP \fIname\fP targeting +currently loading module. +.sp +In addition, the \fBMODULES_FAMILY_<NAME>\fP environment variable is +defined and set to the currently loading module name minus version. This +variable helps to know what module provides for the family \fIname\fP in the +currently loaded environment. For instance if loading modulefile \fBfoo/1.0\fP +defines being member of the \fBbar\fP family, the +\fBMODULES_FAMILY_BAR\fP will be set to the +\fBfoo\fP value. For compatibility, the \fBLMOD_FAMILY_<NAME>\fP +environment variable is also defined and set to the same value than +\fBMODULES_FAMILY_<NAME>\fP\&. +.sp +\fIname\fP should be a non\-empty string only containing characters that could be +part of an environment variable name (i.e., \fIa\-zA\-Z0\-9_\fP). +.UNINDENT +.INDENT 0.0 +.TP +.B getenv \-\-return\-value variable value Returns value of environment \fIvariable\fP\&. If \fIvariable\fP is not defined, \fIvalue\fP is returned if set, an empty string is returned otherwise. The \fI\%getenv\fP command should be preferred over the Tcl global variable \fBenv\fP to query environment variables. .sp When modulefile is evaluated in \fIdisplay\fP mode, \fI\%getenv\fP returns -\fIvariable\fP name prefixed with dollar sign (e.g., \fB$variable\fP). +\fIvariable\fP name prefixed with dollar sign (e.g., \fB$variable\fP) unless if the +\fB\-\-return\-value\fP option is set. When this option is set the value of +environment \fIvariable\fP or defined fallback value is returned in \fIdisplay\fP +mode. .UNINDENT .INDENT 0.0 .TP -.B getvariant variant value +.B getvariant \-\-return\-value variant value Returns value of designated \fIvariant\fP\&. If \fIvariant\fP is not defined, \fIvalue\fP is returned if set, an empty string is returned otherwise. The \fI\%getvariant\fP command should be preferred over the \fI\%ModuleVariant\fP Tcl array to query a variant value. .sp When modulefile is evaluated in \fIdisplay\fP mode, \fI\%getvariant\fP returns -\fIvariant\fP name enclosed in curly braces (e.g., \fB{variant}\fP). +\fIvariant\fP name enclosed in curly braces (e.g., \fB{variant}\fP) unless if the +\fB\-\-return\-value\fP option is set. When this option is set the value of +\fIvariant\fP or defined fallback value is returned in \fIdisplay\fP mode. .UNINDENT .INDENT 0.0 .TP @@ -256,44 +315,102 @@ .INDENT 0.0 .TP .B module sub\-command sub\-command\-options sub\-command\-args -Contains the same \fIsub\-commands\fP as described in the module(1) man -page in the Module Sub\-Commands section. Exception made for the -following sub\-commands that can only be used outside of a modulefile context: -\fBpath\fP, \fBpaths\fP, \fBautoinit\fP, \fBhelp\fP, -\fBclear\fP, \fBsh\-to\-mod\fP, \fBedit\fP, \fBconfig\fP, -\fBrefresh\fP and \fBsource\fP\&. Also the following sub\-commands -cannot be used but have a modulefile command counterpart: -\fBprepend\-path\fP, \fBappend\-path\fP, \fBremove\-path\fP, -\fBis\-loaded\fP, \fBis\-saved\fP, \fBis\-used\fP, -\fBis\-avail\fP and \fBinfo\-loaded\fP\&. -.sp This command permits a \fImodulefile\fP to \fBload\fP or \fBunload\fP -other \fImodulefiles\fP\&. No checks are made to ensure that the \fImodulefile\fP does -not try to load itself. Often it is useful to have a single \fImodulefile\fP that -performs a number of \fBmodule load\fP commands. For example, if every user on -the system requires a basic set of applications loaded, then a core -\fImodulefile\fP would contain the necessary \fBmodule load\fP commands. -.sp -The \fB\-\-not\-req\fP option may be set for the \fBload\fP, \fBunload\fP and -\fBswitch\fP sub\-commands to inhibit the definition of an implicit prereq or -conflict requirement onto specified modules. +other \fImodulefiles\fP or to \fBuse\fP or \fBunuse\fP \fImodulepaths\fP\&. No +checks are made to ensure that the \fImodulefile\fP does not try to load itself. +Often it is useful to have a single \fImodulefile\fP that performs a number of +\fBmodule load\fP commands. For example, if every user on the system requires a +basic set of applications loaded, then a core \fImodulefile\fP would contain the +necessary \fBmodule load\fP commands. +.sp +The \fB\-\-not\-req\fP option may be set for the \fBload\fP, \fBtry\-load\fP, +\fBload\-any\fP, \fBunload\fP and \fBswitch\fP sub\-commands to inhibit the +definition of an implicit prereq or conflict requirement onto specified +modules. .sp On \fBtry\-load\fP sub\-command, if specified \fImodulefile\fP is not found thus loaded, no implicit prereq requirement is defined over this module. .sp +The \fBload\-any\fP sub\-command loads one \fImodulefile\fP from the specified list. +An error is obtained if no \fImodulefile\fP from the list can be loaded. No +operation is performed if a \fImodulefile\fP from the list is found already +loaded. +.sp +The \fBunuse\fP sub\-command accepts the \fB\-\-remove\-on\-unload\fP, +\fB\-\-noop\-on\-unload\fP, \fB\-\-append\-on\-unload\fP and \fB\-\-prepend\-on\-unload\fP +options to control the behavior to apply when \fImodulefile\fP is unloaded. See +\fI\%remove\-path\fP for further explanation. +.sp +The \fBload\fP, \fBtry\-load\fP, \fBload\-any\fP and \fBswitch\fP sub\-commands accept +the \fB\-\-tag\fP option to apply specified tags to \fImodulefile\fP once loaded. +Option accepts a concatenation of multiple module tags separated by colon +character. \fItaglist\fP should not contain tags inherited from \fImodulefile\fP +state or from other modulefile commands. If module is already loaded, tags +from \fItaglist\fP are added to the list of tags already applied to this module. +.sp Command line switches \fB\-\-auto\fP, \fB\-\-no\-auto\fP and \fB\-\-force\fP are ignored when passed to a \fI\%module\fP command set in a \fImodulefile\fP\&. -.INDENT 7.0 -.INDENT 3.5 -Changed in version 4.7: Sub\-command option \fB\-\-no\-req\fP added - .sp -Changed in version 5.0: \fBsource\fP sub\-command is not allowed anymore and \fBsource\fP Tcl -command should be used instead - -.UNINDENT -.UNINDENT +Not all the \fIsub\-commands\fP described in the Module Sub\-Commands +section of the module(1) man page are available when \fI\%module\fP +is used as a Modules specific Tcl command. The following table summarizes the +different sub\-commands available for each interpretation context. +.TS +center; +|l|l|l|. +_ +T{ +Sub\-commands available from +modulefile interpretation +T} T{ +Sub\-commands available from \fBinitrc\fP configuration +file and sourced +script file +T} T{ +Sub\-commands available from run\-command (rc) file +interpretation +T} +_ +T{ +\fBload\fP, +\fBload\-any\fP, +\fBswitch\fP, +\fBtry\-load\fP, +\fBunload\fP, +\fBunuse\fP, \fBuse\fP\&. +Also available but not recommanded for use from regular +modulefile: \fBaliases\fP, +\fBavail\fP, +\fBdisplay\fP, +\fBinitadd\fP, +\fBinitclear\fP, +\fBinitlist\fP, +\fBinitprepend\fP, +\fBinitrm\fP, +\fBinitswitch\fP, +\fBlist\fP, +\fBpurge\fP, +\fBreload\fP, +\fBrestore\fP, +\fBsave\fP, +\fBsavelist\fP, +\fBsaverm\fP, +\fBsaveshow\fP, +\fBsearch\fP, +\fBtest\fP, +\fBwhatis\fP +T} T{ +Same sub\-commands +available than for +modulefile and +\fBconfig\fP +sub\-command. +T} T{ +\fINone\fP +T} +_ +.TE .UNINDENT .INDENT 0.0 .TP @@ -485,8 +602,8 @@ Returns \fB1\fP if \fBmodulecmd.tcl\fP\(aqs command is \fIcommandname\fP\&. \fIcommandname\fP can be: \fBload\fP, \fBunload\fP, \fBrefresh\fP, \fBreload\fP, \fBsource\fP, \fBswitch\fP, \fBdisplay\fP, \fBavail\fP, \fBaliases\fP, \fBlist\fP, -\fBwhatis\fP, \fBsearch\fP, \fBpurge\fP, \fBrestore\fP, \fBhelp\fP, \fBtest\fP or -\fBtry\-load\fP\&. +\fBwhatis\fP, \fBsearch\fP, \fBpurge\fP, \fBrestore\fP, \fBhelp\fP, \fBtest\fP, +\fBtry\-load\fP or \fBload\-any\fP\&. .UNINDENT .UNINDENT .sp @@ -678,8 +795,12 @@ are: \fBauto\-loaded\fP, \fBforbidden\fP, \fBhidden\fP, \fBhidden\-loaded\fP, \fBloaded\fP and \fBnearly\-forbidden\fP\&. .sp -When \fItag\fP equals \fBsticky\fP or \fBsuper\-sticky\fP, designated \fImodulefile\fP are +When \fItag\fP equals \fBsticky\fP or \fBsuper\-sticky\fP, designated \fImodulefile\fP is defined Sticky modules\&. +.sp +When \fItag\fP equals \fBkeep\-loaded\fP, designated \fImodulefile\fP is not +automatically unloaded when it has been auto\-loaded and its dependent modules +are getting unloaded. .UNINDENT .INDENT 0.0 .TP @@ -761,14 +882,101 @@ .UNINDENT .INDENT 0.0 .TP -.B prereq modulefile... -See \fI\%conflict\fP\&. +.B prereq \-\-tag taglist modulefile... +\fI\%prereq\fP controls whether or not the \fImodulefile\fP will be loaded. The +\fI\%prereq\fP command lists \fImodulefiles\fP which must have been previously +loaded before the current \fImodulefile\fP will be loaded. If a list contains +more than one \fImodulefile\fP, then each member of the list acts as a Boolean OR +operation. Multiple \fI\%prereq\fP commands may be used to create a Boolean +AND operation. If one of the requirements have not been satisfied, an error +is reported and the current \fImodulefile\fP makes no changes to the user\(aqs +environment. +.sp +If an argument for \fI\%prereq\fP is a directory and any \fImodulefile\fP from +the directory has been loaded, then the prerequisite is met. For example, +specifying X11 as a \fI\%prereq\fP means that any version of X11, X11/R4 or +X11/R5, must be loaded before proceeding. +.sp +The parameter \fImodulefile\fP may also be a symbolic modulefile name or a +modulefile alias. It may also leverage a specific syntax to finely select +module version (see \fI\%Advanced module version specifiers\fP section below). +.sp +If the \fBauto_handling\fP configuration option is enabled +\fI\%prereq\fP will attempt to load specified modulefile if not found loaded +yet (see \fBMODULES_AUTO_HANDLING\fP in module(1)). +.sp +The \fB\-\-tag\fP option accepts a list of module tags to apply to \fImodulefile\fP +once loaded. \fItaglist\fP corresponds to the concatenation of multiple tags +separated by colon character. \fItaglist\fP should not contain tags inherited +from \fImodulefile\fP state or from other modulefile commands. If module is +already loaded, tags from \fItaglist\fP are added to the list of tags already +applied to this module. +.UNINDENT +.INDENT 0.0 +.TP +.B prereq\-all \-\-tag taglist modulefile... +Declare \fImodulefile\fP as a requirement of currently loading module. This +command acts as an alias of \fI\%prereq\fP command. If more than one +\fImodulefile\fP are specified, then this list acts as a Boolean AND operation, +which means all specified \fImodulefiles\fP are required. +.UNINDENT +.INDENT 0.0 +.TP +.B prereq\-any \-\-tag taglist modulefile... +Alias of \fI\%prereq\fP command. +.UNINDENT +.INDENT 0.0 +.TP +.B pushenv variable value +Set environment \fIvariable\fP to \fIvalue\fP and save previous value of \fIvariable\fP +to restore it when \fImodulefile\fP is unloaded. Like for \fI\%setenv\fP +modulefile command, changes made to \fIvariable\fP with \fI\%pushenv\fP are +applied to \fIvariable\fP in Tcl\(aqs \fBenv\fP array to update environment \fIvariable\fP +value in current evaluation context. +.sp +When \fImodulefile\fP is unloaded, the \fIvalue\fP saved from the \fI\%pushenv\fP +command of this modulefile is removed from saved value stack list. \fIvariable\fP +is then set to the remaining \fIvalue\fP on top of the stack or it is unset if +stack becomes empty. +.sp +Saved value stack list for \fIvariable\fP is stored in an environment variable +which is named by prefixing \fIvariable\fP by \fB__MODULES_PUSHENV_\fP\&. .UNINDENT .INDENT 0.0 .TP -.B remove\-path \-d C|\-\-delim C|\-\-delim=C \-\-index variable value... +.B puts \-nonewline channelId string +Writes the characters given by \fIstring\fP to the channel given by \fIchannelId\fP\&. +This command is not a Modules\-specific command, it is actually part of Tcl. +See the \fBputs(n)\fP Tcl man page for a complete description of this +command. +.sp +Content written to the \fBstderr\fP channel is rendered as output message +produced by modulefile. Content written to the \fBstdout\fP channel is rendered +as shell command evaluated in the user current shell environment. Content +sent to \fBstdout\fP is spooled to be rendered after the environment changes +made by modulefile. +.sp +When \fIchannelId\fP equals \fBprestdout\fP, content is rendered as shell command +evaluated in current shell environment. This content is spooled and rendered +prior any other environment changes. +.UNINDENT +.INDENT 0.0 +.TP +.B remove\-path options variable value... \-\-append\-on\-unload|\-\-prepend\-on\-unload value... Remove \fIvalue\fP from the colon, or \fIdelimiter\fP, separated list in -\fIvariable\fP\&. See \fI\%prepend\-path\fP or \fI\%append\-path\fP for further +\fIvariable\fP\&. +.sp +\fI\%remove\-path\fP command accepts the following options: +.INDENT 7.0 +.IP \(bu 2 +\fB\-d C|\-\-delim C|\-\-delim=C\fP +.IP \(bu 2 +\fB\-\-index\fP +.IP \(bu 2 +\fB\-\-remove\-on\-unload|\-\-noop\-on\-unload|\-\-append\-on\-unload|\-\-prepend\-on\-unload\fP +.UNINDENT +.sp +See \fI\%prepend\-path\fP or \fI\%append\-path\fP for further explanation of using an arbitrary delimiter. Every string between colons, or delimiters, in \fIvariable\fP is compared to \fIvalue\fP\&. If the two match, \fIvalue\fP is removed from \fIvariable\fP if its reference counter is equal to 1 or unknown. @@ -776,6 +984,14 @@ When \fB\-\-index\fP option is set, \fIvalue\fP refers to an index in \fIvariable\fP list. The string element pointed by this index is set for removal. .sp +When \fImodulefile\fP is unloaded, no operation is performed by default or if the +\fB\-\-noop\-on\-unload\fP option is set. If the \fB\-\-remove\-on\-unload\fP option is +set, \fIvalue\fP is removed. If the \fB\-\-append\-on\-unload\fP option is set, append +back \fIvalue\fP removed at load time or specific \fIvalue\fP if any set. If the +\fB\-\-prepend\-on\-unload\fP option is set, prepend back \fIvalue\fP removed at load +time or specific \fIvalue\fP if any set. These options cannot be set if +\fB\-\-index\fP option is also set. +.sp Reference counter of \fIvalue\fP in \fIvariable\fP denotes the number of times \fIvalue\fP has been added to \fIvariable\fP\&. This information is stored in environment \fB__MODULES_SHARE_variable\fP\&. When @@ -790,6 +1006,26 @@ .UNINDENT .INDENT 0.0 .TP +.B reportError string +Output \fIstring\fP as an error message during \fImodulefile\fP evaluation and raise +error count. \fI\%reportError\fP does not abort modulefile evaluation. Use +the \fBerror(n)\fP Tcl command to abort evaluation in addition to emit +an error message. +.UNINDENT +.INDENT 0.0 +.TP +.B reportWarning string +Output \fIstring\fP as a warning message during \fImodulefile\fP evaluation. +.UNINDENT +.INDENT 0.0 +.TP +.B require\-fullname +Abort \fIload\fP evaluation of \fImodulefile\fP if name specified to designate it is +not the fully qualified one. Module alias or a symbolic version names are +considered fully qualified names, exception made for the \fIdefault\fP symbol. +.UNINDENT +.INDENT 0.0 +.TP .B set\-alias alias\-name alias\-string Sets an alias or function with the name \fIalias\-name\fP in the user\(aqs environment to the string \fIalias\-string\fP\&. For some shells, aliases are not @@ -806,7 +1042,7 @@ .UNINDENT .INDENT 0.0 .TP -.B setenv variable value +.B setenv \-\-set\-if\-undef variable value Set environment \fIvariable\fP to \fIvalue\fP\&. The \fI\%setenv\fP command will also change the process\(aq environment. A reference using Tcl\(aqs env associative array will reference changes made with the \fI\%setenv\fP command. Changes @@ -818,8 +1054,11 @@ \fI\%setenv\fP becomes \fI\%unsetenv\fP\&. If the environment \fIvariable\fP had been defined it will be overwritten while loading the \fImodulefile\fP\&. A subsequent \fBunload\fP will unset the environment \fIvariable\fP \- the -previous value cannot be restored! (Unless you handle it explicitly ... see -below.) +previous value cannot be restored! (Unless you handle it explicitly or if you +use the \fI\%pushenv\fP modulefile command instead of \fI\%setenv\fP) +.sp +When the \fB\-\-set\-if\-undef\fP option is set, environment variable is defined +when \fImodulefile\fP is loaded only if not yet defined. .UNINDENT .INDENT 0.0 .TP @@ -835,8 +1074,11 @@ were recorded in the \fB__MODULES_LMSOURCESH\fP environment variable at \fBload\fP time. .sp -Changes on environment variables, shell aliases, shell functions and current -working directory are tracked. +Changes on environment variables, shell aliases, shell functions, shell +completions and current working directory are tracked. +.sp +Changes made on environment variable intended for Modules private use (e.g., +\fBLOADEDMODULES\fP, \fB_LMFILES_\fP, \fB__MODULES_*\fP) are ignored. .sp \fIShell\fP could be specified as a command name or a fully qualified pathname. The following shells are supported: sh, dash, csh, tcsh, bash, ksh, ksh93, @@ -880,6 +1122,14 @@ .UNINDENT .INDENT 0.0 .TP +.B uncomplete name +Unsets completion for command \fIname\fP in the user\(aqs environment. When a +\fImodulefile\fP is unloaded, no operation is performed. +.sp +The following shells are supported: bash, tcsh and fish. +.UNINDENT +.INDENT 0.0 +.TP .B unset\-alias alias\-name Unsets an alias with the name \fIalias\-name\fP in the user\(aqs environment. .UNINDENT @@ -890,15 +1140,20 @@ .UNINDENT .INDENT 0.0 .TP -.B unsetenv variable value +.B unsetenv options variable value Unsets environment \fIvariable\fP\&. When a \fImodulefile\fP is unloaded, no operation is performed unless if an optional \fIvalue\fP is defined, in which case \fIvariable\fP is to \fIvalue\fP\&. The \fI\%unsetenv\fP command changes the process\(aq environment like \fI\%setenv\fP\&. +.sp +If the \fB\-\-noop\-on\-unload\fP option is set, no operation is performed when +\fImodulefile\fP is unloaded. If the \fB\-\-unset\-on\-unload\fP option is set, +environment \fIvariable\fP is also unset when \fImodulefile\fP is unloaded. These +behaviors are applied even if an optional \fIvalue\fP is defined. .UNINDENT .INDENT 0.0 .TP -.B variant \-\-boolean \-\-default value name value... +.B variant \-\-boolean \-\-default value name value... Declare module variant \fIname\fP with list of accepted \fIvalue\fP and instantiate it in the \fI\%ModuleVariant\fP array variable. .sp @@ -908,10 +1163,11 @@ .sp Selected variant value is transmitted to the evaluating modulefile. A value must be specified for variant \fIname\fP and it must corresponds to a value in -the accepted value list. Otherwise an error is raised. An exception is made -if modulefile is evaluated in \fBdisplay\fP mode: no error is raised if no -value is specified for a given variant and variant is not instantiated in the -\fI\%ModuleVariant\fP array variable. +the accepted value list if such list is defined. Otherwise an error is +raised. An exception is made if modulefile is evaluated in \fBdisplay\fP mode: +no error is raised if no value is specified for a given variant and variant +is not instantiated in the \fI\%ModuleVariant\fP array variable. When no +list of accepted value is defined, variant could be set to any value. .sp When the \fB\-\-default\fP option is set, variant \fIname\fP is set to the \fIvalue\fP associated with this option in case no value is specified for variant in @@ -976,6 +1232,48 @@ .UNINDENT .UNINDENT .UNINDENT +.sp +Modulefiles and run\-command (rc) files are differently interpreted. A limited +number of the Modules specific Tcl commands are available for rc files +interpretation since such files are intended to set parameters for modulefiles +(like defining alias, hiding, tagging, etc) and not to change user +environment. The following table summarizes the different commands available +for each interpretation context. +.TS +center; +|l|l|. +_ +T{ +Commands available from +modulefile interpretation +T} T{ +Commands available from run\-command (rc) file +interpretation +T} +_ +T{ +All the Modules specific +and standard Tcl commands +T} T{ +\fI\%is\-loaded\fP, \fI\%is\-used\fP, +\fI\%module\-alias\fP, \fI\%module\-forbid\fP, +\fI\%module\-hide\fP, \fI\%module\-info\fP, +\fI\%module\-tag\fP, \fI\%module\-version\fP, +\fI\%module\-virtual\fP, \fI\%system\fP, +\fI\%uname\fP, \fI\%versioncmp\fP and +standard Tcl commands +T} +_ +.TE +.sp +\fBNOTE:\fP +.INDENT 0.0 +.INDENT 3.5 +Global and user run\-command files are interpreted like modulefiles +and benefit from all Modules specific Tcl commands. However it not advised +to perform environment changes from such files. +.UNINDENT +.UNINDENT .SH MODULES VARIABLES .INDENT 0.0 .TP @@ -985,6 +1283,13 @@ .UNINDENT .INDENT 0.0 .TP +.B ModulesVersion +The \fI\%ModulesVersion\fP variable can be set in \fB\&.version\fP file to +designate the name of the \fImodulefile\fP version which should be considered +as default in current directory (see \fI\%Locating Modulefiles\fP section below). +.UNINDENT +.INDENT 0.0 +.TP .B ModuleTool The \fI\%ModuleTool\fP variable contains the name of the \fImodule\fP implementation currently in use. The value of this variable is set to @@ -995,7 +1300,7 @@ .B ModuleToolVersion The \fI\%ModuleToolVersion\fP variable contains the version of the \fImodule\fP implementation currently in use. The value of this variable is set to -\fB5.0.1\fP for this version of Modules. +\fB5.1.1\fP for this version of Modules. .UNINDENT .INDENT 0.0 .TP @@ -1032,13 +1337,13 @@ .sp If the \fB\&.version\fP file exists, it is opened and interpreted as Tcl code and takes precedence over a \fB\&.modulerc\fP file in the same directory. If -the Tcl variable \fBModulesVersion\fP is set by the \fB\&.version\fP file, +the Tcl variable \fI\%ModulesVersion\fP is set by the \fB\&.version\fP file, \fBmodulecmd.tcl\fP will use the name as if it specifies a \fImodulefile\fP in this directory. This will become the default \fImodulefile\fP in this case. -\fBModulesVersion\fP cannot refer to a \fImodulefile\fP located in a different +\fI\%ModulesVersion\fP cannot refer to a \fImodulefile\fP located in a different directory. .sp -If \fBModulesVersion\fP is a directory, the search begins anew down that +If \fI\%ModulesVersion\fP is a directory, the search begins anew down that directory. If the name does not match any files located in the current directory, the search continues through the remaining directories in \fBMODULEPATH\fP\&. @@ -1105,6 +1410,12 @@ in case of deep \fImodulefile\fP). Unless a symbolic version, alias, or regular module version already exists for these version names. .sp +Every file in searched directories is checked to see if it begins with the +Modules magic cookie (i.e., \fB#%Module\fP file signature) to determine if it is +a \fImodulefile\fP (see \fI\%DESCRIPTION\fP section). When the \fBmcookie_check\fP +configuration is set to \fBeval\fP, this check is skipped and all files in +search directories are considered \fImodulefiles\fP\&. +.sp If user names a \fImodulefile\fP that cannot be found in the first \fImodulepath\fP directory, \fImodulefile\fP will be searched in next \fImodulepath\fP directory and so on until a matching \fImodulefile\fP is found. If search goes through @@ -1146,6 +1457,16 @@ taken into account. When explicitly named for evaluation selection, such modules are unveiled to return an access error. .sp +\fBNOTE:\fP +.INDENT 0.0 +.INDENT 3.5 +When the \fBmcookie_check\fP configuration is set to \fBeval\fP, +file access permissions are not checked thus files with restricted +permissions are included in search results but still lead to error if +evaluated. +.UNINDENT +.UNINDENT +.sp A symbolic version\-name assigned to a hidden module is displayed or taken into account only if explicitly named and if module is not hard\-hidden. Non\-hidden module alias targeting a hidden \fImodulefile\fP appears like any other non\-hidden @@ -1262,6 +1583,77 @@ \fB=\fP and all characters set as variant shortcut. Exception is made for \fB+\fP character which could be set one or several consecutive times at the end of module name (e.g., \fIname+\fP or \fIname++\fP). +.SH DEPENDENCIES BETWEEN MODULEFILES +.sp +A modulefile may express dependencies on other modulefiles. Two kind of +dependency exist: pre\-requirement and conflict. The former means specified +modulefiles should be loaded prior the modulefile that express the +requirement. The latter means specified modulefiles should not be loaded for +the modulefile that express the conflict to be loaded too. +.sp +Pre\-requirement could be expressed with \fI\%prereq\fP, \fI\%prereq\-any\fP, +\fI\%prereq\-all\fP, \fI\%depends\-on\fP, \fI\%always\-load\fP, +\fI\%module load\fP, \fI\%module switch\fP, +\fI\%module try\-load\fP or \fI\%module load\-any\fP +modulefile commands. When the \fBauto_handling\fP configuration option is +disabled, required modulefile should be manually loaded prior their dependent +modulefile when expressed with the \fI\%prereq\fP, \fI\%prereq\-any\fP, +\fI\%prereq\-all\fP or \fI\%depends\-on\fP modulefile commands. For other +commands or when \fBauto_handling\fP is enabled, pre\-required modulefiles +are automatically loaded. +.sp +Conflict is expressed with \fI\%conflict\fP or \fI\%module unload\fP +modulefile commands. A conflicting loaded modulefile should be manually +unloaded prior loading the modulefile that express such conflict when defined +with \fI\%conflict\fP\&. It is automatically unloaded when expressed with +\fI\%module unload\fP\&. +.sp +It is strongly advised to define dependencies prior environment changes in a +modulefile. Dependency resolution should be done before any environment change +to ensure the environment is getting set in the same order whether +pre\-requirements are already loaded, or if they are automatically loaded when +loading the modulefile which depends on them, or if all loaded modules are +reloaded or refreshed. This is especially important when the modulefile +updates an environment variable also altered by other modulefiles like +\fBPATH\fP\&. As the order of the path elements in such variable defines +priority, it is important that this order does not change depending on the way +the modulefiles are loaded. +.sp +\fBmodule\fP keeps environment consistent which means a modulefile cannot +be loaded if its requirements are not loaded or if a conflicting module is +loaded. In addition a loaded module cannot be unloaded if other loaded modules +depends on it. The \fBautomated module handling +mechanisms\fP attempt to solve the dependencies expressed +by loading or unloading additional modulefiles. When the \fB\-\-no\-auto\fP +option is set on \fBmodule\fP command when loading or unload modulefile, +automated module handling mechanisms are disabled and dependencies have to be +solved manually. When dependencies are not satisfied, modulefile fails to load +or unload. +.sp +Adding the \fB\-\-not\-req\fP option when expressing dependencies in modulefile +with the \fI\%module\fP command will attempt to load or unload the designated +modulefile but it will not mark them as pre\-requirement or conflict. +.sp +By adding the \fB\-\-force\fP option to the \fBmodule\fP command when +loading or unloading modulefile, the consistency checks are by\-passed. This +option cannot be used when expressing dependencies in modulefiles. If a module +has been force loaded whereas its requirements are not loaded or whereas a +conflicting module is also loaded, the user environment is said inconsistent. +.sp +Note that a pre\-requirement should be found in the loaded module list prior +its dependent module. User environment is considered inconsistent if +pre\-requirement module is found loaded after dependent module, as the +environment changes may have been done in the wrong priority order. +.sp +When user environment is considered inconsistent global operations achieved by +\fBrefresh\fP, \fBreload\fP and \fBsave\fP sub\-commands cannot +perform. This mechanism is there to avoid the situation to worsen by +re\-evaluating all loaded modules or recording this environment. +.sp +When the \fBauto_handling\fP configuration option is enabled, if missing +pre\-requirement modulefile gets loaded or conflicting modulefile gets unloaded +the inconsistent loaded module will be automatically reloaded to make user +environment consistent again. .SH MODULEFILE SPECIFIC HELP .sp Users can request help about a specific \fImodulefile\fP through the @@ -1285,6 +1677,53 @@ environment changes \fBmodulecmd.tcl\fP will call the \fBModulesDisplay\fP subroutine. The \fBModulesDisplay\fP subroutine is a good place to put additional descriptive information about the \fImodulefile\fP\&. +.SH COMPATIBILITY WITH LMOD TCL MODULEFILE +.sp +The \fBmodulecmd.tcl\fP program supports Tcl modulefile written for Lmod, +the alternative \fBmodule\fP implementation developed in Lua. Such +modulefiles can be evaluated by Modules without raising error. Differences +between the two implementations are listed below. +.sp +The \fBadd\-property\fP, \fBremove\-property\fP and \fBextensions\fP modulefile +commands are evaluated as a \fIno\-operation\fP command. No error is obtained if +these commands are used in modulefiles but no change occurs. +.sp +The \fI\%break\fP command does not accept any argument. A \fBmsg\fP argument +can be set on Lmod to provide a customized break error message. +.sp +Use of \fI\%reportError\fP command aborts modulefile evaluation on Lmod. This +command only reports an error message on Modules. +.sp +The \fI\%require\-fullname\fP command only aborts \fIload\fP modulefile evaluation +whereas the Lmod implementation also aborts \fIunload\fP and \fIdisplay\fP +evaluations. +.sp +When processing a \fI\%family\fP command, the \fBLMOD_FAMILY_<NAME>\fP +environment variable is also defined to be compatible with modulefiles or +scripts relying on such variable. +.sp +When unloading a modulefile, the \fI\%pushenv\fP command does not update the +value of the environment variable if this modulefile was not defining the +value currently in use. +.sp +The third optional argument of \fI\%append\-path\fP and \fI\%prepend\-path\fP +commands corresponds to a priority specification on Lmod whereas these two +commands accept multiple path element arguments on Modules. +.sp +The \fI\%prereq\fP command is equivalent to the \fI\%prereq\-any\fP command +on Modules whereas on Lmod it is equivalent to the \fI\%prereq\-all\fP +command. +.sp +If the \fBauto_handling\fP configuration option is disabled, the +requirements defined with the \fI\%depends\-on\fP command are not +automatically loaded and an error is raised if none of these requirements are +found loaded. +.sp +On \fBmodule load\-any\fP sub\-command and modulefile command, a +modulefile evaluation error is not reported and \fBmodule +load\-any\fP continues to the next modulefile instead of aborting the +whole process. No attempt to load listed modulefiles is made if one of these +modulefiles is found already loaded. .SH ENVIRONMENT .sp See the ENVIRONMENT section in the @@ -1301,6 +1740,6 @@ .sp TclX was developed by Karl Lehenbauer and Mark Diekhans. .SH COPYRIGHT -1996-1999 John L. Furlani & Peter W. Osel, 1998-2017 R.K.Owen, 2002-2004 Mark Lakata, 2004-2017 Kent Mein, 2016-2021 Xavier Delaruelle +1996-1999 John L. Furlani & Peter W. Osel, 1998-2017 R.K.Owen, 2002-2004 Mark Lakata, 2004-2017 Kent Mein, 2016-2022 Xavier Delaruelle .\" Generated by docutils manpage writer. .
View file
_service:tar_scm:modules-5.0.1.tar.bz2/doc/example/compiler-etc-dependencies/homebrewed/bar/common -> _service:tar_scm:modules-5.1.1.tar.bz2/doc/example/compiler-etc-dependencies/homebrewed/bar/common
Changed
@@ -39,7 +39,7 @@ # If no simd loaded, default to sse4.1 if { $simd eq {} } { set simd simd/sse4.1 - # We will load this so autohandling knows is a depency + # We will load this so autohandling knows is a dependency module load $simd PrintLoadInfo "Setting simd to $simd" }
View file
_service:tar_scm:modules-5.0.1.tar.bz2/doc/example/expose-procs-vars-to-modulefiles/siteconfig.tcl -> _service:tar_scm:modules-5.1.1.tar.bz2/doc/example/expose-procs-vars-to-modulefiles/siteconfig.tcl
Changed
@@ -1,5 +1,5 @@ # -# siteconfig.tcl - Site specific configuration script exposing additionnal +# siteconfig.tcl - Site specific configuration script exposing additional # procedures and variables to the modulefile and modulerc evaluation # contexts #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/doc/example/inhibit-report-info/siteconfig.tcl -> _service:tar_scm:modules-5.1.1.tar.bz2/doc/example/inhibit-report-info/siteconfig.tcl
Changed
@@ -17,7 +17,7 @@ # is set to 1 proc reportInfo {message {title INFO}} { if {!$::g_inhibit_inforeport} { - # use reportError for conveniance but there is no error here + # use reportError for convenience but there is no error here reportError $message 0 $title 0 } }
View file
_service:tar_scm:modules-5.0.1.tar.bz2/doc/example/log-module-commands/siteconfig.tcl -> _service:tar_scm:modules-5.1.1.tar.bz2/doc/example/log-module-commands/siteconfig.tcl
Changed
@@ -14,12 +14,17 @@ # parse context lassign $cmdstring cmdname modfile modname set mode currentState mode + if {info level > 1} { + set caller lindex info level -1 0 + } else { + set caller {} + } # only log load and unload modulefile evaluation if {$mode in {load unload}} { # add info on load mode to know if module is auto-loaded or not - if {$mode eq {load}} { + if {$mode eq {load} && $caller eq {cmdModuleLoad}} { upvar 1 uasked uasked set extra ", \"auto\": expr {$uasked ? {false} : {true}}" } else {
View file
_service:tar_scm:modules-5.0.1.tar.bz2/doc/example/top-priority-values/siteconfig.tcl -> _service:tar_scm:modules-5.1.1.tar.bz2/doc/example/top-priority-values/siteconfig.tcl
Changed
@@ -17,36 +17,19 @@ # override 'setenv' procedure to add a '--top' optional argument rename ::setenv ::__setenv proc setenv {args} { - set topPriority 0 - set errArgMsg "wrong # args: should be \"setenv ?--top? var val\"" - switch -- llength $args { - {3} { - if {lindex $args 0 eq "--top"} { - set topPriority 1 - } else { - error $errArgMsg - } - set var lindex $args 1 - set val lindex $args 2 - } - {2} { - set var lindex $args 0 - set val lindex $args 1 - } - default { - error $errArgMsg - } - } + set arglist lsearch -all -inline -not -exact $args "--top" + lassign parseSetenvCommandArgs load set {*}$arglist bhv var val - if {$topPriority} { + # top priority asked + if {llength $arglist != llength $args} { # define an helper variable to know a top-priority value has been set if {currentState mode ne "display"} { __setenv MODULES_PRIORITY_$var $val } - __setenv $var $val + __setenv {*}$arglist # set non-priority value only if no top priority value already set } elseif {!info exists ::env(MODULES_PRIORITY_$var)} { - __setenv $var $val + __setenv {*}$arglist } } @@ -54,47 +37,39 @@ # when setenv is evaluated on an unload mode rename ::setenv-un ::__setenv-un proc setenv-un {args} { - set topPriority 0 - set errArgMsg "wrong # args: should be \"setenv-un ?--top? var val\"" - switch -- llength $args { - {3} { - if {lindex $args 0 eq "--top"} { - set topPriority 1 - } else { - error $errArgMsg - } - set var lindex $args 1 - set val lindex $args 2 - } - {2} { - set var lindex $args 0 - set val lindex $args 1 - } - default { - error $errArgMsg - } - } + set arglist lsearch -all -inline -not -exact $args "--top" + lassign parseSetenvCommandArgs unload unset {*}$arglist bhv var val - if {$topPriority} { + # top priority asked + if {llength $arglist != llength $args} { # define an helper variable to know a top-priority value has been set if {currentState mode ne "display"} { __setenv-un MODULES_PRIORITY_$var $val } - __setenv-un $var $val + __setenv-un {*}$arglist # set non-priority value only if no top priority value already set } elseif {!info exists ::env(MODULES_PRIORITY_$var)} { - __setenv-un $var $val + __setenv-un {*}$arglist } } +# override 'setenv-wh' procedure to interpret the '--top' optional argument +# when setenv is evaluated on an whatis mode +rename ::setenv-wh ::__setenv-wh +proc setenv-wh {args} { + set arglist lsearch -all -inline -not -exact $args "--top" + __setenv-wh {*}$arglist +} + # override 'add-path' procedure to add a '--top' optional argument, which # will benefit to the 'append-path' and 'prepend-path' modulefile commands rename ::add-path ::__add-path -proc add-path {pos args} { +proc add-path {cmd mode dflbhv args} { set keep_top_priority 0 + set pos expr {$cmd eq {append-path} ? {append} : {prepend}} set arglist lsearch -all -inline -not -exact $args "--top" - lassign eval parsePathCommandArgs "add-path" $arglist separator\ - allow_dup idx_val var path_list + lassign parsePathCommandArgs $cmd $mode $dflbhv {*}$arglist separator\ + allow_dup idx_val ign_refcount bhv var path_list # top priority asked if {llength $arglist != llength $args} { @@ -107,34 +82,36 @@ # ensure top-priority value keeps first or last position by unloading it # priority new value addition, then restoring it if {$keep_top_priority} { - eval __unload-path $var $::env(MODULES_PRIORITY_${pos}_$var) + eval __unload-path $cmd load remove $var\ + $::env(MODULES_PRIORITY_${pos}_$var) } - eval __add-path $pos $arglist + __add-path $cmd $mode $dflbhv {*}$arglist if {$keep_top_priority} { - eval __add-path $pos $var $::env(MODULES_PRIORITY_${pos}_$var) + eval __add-path $cmd $mode $dflbhv $var\ + $::env(MODULES_PRIORITY_${pos}_$var) } } rename ::unload-path ::__unload-path -proc unload-path {args} { +proc unload-path {cmd mode dflbhv args} { set arglist lsearch -all -inline -not -exact $args "--top" - lassign eval parsePathCommandArgs "unload-path" $arglist separator\ - allow_dup idx_val var path_list + lassign parsePathCommandArgs $cmd $mode $dflbhv {*}$arglist separator\ + allow_dup idx_val ign_refcount bhv var path_list if {llength $arglist != llength $args} { # wipe priority helper variable when unloading top priority value - switch -- lindex info level -1 0 { - {append-path} { set pos "append" } - {prepend-path} { set pos "prepend" } + switch -- $cmd { + {append-path} { set pos append } + {prepend-path} { set pos prepend } } if {info exists pos} { __setenv MODULES_PRIORITY_${pos}_$var $path_list } } - eval __unload-path $arglist + __unload-path $cmd $mode $dflbhv {*}$arglist } # vim:set tabstop=3 shiftwidth=3 expandtab autoindent:
View file
_service:tar_scm:modules-5.0.1.tar.bz2/doc/example/unload-firstly-loaded/siteconfig.tcl -> _service:tar_scm:modules-5.1.1.tar.bz2/doc/example/unload-firstly-loaded/siteconfig.tcl
Changed
@@ -3,7 +3,7 @@ # procedure to return firstly loaded module by default instead of lastly # loaded module. With this the firsly loaded module will be unloaded instead # of the lastly loaded in case multiple loaded modules match passed name to -# unload. Which was the behavior of Modules v3.2 (compatbility) version. +# unload. Which was the behavior of Modules v3.2 (compatibility) version. # # Author: Xavier Delaruelle <xavier.delaruelle@cea.fr> # Compatibility: Modules v4.2
View file
_service:tar_scm:modules-5.0.1.tar.bz2/doc/source/FAQ.rst -> _service:tar_scm:modules-5.1.1.tar.bz2/doc/source/FAQ.rst
Changed
@@ -17,14 +17,14 @@ module () { - eval `/some/path/modulecmd sh $*` + eval "$(/some/path/modulecmd sh "$@")" } csh: .. code-block:: csh - eval `/some/path/modulecmd csh !*` + eval "`/some/path/modulecmd csh !*:q`" Where the ``modulecmd`` outputs valid shell commands to *stdout* which manipulates the shell's environment. Any text that is meant to be seen by the user **must** be sent to *stderr*. For example: @@ -149,7 +149,7 @@ Build Issues ------------ -The configure script complains about Tclx +The configure script complains about TclX ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ :: @@ -185,7 +185,7 @@ How can I help? ^^^^^^^^^^^^^^^ -We can use help at various levels. The best way to contribute is to send in a patch file (see the FAQ on how to generate a patch file) with whatever fixes. The patch will be reviewed and tested. If you are a regular contributer then you'll likely be invited to become a developer and to have direct source access, and the fame, power, and prestige that all entails. +We can use help at various levels. The best way to contribute is to send in a patch file (see the FAQ on how to generate a patch file) with whatever fixes. The patch will be reviewed and tested. If you are a regular contributor then you'll likely be invited to become a developer and to have direct source access, and the fame, power, and prestige that all entails. How do I download the source repository? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
View file
_service:tar_scm:modules-5.0.1.tar.bz2/doc/source/_static/rtd_theme_overrides.css -> _service:tar_scm:modules-5.1.1.tar.bz2/doc/source/_static/rtd_theme_overrides.css
Changed
@@ -1,7 +1,7 @@ /* override table width restrictions */ @media screen and (min-width: 767px) { - .wy-table-responsive table td { + .wy-table-responsive table td, .wy-table-responsive table th { /* !important prevents the common CSS stylesheets from overriding this as on RTD they are loaded after this stylesheet */ white-space: normal !important;
View file
_service:tar_scm:modules-5.0.1.tar.bz2/doc/source/_static/terminal_output.css -> _service:tar_scm:modules-5.1.1.tar.bz2/doc/source/_static/terminal_output.css
Changed
@@ -8,6 +8,14 @@ color: #fff5ca; } +.sgrb { + color: #ef2929; +} + +.sgra { + color: #8ae234; +} + .sgrhi { font-weight: bold; } @@ -90,6 +98,15 @@ background-color: #06989a; } +.sgrshi { + background-color: #06989a; + font-weight: bold; +} + .sgrss { background-color: #3465a4; } + +.sgrkl { + background-color: #688f8f; +}
View file
_service:tar_scm:modules-5.0.1.tar.bz2/doc/source/changes.rst -> _service:tar_scm:modules-5.1.1.tar.bz2/doc/source/changes.rst
Changed
@@ -66,7 +66,7 @@ :option:`--icase`, :option:`-i` - This command line switch was not supported starting Modules version ``4.0`` but reintroduced starting version ``4.4``. When :option:`--icase` switch is now set it applies to search query string and module specificiation on all sub-commands and modulefile Tcl commands. + This command line switch was not supported starting Modules version ``4.0`` but reintroduced starting version ``4.4``. When :option:`--icase` switch is now set it applies to search query string and module specification on all sub-commands and modulefile Tcl commands. Module Sub-Commands @@ -123,7 +123,7 @@ Compatibility version enables to load a *modulefile* by passing on the command-line the name of a module alias or symbolic version pointing to this modulefile. However this module alias or symbolic version name cannot be used to unload the modulefile once loaded. Modules 4 enables to pass a module alias or symbolic version name to unload a loaded modulefile referred by this name. - On versions ``4.0`` and ``4.1``, unloading an unexistent modulefile generates an *Unable to locate modulefile* error. Starting with version ``4.2``, unloading a module only looks at loaded module list and does not trigger a modulefile search. So starting version ``4.2`` the same behavior than Modules compatibility version is obtained. + On versions ``4.0`` and ``4.1``, unloading an nonexistent modulefile generates an *Unable to locate modulefile* error. Starting with version ``4.2``, unloading a module only looks at loaded module list and does not trigger a modulefile search. So starting version ``4.2`` the same behavior than Modules compatibility version is obtained. Starting with version ``4.1``, content sent to the ``stdout`` channel during a *modulefile* interpretation is spooled to effectively transmit this content to stdout after rendering the environment changes made by this modulefile. @@ -431,7 +431,8 @@ | Introduced | New modulefile Tcl commands | | in version | | +============+=================================================================+ -| 4.0 | :mfcmd:`module-info command<module-info>`, :mfcmd:`getenv` | +| 4.0 | :mfcmd:`module-info command<module-info>`, :mfcmd:`getenv`, | +| | :mfcmd:`reportError`, :mfcmd:`reportWarning` | +------------+-----------------------------------------------------------------+ | 4.1 | :mfcmd:`module-info loaded<module-info>`, :mfcmd:`is-saved`, | | | :mfcmd:`is-used`, :mfcmd:`is-avail`, :mfcmd:`module-virtual` | @@ -521,8 +522,8 @@ | 4.7 | :mconfig:`avail_output`, :mconfig:`avail_terse_output`, | | | :mconfig:`implicit_requirement`, :mconfig:`list_output`, | | | :mconfig:`list_terse_output`, :mconfig:`mcookie_version_check`, | -| | :mconfig:`shells_with_ksh_fpath`, :mconfig:`tag_color_name`, | -| | :mconfig:`term_width` | +| | :mconfig:`shells_with_ksh_fpath`, :mconfig:`tag_abbrev`, | +| | :mconfig:`tag_color_name`, :mconfig:`term_width` | +------------+-----------------------------------------------------------------+ | 4.8 | :mconfig:`editor`, :mconfig:`variant_shortcut` | +------------+-----------------------------------------------------------------+ @@ -562,10 +563,10 @@ :file:`initrc` configuration file. These report messages are disabled when the :mconfig:`verbosity` configuration option is set to ``concise`` or ``silent``. -Enforce use of the module magic cookie (i.e., ``#%Module``) at the start of -:file:`initrc` configuration file. No evaluation occurs and an error is -produced if the magic cookie is missing or if the optional version number -placed after the cookie string is higher than the version of the +Enforce use of the Modules magic cookie (i.e., ``#%Module`` file signature) at +the start of :file:`initrc` configuration file. No evaluation occurs and an +error is produced if the magic cookie is missing or if the optional version +number placed after the cookie string is higher than the version of the :file:`modulecmd.tcl` script in use. Quarantine mechanism code in the Modules shell initialization scripts is now @@ -595,10 +596,10 @@ Modulecmd startup """"""""""""""""" -Enforce use of the module magic cookie (i.e., ``#%Module``) at the start of -global or user rc files. These files are not evaluated and an error is -produced if the magic cookie is missing or if the optional version number -placed after the cookie string is higher than the version of the +Enforce use of the Modules magic cookie (i.e., ``#%Module`` file signature) at +the start of global or user rc files. These files are not evaluated and an +error is produced if the magic cookie is missing or if the optional version +number placed after the cookie string is higher than the version of the :file:`modulecmd.tcl` script in use. Module Sub-Commands @@ -643,11 +644,12 @@ :subcmd:`source` - Enforce use of the module magic cookie (i.e., ``#%Module``) at the start of - any scriptfile passed for evaluation to the :subcmd:`source` sub-command. - These files are not evaluated and an error is produced if the magic cookie is - missing or if the optional version number placed after the cookie string is - higher than the version of the :file:`modulecmd.tcl` script in use. + Enforce use of the Modules magic cookie (i.e., ``#%Module`` file signature) at + the start of any scriptfile passed for evaluation to the :subcmd:`source` + sub-command. These files are not evaluated and an error is produced if the + magic cookie is missing or if the optional version number placed after the + cookie string is higher than the version of the :file:`modulecmd.tcl` script + in use. :subcmd:`use` @@ -690,11 +692,38 @@ When passed environment variable is not defined, an empty string is returned by default rather ``_UNDEFINED_``. + Starting version 5.1, the ``--return-value`` option is added to return + environment variable value or its fallback when modulefile is evaluated in + *display* mode. + :mfcmd:`module` Forbid use of :subcmd:`module source<source>` command in modulefile or in an initialization rc file, the ``source`` Tcl command should be used instead. + Starting version ``5.1``, an error is raised when an unused option is set + on ``module use`` or ``module unuse`` commands. + + Starting version ``5.1``, options ``--*-on-unload`` added to the + :mfcmd:`remove-path` command are also added to the ``module unuse`` command. + +:mfcmd:`remove-path` + + Starting with version ``5.1``, the ``--remove-on-unload`` option is added to + also remove value when modulefile is unloaded. + + Starting with version ``5.1``, the ``--append-on-unload`` and + ``--prepend-on-unload`` options are added to restore when modulefile is + unloaded the value list unset at load time. + + Starting with version ``5.1``, the ``--noop-on-unload`` option is added to + perform no operation when modulefile is unloaded. + +:mfcmd:`setenv` + + Starting with version ``5.1``, the ``--set-if-undef`` option is added to set + environment variable when modulefile is loaded only if not yet defined. + :mfcmd:`unsetenv` When running on an unload evaluation, do not unset designated environment @@ -703,6 +732,21 @@ Distinguish between being called on a unload evaluation without a value to restore or with an empty string value to restore. + Starting with version ``5.1``, the ``--noop-on-unload`` option is added to + perform no operation when modulefile is unloaded. + + Starting with version ``5.1``, the ``--unset-on-unload`` option is added to + also unset variable when modulefile is unloaded. + +:mfcmd:`variant` + + Starting version 5.1, :mfcmd:`variant` command accepts being called without + a list of accepted value defined. In this case, any value specified is + accepted. + + Starting version 5.1, the ``--return-value`` option is added to return + variant value or its fallback when modulefile is evaluated in *display* mode. + Locating Modulefiles """""""""""""""""""" @@ -759,7 +803,7 @@ +---------------------------------+------------------------+-------------------+ | :mconfig:`color` | ``never`` | ``auto`` | +---------------------------------+------------------------+-------------------+ -| :mconfig:`icase` | ``never`` | ``icase`` | +| :mconfig:`icase` | ``never`` | ``search`` | +---------------------------------+------------------------+-------------------+ | :mconfig:`set_shell_startup` | ``1`` | ``0`` | +---------------------------------+------------------------+-------------------+ @@ -775,6 +819,44 @@ When initializing Modules, :subcmd:`refresh` the loaded modules in case some user environment is already configured. +Command line switches +""""""""""""""""""""" + +The following command line switches appeared on Modules 5. + ++------------+-----------------------------------------------------------------+ +| Introduced | New command line switches | +| in version | | ++============+=================================================================+ +| 5.1 | :option:`--redirect`, :option:`--no-redirect`, :option:`--tag` | ++------------+-----------------------------------------------------------------+ + +Module Sub-Commands +""""""""""""""""""" + +The following module sub-commands appeared on Modules 5. + ++------------+-----------------------------------------------------------------+ +| Introduced | New module sub-commands | +| in version | | ++============+=================================================================+ +| 5.1 | :subcmd:`state`, :subcmd:`load-any` | ++------------+-----------------------------------------------------------------+ + +:subcmd:`list` + + Starting Modules 5.1, this sub-command accepts patterns to filter the loaded + modules to list. + + Starting Modules 5.1, the :option:`--starts-with` and :option:`--contains` + options are supported on this sub-command to provide the regular search match + capabilities. + +:subcmd:`sh-to-mod` + + Starting Modules 5.1, this sub-command also tracks shell completion changes + for bash, tcsh and fish shells. + Environment """"""""""" @@ -788,15 +870,70 @@ | | :envvar:`__MODULES_QUARANTINE_SET`, | | | :envvar:`__MODULES_AUTOINIT_INPROGRESS` | +------------+-----------------------------------------------------------------+ +| 5.1 | :envvar:`MODULES_REDIRECT_OUTPUT`, | +| | :envvar:`MODULES_MCOOKIE_CHECK`, | +| | :envvar:`MODULES_FAMILY_\<NAME\>`, | +| | :envvar:`__MODULES_PUSHENV_\<VAR\>`, | +| | :envvar:`__MODULES_LMEXTRATAG`, | +| | :envvar:`MODULES_COLLECTION_PIN_TAG` | ++------------+-----------------------------------------------------------------+ Modules Specific Tcl Commands """"""""""""""""""""""""""""" +The following modulefile Tcl commands appeared on Modules 5. + ++------------+-----------------------------------------------------------------+ +| Introduced | New modulefile Tcl commands | +| in version | | ++============+=================================================================+ +| 5.1 | :mfcmd:`add-property`, :mfcmd:`remove-property`, | +| | :mfcmd:`extensions`, :mfcmd:`prereq-any`, | +| | :mfcmd:`require-fullname`, :mfcmd:`depends-on`, | +| | :mfcmd:`prereq-all`, :mfcmd:`always-load`, | +| | :mfcmd:`module load-any<module>`, :mfcmd:`family`, | +| | :mfcmd:`complete`, :mfcmd:`uncomplete`, :mfcmd:`pushenv` | ++------------+-----------------------------------------------------------------+ + :mfcmd:`system`, :mfcmd:`is-used` Starting Modules 5.0, these modulefile commands are available from a modulerc evaluation context. +:mfcmd:`prereq`, :mfcmd:`module load/try-load/load-any/switch<module>` + + Starting Modules 5.1, these modulefile commands accept the :option:`--tag` + option. + +:mfcmd:`module try-load/load-any<module>` + + Starting Modules 5.1, these modulefile commands accept the ``--not-req`` + option. + +:mfcmd:`puts` + + Starting Modules 5.1, if content is sent to the ``prestdout`` channel, it is + rendered as command to evaluate in current shell session and prior any other + environment changes. + +:mfcmd:`source-sh` + + Starting Modules 5.1, this modulefile command also tracks shell completion + changes for bash, tcsh and fish shells. + +Modules Variables +""""""""""""""""" + +The following Modules-specific Tcl variables appeared on Modules 5. + ++------------+-----------------------------------------------------------------+ +| Introduced | New Modules-specific Tcl variables | +| in version | | ++============+=================================================================+ +| 5.1 | :mfvar:`ModuleVersion` | ++------------+-----------------------------------------------------------------+ + + Modules configuration options """"""""""""""""""""""""""""" @@ -808,3 +945,6 @@ +============+=================================================================+ | 5.0 | :mconfig:`quarantine_support` | +------------+-----------------------------------------------------------------+ +| 5.1 | :mconfig:`redirect_output`, :mconfig:`mcookie_check`, | +| | :mconfig:`collection_pin_tag` | ++------------+-----------------------------------------------------------------+
View file
_service:tar_scm:modules-5.0.1.tar.bz2/doc/source/conf.py -> _service:tar_scm:modules-5.1.1.tar.bz2/doc/source/conf.py
Changed
@@ -46,7 +46,7 @@ # General information about the project. project = u'Modules' -copyright = '1996-1999 John L. Furlani & Peter W. Osel, 1998-2017 R.K.Owen, 2002-2004 Mark Lakata, 2004-2017 Kent Mein, 2016-2021 Xavier Delaruelle' +copyright = '1996-1999 John L. Furlani & Peter W. Osel, 1998-2017 R.K.Owen, 2002-2004 Mark Lakata, 2004-2017 Kent Mein, 2016-2022 Xavier Delaruelle' author = '' # The version info for the project you're documenting, acts as replacement for @@ -79,7 +79,7 @@ else: return version, version + '+' + branch + '-' + tags else: - return '5.0.1', '' + return '5.1.1', '' # The short X.Y version. # The full version, including alpha/beta/rc tags. @@ -210,6 +210,7 @@ if 'pathsubs' in tags: prefix = '@prefix@' bindir = '@bindir@' + libdir = '@libdir@' libexecdir = '@libexecdir@' etcdir = '@etcdir@' initdir = '@initdir@' @@ -218,6 +219,7 @@ else: prefix = '/usr/share/Modules' bindir = prefix + '/bin' + libdir = prefix + '/lib64' libexecdir = prefix + '/libexec' etcdir = '/etc/environment-modules' initdir = prefix + '/init' @@ -231,6 +233,8 @@ rst_epilog += '.. |bindir| replace:: %s\n' % bindir rst_epilog += '.. |emph bindir| replace:: *%s*\n' % bindir rst_epilog += '.. |bold bindir| replace:: **%s**\n' % bindir +rst_epilog += '.. |libdir| replace:: %s\n' % libdir +rst_epilog += '.. |file libdir_tcl_ext_lib| replace:: :file:`%s/libtclenvmodules.so`\n' % libdir rst_epilog += '.. |libexecdir| replace:: %s\n' % libexecdir rst_epilog += '.. |emph libexecdir| replace:: *%s*\n' % libexecdir rst_epilog += '.. |bold libexecdir| replace:: **%s**\n' % libexecdir @@ -259,6 +263,8 @@ # define roles used to color text in parsed-literal to render output like in terminal rst_epilog += """.. role:: noparse .. role:: ps +.. role:: sgrb +.. role:: sgra .. role:: sgrhi .. role:: sgrer .. role:: sgrwa @@ -279,7 +285,9 @@ .. role:: sgrf .. role:: sgrnf .. role:: sgrs -.. role:: sgrss""" +.. role:: sgrshi +.. role:: sgrss +.. role:: sgrkl""" # -- Options for manual page output --------------------------------------- @@ -333,6 +341,13 @@ signode += addnodes.desc_addname(args, args) return opt +from docutils import nodes +def ghcommit_role(name, rawtext, text, lineno, inliner, options={}, content=): + commit_id = str(text) + commit_url = 'https://github.com/cea-hpc/modules/commit/' + commit_id + title = nodes.reference('', commit_id, refuri=commit_url) + return title, + # define new directive/role that can be used as .. subcmd::/:subcmd:, # .. mfcmd::/:mfcmd: and .. mfvar::/:mfvar: def setup(app): @@ -355,4 +370,5 @@ app.add_object_type('mconfig', 'mconfig', objname='module configuration option', indextemplate='pair: %s; module configuration option') + app.add_role('ghcommit', ghcommit_role)
View file
_service:tar_scm:modules-5.0.1.tar.bz2/doc/source/cookbook/compiler-etc-dependencies.rst -> _service:tar_scm:modules-5.1.1.tar.bz2/doc/source/cookbook/compiler-etc-dependencies.rst
Changed
@@ -273,13 +273,13 @@ #. Rename the standard Environment Modules ``modulecmd`` file (in the ``bin`` subdirectory under the installation root) to ``modulecmd.wrapped``. (It is recommended that you do this in a copy of your production installation, or better yet, in a new install of the 3.x Environment - Modules (as Flavours has been developped for Modules 3.x)) + Modules (as Flavours has been developed for Modules 3.x)) #. Copy the ``modulecmd.wrapper`` file from Flavours to the ``bin`` subdirectory above. Make sure the ``modulecmd.wrapper`` file is executable. #. Symlink ``modulecmd.wrapper`` to ``modulecmd`` #. Edit ``modulecmd.wrapper`` where indicated to give fully qualified path to ``modulecmd.wrapped`` #. Copy the ``flavours.tcl`` and ``pkgIndex.tcl`` files to some (possibly new) directory under - the modules installation roor, and set ``TCLLIBPATH`` to that directory (you probably will want to + the modules installation root, and set ``TCLLIBPATH`` to that directory (you probably will want to add that to the various modules init scripts) The ``module`` command invokes ``modulecmd``, which in this case is results @@ -306,7 +306,7 @@ * ``flavours conflict``: This is similar to the standard conflict command, but enhanced to recognize the flavours prereqs above. * ``flavours commit``: This should be called after the ``root``, ``revision``, and ``prereq`` - subcommands of ``flavours`` are called, and before any of the ``path`` subcommands. + sub-commands of ``flavours`` are called, and before any of the ``path`` sub-commands. It seems to be responsible for taking all those values to above and constructing the path to the package. * ``flavours path``: This returns a string with the path to the specific build of the package. @@ -315,7 +315,7 @@ to the environment variable has the path (as returned by ``flavours path``) prepended to it with the appropriate directory separator. E.g., to add to the ``PATH`` variable the bin subdirectory of the root directory where the specific build was installed, use ``flavours prepend-path PATH bin`` -* ``flavours cleanup``: This should be called after all ``flavours`` subcommands are finished +* ``flavours cleanup``: This should be called after all ``flavours`` sub-commands are finished and before exiting the script to ensure proper cleanup. Among other things, it ensures that any packages that depend on this package will get reloaded if this package is switched out. @@ -352,7 +352,7 @@ * the value from ``flavours revision`` * directory separator (``/``) * a ``prefix`` created by concatenating the package names satisfying the prereqs, in order. - The package name and version will be separated by a hypen (-), as will the different + The package name and version will be separated by a hyphen (-), as will the different components. So if ``flavours root`` was set to ``/local/software/foo/1.7``, ``revision`` to 1, and the @@ -382,7 +382,7 @@ :language: console We note that we only see the package names and versions; e.g. ``foo/2.4``, without any mention -of the compilers and MPI libraries for which it is built. This terser stype was an intentional +of the compilers and MPI libraries for which it is built. This terser type was an intentional design goal of the authors. Also of note are the intelmpi and simd packages. The Flavours approach relies on seeing what modules have been loaded previously in order to determine what 'flavor' of the requested package should be loaded. To support the different builds of ``bar`` @@ -769,7 +769,7 @@ :language: tcl The main difference between this modulefile, depending on both compiler and -optionally MPI, and the openmpi modilefile above, is that in addition to +optionally MPI, and the openmpi modulefile above, is that in addition to detecting which compiler is loaded, we call ``GetLoadedMPI`` to determine the MPI library which was loaded, and use both of them in constructing the prefix to the installed foo. @@ -1599,7 +1599,7 @@ to a ``prereq`` on the requesting compiler/MPI module) depends on whether one is using a 3.x or 4.x version of Environment Modules. Due to this, we provide two modulefile trees, one for 3.x and one for 4.x; they are -basicaly identical except for that matter. This leads to slightly +basically identical except for that matter. This leads to slightly different instructions on how to use the examples, depending on which version of Environment Modules is being used, namely: @@ -1640,7 +1640,7 @@ about what variant of each package is loaded. The ``module switch`` command, however, does not work as well as one would -like. While it indeeds switches the specified module, it does not +like. While it indeed switches the specified module, it does not successfully reload the modules which depend on the replaced module, even with the :ref:`Automated module handling <v42-automated-module-handling-mode>` feature enabled. As currently implemented, @@ -1759,7 +1759,7 @@ ------------------------- This strategy makes use of the ability of modules to support multiple -directories in the ``MODULEPATH`` environment variable. Everytime a module is loaded +directories in the ``MODULEPATH`` environment variable. Every time a module is loaded on which other modules might depend, a new path is added to ``MODULEPATH`` containing the modulefiles which depend on the newly added module. @@ -1877,7 +1877,7 @@ This certainly enforces the consistency of loaded modules; one could not load a specific version of gcc (say ``gcc/9.1.0``) and an incompatible version of foo (e.g. ``foo/1.1``), because all of the foo modulefiles are in compiler specific module trees and there is -no ``foo/1.1`` in the ``gcc/9.1.0`` moduletree. Conflict statements in the compiler modulefiles +no ``foo/1.1`` in the ``gcc/9.1.0`` module tree. Conflict statements in the compiler modulefiles will prevent one from loading multiple compilers, thereby preventing multiple compiler specific modulepaths (unless the user explicitly does a ``module use`` or similar, and there is only so far one can go in preventing users from shooting themselves in the foot). @@ -2136,7 +2136,7 @@ libraries. Lmod needed to add a ``module spider`` command to address this, but no such functionality currently exists in Environment Modules. If one were to use this in production, you would need to provide something - similar to the Lmod spider subcommand, or at least provide frequently + similar to the Lmod spider sub-command, or at least provide frequently updated web pages or similar with this information. * This strategy involves the use of many more modulepaths than the previously examined strategies, having at least one modulepath per @@ -2211,8 +2211,8 @@ All of the strategies discussed meet this criterion, with both 3.x and 4.x versions of Environment Modules. -Advanced Dependency Handling (e.g. the module switch subcommand) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Advanced Dependency Handling (e.g. the module switch sub-command) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Things are more complicated when we allow for the modules upon which other loaded modules might depend to be changed. This generally involves @@ -2391,7 +2391,7 @@ While an unqualified ``module avail`` in the :ref:`Flavours <Flavours_strategy>`, :ref:`Homebrewed flavors <Homebrewed_flavors_strategy>`, and especially :ref:`Modulerc-based <Modulerc-based_strategy>` strategies can inundate the user with modulenames, the :ref:`Modulepath-based_strategy` has the opposite problem. -With the :ref:`Modulepath-based_strategy` strategy, the modulefiles are split across multiple, often multually incompatible, modulepaths, so the module avail +With the :ref:`Modulepath-based_strategy` strategy, the modulefiles are split across multiple, often mutually incompatible, modulepaths, so the module avail command will never return a list of all modulefiles installed, only those available given the previously loaded compiler/MPI libraries/etc. E.g., if a package foobar is only installed for a particular compiler/MPI combination, it will not appear in any module avail listing unless that particular compiler and MPI were previously loaded. @@ -2405,7 +2405,7 @@ .. literalinclude:: ../../example/compiler-etc-dependencies/example-sessions/modulerc/modules4/foo-avail1.out :language: console -Similary, to see the builds of foo using gcc compilers, one can do something like: +Similarly, to see the builds of foo using gcc compilers, one can do something like: .. literalinclude:: ../../example/compiler-etc-dependencies/example-sessions/modulerc/modules4/foo-avail2.out :language: console @@ -2557,7 +2557,7 @@ do intelligent defaulting of versions. For the :ref:`Modulepath-based_strategy`, we added the SIMD label as a final component to the -modulename, but the defaulting was somewhat simple (e.g. alway default to lowest SIMD). +modulename, but the defaulting was somewhat simple (e.g. always default to lowest SIMD). With the :ref:`Modulerc-based_strategy`, we added an additional naming scheme for the bar modulefiles, so they can start with bar/BARVERSION, or bar/COMPILER_FAMILY, or bar/SIMD_LEVEL. This not
View file
_service:tar_scm:modules-5.0.1.tar.bz2/doc/source/cookbook/log-module-commands.rst -> _service:tar_scm:modules-5.1.1.tar.bz2/doc/source/cookbook/log-module-commands.rst
Changed
@@ -17,7 +17,7 @@ .. literalinclude:: ../../example/log-module-commands/siteconfig.tcl :language: tcl :caption: siteconfig.tcl - :lines: 13-36 + :lines: 13-41 :lineno-start: 13 This code defines a ``logModfileInterp`` procedure which is set to be @@ -32,8 +32,8 @@ .. literalinclude:: ../../example/log-module-commands/siteconfig.tcl :language: tcl - :lines: 18-19 - :lineno-start: 18 + :lines: 23-24 + :lineno-start: 23 In the proposed code, the :command:`logger` command is run to generate a log message. Log entries are formatted as a JSON record which is convenient to @@ -43,8 +43,8 @@ .. literalinclude:: ../../example/log-module-commands/siteconfig.tcl :language: tcl - :lines: 29-31 - :lineno-start: 29 + :lines: 34-36 + :lineno-start: 34 Example code also defines a ``logModuleCmd`` procedure which is set to be evaluated after each evaluation of the ``module`` and the ``ml`` procedures @@ -53,8 +53,8 @@ .. literalinclude:: ../../example/log-module-commands/siteconfig.tcl :language: tcl :caption: siteconfig.tcl - :lines: 38-58 - :lineno-start: 38 + :lines: 43-63 + :lineno-start: 43 .. note:: @@ -125,7 +125,7 @@ .. parsed-literal:: - :ps:`$` journalctl -q -t module -n 1 + :ps:`$` journalctl -q -t module Sep 12 20:24:01 hostname module9925: { "user": "username", "cmd": "ml", "args": "av" } Sep 12 20:24:02 hostname module9925: { "user": "username", "mode": "load", "module": "foo/1.0", "auto": false } Sep 12 20:24:02 hostname module9925: { "user": "username", "cmd": "ml", "args": "foo" }
View file
_service:tar_scm:modules-5.0.1.tar.bz2/doc/source/cookbook/modulefiles-in-git.rst -> _service:tar_scm:modules-5.1.1.tar.bz2/doc/source/cookbook/modulefiles-in-git.rst
Changed
@@ -46,7 +46,7 @@ default. After this, any time a user wants to edit the Modulefiles, he works in -his local git repo. After editing, testing, and commiting to the local +his local git repo. After editing, testing, and committing to the local git repo, ``git push`` updates the main repository, which (assuming the user knows the password for user ``modules``) automatically updates ``/home/modules/modulefiles``.
View file
_service:tar_scm:modules-5.0.1.tar.bz2/doc/source/cookbook/new-features-without-breaking-old-module.rst -> _service:tar_scm:modules-5.1.1.tar.bz2/doc/source/cookbook/new-features-without-breaking-old-module.rst
Changed
@@ -6,7 +6,7 @@ When working on large infrastructure, sometimes the ``module`` command is not deployed with the same version everywhere. You may have for instance some old cluster that still uses Modules version 3.2 and a newer supercomputer where -the lastest version of Modules 4 is available. In such situation it may +the latest version of Modules 4 is available. In such situation it may however be desired to share the same modulefile catalog. People providing software that build software and generate the modulefiles to @@ -111,4 +111,4 @@ .. note:: As the new Tcl variables are introduced in Modules 4.7, the use of the new - ``uergroups`` sub-command will only be triggered starting Modules 4.7. + ``usergroups`` sub-command will only be triggered starting Modules 4.7.
View file
_service:tar_scm:modules-5.1.1.tar.bz2/doc/source/cookbook/reduce-io-load.rst
Added
@@ -0,0 +1,516 @@ +.. _reduce-io-load: + +Reduce I/O load +=============== + +With large :command:`module` setup containing hundreds or even thousands of +modulefiles, the processing of commands :subcmd:`module avail<avail>` or +:subcmd:`module load<load>`. This is especially the case when all these +modulefiles are hosted in a shared filesystem mounted on all nodes of a +supercomputer concurrently used by many users. + +Such slowness comes from the analysis of the file hierarchy under each enabled +modulepath that determines what files are modulefiles, what are the module +aliases or symbolic versions set on them, etc. This analysis generates a +significant number of I/O operations that linearly grow with the number of +modulefiles. Slowness can be more or less observed depending on the underlying +storage system and the number of available modulefiles. + +This recipe provides examples of the features of Modules that could be +leveraged to reduce the I/O load implied by modulepath analysis. It starts +with the generation of an example modulefile setup that will be progressively +tweaked to observe I/O load reduction. + +A general assumption is made here that the more I/O operations there are, the +slower the :command:`module` commands could be. So reducing the number of +these I/O operations leads to reducing the I/O load. + +The `strace`_ utility, the Linux syscall tracer, will be used to watch the +I/O operations produced by each :command:`module` command run. Examples will +focus on the :subcmd:`module avail<avail>` command, which is one of the +most I/O intensive and widely utilized by users. + +.. _strace: https://strace.io/ + +Implementation +-------------- + +Several features of Modules could be used to reduce the number of I/O +operations to analyze the content of modulepath: + +* `Modules Tcl extension library`_ +* `Modulepath rc file`_ +* `mcookie_check configuration option`_ +* `Virtual modules`_ + +Each of the above features contributes to an I/O reduction as described in the +following section. Combined use of all these features will give the biggest +I/O operation save. + +Example setup +------------- + +For this recipe, a full modulefile setup has to be generated and it will be +progressively modified for the different Modules features that will be used. + +2 modulepaths are created with 15 module names in each, each provided in 4 +different versions. In one modulepath a :file:`.version` rc file is set for +each module name to determine a default version. In the other modulepath a +:file:`.modulerc` file is set for each module name to define a symbolic +version. + +.. code-block:: sh + + mkdir -p example/reduce-io-load/applications + mkdir -p example/reduce-io-load/libraries + # create dummy application modulefiles + cd example/reduce-io-load/applications + for n in a b c d e f g h i j k l m n o; do + mkdir app$n; + for v in 1.0 2.0 3.0 4.0; do + echo '#%Module' >app$n/$v; + done; + # define default version with .version file + echo '#%Module' >app$n/.version + echo 'set ModulesVersion 2.0' >>app$n/.version + done + cd - + # create dummy library modulefiles + cd example/reduce-io-load/libraries + for n in a b c d e f g h i j k l m n o; do + mkdir lib$n; + for v in 1.0 2.0 3.0 4.0; do + echo '#%Module' >lib$n/$v; + done; + # define symbolic version with .modulerc file + echo -e '#%Module' >lib$n/.modulerc + echo -e "module-version lib$n/3.0 sym" >>lib$n/.modulerc + done + cd - + +Some non-modulefile files are added within these modulepaths to simulate +documentation files left by mistake in these directories: + +.. code-block:: sh + + touch example/reduce-io-load/applications/appg/README + touch example/reduce-io-load/applications/appl/README + touch example/reduce-io-load/libraries/libg/README + touch example/reduce-io-load/libraries/libl/README + +The file permission mode of some modulefiles is set to protect them from being +read and simulate a hidden modulefile: + +.. code-block:: sh + + chmod a-r example/reduce-io-load/applications/appg/1.0 + chmod a-r example/reduce-io-load/applications/appl/1.0 + chmod a-r example/reduce-io-load/libraries/libg/1.0 + chmod a-r example/reduce-io-load/libraries/libl/1.0 + +Additional modulefiles are created with a magic cookie header telling that +they are not compatible with the current version of Modules: + +.. code-block:: sh + + echo '#%Module99' >example/reduce-io-load/applications/appg/5.0 + echo '#%Module99' >example/reduce-io-load/applications/appl/5.0 + echo '#%Module99' >example/reduce-io-load/libraries/libg/5.0 + echo '#%Module99' >example/reduce-io-load/libraries/libl/5.0 + +Once all of the above steps done, we end up with a small scale regular +modulefile setup containing 116 modulefiles available to us. + +.. parsed-literal:: + + :ps:`$` module purge + :ps:`$` export MODULEPATH= + :ps:`$` module use example/reduce-io-load/applications + :ps:`$` module use example/reduce-io-load/libraries + :ps:`$` module -o "" avail -t | wc -l + 116 + + +Modules Tcl extension library +----------------------------- + +Modules is shipped by default with a Tcl extension library that extends the +Tcl language in order to provide more optimized I/O commands to read a file or +a directory content than native Tcl commands do. + +**Compatible with Modules v4.3+** + +If we rebuild Modules without this library enabled, we will see the benefits +of having it enabled: + +.. code-block:: sh + + make distclean + ./configure --disable-libtclenvmodules + make modulecmd-test.tcl + chmod +x modulecmd-test.tcl + eval $(tclsh ./modulecmd-test.tcl bash autoinit) + +The :command:`strace` tool gives the number and the kind of I/O operations +performed during the ``module avail`` command: + +.. parsed-literal:: + + :ps:`$` strace -f -c -S name -e trace=%file,%desc -U calls,errors,name \\ + --silence=attach $MODULES_CMD bash avail 2>no_extlib.out + +Once this first stat output is obtained, rebuild Modules with Tcl extension +library enabled and fetch :command:`icdiff` tool to compare results. + +.. code-block:: sh + + make distclean + ./configure --enable-libtclenvmodules + make modulecmd-test.tcl lib/libtclenvmodules.so + chmod +x modulecmd-test.tcl + make icdiff + +Then collect stats and compare results obtained: + +.. parsed-literal:: + + :ps:`$` strace -f -c -S name -e trace=%file,%desc -U calls,errors,name \\ + --silence=attach $MODULES_CMD bash avail 2>with_extlib.out + :ps:`$` ./icdiff --cols=76 no_extlib.out with_extlib.out + :sgrhi:`no_extlib.out` :sgrhi:`with_extlib.out` + calls errors syscall calls errors syscall + --------- --------- ---------------- --------- --------- ---------------- + :sgrb:`36` 2 access :sgra:`37` 2 access + :sgrb:`248` close :sgra:`217` close + 2 dup2 2 dup2 + 8 6 execve 8 6 execve + :sgrb:`166` :sgrhi:`fcntl` :sgra:`12` :sgrhi:`fcntl` + :sgrb:`1` getcwd :sgra:`2` getcwd + :sgrb:`128` :sgrhi:`getdents64` :sgra:`64` :sgrhi:`getdents64` + :sgrb:`166 161` :sgrhi:`ioctl` :sgra:`12 7` :sgrhi:`ioctl` + 9 4 lseek 9 4 lseek + :sgrb:`50` mmap :sgra:`54` mmap + :sgrb:`86` newfstatat :sgra:`55` newfstatat + :sgrb:`250` 10 openat :sgra:`219` 10 openat + 2 pipe 2 pipe + 10 pread64 10 pread64 + :sgrb:`354` read :sgra:`355` read + :sgrb:`1452 1452` :sgrhi:`readlink` :sgra:`25 25` :sgrhi:`readlink` + :sgrb:`354` 2 :sgrhi:`stat` :sgra:`196` 2 :sgrhi:`stat` + 1 unlink 1 unlink + 20 write 20 write + --------- --------- ---------------- --------- --------- ---------------- + :sgrb:`3335 1637` :sgrhi:`total` :sgra:`1292 56` :sgrhi:`total` + +Modules Tcl extension library greatly reduces the number of filesystem I/O +operations by removing unneeded ``ioctl``, ``fcntl`` and ``readlink`` system +calls done (by Tcl ``open`` command) to read each file. Directory content read +is also improved by fetching hidden and regular files in one pass, which +divides by 2 the number of ``getdents`` call. ``stat`` calls are also reduced +as files found in directories are not checked prior attempting to opening +them. + +Modulepath rc file +------------------ + +A ``.modulerc`` file found at the root of an enabled modulepath directory is +now evaluated when modulepath is walked through to locate modulefiles. This +file could hold the rc definition of the whole modules located in the +modulepath, instead of having specific ``.modulerc`` or ``.version`` file for +each module directory within the modulepath. + +**Compatible with Modules v4.3+** + +Let's migrate the ``.modulerc`` definition under each module directory in the +``.modulerc`` file at the root of the modulepath directory. And also translate +the content of ``.version`` files in :mfcmd:`module-version` commands that +could be stored in this top-level rc file. Then all the ``.modulerc`` and +``.version`` files under module directories are deleted to only keep one +``.modulerc`` per modulepath. + +.. code-block:: sh + + cd example/reduce-io-load/applications + echo '#%Module' >.modulerc + for n in *; do + v=$(grep set $n/.version | cut -d ' ' -f 3); + echo "module-version $n/$v default" >>.modulerc; + rm -f $n/.version + done + cd - + cd example/reduce-io-load/libraries + echo '#%Module' >.modulerc + for n in *; do + grep module-version $n/.modulerc >>.modulerc; + rm -f $n/.modulerc + done + cd - + +Once this change on the module trees has been done, collect new statistics and +compare them to those generated previously. + +.. parsed-literal:: + + :ps:`$` strace -f -c -S name -e trace=%file,%desc -U calls,errors,name \\ + --silence=attach $MODULES_CMD bash avail 2>with_modulepath_rc.out + :ps:`$` ./icdiff --cols=76 with_extlib.out with_modulepath_rc.out + :sgrhi:`with_extlib.out` :sgrhi:`with_modulepath_rc.out` + calls errors syscall calls errors syscall + --------- --------- ---------------- --------- --------- ---------------- + :sgrb:`37` 2 :sgrhi:`access` :sgra:`9` 2 :sgrhi:`access` + :sgrb:`217` :sgrhi:`close` :sgra:`189` :sgrhi:`close` + 2 dup2 2 dup2 + 8 6 execve 8 6 execve + 12 fcntl 12 fcntl + 2 getcwd 2 getcwd + 64 getdents64 64 getdents64 + 12 7 ioctl 12 7 ioctl + 9 4 lseek 9 4 lseek + 54 mmap 54 mmap + 55 newfstatat 55 newfstatat + :sgrb:`219` 10 :sgrhi:`openat` :sgra:`191` 10 :sgrhi:`openat` + 2 pipe 2 pipe + 10 pread64 10 pread64 + :sgrb:`355` :sgrhi:`read` :sgra:`299` :sgrhi:`read` + 25 25 readlink 25 25 readlink + :sgrb:`196` 2 :sgrhi:`stat` :sgra:`168` 2 :sgrhi:`stat` + 1 unlink 1 unlink + 12 write 12 write + --------- --------- ---------------- --------- --------- ---------------- + :sgrb:`1292` 56 :sgrhi:`total` :sgra:`1124` 56 :sgrhi:`total` + +With this change we have saved the ``access``, ``stat``, ``open``, ``read`` +and ``close`` calls needed to analyze the 15 ``.modulerc`` and 15 ``.version`` +files that have been removed and replaced by 2 top-level ``.modulerc`` files. + +mcookie_check configuration option +---------------------------------- + +A new configuration option named :mconfig:`mcookie_check` has been introduced +to control the verification made to files to determine if they are +modulefiles. By default this configuration option is set to ``always`` and +when searching for modulefiles within enabled modulepaths each file below +these directories is opened to check if it starts with the Modules magic +cookie (i.e., ``#%Module`` file signature). + +These historical checks lead to a large number of I/O operations but if the +option is set to the ``eval`` value, files are not checked anymore when +searching for modulefiles, only when evaluating them. + +**Compatible with Modules v5.1+** + +Here we are setting the :mconfig:`mcookie_check` configuration to the ``eval`` +value to skip all test on files hosted in modulepath directories and see what +happens when listing available modulefiles: + +.. parsed-literal:: + + :ps:`$` module config mcookie_check eval + :ps:`$` module -o "" avail -t | wc -l + 128 + :ps:`$` module avail -o "" appg appl libg libl + appg/1.0 appg/2.0 appg/3.0 appg/4.0 appg/5.0 appg/README + + appl/1.0 appl/2.0 appl/3.0 appl/4.0 appl/5.0 appl/README + + libg/1.0 libg/2.0 libg/3.0(sym) libg/4.0 libg/5.0 libg/README + + libl/1.0 libl/2.0 libl/3.0(sym) libl/4.0 libl/5.0 libl/README + +12 more modulefiles are returned. Indeed the file checks done by default are +useful but we could disable them if a special care is given to the content of +modulepath directories. First, we have to eliminate the non-modulefiles stored +in these directories: + +.. code-block:: sh + + rm -f example/reduce-io-load/applications/appg/README + rm -f example/reduce-io-load/applications/appl/README + rm -f example/reduce-io-load/libraries/libg/README + rm -f example/reduce-io-load/libraries/libl/README + +Then a :mfcmd:`module-hide` command in modulepath's ``.modulerc`` file should +be added for each the modulefile that is read-protected through the use of +file permission modes. This way :command:`module` will know that modulefile is +hidden. + +.. code-block:: sh + + cd example/reduce-io-load/applications + echo 'module-hide --hard appg/1.0' >>.modulerc + echo 'module-hide --hard appl/1.0' >>.modulerc + cd - + cd example/reduce-io-load/libraries + echo 'module-hide --hard libg/1.0' >>.modulerc + echo 'module-hide --hard libl/1.0' >>.modulerc + cd - + +A :mfcmd:`module-hide` command in modulepath's ``.modulerc`` file should also +be defined for each modulefile requiring a specific Modules version in its +magic cookie. :command:`module` will skip such modulefiles in case its version +is not compatible with them. + +.. code-block:: sh + + cd example/reduce-io-load/applications + echo 'if {$ModuleToolVersion < 99} {' >>.modulerc + echo ' module-hide --hard appg/5.0' >>.modulerc + echo ' module-hide --hard appl/5.0' >>.modulerc + echo '}' >>.modulerc + cd - + cd example/reduce-io-load/libraries + echo 'if {$ModuleToolVersion < 99} {' >>.modulerc + echo ' module-hide --hard libg/5.0' >>.modulerc + echo ' module-hide --hard libl/5.0' >>.modulerc + echo '}' >>.modulerc + cd - + +Once this specific setup has been achieved to get in full control of the +content of each modulepaths, we get the accurate listing result with the +*eval* mode of :mconfig:`mcookie_check`. + +.. parsed-literal:: + + :ps:`$` module -o "" avail -t | wc -l + 116 + :ps:`$` strace -f -c -S name -e trace=%file,%desc -U calls,errors,name \\ + --silence=attach $MODULES_CMD bash avail 2>mcookie_check_eval.out + :ps:`$` ./icdiff --cols=76 with_modulepath_rc.out mcookie_check_eval.out + :sgrhi:`with_modulepath_rc.out` :sgrhi:`mcookie_check_eval.out` + calls errors syscall calls errors syscall + --------- --------- ---------------- --------- --------- ---------------- + 9 2 access 9 2 access + :sgrb:`189` :sgrhi:`close` :sgra:`65` :sgrhi:`close` + 2 dup2 2 dup2 + 8 6 execve 8 6 execve + 12 fcntl 12 fcntl + 2 getcwd 2 getcwd + 64 getdents64 64 getdents64 + 12 7 ioctl 12 7 ioctl + 9 4 lseek 9 4 lseek + 54 mmap 54 mmap + 55 newfstatat 55 newfstatat + :sgrb:`191 10` :sgrhi:`openat` :sgra:`63` 6 :sgrhi:`openat` + 2 pipe 2 pipe + 10 pread64 10 pread64 + :sgrb:`299` :sgrhi:`read` :sgra:`175` :sgrhi:`read` + 25 25 readlink 25 25 readlink + :sgrb:`168` 2 stat :sgra:`164` 2 stat + 1 unlink 1 unlink + 12 write 12 write + --------- --------- ---------------- --------- --------- ---------------- + :sgrb:`1124 56` :sgrhi:`total` :sgra:`744 52` :sgrhi:`total` + +A significant drop in I/O calls can be observed from this finely tuned setup. +``open``, ``read`` and ``close`` calls are saved for the 4 non-modulefiles +deleted, the 8 modulefiles made hidden and of course for the 116 regular +modulefiles available. As demonstrated, such gain requires a complete control +over the modulepath content and specific care for unsupported or +read-protected files. + +Virtual modules +--------------- + +A virtual module stands for a module name associated to a modulefile. Instead +of looking for files under modulepaths to get modulefiles, a virtual module +is defined in ``.modulerc`` file with the :mfcmd:`module-virtual` modulefile +command which saves walk down I/O operations to analyze modulepath directory +content. + +**Compatible with Modules v4.1+** + +Let's create 2 new modulepaths that will only contain a ``.modulerc`` file in +which a virtual module is defined for each existing modulefile in initial +modulepath. Content of the ``.modulerc`` in the initial modulepaths is also +copied in the ``.modulerc`` of the *virtual* modulepaths. + +.. code-block:: sh + + mkdir example/reduce-io-load/applications-virt + mkdir example/reduce-io-load/libraries-virt + cd example/reduce-io-load/applications + echo '#%Module' >../applications-virt/.modulerc + for mod in */*; do + echo "module-virtual $mod ../applications/$mod" \ + >>../applications-virt/.modulerc; + done + grep -v '#%Module' .modulerc >>../applications-virt/.modulerc + cd - + cd example/reduce-io-load/libraries + echo '#%Module' >../libraries-virt/.modulerc + for mod in */*; do + echo "module-virtual $mod ../libraries/$mod" \ + >>../libraries-virt/.modulerc; + done + grep -v '#%Module' .modulerc >>../libraries-virt/.modulerc + cd - + +Once the setup of the virtual modulepaths is finished, the environment of the +:command:`module` command has to be changed to use these new modulepaths +instead of the original ones. + +.. parsed-literal:: + + :ps:`$` module unuse example/reduce-io-load/applications + :ps:`$` module unuse example/reduce-io-load/libraries + :ps:`$` module use example/reduce-io-load/applications-virt + :ps:`$` module use example/reduce-io-load/libraries-virt + +Then we can check we obtain the same output as with the original setup, 116 +modulefiles available. After that collect I/O operation statistics and compare +them to those previously fetched. + +.. parsed-literal:: + + :ps:`$` module -o "" avail -t | wc -l + 116 + :ps:`$` strace -f -c -S name -e trace=%file,%desc -U calls,errors,name \\ + --silence=attach $MODULES_CMD bash avail 2>with_virtual_modules.out + :ps:`$` ./icdiff --cols=76 mcookie_check_eval.out with_virtual_modules.out + :sgrhi:`mcookie_check_eval.out` :sgrhi:`with_virtual_modules.out` + ... + calls errors syscall calls errors syscall + --------- --------- ---------------- --------- --------- ---------------- + 9 2 access 9 2 access + :sgrb:`65` :sgrhi:`close` :sgra:`35` :sgrhi:`close` + 2 dup2 2 dup2 + 8 6 execve 8 6 execve + 12 fcntl 12 fcntl + 2 getcwd 2 getcwd + :sgrb:`64` :sgrhi:`getdents64` :sgra:`4` :sgrhi:`getdents64` + 12 7 ioctl 12 7 ioctl + 9 4 lseek 9 4 lseek + 54 mmap 54 mmap + :sgrb:`55` :sgrhi:`newfstatat` :sgra:`25` :sgrhi:`newfstatat` + :sgrb:`63` 6 :sgrhi:`openat` :sgra:`33` 6 :sgrhi:`openat` + 2 pipe 2 pipe + 10 pread64 10 pread64 + 175 read 175 read + 25 25 readlink 25 25 readlink + :sgrb:`164` 2 :sgrhi:`stat` :sgra:`10` 2 :sgrhi:`stat` + 1 unlink 1 unlink + 12 write 12 write + --------- --------- ---------------- --------- --------- ---------------- + :sgrb:`744` 52 :sgrhi:`total` :sgra:`440` 52 :sgrhi:`total` + +A large I/O operation drop is observed with the *virtual* modulepath setup. +The analysis of the 15 module directories under each of the 2 original +modulepaths is not anymore needed as the ``.modulerc`` in the 2 *virtual* +modulepaths already point to the modulefile location. ``stat``, ``open``, +``getdents`` and ``close`` I/O calls are saved due to that. + +Wrap-up +------- + +Combining all the 4 features detailed above leads to a significant drop in +I/O operations. Almost all remaining I/O calls are made for the initialization +of the :command:`module` command run. + +It is advised to run this recipe code on your setup to observe the I/O load +gain you could obtain. As said earlier the less I/O operations there are, the +faster the :command:`module` command could be. But this highly depends on your +storage system, on the number of modulefiles and on the number of active +users. You may not notice a big difference if your modulefiles are installed +on a local SSD storage whereas it can be a game changer if instead the +modulefiles are hosted on a shared HDD filesystem that is accessed by +hundreds of users.
View file
_service:tar_scm:modules-5.0.1.tar.bz2/doc/source/cookbook/sticky-modules.rst -> _service:tar_scm:modules-5.1.1.tar.bz2/doc/source/cookbook/sticky-modules.rst
Changed
@@ -36,7 +36,7 @@ require to install a recent version of Modules to get a basic sticky mechanism. -To get a smoother sticky mechanism with two different level of stickyness, +To get a smoother sticky mechanism with two different level of stickiness, allowing to reload environment or to swap a sticky module by another version of the same module name, the *sticky* and *super-sticky* module tags have been introduced in Modules v4.7. @@ -50,7 +50,7 @@ module tag. *Super-sticky* module cannot be unloaded even if the unload action is forced. It can only be unloaded if the module reloads afterward. -In case the stickyness applies to the generic module name (and does not target +In case the stickiness applies to the generic module name (and does not target a specific module version or version-set), one version of the sticky or super-sticky module can be swapped by another version of this same module. @@ -117,7 +117,7 @@ module-tag sticky compiler -As stickyness is defined over the generic *compiler* name, users can switch +As stickiness is defined over the generic *compiler* name, users can switch between available compiler flavors: .. parsed-literal::
View file
_service:tar_scm:modules-5.0.1.tar.bz2/doc/source/cookbook/top-priority-values.rst -> _service:tar_scm:modules-5.1.1.tar.bz2/doc/source/cookbook/top-priority-values.rst
Changed
@@ -28,9 +28,9 @@ .. literalinclude:: ../../example/top-priority-values/siteconfig.tcl :caption: siteconfig.tcl - :lines: 17-138 + :lines: 17-115 -**Compatible with Modules v4.2** +**Compatible with Modules v4.2+** Installation ------------
View file
_service:tar_scm:modules-5.1.1.tar.bz2/doc/source/design/add-new-config-option.rst
Added
@@ -0,0 +1,185 @@ +.. _add-new-config-option: + +Add new configuration option +============================ + +This document is a guide for Modules developers that wish to introduce a new +configuration option for the :command:`module` command. + +Core code +--------- + +Introducing new configuration option means declaring it then using it (get its +value then branch code in :file:`modulecmd.tcl` script to adapt +:command:`module` command behavior. + +1. First declare configuration option in ``g_config_defs`` definition array + + - File to edit: :file:`tcl/init.tcl.in` + - Example commit: :ghcommit:`2199edf8` + + New configuration option name should be short yet understandable. If + composed of multiple words, they should be joined by ``_`` character. + Option value could be superseded by an environment variable, using same name + than config, upper-cased and prefixed by ``MODULES_``. + + Entry in ``g_config_defs`` definition array uses option name as key then a + list as value composed with: + + - Superseding environment variable + - Default value + - Is configuration lockable to default value (0 or 1) + - Valid value list (empty list if no validation list) + - Internal value representation (optional) + - Specific procedure to call to initialize option value (optional) + - Valid value list kind (empty string, ``intbe`` or ``eltlist``) + +2. Update the Tcl code that compose the :file:`modulecmd.tcl` script to adapt + behavior depending on the value defined (by default or superseded) for the + configuration option. Use the ``getConf`` helper procedure to fetch + configuration option value. This part highly depends on the kind of + configuration option introduced. + + - File to edit: file(s) in :file:`tcl/` directory + - Example commit: :ghcommit:`4baf5dc4` + +Installation scripts +-------------------- + +If the default value of the configuration option may be selected at +installation time, an installation option should be added on the +:file:`configure` script. + +1. Define installation option argument in :file:`configure` script, add it to + the internal help message of this shell script, define an internal + ``<optionname>`` variable that is set to the default installation option + value, then updated when install option argument is set. + + - File to edit: :file:`configure` + - Example commit: :ghcommit:`c00ecefa` + + +2. Define the ``<optionname>`` variable in :file:`Makefile.inc.in` set to the + ``@<optionname>@`` mark, that will be replaced by chosen value for option + when :file:`configure` script will generate :file:`Makefile.inc`. Define + the ``install_<optionname>`` variable in :file:`site.exp.in` to get value + set for option within testsuite. Update ``translate-in-script`` rule in + :file:`Makefile` to add translation of the ``@<optionname>@`` mark into + selected value. + + - Files to edit: + + - :file:`Makefile.inc.in` + - :file:`Makefile` + - :file:`site.exp.in` + + - Example commit: :ghcommit:`c00ecefa` + +3. Set the ``@<optionname>@`` mark as the default value for configuration + option in ``g_config_defs`` definition array in Tcl core code + + - File to edit: :file:`tcl/init.tcl.in` + - Example commit: :ghcommit:`c00ecefa` + + When the *make* installation step is performed the :file:`modulecmd.tcl` + script file is generated with the ``@<optionname>@`` mark replaced by + selected default value. + +Initialization scripts +---------------------- + +New configuration option should be referred in the shell completion scripts as +argument for the :subcmd:`config` sub-command. + +Files that should be edited to add reference to the new option: + +- :file:`init/Makefile` (contains definitions to build *bash* and *tcsh* + completion scripts +- :file:`init/fish_completion` +- :file:`init/zsh-functions/_module.in` + +Example commit: :ghcommit:`abfef4ed` + +Documentation +------------- + +Man pages and other user documentation have to be updated to describe the +introduced option. + +Files that should be edited: + +- :file:`doc/source/module.rst` (module manpage) + + - add configuration option description with ``mconfig`` anchor under + :subcmd:`config` sub-command section + - add environment variable description with ``envvar`` anchor under + *ENVIRONMENT* section + +- :file:`doc/source/changes.rst` + + - add configuration option under *Modules configuration options* section of + current Modules major version + - add environment variable under *Environment* section of current Modules + major version + +- :file:`INSTALL.rst` + + - add configuration and related environment variable and installation + option in the table under *Configuration options* section + +Example commits: + +- configuration option doc: :ghcommit:`f8e5eac6` +- related environment variable doc: :ghcommit:`eed719f0` + +In case an installation option has been added, it should be covered by documentation + + - File to edit: :file:`INSTALL.rst` + - Example commit: :ghcommit:`3d19ab52` + +Testsuite +--------- + +Non-regression testsuite must be adapted first to ensure existing tests still +pass then to add specific tests to check the behavior of the added +configuration option and ensure overall code coverage does not drop. + +1. First, clear the run test environment from predefined configuration value, + set over the associated environment variable. + + - Files that should be edited: + + - :file:`testsuite/modules.00-init/010-environ.exp` + - :file:`testsuite/install.00-init/010-environ.exp` + + - Example commit: :ghcommit:`1c9fe1bd` + + If default value for option could be set at installation time, it may be + important to take this chosen default value into account, thanks to the + ``install_<optionname>`` Tcl variable set in :file:`site.exp`. + +2. Add new configuration option to the list of options tested over the + :subcmd:`config` sub-command. + + - File to edit: :file:`testsuite/modules.70-maint/220-config.exp` + - Example commit: :ghcommit:`1c9fe1bd` + +3. Craft specific tests to validate the correct behavior of the configuration + when not set, set with valid or invalid values. + + - File to edit: depends on what is impacted by the new configuration + option, if some tests already exist for concerned behavior (existing + testsuite file to update) or not (new testfile to create). + + - Example commit: :ghcommit:`122039e5` + +4. Optionally if a new installation option has been introduced, it may be + interesting to adapt CI configuration to test a value different than the + default one + + - Files to either edit: + + - :file:`.cirrus.yml` + - :file:`.github/workflows/linux_tests.yaml` + + - Example commit: :ghcommit:`8bf6fb54`
View file
_service:tar_scm:modules-5.1.1.tar.bz2/doc/source/design/add-new-sub-command.rst
Added
@@ -0,0 +1,134 @@ +.. _add-new-sub-command: + +Add new module sub-command +========================== + +This document is a guide for Modules developers that wish to introduce a new +sub-command for the :command:`module` command. + +Core code +--------- + +Introducing new configuration option means declaring it then using it (get its +value then branch code in :file:`modulecmd.tcl` script to adapt +:command:`module` command behavior. + +1. First update in the ``reportUsage`` procedure the usage message of the + :command:`module` command to report the new sub-command. + + - File to edit: :file:`tcl/report.tcl.in` + - Example commit: :ghcommit:`697b999a` + +2. Update the ``module`` procedure and its helper procedures to register the + new sub-command. First add sub-command in the list of valid sub-commands + defined in ``parseModuleCommandName``. + + If sub-command cannot be called within a modulefile context add it in + ``module`` procedure to the list of sub-commands raising an error if found + call from such context. + + Add test in ``module`` procedure to verify that the number of argument + passed to sub-command is valid. + + Update main switch in ``module`` procedure to add case for new sub-command + that calls the ``cmdModule<Subcmdname>`` procedure. + + - File to edit: :file:`tcl/main.tcl.in` + - Example commit: :ghcommit:`697b999a` + +3. Create the ``cmdModule<Subcmdname>`` procedure and craft in it the Tcl code + corresponding to the sub-command introduced. + + - File to edit: :file:`tcl/subcmd.tcl.in` + - Example commit: :ghcommit:`697b999a` + +Initialization scripts +---------------------- + +New sub-command should be referred in the shell completion scripts. + +Files that should be edited to add reference to the new sub-command: + +- :file:`init/Makefile` (contains definitions to build *bash* and *tcsh* + completion scripts +- :file:`init/bash_completion.in` +- :file:`init/fish_completion` +- :file:`init/tcsh_completion.in` +- :file:`init/zsh-functions/_module.in` + +Example commit: :ghcommit:`0a96ed64` + +Documentation +------------- + +Man pages and other user documentation have to be updated to describe the +introduced sub-command. + +Files that should be edited: + +- :file:`doc/source/module.rst` (module manpage) + + - add sub-command description with ``subcmd`` anchor under *Module + Sub-Commands* section + +- :file:`doc/source/modulefile.rst` (modulefile manpage) + + - mention if sub-command cannot be called from the modulefile evaluation + context under :mfcmd:`module` modulefile command section + - if sub-command leads to modulefile evaluation, mention sub-command name + in the list of value returned by :mfcmd:`module-info + command<module-info>` + +- :file:`doc/source/changes.rst` + + - add sub-command under *Module Sub-Commands* section of current Modules + major version + +Example commits: + +- sub-command doc: :ghcommit:`b4c0e0f8` +- new value returned by ``module-info command``: :ghcommit:`5cd53523` + +Testsuite +--------- + +Non-regression testsuite must be adapted first to add specific tests to check +the behavior of the added sub-command and ensure overall code coverage does +not drop. + +1. Test the sub-command against an invalid number of arguments (too few and + too many). + + - File to edit: :file:`testsuite/modules.00-init/071-args.exp` + - Example commit: :ghcommit:`086ac136` + +2. If the new sub-command cannot be called from a modulefile evaluation, test + the error obtained when tried. + + - Files to edit: + + - :file:`testsuite/modules.50-cmds/151-module-onlytop.exp` + - :file:`testsuite/modulefiles.3/modbad/<subcmdname>` + + - Example commit: :ghcommit:`086ac136` + +3. If the new sub-command leads to modulefile evaluation, test value returned + by :mfcmd:`module-info command<module-info>`. + + - Files to edit: + + - :file:`testsuite/modules.50-cmds/282-info-command.exp` + - :file:`testsuite/modules.50-cmds/283-info-command-exp.exp` + - :file:`testsuite/modulefiles/info/commandexp` + + - Example commit: :ghcommit:`5cd53523` + +4. Craft specific tests to validate the correct behavior of the sub-command + against valid or invalid values and valid or invalid environment. + + - File to edit: new test file to create in + :file:`testsuite/modules.50-cmds` directory, for sub-command called + during a modulefile evaluation, or in :file:`testsuite/modules.70-maint` + directory otherwise. + + - Example commit: :ghcommit:`086ac136`
View file
_service:tar_scm:modules-5.1.1.tar.bz2/doc/source/design/control-mode-behaviors.rst
Added
@@ -0,0 +1,169 @@ +.. _control-mode-behaviors: + +Control mode behaviors +====================== + +- Modulefile commands that modify environment variables applies + + - a behavior when modulefile is loaded + - and another behavior when modulefile is unloaded + +- Depending on the situation, it seems interesting to apply a different + behavior when modulefile is unloaded: + + - restore value unset at load time, either: + + - append-on-unload + - prepend-on-unload + + - remove value from list: remove-on-unload + - unset full variable value: unset-on-unload + - set another value, either: + + - append-on-unload + - prepend-on-unload + - set-on-unload (for non-path-like variable) + + - do nothing: noop-on-unload + +- Also when modulefile loads sometimes it may be interesting to apply a + slightly different behavior depending on the situation: + + - set value only if variable is undefined: set-if-undef + +- Concerned modulefile commands: + + - :mfcmd:`module use<module>` + - :mfcmd:`module unuse<module>` + - :mfcmd:`setenv` + - :mfcmd:`unsetenv` + - :mfcmd:`append-path` + - :mfcmd:`prepend-path` + - :mfcmd:`remove-path` + +- Only applies when the above commands are called from a modulefile (as some + of these commands can also act as module sub-commands) + +Unload behavior +--------------- + +- Unload behavior of concerned modulefile commands: + + +--------------+-------------------------+--------------------------+-----------------------+ + | Command | Default unload behavior | Specific unload behavior | Alternative behaviors | + | | | | to add | + +==============+=========================+==========================+=======================+ + | module use | remove-on-unload | *n/a* | | + +--------------+-------------------------+--------------------------+-----------------------+ + | module unuse | remove-on-unload | *n/a* | append-on-unload, | + | | | | prepend-on-unload, | + | | | | noop-on-unload | + +--------------+-------------------------+--------------------------+-----------------------+ + | setenv | unset-on-unload | *n/a* | | + +--------------+-------------------------+--------------------------+-----------------------+ + | unsetenv | noop-on-unload | set-on-unload (when 2nd | unset-on-unload | + | | | argument is provided) | | + +--------------+-------------------------+--------------------------+-----------------------+ + | append-path | remove-on-unload | *n/a* | | + +--------------+-------------------------+--------------------------+-----------------------+ + | prepend-path | remove-on-unload | *n/a* | | + +--------------+-------------------------+--------------------------+-----------------------+ + | remove-path | noop-on-unload | *n/a* | remove-on-unload, | + | | | | append-on-unload, | + | | | | prepend-on-unload | + +--------------+-------------------------+--------------------------+-----------------------+ + +- When either restoring or setting other value for path-like modulefile + commands, it is needed to know if the value should be appended or prepended. + +- Either restoring or setting other value result in the same behavior name + + - *append-on-unload* and *prepend-on-unload* + - position of the option will determine if the values to set are: + + - those unset at load time: when option is placed prior value list + - a different list of value: when option is placed after value list to + unset at load time and another value list is defined after option + +- The *set-on-unload* behavior is only useful for modulefile commands which + unset value on load mode, as commands that set value on load mode mainly + need to unset the value set. + +- Default unload behavior of ``module unuse``, ``unsetenv`` and + ``remove-path`` commands can also be set as an option in their argument + list. Helps to dynamically choose the behavior to apply, which could be the + default behavior. + +Load behavior +------------- + +- Load behavior of concerned modulefile commands: + + +--------------+-----------------------+-----------------------+ + | Command | Default load behavior | Alternative behaviors | + | | | to add | + +==============+=======================+=======================+ + | module use | set-on-load | | + +--------------+-----------------------+-----------------------+ + | module unuse | remove-on-load | | + +--------------+-----------------------+-----------------------+ + | setenv | set-on-load | set-if-undef | + +--------------+-----------------------+-----------------------+ + | unsetenv | unset-on-load | | + +--------------+-----------------------+-----------------------+ + | append-path | add-on-load | | + +--------------+-----------------------+-----------------------+ + | prepend-path | add-on-load | | + +--------------+-----------------------+-----------------------+ + | remove-path | remove-on-load | | + +--------------+-----------------------+-----------------------+ + +Modulefile command options +-------------------------- + +- Alternative behaviors could be specified by setting the associated option + over the modulefile command: + + - ``--remove-on-unload`` + - ``--append-on-unload`` + - ``--prepend-on-unload`` + - ``--noop-on-unload`` + - ``--unset-on-unload`` + - ``--set-if-undef`` + +- The ``--append-on-unload`` and ``--prepend-on-unload`` options either: + + - restore the value list removed at load time if placed prior this value + list + - set a different value list if a different list of value is specified + after option (all the values set after the option are considered element + to add to the path-like variable) + - both options also accept to be set prior or right after variable name or + even right at the end of argument list to restore value list removed at + load time + +- The ``--set-if-undef`` option does not change the behavior of ``setenv`` + when modulefile is unloaded: environment variable will be unset whether the + option is set or not. + +- The ``--remove-on-unload`` option can be set anywhere in argument list + +- The ``--remove-on-unload``, ``--append-on-unload`` and + ``--prepend-on-unload`` options cannot be mixed with the ``--index`` option + of ``remove-path`` sub-command. + +- The ``--remove-on-unload``, ``--append-on-unload``, ``--prepend-on-unload`` + and ``--noop-on-unload`` options: + + - can be placed at different positions in argument list to limit error + cases + - if multiple options of this kind are defined in argument list, the one + defined at the most right is retained + +Misc +---- + +- *FUTURE*: what is applied to: + + - ``module use`` may also be interesting for ``module load`` + - ``module unuse`` may also be interesting for ``module unload``
View file
_service:tar_scm:modules-5.0.1.tar.bz2/doc/source/design/default-latest-version-specifiers.rst -> _service:tar_scm:modules-5.1.1.tar.bz2/doc/source/design/default-latest-version-specifiers.rst
Changed
@@ -38,7 +38,7 @@ - otherwise an error is raised -- ``default`` or ``latest`` version specifiers can also be specified with the traditionnal ``mod/version`` syntax +- ``default`` or ``latest`` version specifiers can also be specified with the traditional ``mod/version`` syntax - for instance ``mod/default`` or ``mod/latest``
View file
_service:tar_scm:modules-5.0.1.tar.bz2/doc/source/design/extended-default.rst -> _service:tar_scm:modules-5.1.1.tar.bz2/doc/source/design/extended-default.rst
Changed
@@ -42,7 +42,7 @@ - If :mconfig:`implicit_default` is disabled - - it makes ``extended_default`` inoperant if queried version does not include a defined default + - it makes ``extended_default`` inoperative if queried version does not include a defined default - even if only one modulefile matches query - with situation described above query soft/1 returns soft/1.1 - but query soft/2 returns an error as no default is found among version 2 modulefiles
View file
_service:tar_scm:modules-5.0.1.tar.bz2/doc/source/design/hide-or-forbid-modulefile.rst -> _service:tar_scm:modules-5.1.1.tar.bz2/doc/source/design/hide-or-forbid-modulefile.rst
Changed
@@ -80,7 +80,7 @@ - Visibility is however enabled if hidden module is specifically searched - - On all context hidden module *mod/1.0* is included in result for instance if *mod/1.0* or *mod@1.0,2.0* are specficied + - On all context hidden module *mod/1.0* is included in result for instance if *mod/1.0* or *mod@1.0,2.0* are specified - But hidden module *mod/1.0* is excluded from result if *mod@:2.0* or *mod@1:* are specified - And is also excluded from result if *mod* or *mod/** are specified when *mod/1.0* is set default - Unless if search is made to select one module since in this context a *mod* search query is equivalent to *mod/default* @@ -115,7 +115,7 @@ - Included in module resolution result if :option:`--all` option of ``avail``, ``whatis``, ``search`` and ``aliases`` sub-commands is set - - ``--all`` option does not apply to ``is-avail`` sub-command to make it coherent with ``load`` sub-command (eg. a ``is-avail mod`` returning true implies ``load mod`` effectively loading a module) + - ``--all`` option does not apply to ``is-avail`` sub-command to make it coherent with ``load`` sub-command (e.g., a ``is-avail mod`` returning true implies ``load mod`` effectively loading a module) - Visibility of a module targeted by a ``module-hide`` command, with regular hiding level defined, acts similarly than for a file whose name is prefixed by a dot character on Unix platform @@ -177,12 +177,12 @@ - Unless ``--all`` option is set on ``list`` sub-command - - Hidden once loaded modules load or unload is not reported + - Hidden once loaded modules load, unload or tag is not reported - If this evaluation has been triggered automatically - By an *automated module handling mechanism* for instance - - Which means user has not explicitely asked the module load or unload + - Which means user has not explicitly asked the module load or unload - And was automatically loaded, in case of an automatic unload @@ -293,7 +293,7 @@ - Message content is set along forbidden module specification - Message recorded for matching module specification will be printed - - Message recorded on other matching specification will be ignored, only message from retained matching specificaton is printed + - Message recorded on other matching specification will be ignored, only message from retained matching specification is printed - Firstly evaluated ``module-forbid`` command that matches module specification is retained with its message property - a module matching a ``module-forbid`` statement whose ``--after`` limit is close is considered *nearly forbidden* @@ -301,7 +301,7 @@ - ``nearly-forbidden`` tag applies to such module - matched ``module-forbid`` statement should of course not be disabled for current user of group due to ``--not-user`` or ``--not-group`` option values - the *near* range is defined by the :mconfig:`nearly_forbidden_days` configuration, which equals to ``14`` (14 days) by default - - this configuration accepts an integer value which represents a number of days prior forbiding starts to be effective for module + - this configuration accepts an integer value which represents a number of days prior forbidding starts to be effective for module - ``nearly_forbidden_days`` configuration can be set at configure time with :instopt:`--with-nearly-forbidden-days` option or afterward with the ``config`` sub-command (which sets the :envvar:`MODULES_NEARLY_FORBIDDEN_DAYS` environment variable) - when evaluating a *nearly-forbidden* module, a warning message is reported to indicate that module access will soon be denied @@ -311,7 +311,7 @@ - Message content is set along nearly-forbidden module specification - Message recorded for matching module specification will be printed - - Message recorded on other matching specification will be ignored, only message from retained matching specificaton is printed + - Message recorded on other matching specification will be ignored, only message from retained matching specification is printed - Firstly evaluated ``module-forbid`` command that matches module specification is retained with its message property - ``module-hide`` and ``module-forbid`` are intended to be used in modulerc files @@ -324,7 +324,7 @@ - definition with the highest hiding level wins - which means the most restrictive call wins - a ``--hidden-loaded`` status set is kept even if corresponding ``module-hide`` call is not the highest one - - the multiple definitions can come accross different modulerc files (global, modulepath or modulefile rc levels) + - the multiple definitions can come across different modulerc files (global, modulepath or modulefile rc levels) - Module specification passed as argument to ``module-hide`` and ``module-forbid`` are matched exactly against available modules @@ -338,7 +338,7 @@ - Auto-symbols cannot be set hidden - - When a defined ``default`` or ``latest`` symbol is set hidden, it is replaced by a ``default`` or ``latest`` auto-symbol targetting highest available module version + - When a defined ``default`` or ``latest`` symbol is set hidden, it is replaced by a ``default`` or ``latest`` auto-symbol targeting highest available module version - Targeting an auto-symbol with a ``module-hide`` command, will have no effect - When module specification of ``module-hide`` targets:
View file
_service:tar_scm:modules-5.0.1.tar.bz2/doc/source/design/insensitive-case.rst -> _service:tar_scm:modules-5.1.1.tar.bz2/doc/source/design/insensitive-case.rst
Changed
@@ -42,8 +42,8 @@ - like *soft*, *soFT*, *SoFt*, *SOFT* filenames - query *SOFT* returns *SOFT* (exact match is returned among possibilities) - query *SoFt* returns *SoFt* (exact match is returned among possibilities) - - query *SOft* returns *soft* (highest dictionarily-sorted match is returned among possibilities) - - query *soFt* returns *soft* (highest dictionarily-sorted match is returned among possibilities) + - query *SOft* returns *soft* (highest lexicographically sorted match is returned among possibilities) + - query *soFt* returns *soft* (highest lexicographically sorted match is returned among possibilities) - When icase is enabled for search context it applies to
View file
_service:tar_scm:modules-5.1.1.tar.bz2/doc/source/design/lmod-tcl-modulefile-compat.rst
Added
@@ -0,0 +1,327 @@ +.. _lmod-tcl-modulefile-compat: + +Lmod Tcl modulefile compatibility +================================= + +- Goal is to be able to evaluate with :command:`modulecmd.tcl` a Tcl + modulefile generated for Lmod + + - No evaluation error + - Be as close as possible to the behavior of Lmod + +- As of Modules v5.0, the following Tcl modulefile command of Lmod are not + supported: + + - ``add-property`` + - ``remove-property`` + - ``extensions`` + - ``depends-on`` + - ``prereq-any`` + - ``always-load`` + - ``module load-any`` + - ``pushenv`` + - ``require-fullname`` + - ``family`` + + +``add-property``/``remove-property`` +------------------------------------ + +- Property mechanism of Lmod does not completely fit into Modules tag + mechanism: + + - Property are first defined in a global RC file + - Then associated to a given modulefile with ``add-property`` command + - Could be unset with ``remove-property`` + - Defined as a key-value + +- These commands will be first implemented as a no-operation command (``nop``) + + - No error raised if used + - And no warning message to avoid polluting output + +- These commands are intended for use only within modulefile evaluation + context (not within modulerc) + +- *FUTURE*: it could be interesting to map some properties on tags like the + ``lmod:sticky`` property which corresponds to the ``sticky`` tag + + +``extensions`` +-------------- + +- Extension mechanism is an additional information added on ``avail`` and + ``spider`` sub-command output + + - Requires to evaluate modulefile on ``avail`` processing + - Not used to load the modulefile declaring them when an extension name is + passed to ``load`` sub-command or ``depends-on`` modulefile command + +- This command will be first implemented as a no-operation command (``nop``) + + - No error raised if used + - And no warning message to avoid polluting output + +- This command is intended for use only within modulefile evaluation context + (not within modulerc) + +- *FUTURE*: may be interesting to improve the concept by making the extension + names an alias on the modulefile declaring them + + - Will automatically achieve dependency consistency this way + - Could resolve dependencies based on extension names if modulefile is + evaluated during an ``avail`` + + +``prereq-any`` +-------------- + +- This command is an alias over ``prereq`` command + + - In Lmod, ``prereq`` acts as a *prereq-all* + - Whereas on Modules ``prereq`` acts already as a *prereq-any* + +- This command is intended for use only within modulefile evaluation context + (not within modulerc) + + +``require-fullname`` +-------------------- + +- Raise an error if modulefile has been designed with implicit or explicit + default name + + - This error aborts modulefile evaluation + - Occurs for instance if ``foo/1.0`` is loaded with ``foo`` or + ``foo/default`` name + - Which means ``require-fullname`` has precedence over explicitly set + default version + - If an alias or a symbolic version (other than ``default``) point to the + modulefile, no error occurs if modulefile is designated using these + alternative names. + +- ``require-fullname`` is implemented to only apply on *load* evaluation mode + + - On Lmod, it applies on *load*, *unload*, and *display* modes + - It seems important not to apply the constraint on *unload* and *display* + modes to ease user's experience + +- This command is intended for use only within modulefile evaluation context + (not within modulerc) + + +``depends-on`` +-------------- + +- Auto load one or more modules said as dependencies when modulefile is + evaluated in *load* mode + + - Corresponds to the *Requirement Load* module auto handling mechanism. + - Semantically this command corresponds to a requirement declaration. + - Make it an alias over :mfcmd:`prereq` but with each argument set as a + *prereq*all* not a *prereq-any*. + - If :mconfig:`auto_handling` option is disabled, requirement will not be + loaded and an error is raised. This will be different than Lmod as + with Modules the modulefile commands defines the semantic (*this is + a dependency*) then the automation is defined by the module command + configuration, not by the modulefile like done in Lmod. + +- Auto unload the dependency modules when modulefile is unloaded if no other + loaded module depends on them + + - Corresponds to the *Useless Requirement Unload* module auto handling + mechanism + - Like for *load* evaluation, automation is configured at the module + command level, not by individual modulefiles + +- This command is intended for use only within modulefile evaluation context + (not within modulerc) + + +``always-load`` +--------------- + +- Auto load on or more modules said as dependencies when modulefile is + evaluated in *load* mode + + - Semantically this command corresponds to a requirement declaration. + - Make it an alias over :mfcmd:`module load<module>` + - Add ``keep-loaded`` tag to the modules loaded this way + - When several modules are specified, it acts as an *AND* operation, which + means all specified modules are required + +- When modulefile is unloaded, the *always-load* modules are not automatically + unloaded as they own the ``keep-loaded`` tag + +- This command is intended for use only within modulefile evaluation context + (not within modulerc) + + +``module load-any`` +------------------- + +- Auto load first valid module in a list when modulefile is evaluated in + *load* mode + + - Semantically this command corresponds to a requirement declaration. + - Acting as an *OR* operation + - Evaluation stops after first module in list loaded + + - Whether called from a modulefile evaluation context or from top + evaluation context + - Different than Lmod that apply the :subcmd:`load` sub-command + behavior when called from top evaluation context and does not stop + after first modulefile loaded + + - If the evaluation of first module to load in list ends in error + + - When called from a modulefile evaluation context + + - Error is silenced + - Next module in list is tried + - It behaves this way like a :mfcmd:`prereq` command with + auto_handling mode enabled + - Proceed this way whatever the auto_handling state + - Different than Lmod that aborts modulefile evaluation + + - Otherwise when called from top evaluation context + + - Error message is reported + - Next module in list is tried + - Different than Lmod that aborts processing + + - If first modules to load are unknown + + - No message reported + - ``load-any`` continues until finding a module in the specified list + + - If a module in the list is already loaded + + - When called from a modulefile evaluation context + + - ``load-any`` is not performed as requirement is considered + already satisfied + - Better cope this way with the expressed requirement + - It behaves this way like a :mfcmd:`prereq` command + - Proceed this way whatever the auto_handling state + - Different behavior than Lmod that still proceed to load the + module in the list from the left to the right until loading one + or finding one loaded + + - Otherwise when called from top evaluation context + + - An attempt to load first module in list is still issued + - And pursued from left to right until loading one module or + finding one loaded + + - ``load-any`` acts similarly to ``try-load`` but with an *OR* operation + behavior instead of an *AND* operation + + - An error is obtained if none of the listed modules can be loaded if + none of their load attempt generated an error message + + - If no argument is provided an error is obtained, like done for + ``try-load`` + +- When modulefile is unloaded, an attempt to unload all specified module is + made + + - Correspond to the behavior of a ``module unload`` + - Modules which are still depended by other loaded modules will not be + unloaded + +- This command is intended for use only within modulefile evaluation context + (not within modulerc) + + +``family`` +---------- + +- Defines membership in family *name* and ensures that only one member of a + given family is currently loaded. + + - Semantically this command corresponds to the definition of both: + + - a conflict on family *name* + - a module alias *name* over currently loading module + +- Also defines the :envvar:`MODULES_FAMILY_\<NAME\>` environment variable set + to the currently loading module name minus its version number. + + - As family *name* is used in environment variable name, it requires that + *name* should only use characters that are accepted there + - Accepted characters for family *name* are *a-zA-Z0-9_* + - An error is generated in case other kind of characters are found in + specified family *name* + +- The :envvar:`LMOD_FAMILY_\<NAME\>` environment variable is also set in + addition to :envvar:`MODULES_FAMILY_\<NAME\>` and set to the same value. + This way existing scripts or modulefiles relying on this variable do not + need to be changed to be compatible with Modules. + +- When modulefile is unloaded, the ``MODULES_FAMILY_<NAME>`` and + ``LMOD_FAMILY_<NAME>`` environment variables are unset + +- This command is intended for use only within modulefile evaluation context + (not within modulerc) + + +``pushenv`` +----------- + +- Sets an environment variable with a value specified as argument but saves + the previous value set to restore it when modulefile is unloaded. + +- Use a :envvar:`__MODULES_PUSHENV_\<VAR\>` environment variable as a stack to + record the previous values of environment variable ``<VAR>``. + + - Each element in this Modules-specific variable is the combination of the + currently evaluating modulename and pushed value. + + - Combination joined with the ampersand character + - Each element in variable separated by colon character + + - When unloading, the value set by this module is removed not the value on + top of the list. + - Different than Lmod that restores the value on top of the stack even if + unloading module were not the one defining the top value currently in + use. + +- When saving value set before any module + + - An empty module name is used to push to the stack. + - When restoring this initial value, initial entry in stack is also + cleared (as no other module unload will unset it). + +- It is not expected that for the same environment variable, :mfcmd:`pushenv` + is mixed with: + + - ``setenv``, ``unsetenv`` + - ``append-path``, ``prepend-path``, ``remove-path`` + - These other modulefile commands clear the pushenv stack environment + variable (like ``setenv``/``unsetenv`` clear the reference counter + environment variable of the ``*-path`` commands) + +- It is not expected that :mfcmd:`pushenv` is called multiple times for the + same environment variable in the same modulefile + + - Inconsistent results may be obtained if environment variable value is + used in modulefile to set other variables. + - Especially that unload evaluation of modulefile will not process the + ``pushenv`` commands in the reverse order but in the script order. + - When checked during modulefile evaluation, lastly defined value remains + - However the operation is consistent at the end of modulefile evaluation, + as all values are withdrawn from stack and a value defined somewhere + else is restored. + - pushenv stack environment variable correctly handles multiple entries + coming from same modulefile, even multiple identical values. + +- For Lua modulefiles, Lmod handles a specific ``false`` value which clears + environment variable + + - Lmod does not implement this for Tcl modulefile + - Maybe because ``false`` cannot be distinguished from any other value + - So this specific behavior is also not supported on Modules + +- This command is intended for use only within modulefile evaluation context + (not within modulerc)
View file
_service:tar_scm:modules-5.1.1.tar.bz2/doc/source/design/magic-cookie-check.rst
Added
@@ -0,0 +1,89 @@ +.. _magic-cookie-check: + +Module magic cookie check +========================= + +A file should start with a specific string as header line to be considered as +a modulefile. This specific string is called the magic cookie and is equal to +``#%Module`` optionally followed by a version number to indicate the minimum +version of :file:`modulecmd.tcl` required to interpret this file. + +Magic cookie applies to modulefiles and module RC files. More recently it also +applies to the :file:`initrc` configuration file and collections. + +Magic cookie is checked in two different situations: + +* When searching for a modulefile: all files located under a directory used as + a modulepath are checked to determine if they are modulefiles to take them + into account in the module search. + +* When evaluating a modulefile: when reading file to pass it down to the + modulefile or modulerc interpreter, the magic cookie is checked to ensure + file can be evaluated. + +The :mconfig:`mcookie_check` configuration option is introduced to be able to +disable the magic cookie check. Option accepts the following values: + +* ``always``: This is the default value, magic cookie is checked in both + situations described above +* ``eval``: magic cookie is only checked prior evaluating file, not when + searching for modulefiles + +The :mconfig:`mcookie_check` option works like the :mconfig:`icase` option +with value determining a level of cumulative support. + +*FUTURE*: a third value, ``never``, may be interesting to disable the magic +cookie check in all situations. + + +Skipping check when searching modules +------------------------------------- + +When setting :mconfig:`mcookie_check` to ``eval``, module magic cookie is not +checked when analyzing the files located under an enabled modulepath. This +mode significantly diminishes the I/O load when looking at the content of a +modulepath as files are not opened and header read for the check. + +This mode requires a perfect control on the files located within the hierarchy +of the modulepath directories as: + +* non-modulefiles will be considered modulefiles and will be reported in + module search results and used to locate a module corresponding to a query + +* files hidden through restrictive permissions are reported in search results + and used to locate a module corresponding to a query + +For these non-modulefiles or read-protected files an error is obtained when +trying to evaluate them, as the magic cookie is checked at this step. + +Also the files specified full path are not checked prior evaluation if +``mcookie_check`` is set to ``eval``, so if these files are not modulefile an +error will be obtained when trying to evaluate them. + +The ``eval`` mode of ``mcookie_check`` configuration option has no impact on +the :file:`initrc` configuration file and collections as such files are not +searched like modulefiles. Their header is only checked at evaluation time. + + +Implementation of ``eval`` mode +------------------------------- + +Modulefiles or modulercs are read through the ``readModuleContent`` procedure +which is called by: + +* ``execute-modulerc`` or ``execute-modulefile`` procedures when files need to + get fully read to get evaluated +* ``checkValidModule`` procedure to verify file is a readable modulefile when + search for modules + +The ``checkValidModule`` procedure is the one to update when ``mcookie_check`` +configuration option is not set to ``always`` as this procedure is called by +all module search contexts. It is called by: + +* ``findModules`` to check files in directories within modulepaths +* ``getModules`` to check files pointed by mfcmd:`module-virtual` +* ``getPathToModule`` to check files transmitted as full path file + +.. note:: File readability (permission check) is not verified when + ``mcookie_check`` option is set to ``eval`` to keep the full benefit of + this mode regarding the I/O load optimization.
View file
_service:tar_scm:modules-5.0.1.tar.bz2/doc/source/design/module-tags.rst -> _service:tar_scm:modules-5.1.1.tar.bz2/doc/source/design/module-tags.rst
Changed
@@ -19,6 +19,12 @@ - For instance, a module with a ``sticky`` tag set on it cannot be unloaded +- Tag may also be set manually with the :option:`--tag` sub-command option + + - Applies to :subcmd:`load`, :subcmd:`try-load`, :subcmd:`load-any` and :subcmd:`switch` sub-commands + - When directly used from the terminal session or within modulefile + - Applies to :mfcmd:`always-load`, :mfcmd:`depends-on`, :mfcmd:`prereq`, :mfcmd:`prereq-all` and :mfcmd:`prereq-any` modulefile commands + - 3 different kind of tag exist: - Those inherited from module state, consequence of a specific modulefile command or module action @@ -31,27 +37,33 @@ - Every tag holding specific properties should have its dedicated modulefile command to define it - - Those set with ``module-tag`` that lead to a specific behavior - - Those set with ``module-tag`` that are purely informational, no specific behavior + - Those set with ``module-tag`` or ``--tag`` option that lead to a specific behavior + - Those set with ``module-tag`` or ``--tag`` option that are purely informational, no specific behavior - Tags inherited from module state: - ``hidden``: module not visible, not reported by default in ``avail`` result (tag acquired through :mfcmd:`module-hide`) - - ``hidden-loaded``: loaded module not reported by default in ``list`` result (tag acquired through ``module-hide --hidden-loaded``) + - ``hidden-loaded``: loaded module not reported by default in ``list`` result (tag acquired through ``module-hide --hidden-loaded`` or ``--tag`` option) - ``forbidden``: module that cannot be loaded (tag acquired through :mfcmd:`module-forbid`) - ``nearly-forbidden``: module that soon cannot be loaded (tag acquired through ``module-forbid``) - ``loaded``: loaded module - ``auto-loaded``: module automatically loaded by another module -- Tags set with ``module-tag`` associated to a specific behavior: +- Tags set with ``module-tag`` or ``--tag`` option associated to a specific behavior: - ``sticky``: loaded module cannot be unloaded unless forced or reloaded (see :ref:`sticky-modules`) - ``super-sticky``: loaded module cannot be unloaded even if forced, it stills can be unloaded if reloaded afterward (see :ref:`sticky-modules`) + - ``keep-loaded``: auto_handling mechanism does not unload auto-loaded module - Tags inherited from module state cannot be set with ``module-tag`` command - An error is otherwise thrown +- Tags inherited from module state cannot be set with ``--tag`` option + + - Exception made for ``hidden-loaded`` tag + - An error is otherwise thrown + - Modules project may introduce in the future new tags inherited from new states or new specific behaviors - These new tags will supersede tags set by users using the same naming @@ -88,6 +100,20 @@ - and modulefile are automatically generated by a build tool - but properties are not always related and set by the build tool +- ``module load --tag tag modspec...`` + + - Apply ``tag`` to the loading module selected through ``modspec`` module specification + - Available from all loading module sub-commands (``load``, ``try-load``, ``load-any`` and ``switch``) + - Option is preferably written: + + - ``--tag=tag`` when called from command-line + - ``--tag tag`` when called from modulefile + - but both syntaxes work from both locations + + - Multiple tags can be set at once by providing a tag list separated by ``:`` + + - e.g., ``--tag foo:bar`` or ``--tag=foo:bar`` + Persistency ^^^^^^^^^^^ @@ -106,6 +132,56 @@ - Before version 5.0, this tag was not recorded and auto loaded modules where listed in the ``__MODULES_LMNOTUASKED`` environment variable - This environment variable has been removed in Modules 5.0 +- Tags applied to loaded modules are saved in collection + + - Saving tags in collection is introduced in Modules 5.1 + - When one or more tags are set on a module to save, the + ``--tag=tag1:tag2`` option is added + + - After ``module load`` + - And before module specification + + - When option ``--tag=`` is found on a module to restore + + - Defined tags are transmitted to apply them to the module to load + + - With this change, the ``--notuasked`` option used in collection + previously to indicate module has been auto loaded is replaced by + ``--tag=auto-loaded`` option + + - No difference is made between tags set manually (through ``--tag`` + option) or tags set in modulerc (through ``module-tag`` or loaded module + states): both kind of tags are recorded in collection + +- The :mconfig:`collection_pin_tag` configuration option determines what tags + should be recorded in collection + + - When disabled (default), only the tags set through ``--tag`` option or + resulting from the way the module has been loaded (``auto-loaded`` and + ``keep-loaded`` tags) are recorded in collections + - When enabled, all tags applying to modules are recorded + - Exception made for ``nearly-forbidden`` tag, as its temporal meaning + is not fit for being saved + - Changing default value of :mconfig:`collection_pin_tag` defines the + :envvar:`MODULES_COLLECTION_PIN_TAG` variable + +- The :envvar:`__MODULES_LMEXTRATAG` environment variable holds all tags + applying to loaded modules that have been set through the ``--tag`` option + + - It helps to distinguish these specifically set tags from the others + - To only record these tags and those resulting from the way the module + has been loaded (like ``auto-loaded``) in collections by default + - The following tags set with ``--tag`` option but which describe a + specific state of loaded module are excluded from + ``__MODULES_LMEXTRATAG`` record: + + - ``auto-loaded`` + - ``keep-loaded`` + +- When a collection saved with ``collection_pin_tag`` option enabled is + restored all tags set are then considered extra tags (as they are found set + through the ``--tag`` option). + Reporting ^^^^^^^^^ @@ -118,6 +194,17 @@ - Tags are right-aligned on each column - One space character at least separates module name and version or list of symbolic version from tag list +- Defines tags are reported on module evaluation message block + + - Applies to *Loading*, *Unloading*, *Refreshing*, *Tagging* message blocks + - Only for the module designation set in the header of the block + + - Not on the error message, or list of requirement loaded/unloaded + - To avoid overloading the output + + - Tags are reported the same way than on ``list`` sub-command + - If load evaluation fails, the tags are not reported as they were not yet set + - Tags applying to module alias are reported on ``avail`` reports only - Where the module alias stands for itself in the report @@ -157,7 +244,7 @@ - The :mconfig:`tag_abbrev` configuration defines the abbreviations to apply to each tag - - Set by default at configure time to ``auto-loaded=aL:loaded=L:hidden=H:hidden-loaded=H:forbidden=F:nearly-forbidden=nF:sticky=S:super-sticky=sS`` + - Set by default at configure time to ``auto-loaded=aL:loaded=L:hidden=H:hidden-loaded=H:forbidden=F:nearly-forbidden=nF:sticky=S:super-sticky=sS:keep-loaded=kL`` - Note that by default, *hidden* and *hidden-loaded* tags share the same abbreviation, as they operate on separate contexts (respectively avail and list contexts) @@ -230,3 +317,44 @@ - Tags cannot be queried to select modules - Symbolic versions or variants can be used to select modules + +Updating tags on already loaded modules +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- An attempt to load an already loaded module with a ``--tag`` option set will + update the list of extra tags set for this loaded module + + - Works for every sub-command and modulefile commands accepting the + ``--tag`` option + - Does not imply the reload of the loaded module + - Add tags to the tag list already set, no removal + - As tags defined with ``module-tag`` cannot be unset + +- A ``tag`` sub-command may seem useful to update tag list of already loaded + modules + + - But it is simpler to use the loading/enabling sub-command to set these + extra tags, especially to distinguish between tagging modules or + modulepaths + - So no need for a dedicated sub-command, use loading or enabled + sub-commands instead + +- If extra tags specified are already set as non-extra tags on already loaded + module, the tags are not updated (extra tag list is not updated) + +- With ``prereq``-like commands: + + - all loaded requirement in specified list get their tag list updated + - loading requirement does not get its tag list updated (no real use case + foreseen for cyclic dependencies) + +- When restoring collection, extra tags of modules are unset to only keep the + extra tags defined in collection. + + - Extra tags are cleared either when module is unloaded or specifically + if module is already loaded at the correct position + +- When unloading a module, the ``auto-loaded``, ``keep-loaded`` and all + extra tags are unset from in-memory knowledge, not to reapply automatically + these tags if the module is loaded again: only the extra and state tags + from this new load will be set.
View file
_service:tar_scm:modules-5.0.1.tar.bz2/doc/source/design/output-configuration.rst -> _service:tar_scm:modules-5.1.1.tar.bz2/doc/source/design/output-configuration.rst
Changed
@@ -56,7 +56,7 @@ - For ``avail`` options: modulepath, alias, dirwsym, sym, tag, key - For ``list`` options: header, idx, variant, sym, tag, key -- If the ``-o``/``--output`` options are wronly specified +- If the ``-o``/``--output`` options are wrongly specified - An error is raised and evaluation terminates - It may happen in the following situations @@ -78,7 +78,7 @@ - Their value is ignored - So the default value takes precedence, unless a ``-o``/``--output`` option is specified - - Value in environment variable is wronly specified for instance in the following situations + - Value in environment variable is wrongly specified for instance in the following situations - Element set in option value unsupported by module sub-command - Elements set in option value not separated by colon character (``:``)
View file
_service:tar_scm:modules-5.1.1.tar.bz2/doc/source/design/shell-completion.rst
Added
@@ -0,0 +1,90 @@ +.. _shell-completion: + +Shell completion +================ + +Goal is to provide tool to define shell completion through modulefile. Need +comes from the ability of the :mfcmd:`source-sh` modulefile command to +reproduce :ref:`the shell changes made by a sourced shell +script<source-shell-script-in-modulefile>`. Completion definitions are part +of those shell changes, so there is a need to be able to define them through +modulefile command. + +:mfcmd:`complete` and :mfcmd:`uncomplete` modulefile commands are introduced +to give this ability to define or unset completion for commands in shell that +provides a command to define such completion. Such shells are: + +* bash +* tcsh +* fish + +No shell command to setup completion has been found on other shells. For +instance on zsh, completion is made through files saved in specific +directories. + + +complete +-------- + +:mfcmd:`complete` takes as argument: + +* shell: name of the shell this completion definition should be applied to +* command: name of the command the completion targets +* completion arguments aka body: parameter to define completion on shell + +*Shell* should correspond to one of the supported shell name. When modulefile +is evaluated, the :mfcmd:`complete` command will produce shell code as output +only if *shell* name corresponds to the shell the :file:`modulecmd.tcl` script +has been initialized for. + +If an unsupported *shell* name is set, :mfcmd:`complete` command is simply +ignored. No error is produced as the shell specified may be supported on a +latter version of the :file:`modulecmd.tcl` script and the modulefile may be +provided for use by different version of this script. + +*Command* name should be a non-empty string. Otherwise an evaluation error is +returned. + +*Body* is shell-specific. When modulefile is evaluated the body defined on a +:mfcmd:`complete` command is not checked by module. Possible options are +numerous and really different from one shell to another so it is up to the +modulefile author to ensure the body definition used is correctly supported on +targeted shell. + +*Body* value is not escaped to fit shell evaluation. Defined syntax should be +compatible with this evaluation. It is up to the modulefile writer to use the +correct syntax as it cannot be guessed depending on what writer wants to +achieve. + +For shells like fish: + +* Completion definition consist of multiple complete commands for a single + *command* name. +* Prior applying completion definition, any previous completion is cleared for + *command*. We ensure modulefile provides the full completion definition for + *command* this way. + +**Note**: when loading module on fish shell, completion is first fully removed +for *command*. It is expected that modulefile provides the full completion +definition for *command* and not rely on previous definition made elsewhere. + +:mfcmd:`complete` is evaluated on *load* but also *refresh* mode. Important on +the later to get completion correctly redefined when initializing sub-shells. +On *unload* mode, :mfcmd:`complete` becomes :mfcmd:`uncomplete`. + +uncomplete +---------- + +:mfcmd:`uncomplete` is evaluated on *unload* mode. Like other *undo* command, +it is ignored when unloading a modulefile. + +:mfcmd:`uncomplete` does not require a *shell* name as argument. Only the +*command* name is expected. + +*Command* name should be a non-empty string. Otherwise an evaluation error is +returned. + +:mfcmd:`uncomplete` command is provided in case of a need to specifically +unset a defined completion. There should not be a lot of use case for this +command, but it does not cost much to add as it is needed to undo the +:mfcmd:`complete` command when a modulefile is unloaded.
View file
_service:tar_scm:modules-5.0.1.tar.bz2/doc/source/design/source-shell-script-in-modulefile.rst -> _service:tar_scm:modules-5.1.1.tar.bz2/doc/source/design/source-shell-script-in-modulefile.rst
Changed
@@ -28,6 +28,8 @@ - Shell alias unset: transformed into ``unset-alias`` - Shell function definition: transformed into ``set-function`` - Shell function unset: transformed into ``unset-function`` + - Shell completion definition: transformed into ``complete`` + - Shell completion unset: transformed into ``uncomplete`` - Depending on modulefile evaluation mode, ``source-sh`` has different behaviors: @@ -58,9 +60,9 @@ - Respectively to ``<EnvModEscPS>``, ``<EnvModEscS1>`` and ``<EnvModEscS2>`` - If found in environment changes to record - - Actual bodies of shell alias and shell functions are not recorded in ``__MODULES_LMSOURCESH``, an empty body is recorded instead + - Actual bodies of shell alias, shell functions and shell completions are not recorded in ``__MODULES_LMSOURCESH``, an empty body is recorded instead - - Example value: ``foo/1&sh /tmp/source.sh|set-alias alfoo {}|set-function funcfoo {}`` + - Example value: ``foo/1&sh /tmp/source.sh|set-alias alfoo {}|set-function funcfoo {}|complete bash foocmd {}`` - When unloading modulefile, content found for this modulefile in ``__MODULES_LMSOURCESH`` variable is evaluated to reverse environment changes @@ -71,7 +73,7 @@ - If it is loaded - the content found for this modulefile in ``__MODULES_LMSOURCESH`` variable is evaluated in display mode to report each resulting modulefile command - - script is evaluated to fetch shell alias and function definition which are not recorded in ``__MODULES_LMSOURCESH`` + - script is evaluated to fetch shell alias, function and completion definitions which are not recorded in ``__MODULES_LMSOURCESH`` - If not loaded, script is evaluated to gather environment changes and report each resulting modulefile command @@ -122,6 +124,11 @@ - **Note**: if sourced script produces shell alias or function, these alias or function may not be compatible with the current shell of the user +- Shell completion is defined for the shell used to evaluate script + + - :mfcmd:`complete` commands are generated even if current user shell is not the same as the shell used to evaluate script + - but the completion definition will produce a no-operation on current user shell when :mfcmd:`complete` command is evaluated + - **Note**: the mechanism described here only applies for shell script as to understand the impact the script execution over the user environment, this environment need to be compared prior and after execution - ``source-sh`` modulefile command relies of the ``sh-to-mod`` procedure of ``modulecmd.tcl`` @@ -138,8 +145,8 @@ - Shell to use to source targeted script may be specified as a command name or as a path name - - When specified as a command name (eg. ``bash``), command location will be determined based on currently set ``PATH`` - - When specified as a path name (eg. ``/bin/bash``), this path name determines command location + - When specified as a command name (e.g., ``bash``), command location will be determined based on currently set ``PATH`` + - When specified as a path name (e.g., ``/bin/bash``), this path name determines command location - Prior executing shell and making it sourcing script: @@ -165,7 +172,7 @@ - but it is an external command, so requires extra processing and an additional requirement - moreover it does not return shell functions in general, only exported Bash functions - - Shell builtin commands are used to query existing environment variables, aliases, functions and current working directory + - Shell builtin commands are used to query existing environment variables, aliases, functions, completions and current working directory - which provides best processing efficiency - but leads to specific output parsing for each shell @@ -184,3 +191,24 @@ - appearing in newly prepended entries or newly appended entries and in entries defined prior script evaluation - An environment variable equaling to the path separator character (``:``) prior script evaluation is considered as undefined prior script evaluation to avoid misleading analysis + +- Environment variables made for Modules private use are filtered-out from the environment changes produced + + - ``LOADEDMODULES``, ``_LMFILES_`` and any variable prefixed by ``__MODULES_`` are concerned + - Changes relative to Modules state are ignored this way + - If script loads in turn a modulefile, environment changes reported will not report the loaded module but only the environment changes it does + - Modules configuration variable (prefixed by ``MODULES_``) are still taken into account + +- There may be several shell completion changes found for the same command on particular shell like fish + + - It produces multiple ``complete`` modulefile commands + - But in ``__MODULES_LMSOURCESH`` variable, a single entry is recorded as a single ``uncomplete`` command should be generated when unloading modulefile + - If completion definition is partial for a command when loading modulefile, on fish shell previous completion definition is cleared right before setting those defined in modulefile + - When a completion definition difference is spotted after script evaluation, new completion definition is set which means previous definition is cleared (either intrinsically by shell or for fish due to the definition clear specifically added) + +- Fish shell allows nested definition of shell functions + + - A separator string ``%ModulesSubShToMod%`` is printed between each function definition not to get main and nested functions mixed up + - Such sub-separator is only applied on fish shell + +- **FUTURE**: this feature may be extended to translate environment changes made by tools like Spack, Lmod or pkg-config. It may provide this way bridges between different realms.
View file
_service:tar_scm:modules-5.0.1.tar.bz2/doc/source/design/sticky-modules.rst -> _service:tar_scm:modules-5.1.1.tar.bz2/doc/source/design/sticky-modules.rst
Changed
@@ -14,33 +14,33 @@ - Once loaded a sticky module cannot be unloaded unless forced or reloaded. - If module is super-sticky instead of sticky, it cannot be unloaded even if forced, only if it is reloaded afterward -- Stickyness definition relies on :ref:`module-tags` +- Stickiness definition relies on :ref:`module-tags` - ``module-tag sticky foo/1.0`` defines module *foo/1.0* as sticky - ``module-tag super-sticky foo/1.0`` defines module *foo/1.0* as super-sticky -- Stickyness specified over a symbolic version or a module alias has no effect +- Stickiness specified over a symbolic version or a module alias has no effect - ``module-tag`` allows to specify a symbolic module version or a module alias - but associated tag will apply to the symbolic version or alias only - - as modulefile targetted by symbol or alias does not inherit their tags + - as modulefile targeted by symbol or alias does not inherit their tags - so a sticky or super-sticky tag set on a symbolic version or alias has no effect -- Sticky module can be swapped with another version from same module when stickness is defined over module parent name +- Sticky module can be swapped with another version from same module when stickiness is defined over module parent name - - For instance if stickyness is defined over module *foo*, *foo/1.0* can be swapped with *foo/2.0* + - For instance if stickiness is defined over module *foo*, *foo/1.0* can be swapped with *foo/2.0* - Such swap could occur from a ``restore`` or a ``switch`` sub-command - - As soon as stickyness is defined over a precise module version name (like *foo/1.0*) such module cannot be swapped by another version of *foo* module - - Stickyness defined over module parent name (like *foo*) means *any version from module foo must be loaded* - - When stickyness is defined for several module versions using advanced version specifiers like *foo@1:* or *foo@1.0,2.0* + - As soon as stickiness is defined over a precise module version name (like *foo/1.0*) such module cannot be swapped by another version of *foo* module + - Stickiness defined over module parent name (like *foo*) means *any version from module foo must be loaded* + - When stickiness is defined for several module versions using advanced version specifiers like *foo@1:* or *foo@1.0,2.0* - - it means stickyness applies to the module versions + - it means stickiness applies to the module versions - thus they cannot be swapped by another version - - In case stickness is defined over module parent name and another ``module-tag`` defines stickyness over specific module version name + - In case stickiness is defined over module parent name and another ``module-tag`` defines stickiness over specific module version name - - it means stickyness applies to the module version - - thus these versions targetted specifically with ``module-tag`` cannot be swapped by another version from same module + - it means stickiness applies to the module version + - thus these versions targeted specifically with ``module-tag`` cannot be swapped by another version from same module - When a super-sticky module depends on a non-super-sticky module @@ -65,8 +65,8 @@ Current limitations ------------------- -- When swapping a sticky module explicitely targetted by the ``module-tag`` command and which is the default version +- When swapping a sticky module explicitly targeted by the ``module-tag`` command and which is the default version - For instance ``module-tag sticky foo/1.0`` and ``module-version foo/1.0 default`` - If specified swapped-on module is the generic module name, for instance *foo* - - ``switch`` sub-command raises an error even if the sticky module is the default version (either implicit or explicitely set) for this module + - ``switch`` sub-command raises an error even if the sticky module is the default version (either implicit or explicitly set) for this module
View file
_service:tar_scm:modules-5.0.1.tar.bz2/doc/source/design/variants.rst -> _service:tar_scm:modules-5.1.1.tar.bz2/doc/source/design/variants.rst
Changed
@@ -19,11 +19,11 @@ - variants are defined for modulefiles within concerned modulefiles with the :mfcmd:`variant` modulefile command - - variants are bound to the modulefile their target + - variants are bound to the modulefile they target - especially modulefile evaluation may be guided by the value selected for the variants - so it makes more sense to have variants defined within modulefiles rather in modulercs -- ``variant --default? defaultval? --alias? {aliasname...?} name value ...?`` +- ``variant --default? defaultval? --alias? {aliasname...?} name value? ...?`` - ``name`` restrained to the accepted variable name @@ -43,17 +43,21 @@ - raise error otherwise - - default value should be part of possible value list + - default value should be part of possible value list if value list provided - error is raised otherwise when default value is used, as it does not correspond to an accepted value - ex: ``variant name --default 1.8 1.0 2.0`` + - when no list of accepted value is provided, default value could be any value + - may be set as a Boolean variant (when ``--boolean`` argument is passed) - a Boolean variant may equal *true* or *false* -- must have a list of accepted values unless if defined as a Boolean variant +- may have a list of accepted values + + - unless if defined as a Boolean variant - passed value(s) must correspond to those accepted @@ -68,6 +72,10 @@ - an error is raised otherwise - exception made for the *0* and *1* integers + - when no list of accepted value is provided it means any value is accepted + + - it is up to the modulefile author to write the appropriate test after variant declaration to check that the value provided is acceptable + - may be aliased (when argument ``--alias`` is passed) in which case: - argument ``--alias`` should be associated one or a list of alias names @@ -152,7 +160,7 @@ - to ensure no usage of this variant name will be made before its special mechanism availability -- special variant ``version`` is instanciated as variable ``ModuleVariant(version)`` if declared +- special variant ``version`` is instantiated as variable ``ModuleVariant(version)`` if declared - will be set to value that may be specified with the ``@`` shortcut - will initially work as any other variant (accepted list of value, default value) @@ -378,7 +386,7 @@ - command-line option takes precedence - for instance the ``-t`` will always be treated as ``--terse`` and not the negation of a ``t`` variant - - beware that the negation prefix *~* when used as a separate word may trigger the tilda resolution of the currently running shell + - beware that the negation prefix *~* when used as a separate word may trigger the tilde resolution of the currently running shell - if a username matches a Boolean variant name, using the ``~name`` form on the shell command-line will leads to the resolution of the HOME directory path of user ``name`` @@ -655,7 +663,7 @@ - In case the :mconfig:`collection_pin_version` configuration option is disabled variant set to their default value should not be recorded in collection - Following the same scheme than for module version - - When saving collection, the *is-default-value* information stored in persistency variable (``__MODULES_LMVARIANT``) helps to know whether to value set to a variant is or not the default one + - When saving collection, the *is-default-value* information stored in persistency variable (``__MODULES_LMVARIANT``) helps to know whether the value set to a variant is or not the default one - The save mechanism will rely on this information to exclude or not the variant specification in the generated collection output - Within this *is-default-value* hint, the *was-this-default-specified-by-user* sub-information is not preserved when saving collection @@ -747,7 +755,7 @@ - ``cmdModuleSwitch`` - ``getModules`` - - Used by ``cmdModuleAvail``, ``getPathToModule``, ``isStickynessReloading``, + - Used by ``cmdModuleAvail``, ``getPathToModule``, ``isStickinessReloading``, ``cmdModulePaths``, ``cmdModuleSearch`` and ``cmdModuleAliases`` - ``getPathToModule``
View file
_service:tar_scm:modules-5.0.1.tar.bz2/doc/source/index.rst -> _service:tar_scm:modules-5.1.1.tar.bz2/doc/source/index.rst
Changed
@@ -26,7 +26,7 @@ languages such as *tcl*, *perl*, *python*, *ruby*, *cmake* and *r*. Modules are useful in managing different versions of applications. Modules -can also be bundled into metamodules that will load an entire suite of +can also be bundled into meta-modules that will load an entire suite of different applications. .. note:: Modules presented here are ones that modify the shell or script
View file
_service:tar_scm:modules-5.0.1.tar.bz2/doc/source/module.rst -> _service:tar_scm:modules-5.1.1.tar.bz2/doc/source/module.rst
Changed
@@ -120,7 +120,7 @@ .. parsed-literal:: - eval "\`\ |libexecdir|\ /modulecmd.tcl sh autoinit\`" + eval "$(\ |libexecdir|\ /modulecmd.tcl sh autoinit)" .. _Modulecmd startup: @@ -153,16 +153,20 @@ 3. All :file:`.modulerc` and :file:`.version` files found during modulefile seeking. -These module run-command files must begins like *modulefiles* with the magic -cookie ``#%Module``. A version number may be placed after this string. The -version number reflects the minimum version of :file:`modulecmd.tcl` required -to interpret the run-command file. If a version number doesn't exist, then -:file:`modulecmd.tcl` will assume the run-command file is compatible. Files -without the magic cookie or with a version number greater than the current -version of :file:`modulecmd.tcl` will not be interpreted and an error is -reported. Such error does not abort the whole :command:`module` evaluation. If -the :mconfig:`mcookie_version_check` configuration is disabled the version -number set is not checked. +These module run-command files must begins like *modulefiles* with the +``#%Module`` file signature, also called the Modules magic cookie. A version +number may be placed after this string. The version number reflects the +minimum version of :file:`modulecmd.tcl` required to interpret the run-command +file. If a version number doesn't exist, then :file:`modulecmd.tcl` will +assume the run-command file is compatible. Files without the magic cookie or +with a version number greater than the current version of +:file:`modulecmd.tcl` will not be interpreted and an error is reported. Such +error does not abort the whole :command:`module` evaluation. If the +:mconfig:`mcookie_version_check` configuration is disabled the version number +set is not checked. + +.. note:: Run-command files are intended to set parameters for modulefiles, + not to configure the :command:`module` command itself. Command line switches ^^^^^^^^^^^^^^^^^^^^^ @@ -206,13 +210,16 @@ .. option:: --contains, -C - On :subcmd:`avail` sub-command, return modules whose fully qualified name - contains search query string. + On :subcmd:`avail` and :subcmd:`list` sub-commands, return modules whose + fully qualified name contains search query string. .. only:: html .. versionadded:: 4.3 + .. versionchanged:: 5.1 + Support for :subcmd:`list` sub-command added + .. option:: --debug, -D, -DD Debug mode. Causes :command:`module` to print debugging messages about its @@ -272,7 +279,7 @@ .. versionadded:: 4.4 :option:`--icase`/:option:`-i` support was dropped on version `4.0` but reintroduced starting version `4.4`. When set, it now applies to - search query string and module specificiation on all sub-commands and + search query string and module specification on all sub-commands and modulefile Tcl commands. .. option:: --indepth @@ -338,6 +345,14 @@ .. versionadded:: 4.1 +.. option:: --no-redirect + + Do not send message output to stdout. Keep it on stderr. + + .. only:: html + + .. versionadded:: 5.1 + .. option:: --output=LIST, -o LIST Define the content to report in addition to module names. This option is @@ -374,6 +389,15 @@ .. versionadded:: 4.1 +.. option:: --redirect + + Send message output to stdout instead of stderr. Only supported on sh, bash, + ksh, zsh and fish shells. + + .. only:: html + + .. versionadded:: 5.1 + .. option:: --silent, -s Turn off error, warning and informational messages. :command:`module` command @@ -387,13 +411,30 @@ .. option:: --starts-with, -S - On :subcmd:`avail` sub-command, return modules whose name starts with search - query string. + On :subcmd:`avail` and :subcmd:`list` sub-commands, return modules whose name + starts with search query string. .. only:: html .. versionadded:: 4.3 + .. versionchanged:: 5.1 + Support for :subcmd:`list` sub-command added + +.. option:: --tag=LIST + + On :subcmd:`load`, :subcmd:`load-any`, :subcmd:`switch` and + :subcmd:`try-load` sub-commands, apply LIST of module tags to the loading + *modulefile*. *LIST* corresponds to the concatenation of multiple tags + separated by colon character (``:``). *LIST* should not contain tags + inherited from *modulefile* state or from other modulefile commands. If + module is already loaded, tags from *LIST* are added to the list of tags + already applied to this module. + + .. only:: html + + .. versionadded:: 5.1 + .. option:: --terse, -t Display :subcmd:`avail`, :subcmd:`list` and :subcmd:`savelist` output in @@ -442,10 +483,18 @@ Module Sub-Commands ^^^^^^^^^^^^^^^^^^^ -.. subcmd:: add --auto|--no-auto -f modulefile... +.. subcmd:: add options modulefile... See :subcmd:`load`. +.. subcmd:: add-any options modulefile... + + See :subcmd:`load-any`. + + .. only:: html + + .. versionadded:: 5.1 + .. subcmd:: aliases -a List all available symbolic version-names and aliases in the current @@ -484,16 +533,16 @@ See :subcmd:`search`. -.. subcmd:: avail -d|-L -t|-l|-j -a -o LIST -S|-C --indepth|--no-indepth path... +.. subcmd:: avail -d|-L -t|-l|-j -a -o LIST -S|-C --indepth|--no-indepth pattern... List all available *modulefiles* in the current :envvar:`MODULEPATH`. All directories in the :envvar:`MODULEPATH` are recursively searched for files - containing the *modulefile* magic cookie. If an argument is given, then + containing the Modules magic cookie. If a *pattern* argument is given, then each directory in the :envvar:`MODULEPATH` is searched for *modulefiles* - whose pathname, symbolic version-name or alias match the argument. Argument - may contain wildcard characters. Multiple versions of an application can - be supported by creating a subdirectory for the application containing - *modulefiles* for each version. + whose pathname, symbolic version-name or alias match *pattern* in a case + insensitive manner by default. *pattern* may contain wildcard characters. + Multiple versions of an application can be supported by creating a + subdirectory for the application containing *modulefiles* for each version. Symbolic version-names and aliases found in the search are displayed in the result of this sub-command. Symbolic version-names are displayed next to @@ -518,10 +567,10 @@ A *Key* section is added at the end of the output in case some elements are reported in parentheses or chevrons along module name or if some graphical - rendition is made over some outputed elements. This *Key* section gives hints + rendition is made over some output elements. This *Key* section gives hints on the meaning of such elements. - The parameter *path* may also refer to a symbolic modulefile name or a + The parameter *pattern* may also refer to a symbolic modulefile name or a modulefile alias. It may also leverage a specific syntax to finely select module version (see `Advanced module version specifiers`_ section below). @@ -586,8 +635,14 @@ .. mconfig:: advanced_version_spec - Advanced module version specification to finely select modulefiles. Defines - environment variable :envvar:`MODULES_ADVANCED_VERSION_SPEC` when set. + Advanced module version specification to finely select modulefiles. + + Default value is ``1``. It can be changed at installation time with + :instopt:`--disable-advanced-version-spec<--enable-advanced-version-spec>` + option. The :envvar:`MODULES_ADVANCED_VERSION_SPEC` environment variable is + defined by :subcmd:`config` sub-command when changing this configuration + option from its default value. See :envvar:`MODULES_ADVANCED_VERSION_SPEC` + description for details. .. only:: html @@ -595,17 +650,40 @@ .. mconfig:: auto_handling - Automated module handling mode. Defines :envvar:`MODULES_AUTO_HANDLING`. + Automated module handling mode. + + Default value is ``1``. It can be changed at installation time with + :instopt:`--disable-auto-handling<--enable-auto-handling>` option. The + :envvar:`MODULES_AUTO_HANDLING` environment variable is defined by + :subcmd:`config` sub-command when changing this configuration option from + its default value. The :option:`--auto` and :option:`--no-auto` + command line switches change the value of this configuration option. See + :envvar:`MODULES_AUTO_HANDLING` description for details. .. mconfig:: avail_indepth - :subcmd:`avail` sub-command in depth search mode. Defines - :envvar:`MODULES_AVAIL_INDEPTH`. + :subcmd:`avail` sub-command in depth search mode. + + Default value is ``1``. It can be changed at installation time with + :instopt:`--disable-avail-indepth<--enable-avail-indepth>` option. The + :envvar:`MODULES_AVAIL_INDEPTH` environment variable is defined by + :subcmd:`config` sub-command when changing this configuration option from + its default value. The :option:`--indepth` and :option:`--no-indepth` + command line switches change the value of this configuration option. See + :envvar:`MODULES_AVAIL_INDEPTH` description for details. .. mconfig:: avail_output Content to report in addition to module names on :subcmd:`avail` sub-command - regular output mode. Defines :envvar:`MODULES_AVAIL_OUTPUT`. + regular output mode. + + Default value is ``modulepath:alias:dirwsym:sym:tag:key``. It can be changed + at installation time with :instopt:`--with-avail-output` option. The + :envvar:`MODULES_AVAIL_OUTPUT` environment variable is defined by + :subcmd:`config` sub-command when changing this configuration option from + its default value. The :option:`--output`/:option:`-o` command line switches + change the value of this configuration option. See + :envvar:`MODULES_AVAIL_OUTPUT` description for details. .. only:: html @@ -614,7 +692,15 @@ .. mconfig:: avail_terse_output Content to report in addition to module names on :subcmd:`avail` sub-command - terse output mode. Defines :envvar:`MODULES_AVAIL_TERSE_OUTPUT`. + terse output mode. + + Default value is ``modulepath:alias:dirwsym:sym:tag``. It can be changed at + installation time with :instopt:`--with-avail-terse-output` option. The + :envvar:`MODULES_AVAIL_TERSE_OUTPUT` environment variable is defined by + :subcmd:`config` sub-command when changing this configuration option from + its default value. The :option:`--output`/:option:`-o` command line switches + change the value of this configuration option. See + :envvar:`MODULES_AVAIL_TERSE_OUTPUT` description for details. .. only:: html @@ -622,31 +708,80 @@ .. mconfig:: collection_pin_version - Register exact modulefile version in collection. Defines - :envvar:`MODULES_COLLECTION_PIN_VERSION`. + Register exact modulefile version in collection. + + Default value is ``0``. The :envvar:`MODULES_COLLECTION_PIN_VERSION` + environment variable is defined by :subcmd:`config` sub-command when + changing this configuration option from its default value. See + :envvar:`MODULES_COLLECTION_PIN_VERSION` description for details. + + .. mconfig:: collection_pin_tag + + Register full tag list applying to modulefiles in collection. + + Default value is ``0``. The :envvar:`MODULES_COLLECTION_PIN_TAG` + environment variable is defined by :subcmd:`config` sub-command when + changing this configuration option from its default value. See + :envvar:`MODULES_COLLECTION_PIN_TAG` description for details. + + .. only:: html + + .. versionadded:: 5.1 .. mconfig:: collection_target - Collection target which is valid for current system. Defines - :envvar:`MODULES_COLLECTION_TARGET`. + Collection target which is valid for current system. + + This configuration option is unset by default. The + :envvar:`MODULES_COLLECTION_TARGET` environment variable is defined by + :subcmd:`config` sub-command when changing this configuration option from + its default value. See :envvar:`MODULES_COLLECTION_TARGET` description for + details. .. mconfig:: color - Colored output mode. Defines :envvar:`MODULES_COLOR`. + Colored output mode. + + Default value is ``auto``. It can be changed at installation time with + :instopt:`--disable-color<--enable-color>` option. The + :envvar:`MODULES_COLOR` environment variable is defined by + :subcmd:`config` sub-command when changing this configuration option from + its default value. The :option:`--color` command line switches changes the + value of this configuration option. See :envvar:`MODULES_COLOR` description + for details. .. mconfig:: colors - Chosen colors to highlight output items. Defines - :envvar:`MODULES_COLORS`. + Chosen colors to highlight output items. + + Default value is ``hi=1:db=2:tr=2:se=2:er=91:wa=93:me=95:in=94:mp=1;94:di=94:al=96:va=93:sy=95:de=4:cm=92:aL=100:L=90;47:H=2:F=41:nF=43:S=46:sS=44:kL=30;48;5;109``. + It can be changed at installation time with + :instopt:`--with-dark-background-colors` or + :instopt:`--with-light-background-colors` options in conjunction with + :instopt:`--with-terminal-background`. The :envvar:`MODULES_COLORS` + environment variable is defined by :subcmd:`config` sub-command when + changing this configuration option from its default value. See + :envvar:`MODULES_COLORS` description for details. .. mconfig:: contact - Modulefile contact address. Defines :envvar:`MODULECONTACT`. + Modulefile contact address. + + Default value is ``root@localhost``. The :envvar:`MODULECONTACT` environment + variable is defined by :subcmd:`config` sub-command when changing this + configuration option from its default value. See :envvar:`MODULECONTACT` + description for details. .. mconfig:: extended_default - Allow partial module version specification. Defines - :envvar:`MODULES_EXTENDED_DEFAULT`. + Allow partial module version specification. + + Default value is ``1``. It can be changed at installation time with + :instopt:`--disable-extended-default<--enable-extended-default>` option. The + :envvar:`MODULES_EXTENDED_DEFAULT` environment variable is defined by + :subcmd:`config` sub-command when changing this configuration option from + its default value. See :envvar:`MODULES_EXTENDED_DEFAULT` description for + details. .. only:: html @@ -655,7 +790,13 @@ .. mconfig:: editor Text editor command to open modulefile with through :subcmd:`edit` - sub-command. Defines :envvar:`MODULES_EDITOR`. + sub-command. + + Default value is ``vi``. It can be changed at installation time with + :instopt:`--with-editor` option. The :envvar:`MODULES_EDITOR` environment + variable is defined by :subcmd:`config` sub-command when changing this + configuration option from its default value. See :envvar:`MODULES_EDITOR` + description for details. .. only:: html @@ -663,13 +804,22 @@ .. mconfig:: extra_siteconfig - Additional site-specific configuration script location. Defines - :envvar:`MODULES_SITECONFIG`. + Additional site-specific configuration script location. + + This configuration option is unset by default. The + :envvar:`MODULES_SITECONFIG` environment variable is defined by + :subcmd:`config` sub-command when changing this configuration option from + its default value. See :envvar:`MODULES_SITECONFIG` description for details. .. mconfig:: home - Location of Modules package main directory. Defines - :envvar:`MODULESHOME`. + Location of Modules package main directory. + + Default value is |file prefix|. It can be changed at installation time with + :instopt:`--prefix` or :instopt:`--with-moduleshome` options. The + :envvar:`MODULESHOME` environment variable is defined by :subcmd:`config` + sub-command when changing this configuration option from its default value. + See :envvar:`MODULESHOME` description for details. .. only:: html @@ -677,7 +827,15 @@ .. mconfig:: icase - Enable case insensitive match. Defines :envvar:`MODULES_ICASE`. + Enable case insensitive match. + + Default value is ``search``. It can be changed at installation time with + :instopt:`--with-icase` option. The :envvar:`MODULES_ICASE` environment + variable is defined by :subcmd:`config` sub-command when changing this + configuration option from its default value. The + :option:`--icase`/:option:`-i` command line switches change the value of + this configuration option. See :envvar:`MODULES_ICASE` description for + details. .. only:: html @@ -687,17 +845,31 @@ Directories ignored when looking for modulefiles. - The value of this option cannot be altered. + Default value is ``CVS RCS SCCS .svn .git .SYNC .sos``. The value of this + option cannot be altered. .. mconfig:: implicit_default - Set an implicit default version for modules. Defines - :envvar:`MODULES_IMPLICIT_DEFAULT`. + Set an implicit default version for modules. + + Default value is ``1``. It can be changed at installation time with + :instopt:`--disable-implicit-default<--enable-implicit-default>` option. The + :envvar:`MODULES_IMPLICIT_DEFAULT` environment variable is defined by + :subcmd:`config` sub-command when changing this configuration option from + its default value. See :envvar:`MODULES_IMPLICIT_DEFAULT` description for + details. .. mconfig:: implicit_requirement Implicitly define a requirement onto modules specified on :mfcmd:`module` - commands in modulefile. Defines :envvar:`MODULES_IMPLICIT_REQUIREMENT`. + commands in modulefile. + + Default value is ``1``. It can be changed at installation time with + :instopt:`--disable-implicit-requirement<--enable-implicit-requirement>` + option. The :envvar:`MODULES_IMPLICIT_REQUIREMENT` environment variable is + defined by :subcmd:`config` sub-command when changing this configuration + option from its default value. See :envvar:`MODULES_IMPLICIT_REQUIREMENT` + description for details. .. only:: html @@ -706,7 +878,15 @@ .. mconfig:: list_output Content to report in addition to module names on :subcmd:`list` sub-command - regular output mode. Defines :envvar:`MODULES_LIST_OUTPUT`. + regular output mode. + + Default value is ``header:idx:variant:sym:tag:key``. It can be changed at + installation time with :instopt:`--with-list-output` option. The + :envvar:`MODULES_LIST_OUTPUT` environment variable is defined by + :subcmd:`config` sub-command when changing this configuration option from + its default value. The :option:`--output`/:option:`-o` command line switches + change the value of this configuration option. See + :envvar:`MODULES_LIST_OUTPUT` description for details. .. only:: html @@ -715,7 +895,15 @@ .. mconfig:: list_terse_output Content to report in addition to module names on :subcmd:`list` sub-command - terse output mode. Defines :envvar:`MODULES_LIST_TERSE_OUTPUT`. + terse output mode. + + Default value is ``header``. It can be changed at installation time with + :instopt:`--with-list-terse-output` option. The + :envvar:`MODULES_LIST_TERSE_OUTPUT` environment variable is defined by + :subcmd:`config` sub-command when changing this configuration option from + its default value. The :option:`--output`/:option:`-o` command line switches + change the value of this configuration option. See + :envvar:`MODULES_LIST_TERSE_OUTPUT` description for details. .. only:: html @@ -727,14 +915,36 @@ :mconfig:`locked_configs` value are locked, thus their value cannot be altered. + This configuration option is set to an empty value by default. It can be + changed at installation time with :instopt:`--with-locked-configs` option. The value of this option cannot be altered. + .. mconfig:: mcookie_check + + Defines if the Modules magic cookie (i.e., ``#%Module`` file signature) + should be checked to determine if a file is a modulefile. + + Default value is ``always``. The :envvar:`MODULES_MCOOKIE_CHECK` environment + variable is defined by :subcmd:`config` sub-command when changing this + configuration option from its default value. See + :envvar:`MODULES_MCOOKIE_CHECK` description for details. + + .. only:: html + + .. versionadded:: 5.1 + .. mconfig:: mcookie_version_check Defines if the version set in the Modules magic cookie used in modulefile should be checked against the version of :file:`modulecmd.tcl` to determine - if the modulefile could be evaluated or not. Defines - :envvar:`MODULES_MCOOKIE_VERSION_CHECK`. + if the modulefile could be evaluated or not. + + Default value is ``1``. It can be changed at installation time with + :instopt:`--disable-mcookie-version-check<--enable-mcookie-version-check>` + option. The :envvar:`MODULES_MCOOKIE_VERSION_CHECK` environment variable is + defined by :subcmd:`config` sub-command when changing this configuration + option from its default value. See :envvar:`MODULES_MCOOKIE_VERSION_CHECK` + description for details. .. only:: html @@ -742,8 +952,13 @@ .. mconfig:: ml - Define :command:`ml` command at initialization time. Defines - :envvar:`MODULES_ML`. + Define :command:`ml` command at initialization time. + + Default value is ``1``. It can be changed at installation time with + :instopt:`--disable-ml<--enable-ml>` option. The :envvar:`MODULES_ML` + environment variable is defined by :subcmd:`config` sub-command when + changing this configuration option from its default value. See + :envvar:`MODULES_ML` description for details. .. only:: html @@ -752,8 +967,14 @@ .. mconfig:: nearly_forbidden_days Set the number of days a module should be considered *nearly forbidden* - prior reaching its expiry date. Defines - :envvar:`MODULES_NEARLY_FORBIDDEN_DAYS`. + prior reaching its expiry date. + + Default value is ``14``. It can be changed at installation time with + :instopt:`--with-nearly-forbidden-days` option. The + :envvar:`MODULES_NEARLY_FORBIDDEN_DAYS` environment variable is defined by + :subcmd:`config` sub-command when changing this configuration option from + its default value. See :envvar:`MODULES_NEARLY_FORBIDDEN_DAYS` description + for details. .. only:: html @@ -761,13 +982,25 @@ .. mconfig:: pager - Text viewer to paginate message output. Defines :envvar:`MODULES_PAGER`. + Text viewer to paginate message output. + + Default value is ``less -eFKRX``. It can be changed at installation time + with :instopt:`--with-pager` and :instopt:`--with-pager-opts` options. The + :envvar:`MODULES_PAGER` environment variable is defined by :subcmd:`config` + sub-command when changing this configuration option from its default value. + See :envvar:`MODULES_PAGER` description for details. .. mconfig:: quarantine_support Defines if code for quarantine mechanism support should be generated in - :command:`module` shell function definition. Defines - :envvar:`MODULES_QUARANTINE_SUPPORT`. + :command:`module` shell function definition. + + Default value is ``0``. It can be changed at installation time with + :instopt:`--enable-quarantine-support` option. The + :envvar:`MODULES_QUARANTINE_SUPPORT` environment variable is defined by + :subcmd:`config` sub-command when changing this configuration option from + its default value. See :envvar:`MODULES_QUARANTINE_SUPPORT` description for + details. .. only:: html @@ -775,48 +1008,108 @@ .. mconfig:: rcfile - Global run-command file location. Defines :envvar:`MODULERCFILE`. + Global run-command file location. - .. mconfig:: run_quarantine + This configuration option is unset by default. The :envvar:`MODULERCFILE` + environment variable is defined by :subcmd:`config` sub-command when + changing this configuration option from its default value. See + :envvar:`MODULERCFILE` description for details. + + .. mconfig:: redirect_output + + Control whether or not the output of module command should be redirected + from stderr to stdout. + + Default value is ``1``. The :envvar:`MODULES_REDIRECT_OUTPUT` environment + variable is defined by :subcmd:`config` sub-command when changing this + configuration option from its default value. The :option:`--redirect` and + :option:`--no-redirect` command line switches change the value of this + configuration option. See :envvar:`MODULES_REDIRECT_OUTPUT` description for + details. - Environment variables to indirectly pass to :file:`modulecmd.tcl`. Defines - :envvar:`MODULES_RUN_QUARANTINE`. + .. only:: html - .. mconfig:: silent_shell_debug + .. versionadded:: 5.1 - Disablement of shell debugging property for the module command. Also defines - if code to silence shell debugging property should be generated in - :command:`module` shell function definition. Defines - :envvar:`MODULES_SILENT_SHELL_DEBUG`. + .. mconfig:: run_quarantine + + Environment variables to indirectly pass to :file:`modulecmd.tcl`. + + This configuration option is set to an empty value by default. It can be + changed at installation time with :instopt:`--with-quarantine-vars` option + that sets :envvar:`MODULES_RUN_QUARANTINE`. This environment variable is + also defined by :subcmd:`config` sub-command when changing this + configuration option. See :envvar:`MODULES_RUN_QUARANTINE` description for + details. .. mconfig:: search_match - Module search match style. Defines :envvar:`MODULES_SEARCH_MATCH`. + Module search match style. + + Default value is ``starts_with``. It can be changed at installation time + with :instopt:`--with-search-match` option. The + :envvar:`MODULES_SEARCH_MATCH` environment variable is defined by + :subcmd:`config` sub-command when changing this configuration option from + its default value. The :option:`--contains` and :option:`--starts-with` + command line switches change the value of this configuration option. See + :envvar:`MODULES_SEARCH_MATCH` description for details. .. mconfig:: set_shell_startup - Ensure module command definition by setting shell startup file. Defines - :envvar:`MODULES_SET_SHELL_STARTUP`. + Ensure module command definition by setting shell startup file. + + Default value is ``0``. It can be changed at installation time with + :instopt:`--enable-set-shell-startup` option. The + :envvar:`MODULES_SET_SHELL_STARTUP` environment variable is defined by + :subcmd:`config` sub-command when changing this configuration option from + its default value. See :envvar:`MODULES_SET_SHELL_STARTUP` description for + details. .. mconfig:: shells_with_ksh_fpath Ensure module command is defined in ksh when it is started as a sub-shell - from the listed shells. Defines :envvar:`MODULES_SHELLS_WITH_KSH_FPATH`. + from the listed shells. + + This configuration option is set to an empty value by default. The + :envvar:`MODULES_SHELLS_WITH_KSH_FPATH` environment variable is defined by + :subcmd:`config` sub-command when changing this configuration option from + its default value. See :envvar:`MODULES_SHELLS_WITH_KSH_FPATH` description + for details. .. only:: html .. versionadded:: 4.7 + .. mconfig:: silent_shell_debug + + Disablement of shell debugging property for the module command. Also defines + if code to silence shell debugging property should be generated in + :command:`module` shell function definition. + + Default value is ``0``. It can be changed at installation time with + :instopt:`--enable-silent-shell-debug-support` option. The + :envvar:`MODULES_SILENT_SHELL_DEBUG` environment variable is defined by + :subcmd:`config` sub-command when changing this configuration option from + its default value. See :envvar:`MODULES_SILENT_SHELL_DEBUG` description for + details. + .. mconfig:: siteconfig Primary site-specific configuration script location. - The value of this option cannot be altered. + Default value is |file etcdir_siteconfig|. It can be changed at installation + time with :instopt:`--prefix` or :instopt:`--etcdir` options. The value of + this option cannot be altered. .. mconfig:: tag_abbrev - Abbreviations to use to report module tags. Defines - :envvar:`MODULES_TAG_ABBREV`. + Abbreviations to use to report module tags. + + Default value is ``auto-loaded=aL:loaded=L:hidden=H:hidden-loaded=H:forbidden=F:nearly-forbidden=nF:sticky=S:super-sticky=sS:keep-loaded=kL``. + It can be changed at installation time with :instopt:`--with-tag-abbrev` + option. The :envvar:`MODULES_TAG_ABBREV` environment variable is defined by + :subcmd:`config` sub-command when changing this configuration option from + its default value. See :envvar:`MODULES_TAG_ABBREV` description for details. .. only:: html @@ -824,8 +1117,14 @@ .. mconfig:: tag_color_name - Tags whose name should be colored instead of module name. Defines - :envvar:`MODULES_TAG_COLOR_NAME`. + Tags whose name should be colored instead of module name. + + This configuration option is set to an empty value by default. It can be + changed at installation time with :instopt:`--with-tag-color-name` option. + The :envvar:`MODULES_TAG_COLOR_NAME` environment variable is defined by + :subcmd:`config` sub-command when changing this configuration option from + its default value. See :envvar:`MODULES_TAG_COLOR_NAME` description for + details. .. only:: html @@ -835,15 +1134,31 @@ Modules Tcl extension library location. + Default value is |file libdir_tcl_ext_lib|. It can be changed at + installation time with :instopt:`--prefix` or :instopt:`--libdir` options. The value of this option cannot be altered. .. mconfig:: term_background - Terminal background color kind. Defines :envvar:`MODULES_TERM_BACKGROUND`. + Terminal background color kind. + + Default value is ``dark``. It can be changed at installation time with + :instopt:`--with-terminal-background` option. The + :envvar:`MODULES_TERM_BACKGROUND` environment variable is defined by + :subcmd:`config` sub-command when changing this configuration option from + its default value. See :envvar:`MODULES_TERM_BACKGROUND` description for + details. .. mconfig:: term_width - Set the width of the output. Defines :envvar:`MODULES_TERM_WIDTH`. + Set the width of the output. + + Default value is ``0``. The :envvar:`MODULES_TERM_WIDTH` environment + variable is defined by :subcmd:`config` sub-command when changing this + configuration option from its default value. The + :option:`--width`/:option:`-w` command line switches change the value of + this configuration option. See :envvar:`MODULES_TERM_WIDTH` description for + details. .. only:: html @@ -851,13 +1166,25 @@ .. mconfig:: unload_match_order - Unload firstly loaded or lastly loaded module matching request. Defines - :envvar:`MODULES_UNLOAD_MATCH_ORDER`. + Unload firstly loaded or lastly loaded module matching request. + + Default value is ``returnlast``. It can be changed at installation time with + :instopt:`--with-unload-match-order` option. The + :envvar:`MODULES_UNLOAD_MATCH_ORDER` environment variable is defined by + :subcmd:`config` sub-command when changing this configuration option from + its default value. See :envvar:`MODULES_UNLOAD_MATCH_ORDER` description for + details. .. mconfig:: variant_shortcut Shortcut characters that could be used to specify or report module variants. - Defines :envvar:`MODULES_VARIANT_SHORTCUT`. + + This configuration option is set to an empty value by default. It can be + changed at installation time with :instopt:`--with-variant-shortcut` option. + The :envvar:`MODULES_VARIANT_SHORTCUT` environment variable is defined by + :subcmd:`config` sub-command when changing this configuration option from + its default value. See :envvar:`MODULES_VARIANT_SHORTCUT` description for + details. .. only:: html @@ -865,11 +1192,26 @@ .. mconfig:: verbosity - Module command verbosity level. Defines :envvar:`MODULES_VERBOSITY`. + Module command verbosity level. + + Default value is ``normal``. It can be changed at installation time with + :instopt:`--with-verbosity` option. The :envvar:`MODULES_VERBOSITY` + environment variable is defined by :subcmd:`config` sub-command when + changing this configuration option from its default value. The + :option:`--debug`/:option:`-D`, :option:`--silent`/:option:`-s`, + :option:`--trace`/:option:`-T` and :option:`--verbose`/:option:`-v` + command line switches change the value of this configuration option. See + :envvar:`MODULES_VERBOSITY` description for details. .. mconfig:: wa_277 - Workaround for Tcsh history issue. Defines :envvar:`MODULES_WA_277`. + Workaround for Tcsh history issue. + + Default value is ``0``. It can be changed at installation time with + :instopt:`--enable-wa-277` option. The :envvar:`MODULES_WA_277` environment + variable is defined by :subcmd:`config` sub-command when changing this + configuration option from its default value. See :envvar:`MODULES_WA_277` + description for details. .. only:: html @@ -1033,9 +1375,13 @@ See :subcmd:`search`. -.. subcmd:: list -a -o LIST -t|-l|-j +.. subcmd:: list -t|-l|-j -a -o LIST -S|-C pattern... - List loaded modules. + List loaded modules. If a *pattern* is given, then the loaded modules are + filtered to only list those whose name match this *pattern*. It may contain + wildcard characters. *pattern* is matched in a case insensitive manner by + default. If multiple *patterns* are given, loaded modules has to + match at least one of them to be listed. Module tags applying to the loaded modules are reported along the module name they are associated to (see `Module tags`_ section). @@ -1045,9 +1391,13 @@ A *Key* section is added at the end of the output in case some elements are reported in parentheses or chevrons along module name or if some graphical - rendition is made over some outputed elements. This *Key* section gives hints + rendition is made over some output elements. This *Key* section gives hints on the meaning of such elements. + The parameter *pattern* may also refer to a symbolic modulefile name or a + modulefile alias. It may also leverage a specific syntax to finely select + module version (see `Advanced module version specifiers`_ section below). + .. only:: html .. versionchanged:: 4.5 @@ -1066,10 +1416,23 @@ .. versionchanged:: 4.8 Report if enabled the variants selected on loaded modules -.. subcmd:: load --auto|--no-auto -f modulefile... + .. versionchanged:: 5.1 + *pattern* search to filter loaded modules added + + .. versionchanged:: 5.1 + Options :option:`--starts-with`/:option:`-S` and + :option:`--contains`/:option:`-C` added + +.. subcmd:: load options modulefile... Load *modulefile* into the shell environment. + :subcmd:`load` command accepts the following options: + + * ``--auto|--no-auto`` + * ``-f|--force`` + * ``--tag=taglist`` + Once loaded, the ``loaded`` module tag is associated to the loaded module. If module has been automatically loaded by another module, the ``auto-loaded`` tag is associated instead (see `Module tags`_ section). @@ -1078,12 +1441,49 @@ modulefile alias. It may also leverage a specific syntax to finely select module version (see `Advanced module version specifiers`_ section below). + The :option:`--tag` option accepts a list of module tags to apply to + *modulefile* once loaded. If module is already loaded, tags from *taglist* + are added to the list of tags already applied to this module. + .. only:: html .. versionchanged:: 4.2 Options :option:`--auto`, :option:`--no-auto`, :option:`--force`/:option:`-f` added + .. versionchanged:: 5.1 + Option :option:`--tag` added + + +.. subcmd:: load-any options modulefile... + + Load into the shell environment one of the *modulefile* specified. Try to + load each *modulefile* specified in list from the left to the right until + one got loaded or is found already loaded. Do not complain if *modulefile* + cannot be found but if its evaluation fails an error is reported. + + :subcmd:`load-any` command accepts the following options: + + * ``--auto|--no-auto`` + * ``-f|--force`` + * ``--tag=taglist`` + + Once loaded, the ``loaded`` module tag is associated to the loaded module. If + module has been automatically loaded by another module, the ``auto-loaded`` + tag is associated instead (see `Module tags`_ section). + + The parameter *modulefile* may also be a symbolic modulefile name or a + modulefile alias. It may also leverage a specific syntax to finely select + module version (see `Advanced module version specifiers`_ section below). + + The :option:`--tag` option accepts a list of module tags to apply to + *modulefile* once loaded. If module is already loaded, tags from *taglist* + are added to the list of tags already applied to this module. + + .. only:: html + + .. versionadded:: 5.1 + .. subcmd:: path modulefile Print path to *modulefile*. @@ -1242,6 +1642,12 @@ :envvar:`MODULES_COLLECTION_PIN_VERSION` is set to ``1``, module version is always recorded even if it is the default version. + By default, only the module tags specifically set with the :option:`--tag` + option or resulting from a specific module state (like ``auto-loaded`` and + ``keep-loaded`` tags) are recorded in collection. If + :envvar:`MODULES_COLLECTION_PIN_TAG` is set to ``1``, all tags are recorded + in collection except ``nearly-forbidden`` tag. + No *collection* is recorded and an error is returned if the loaded *modulefiles* have unsatisfied constraint corresponding to the :mfcmd:`prereq` and :mfcmd:`conflict` they declare. @@ -1315,8 +1721,11 @@ translated into *modulefile* commands to output the modulefile content equivalent to the evaluation of shell script. - Changes on environment variables, shell aliases, shell functions and current - working directory are tracked. + Changes on environment variables, shell aliases, shell functions, shell + completions and current working directory are tracked. + + Changes made on environment variable intended for Modules private use (e.g., + :envvar:`LOADEDMODULES`, :envvar:`_LMFILES_`, ``__MODULES_*``) are ignored. *Shell* could be specified as a command name or a fully qualified pathname. The following shells are supported: sh, dash, csh, tcsh, bash, ksh, ksh93, @@ -1326,6 +1735,13 @@ .. versionadded:: 4.6 + .. versionchanged:: 5.1 + Changes on Modules private environment variable are ignored + + .. versionchanged:: 5.1 + Support for tracking shell completion changes on bash, tcsh and fish + shells added + .. subcmd:: show modulefile... See :subcmd:`display`. @@ -1341,33 +1757,47 @@ .. versionadded:: 4.0 -.. subcmd:: swap --auto|--no-auto -f modulefile1 modulefile2 +.. subcmd:: state name + + Gets :file:`modulecmd.tcl` states. Reports the currently set value + of passed state *name* or all existing states if no *name* passed. + + .. only:: html + + .. versionadded:: 5.1 + +.. subcmd:: swap options modulefile1 modulefile2 See :subcmd:`switch`. -.. subcmd:: switch --auto|--no-auto -f modulefile1 modulefile2 +.. subcmd:: switch options modulefile1 modulefile2 Switch loaded *modulefile1* with *modulefile2*. If *modulefile1* is not specified, then it is assumed to be the currently loaded module with the same root name as *modulefile2*. + :subcmd:`switch` command accepts the following options: + + * ``--auto|--no-auto`` + * ``-f|--force`` + * ``--tag=taglist`` + The parameter *modulefile* may also be a symbolic modulefile name or a modulefile alias. It may also leverage a specific syntax to finely select module version (see `Advanced module version specifiers`_ section below). + The :option:`--tag` option accepts a list of module tags to apply to + *modulefile* once loaded. If module is already loaded, tags from *taglist* + are added to the list of tags already applied to this module. + .. only:: html .. versionchanged:: 4.2 Options :option:`--auto`, :option:`--no-auto`, :option:`--force`/:option:`-f` added -.. subcmd:: try-add --auto|--no-auto -f modulefile... - - See :subcmd:`try-load`. - - .. only:: html - - .. versionadded:: 4.8 + .. versionchanged:: 5.1 + Option :option:`--tag` added .. subcmd:: test modulefile... @@ -1382,12 +1812,26 @@ .. versionadded:: 4.0 -.. subcmd:: try-load --auto|--no-auto -f modulefile... +.. subcmd:: try-add options modulefile... + + See :subcmd:`try-load`. + + .. only:: html + + .. versionadded:: 4.8 + +.. subcmd:: try-load options modulefile... Like :subcmd:`load` sub-command, load *modulefile* into the shell environment, but do not complain if *modulefile* cannot be found. If *modulefile* is found but its evaluation fails, error is still reported. + :subcmd:`try-load` command accepts the following options: + + * ``--auto|--no-auto`` + * ``-f|--force`` + * ``--tag=taglist`` + Once loaded, the ``loaded`` module tag is associated to the loaded module. If module has been automatically loaded by another module, the ``auto-loaded`` tag is associated instead (see `Module tags`_ section). @@ -1396,10 +1840,17 @@ modulefile alias. It may also leverage a specific syntax to finely select module version (see `Advanced module version specifiers`_ section below). + The :option:`--tag` option accepts a list of module tags to apply to + *modulefile* once loaded. If module is already loaded, tags from *taglist* + are added to the list of tags already applied to this module. + .. only:: html .. versionadded:: 4.8 + .. versionchanged:: 5.1 + Option :option:`--tag` added + .. subcmd:: unload --auto|--no-auto -f modulefile... Remove *modulefile* from the shell environment. @@ -1432,6 +1883,8 @@ If *directory* corresponds to the concatenation of multiple paths separated by colon character, each path is treated separately. + .. only:: html + .. versionchanged:: 5.0 *directory* is removed whatever its reference counter value if :subcmd:`module unuse<unuse>` is called from the command-line or within @@ -1645,14 +2098,25 @@ modulefile command. Among tags that could be set this way, some have a special meaning: +* ``keep-loaded``: auto-loaded module cannot be automatically unloaded. This + tag is also set through the use of the :mfcmd:`always-load` command. * ``sticky``: module once loaded cannot be unloaded unless forced or reloaded (see `Sticky modules`_ section) * ``super-sticky``: module once loaded cannot be unloaded unless reloaded, module cannot be unloaded even if forced (see `Sticky modules`_ section) +The :option:`--tag` option helps to apply additional tags to modules. It is +available on :subcmd:`load`, :subcmd:`load-any`, :subcmd:`switch` and +:subcmd:`try-load` sub-commands and on :mfcmd:`always-load`, +:mfcmd:`depends-on`, :mfcmd:`module`, :mfcmd:`prereq`, :mfcmd:`prereq-all` and +:mfcmd:`prereq-any` modulefile commands. In case the designated module is +already loaded, the additional tags are added to the list of tags already +applied to this module. + Module tags are reported along the module they are associated to on -:subcmd:`avail` and :subcmd:`list` sub-command results. Tags could be reported -either: +:subcmd:`avail` and :subcmd:`list` sub-command results and also when module's +loading, unloading, refreshing or tagging evaluation is mentioned. Tags could +be reported either: * along the module name, all tags set within angle brackets, each tag separated from the others with a colon character (e.g., @@ -1690,6 +2154,9 @@ .. versionadded:: 4.7 + .. versionchanged:: 5.1 + Tag ``keep-loaded`` added + .. _Sticky modules: @@ -1697,7 +2164,7 @@ ^^^^^^^^^^^^^^ Modules are said *sticky* when they cannot be unloaded (they stick to the -loaded environment). Two kind of stickyness can be distinguished: +loaded environment). Two kind of stickiness can be distinguished: * ``sticky`` module: cannot be unloaded unless if the unload is forced or if the module is reloaded after being unloaded @@ -1709,11 +2176,11 @@ ``super-sticky`` :ref:`module tag<Module tags>` with the :mfcmd:`module-tag` modulefile command. -When stickyness is defined over the generic module name (and not over a +When stickiness is defined over the generic module name (and not over a specific module version, a version list or a version range), sticky or super-sticky module can be swapped by another version of module. For instance if the ``sticky`` tag is defined over *foo* module, loaded module *foo/1.2* -can be swapped by *foo/2.0*. Such stickyness definition means one version of +can be swapped by *foo/2.0*. Such stickiness definition means one version of module should stay loaded whatever version it is. .. only:: html @@ -1753,9 +2220,9 @@ modulefile declares. When reaching the :mfcmd:`variant` modulefile command declaring a variant, an error is raised if no value is specified for this variant and if no default value is declared. Specified variant value should -match a value from the declared accepted value list otherwise an error is -raised. Additionally if a variant is specified but does not correspond to a -variant declared in modulefile, an error is raised. +match a value from the declared accepted value list if such list is defined +otherwise an error is raised. Additionally if a variant is specified but does +not correspond to a variant declared in modulefile, an error is raised. Module variants are reported along the module they are associated to on :subcmd:`list` sub-command results. Variants are reported within curly braces @@ -1930,6 +2397,22 @@ Variable renamed from ``MODULES_LMSOURCESH`` to ``__MODULES_LMSOURCESH`` +.. envvar:: __MODULES_LMEXTRATAG + + A colon separated list of the tags corresponding to all loaded *modulefiles* + that have been set through the :option:`--tag` option. Each element in this + list starts by the name of the loaded *modulefile* followed by all explicitly + set tags applying to it. The loaded modulefile and its tags are separated by + the ampersand character. + + This environment variable is intended for :command:`module` command internal + use to distinguish from all tags those that have been specifically set with + :option:`--tag` option. + + .. only:: html + + .. versionadded:: 5.1 + .. envvar:: __MODULES_LMTAG A colon separated list of the tags corresponding to all loaded *modulefiles* @@ -1979,6 +2462,23 @@ .. versionchanged:: 5.0 Variable renamed from ``MODULES_LMVARIANT`` to ``__MODULES_LMVARIANT`` +.. envvar:: __MODULES_PUSHENV_<VAR> + + Stack of saved values for :envvar:`<VAR>` environment variable. A colon-\ + separated list containing pairs of elements. A pair is formed by a loaded + module name followed by the value set to :envvar:`<VAR>` in this module with + :mfcmd:`pushenv` command. An ampersand character separates the two parts of + the pair. + + First element in list corresponds to the lastly set value of :envvar:`<VAR>`. + If a value were set to :envvar:`<VAR>` prior the first evaluated + :mfcmd:`pushenv` command, this value is associated to an empty module name to + record it as a pair element in :envvar:`__MODULES_PUSHENV_\<VAR\>`. + + .. only:: html + + .. versionadded:: 5.1 + .. envvar:: __MODULES_QUAR_<VAR> Value of environment variable :envvar:`<VAR>` passed to :file:`modulecmd.tcl` @@ -2037,15 +2537,25 @@ A colon separated list of the full pathname for all loaded *modulefiles*. + This environment variable is generated by :command:`module` command and + should not be modified externally. + .. envvar:: LOADEDMODULES A colon separated list of all loaded *modulefiles*. + This environment variable is generated by :command:`module` command and + should not be modified externally. + .. envvar:: MODULECONTACT Email address to contact in case any issue occurs during the interpretation of modulefiles. + This environment variable value supersedes the default value set in the + :mconfig:`contact` configuration option. It can be defined with the + :subcmd:`config` sub-command. + .. only:: html .. versionadded:: 4.0 @@ -2070,17 +2580,19 @@ The location of a global run-command file containing *modulefile* specific setup. See `Modulecmd startup`_ section for detailed information. + This environment variable value supersedes the default value set in the + :mconfig:`rcfile` configuration option. It can be defined with the + :subcmd:`config` sub-command. + .. envvar:: MODULES_ADVANCED_VERSION_SPEC If set to ``1``, enable advanced module version specifiers (see `Advanced module version specifiers`_ section). If set to ``0``, disable advanced module version specifiers. - Advanced module version specifiers enablement is defined in the following - order of preference: :envvar:`MODULES_ADVANCED_VERSION_SPEC` environment - variable then the default set in :file:`modulecmd.tcl` script configuration. - Which means :envvar:`MODULES_ADVANCED_VERSION_SPEC` overrides default - configuration. + This environment variable value supersedes the default value set in the + :mconfig:`advanced_version_spec` configuration option. It can be defined with + the :subcmd:`config` sub-command. .. only:: html @@ -2115,7 +2627,8 @@ have been automatically loaded for either the unloaded modulefile, an unloaded dependent modulefile or a modulefile part of this useless requirement unloading batch. Modulefiles are added to this unloading batch - only if they are not required by any other loaded modulefiles. + only if they are not required by any other loaded modulefiles and if they + are not tagged ``keep-loaded``. * Dependent Reload: reload of the modulefiles declaring a :mfcmd:`conflict` or an optional :mfcmd:`prereq` onto either the unloaded modulefile, an @@ -2132,18 +2645,19 @@ are merged into the Dependent modulefiles to Reload that are reloaded after the load of the switched-to modulefile. - Automated module handling mode enablement is defined in the following order - of preference: :option:`--auto`/:option:`--no-auto` command line switches, - then :envvar:`MODULES_AUTO_HANDLING` environment variable, then the default - set in :file:`modulecmd.tcl` script configuration. Which means - :envvar:`MODULES_AUTO_HANDLING` overrides default configuration and - :option:`--auto`/:option:`--no-auto` command line switches override every - other ways to enable or disable this mode. + This environment variable value supersedes the default value set on the + :mconfig:`auto_handling` configuration option. It can be defined with the + :subcmd:`config` sub-command. The :option:`--auto` and :option:`--no-auto` + command line switches override this environment variable. .. only:: html .. versionadded:: 4.2 + .. versionchanged:: 5.1 + Modules with keep-loaded tag set are excluded from Useless Requirement + Unload mechanism + .. envvar:: MODULES_AVAIL_INDEPTH If set to ``1``, enable in depth search results for :subcmd:`avail` @@ -2155,13 +2669,11 @@ disabled these modulefiles and directories contained in matching directories are excluded. - :subcmd:`avail` sub-command in depth mode enablement is defined in the - following order of preference: :option:`--indepth`/:option:`--no-indepth` - command line switches, then :envvar:`MODULES_AVAIL_INDEPTH` environment - variable, then the default set in :file:`modulecmd.tcl` script configuration. - Which means :envvar:`MODULES_AVAIL_INDEPTH` overrides default configuration - and :option:`--indepth`/:option:`--no-indepth` command line switches override - every other ways to enable or disable this mode. + This environment variable value supersedes the default value set in the + :mconfig:`avail_indepth` configuration option. It can be defined with the + :subcmd:`config` sub-command. The :option:`--indepth` and + :option:`--no-indepth` command line switches override this environment + variable. .. only:: html @@ -2189,13 +2701,10 @@ modules from global/user rc and all enabled modulepaths are reported as a single list. - :subcmd:`avail` sub-command regular output content is defined in the - following order of preference: :option:`--output`/:option:`-o` command line - switches, then :envvar:`MODULES_AVAIL_OUTPUT` environment variable, then the - default set in :file:`modulecmd.tcl` script configuration. Which means - :envvar:`MODULES_AVAIL_OUTPUT` overrides default configuration and - :option:`--output`/:option:`-o` command line switches override every other - ways to configure regular output content. + This environment variable value supersedes the default value set in the + :mconfig:`avail_output` configuration option. It can be defined with + the :subcmd:`config` sub-command. The :option:`--output`/:option:`-o` command + line switches override this environment variable. .. only:: html @@ -2212,13 +2721,10 @@ The order of the elements in the list does not matter. Module names are the only content reported when *LIST* is set to an empty value. - :subcmd:`avail` sub-command terse output content is defined in the following - order of preference: :option:`--output`/:option:`-o` command line switches, - then :envvar:`MODULES_AVAIL_TERSE_OUTPUT` environment variable, then the - default set in :file:`modulecmd.tcl` script configuration. Which means - :envvar:`MODULES_AVAIL_TERSE_OUTPUT` overrides default configuration and - :option:`--output`/:option:`-o` command line switches override every other - ways to configure terse output content. + This environment variable value supersedes the default value set in the + :mconfig:`avail_terse_output` configuration option. It can be defined with + the :subcmd:`config` sub-command. The :option:`--output`/:option:`-o` + command line switches override this environment variable. .. only:: html @@ -2228,6 +2734,9 @@ The location of the active module command script. + This environment variable is generated by :command:`module` command and + should not be modified externally. + .. only:: html .. versionadded:: 4.1 @@ -2239,10 +2748,31 @@ to the explicitly set default version and also to the implicit default when the configuration option :mconfig:`implicit_default` is enabled. + This environment variable value supersedes the default value set in the + :mconfig:`collection_pin_version` configuration option. It can be defined + with the :subcmd:`config` sub-command. + .. only:: html .. versionadded:: 4.1 +.. envvar:: MODULES_COLLECTION_PIN_TAG + + If set to ``1``, register all tags applying to modulefiles when saving a + collection. Otherwise only the extra tags set through the :option:`--tag` + option and tags resulting from specific module states (like ``auto-loaded`` + and ``keep-loaded`` tags) are recorded in collection. Note that the + ``nearly-forbidden`` tag due to its temporal meaning is not saved in + collection even when this configuration option is enabled. + + This environment variable value supersedes the default value set in the + :mconfig:`collection_pin_tag` configuration option. It can be defined with + the :subcmd:`config` sub-command. + + .. only:: html + + .. versionadded:: 5.1 + .. envvar:: MODULES_COLLECTION_TARGET The collection target that determines what collections are valid thus @@ -2265,6 +2795,10 @@ results from commands like :command:`lsb_release`, :command:`hostname`, :command:`dnsdomainname`, etc. + This environment variable value supersedes the default value set in the + :mconfig:`collection_target` configuration option. It can be defined with + the :subcmd:`config` sub-command. + .. only:: html .. versionadded:: 4.0 @@ -2277,15 +2811,10 @@ When color mode is set to ``auto``, output is colored only if the standard error output channel is attached to a terminal. - Colored output enablement is defined in the following order of preference: - :option:`--color` command line switch, then :envvar:`MODULES_COLOR` - environment variable, then :envvar:`NO_COLOR`, :envvar:`CLICOLOR` and - :envvar:`CLICOLOR_FORCE` environment variables, then the default set in - :file:`modulecmd.tcl` script configuration. Which means - :envvar:`MODULES_COLOR` overrides default configuration and the - :envvar:`NO_COLOR` and :envvar:`CLICOLOR`/:envvar:`CLICOLOR_FORCE` variables. - :option:`--color` command line switch overrides every other ways to enable or - disable this mode. + This environment variable value supersedes the default value set in the + :mconfig:`color` configuration option. It can be defined with the + :subcmd:`config` sub-command. The :option:`--color` command line switch + overrides this environment variable. :envvar:`NO_COLOR`, :envvar:`CLICOLOR` and :envvar:`CLICOLOR_FORCE` environment variables are also honored to define color mode. The ``never`` @@ -2295,7 +2824,8 @@ :envvar:`CLICOLOR_FORCE` is set to a value different than ``0``. :envvar:`NO_COLOR` variable prevails over :envvar:`CLICOLOR` and :envvar:`CLICOLOR_FORCE`. Color mode set with these three variables is - superseded by mode set with :envvar:`MODULES_COLOR` environment variable. + superseded by mode set with :envvar:`MODULES_COLOR` environment variable or + with :option:`--color` command line switch.. .. only:: html @@ -2323,7 +2853,8 @@ abbreviation to get a graphical rendering. Each basic tag has by default a key set in the color palette, based on its abbreviated string: auto-loaded (``aL``), forbidden (``F``), hidden and hidden-loaded (``H``), loaded - (``L``), nearly-forbidden (``nF``), sticky (``S``) and super-sticky (``sS``). + (``L``), nearly-forbidden (``nF``), sticky (``S``), super-sticky (``sS``) and + keep-loaded (``kL``). See the Select Graphic Rendition (SGR) section in the documentation of the text terminal that is used for permitted values and their meaning as @@ -2339,10 +2870,9 @@ be colored but which is not defined in the color set. Thus if :envvar:`MODULES_COLORS` is defined empty, no output will be colored at all. - The color set is defined for Modules in the following order of preference: - :envvar:`MODULES_COLORS` environment variable, then the default set in - :file:`modulecmd.tcl` script configuration. Which means - :envvar:`MODULES_COLORS` overrides default configuration. + This environment variable value supersedes the default value set in the + :mconfig:`colors` configuration option. It can be defined with the + :subcmd:`config` sub-command. .. only:: html @@ -2359,17 +2889,21 @@ .. versionchanged:: 4.8 Output item for module variant (``va``) added + .. versionchanged:: 5.1 + Output item for keep-loaded module tag (``kL``) added + .. envvar:: MODULES_EDITOR Text editor command name or path for use to open modulefile through the :subcmd:`edit` sub-command. - Editor command is defined for Modules in the following order of preference: - :envvar:`MODULES_EDITOR`, or :envvar:`VISUAL` or :envvar:`EDITOR` environment - variables, then the default set in :file:`modulecmd.tcl` script - configuration. Which means :envvar:`MODULES_EDITOR` overrides - :envvar:`VISUAL` or :envvar:`EDITOR` environment variables and default - configuration. + This environment variable value supersedes the default value set in the + :mconfig:`editor` configuration option. It can be defined with the + :subcmd:`config` sub-command. + + Text editor could also be defined through the :envvar:`VISUAL` or + :envvar:`EDITOR` environment variables. These environment variables are + overridden by :envvar:`MODULES_EDITOR`. .. only:: html @@ -2389,36 +2923,55 @@ matching modulefiles is returned if defined (see :envvar:`MODULES_IMPLICIT_DEFAULT` section) - This environment variable supersedes the value of the configuration option - :mconfig:`extended_default` set in :file:`modulecmd.tcl` script. + This environment variable value supersedes the default value set in the + :mconfig:`extended_default` configuration option. It can be defined with the + :subcmd:`config` sub-command. .. only:: html .. versionadded:: 4.4 +.. envvar:: MODULES_FAMILY_<NAME> + + Module name minus version that provides for the *name* family in currently + loaded environment. This environment variable is defined through the use of + the :mfcmd:`family` modulefile command. + + For instance if loading modulefile ``foo/1.0`` defines being member of the + ``bar`` family, the :envvar:`MODULES_FAMILY_BAR<MODULES_FAMILY_\<NAME\>>` + will be set to the ``foo`` value. + + This environment variable is generated by :command:`module` command and + should not be modified externally. + + .. only:: html + + .. versionadded:: 5.1 + .. envvar:: MODULES_ICASE When module specification are passed as argument to module sub-commands or modulefile Tcl commands, defines the case sensitiveness to apply to match them. When :envvar:`MODULES_ICASE` is set to ``never``, a case sensitive match is applied in any cases. When set to ``search``, a case insensitive - match is applied to the :subcmd:`avail`, :subcmd:`whatis` and :subcmd:`paths` - sub-commands. When set to ``always``, a case insensitive match is also - applied to the other module sub-commands and modulefile Tcl commands for the - module specification they receive as argument. - - Case sensitiveness behavior is defined in the following order of preference: - :option:`--icase` command line switch, which corresponds to the ``always`` - mode, then :envvar:`MODULES_ICASE` environment variable, then the default set - in :file:`modulecmd.tcl` script configuration. Which means - :envvar:`MODULES_ICASE` overrides default configuration and :option:`--icase` - command line switch overrides every other ways to set case sensitiveness - behavior. + match is applied to the :subcmd:`avail`, :subcmd:`list`, :subcmd:`whatis` and + :subcmd:`paths` sub-commands. When set to ``always``, a case insensitive + match is also applied to the other module sub-commands and modulefile Tcl + commands for the module specification they receive as argument. + + This environment variable value supersedes the default value set in the + :mconfig:`icase` configuration option. It can be defined with the + :subcmd:`config` sub-command. The :option:`--icase`/:option:`-i` command line + switches, which correspond to the ``always`` mode, override this environment + variable. .. only:: html .. versionadded:: 4.4 + .. versionchanged:: 5.1 + Search mode applied to :subcmd:`list` sub-command + .. envvar:: MODULES_IMPLICIT_DEFAULT Defines (if set to ``1``) or not (if set to ``0``) an implicit default @@ -2443,10 +2996,11 @@ An error is returned in the above situations if either no explicit or implicit default version is defined. - This environment variable supersedes the value of the configuration option - :mconfig:`implicit_default` set in :file:`modulecmd.tcl` script. This - environment variable is ignored if :mconfig:`implicit_default` has been - declared locked in :mconfig:`locked_configs` configuration option. + This environment variable value supersedes the default value set in the + :mconfig:`implicit_default` configuration option. It can be defined with the + :subcmd:`config` sub-command. This environment variable is ignored if + :mconfig:`implicit_default` has been declared locked in + :mconfig:`locked_configs` configuration option. .. only:: html @@ -2461,11 +3015,10 @@ module and a prereq requirement onto switched-on module are also defined for :mfcmd:`module switch <module>` commands used in modulefile. - This environment variable supersedes the value of the configuration option - :mconfig:`implicit_requirement` set in :file:`modulecmd.tcl` script. - :envvar:`MODULES_IMPLICIT_REQUIREMENT` is in turn superseded by the - ``--not-req`` option that applies to a :mfcmd:`module` command in a - modulefile. + This environment variable value supersedes the default value set in the + :mconfig:`implicit_requirement` configuration option. It can be defined with + the :subcmd:`config` sub-command. The ``--not-req`` option, applied to a + :mfcmd:`module` command in a modulefile, overrides this environment variable. .. only:: html @@ -2489,13 +3042,10 @@ The order of the elements in the list does not matter. Module names are the only content reported when *LIST* is set to an empty value. - :subcmd:`list` sub-command regular output content is defined in the following - order of preference: :option:`--output`/:option:`-o` command line switches, - then :envvar:`MODULES_LIST_OUTPUT` environment variable, then the default set - in :file:`modulecmd.tcl` script configuration. Which means - :envvar:`MODULES_LIST_OUTPUT` overrides default configuration and - :option:`--output`/:option:`-o` command line switches override every other - ways to configure regular output content. + This environment variable value supersedes the default value set in the + :mconfig:`list_output` configuration option. It can be defined with the + :subcmd:`config` sub-command. The :option:`--output`/:option:`-o` command + line switches override this environment variable. .. only:: html @@ -2515,24 +3065,50 @@ The order of the elements in the list does not matter. Module names are the only content reported when *LIST* is set to an empty value. - :subcmd:`list` sub-command regular output content is defined in the following - order of preference: :option:`--output`/:option:`-o` command line switches, - then :envvar:`MODULES_LIST_TERSE_OUTPUT` environment variable, then the - default set in :file:`modulecmd.tcl` script configuration. Which means - :envvar:`MODULES_LIST_TERSE_OUTPUT` overrides default configuration and - :option:`--output`/:option:`-o` command line switches override every other - ways to configure regular output content. + This environment variable value supersedes the default value set in the + :mconfig:`list_terse_output` configuration option. It can be defined with the + :subcmd:`config` sub-command. The :option:`--output`/:option:`-o` command + line switches override this environment variable. .. only:: html .. versionadded:: 4.7 +.. envvar:: MODULES_MCOOKIE_CHECK + + If set to ``eval``, the Modules magic cookie (i.e., ``#%Module`` + file signature) is only checked to determine if a file is a modulefile when + evaluating these files. If set to ``always``, the Modules magic cookie is + also checked when searching for modules. + + The ``eval`` mode is made to significantly reduce file checks when walking + through modulepaths to search for *modulefiles*. Special care should be given + to the content of modulepaths when this ``eval`` mode is set as the following + kind of files are included in search results: + + * *modulefiles* with a magic cookie requiring a higher version of + :file:`modulecmd.tcl` + * files not beginning with the magic cookie ``#%Module`` + * read-protected files + + This environment variable value supersedes the default value set in the + :mconfig:`mcookie_check` configuration option. It can be defined with the + :subcmd:`config` sub-command. + + .. only:: html + + .. versionadded:: 5.1 + .. envvar:: MODULES_MCOOKIE_VERSION_CHECK If set to ``1``, the version set in the Modules magic cookie in modulefile is checked against the current version of :file:`modulecmd.tcl` to determine if the modulefile can be evaluated. + This environment variable value supersedes the default value set in the + :mconfig:`mcookie_version_check` configuration option. It can be defined with + the :subcmd:`config` sub-command. + .. only:: html .. versionadded:: 4.7 @@ -2543,10 +3119,13 @@ `Package Initialization`_ section). If set to ``0``, :command:`ml` command is not defined. - :command:`ml` command enablement is defined in the following order of - preference: :envvar:`MODULES_ML` environment variable then the default set in - :file:`modulecmd.tcl` script configuration. Which means :envvar:`MODULES_ML` - overrides default configuration. + This environment variable value supersedes the default value set in the + :mconfig:`ml` configuration option. It can be defined with the + :subcmd:`config` sub-command. + + To enable or disable :command:`ml` command, :envvar:`MODULES_ML` should be set + prior Modules initialization or the :mconfig:`ml` configuration option should + be set in the :file:`initrc` configuration file. .. only:: html @@ -2560,10 +3139,9 @@ will soon be forbidden. If set to ``0``, modules will never be considered *nearly forbidden*. Accepted values are integers comprised between 0 and 365. - This configuration is defined in the following order of preference: - :envvar:`MODULES_NEARLY_FORBIDDEN_DAYS` environment variable then the default - set in :file:`modulecmd.tcl` script configuration. Which means - :envvar:`MODULES_NEARLY_FORBIDDEN_DAYS` overrides default configuration. + This environment variable value supersedes the default value set in the + :mconfig:`nearly_forbidden_days` configuration option. It can be defined with + the :subcmd:`config` sub-command. .. only:: html @@ -2575,10 +3153,9 @@ attached to a terminal. The value of this variable is composed of a pager command name or path eventually followed by command-line options. - Paging command and options are defined for Modules in the following order of - preference: :envvar:`MODULES_PAGER` environment variable, then the default - set in :file:`modulecmd.tcl` script configuration. Which means - :envvar:`MODULES_PAGER` overrides default configuration. + This environment variable value supersedes the default value set in the + :mconfig:`pager` configuration option. It can be defined with the + :subcmd:`config` sub-command. If :envvar:`MODULES_PAGER` variable is set to an empty string or to the value ``cat``, pager will not be launched. @@ -2608,15 +3185,29 @@ :file:`modulecmd.tcl` script to make it restore the environment variable put in quarantine. - Quarantine mechanism support is defined for Modules in the following order of - preference: :envvar:`MODULES_QUARANTINE_SUPPORT` environment variable, then - the default set in :file:`modulecmd.tcl` script configuration. Which means - :envvar:`MODULES_QUARANTINE_SUPPORT` overrides default configuration. + This environment variable value supersedes the default value set in the + :mconfig:`quarantine_support` configuration option. It can be defined with + the :subcmd:`config` sub-command. .. only:: html .. versionadded:: 5.0 +.. envvar:: MODULES_REDIRECT_OUTPUT + + If set to ``0``, the output generated by module command is kept on stderr and + not redirected to stdout channel. + + This environment variable value supersedes the default value set in the + :mconfig:`redirect_output` configuration option. It can be defined with + the :subcmd:`config` sub-command. The :option:`--redirect` and + :option:`--no-redirect` command line switches override this environment + variable. + + .. only:: html + + .. versionadded:: 5.1 + .. envvar:: MODULES_RUN_QUARANTINE A space separated list of environment variable names that should be passed @@ -2632,6 +3223,10 @@ Original values of these environment variables set in quarantine are passed to :file:`modulecmd.tcl` via :envvar:`__MODULES_QUAR_\<VAR\>` variables. + This environment variable value supersedes the default value set in the + :mconfig:`run_quarantine` configuration option. It can be defined with the + :subcmd:`config` sub-command. + .. only:: html .. versionadded:: 4.1 @@ -2654,13 +3249,11 @@ query string. When set to ``contains``, any modules whose fully qualified name contains search query string are returned. - Module search match style is defined in the following order of preference: - :option:`--starts-with` and :option:`--contains` command line switches, then - :envvar:`MODULES_SEARCH_MATCH` environment variable, then the default set in - :file:`modulecmd.tcl` script configuration. Which means - :envvar:`MODULES_SEARCH_MATCH` overrides default configuration and - :option:`--starts-with`/:option:`--contains` command line switches override - every other ways to set search match style. + This environment variable value supersedes the default value set in the + :mconfig:`search_match` configuration option. It can be defined with the + :subcmd:`config` sub-command. The :option:`--starts-with` and + :option:`--contains` command line switches override this environment + variable. .. only:: html @@ -2674,6 +3267,15 @@ :envvar:`BASH_ENV` environment variable to the Modules bourne shell initialization script. If set to ``0``, shell startup file is not defined. + This environment variable value supersedes the default value set in the + :mconfig:`set_shell_startup` configuration option. It can be defined with the + :subcmd:`config` sub-command. + + To enable shell startup file, :envvar:`MODULES_SET_SHELL_STARTUP` should be + set to ``1`` prior Modules initialization or the :mconfig:`set_shell_startup` + configuration option should be set to ``1`` in the :file:`initrc` + configuration file. + .. only:: html .. versionadded:: 4.3 @@ -2689,6 +3291,16 @@ Accepted values are a list of shell among *sh*, *bash*, *csh*, *tcsh* and *fish* separated by colon character (``:``). + This environment variable value supersedes the default value set in the + :mconfig:`shells_with_ksh_fpath` configuration option. It can be defined with + the :subcmd:`config` sub-command. + + To enable the setup of :envvar:`FPATH` for some shells, + :envvar:`MODULES_SHELLS_WITH_KSH_FPATH` should be set to the list of these + shells prior Modules initialization or the :mconfig:`shells_with_ksh_fpath` + configuration option should be set to the list of these shells in the + :file:`initrc` configuration file. + .. only:: html .. versionadded:: 4.7 @@ -2700,6 +3312,10 @@ command or the module shell initialization script. Only applies to Bourne Shell (sh) and its derivatives. + This environment variable value supersedes the default value set in the + :mconfig:`silent_shell_debug` configuration option. It can be defined with the + :subcmd:`config` sub-command. + To generate the code to silence shell debugging property in the :command:`module` shell function, :envvar:`MODULES_SILENT_SHELL_DEBUG` should be set to ``1`` prior Modules initialization or the @@ -2715,8 +3331,11 @@ Location of a site-specific configuration script to source into :file:`modulecmd.tcl`. See also `Modulecmd startup`_ section. - This environment variable is ignored if :mconfig:`extra_siteconfig` has been - declared locked in :mconfig:`locked_configs` configuration option. + This environment variable value supersedes the default value set in the + :mconfig:`extra_siteconfig` configuration option. It can be defined with the + :subcmd:`config` sub-command. This environment variable is ignored if + :mconfig:`extra_siteconfig` has been declared locked in + :mconfig:`locked_configs` configuration option. .. only:: html @@ -2732,9 +3351,9 @@ reported. In case the whole :envvar:`MODULES_TAG_ABBREV` environment variable is set to an empty string, tags are reported but not abbreviated. - The tag abbreviation definition set in :envvar:`MODULES_TAG_ABBREV` - environment variable supersedes the default configuration set in - :file:`modulecmd.tcl` script. + This environment variable value supersedes the default value set in the + :mconfig:`tag_abbrev` configuration option. It can be defined with the + :subcmd:`config` sub-command. .. only:: html @@ -2754,8 +3373,9 @@ :envvar:`MODULES_TAG_COLOR_NAME` environment variable, a tag name or abbreviation is displayed and select graphic rendition is applied over it. - The definition set in :envvar:`MODULES_TAG_COLOR_NAME` environment variable - supersedes the default configuration set in :file:`modulecmd.tcl` script. + This environment variable value supersedes the default value set in the + :mconfig:`tag_color_name` configuration option. It can be defined with the + :subcmd:`config` sub-command. .. only:: html @@ -2769,6 +3389,10 @@ :envvar:`MODULES_COLORS` variable. Accepted values are ``dark`` and ``light``. + This environment variable value supersedes the default value set in the + :mconfig:`term_background` configuration option. It can be defined with the + :subcmd:`config` sub-command. + .. only:: html .. versionadded:: 4.3 @@ -2780,13 +3404,10 @@ the module command. Accepted values are integers comprised between 0 and 1000. - This configuration is defined in the following order of preference: - :option:`--width` or :option:`-w` command line switches, then - :envvar:`MODULES_TERM_WIDTH` environment variable, then the default set in - :file:`modulecmd.tcl` script configuration. Which means - :envvar:`MODULES_TERM_WIDTH` overrides default configuration. - :option:`--width` or :option:`-w` command line switches override every other - configuration. + This environment variable value supersedes the default value set in the + :mconfig:`term_width` configuration option. It can be defined with the + :subcmd:`config` sub-command. The :option:`--width`/:option:`-w` command line + switches override this environment variable. .. only:: html @@ -2798,6 +3419,10 @@ loaded module or lastly loaded module. Accepted values are ``returnfirst`` and ``returnlast``. + This environment variable value supersedes the default value set in the + :mconfig:`unload_match_order` configuration option. It can be defined with + the :subcmd:`config` sub-command. + .. only:: html .. versionadded:: 4.3 @@ -2815,9 +3440,9 @@ If a shortcut is associated to an empty string or an invalid character, this shortcut definition will be ignored. - The variant shortcut definition set in :envvar:`MODULES_VARIANT_SHORTCUT` - environment variable supersedes the default configuration set in - :file:`modulecmd.tcl` script. + This environment variable value supersedes the default value set in the + :mconfig:`variant_shortcut` configuration option. It can be defined with the + :subcmd:`config` sub-command. .. only:: html @@ -2847,14 +3472,11 @@ * ``debug2``: report :file:`modulecmd.tcl` procedure calls in addition to printing debug messages. - Module command verbosity is defined in the following order of preference: - :option:`--silent`, :option:`--verbose`, :option:`--debug` and - :option:`--trace` command line switches, then :envvar:`MODULES_VERBOSITY` - environment variable, then the default set in :file:`modulecmd.tcl` script - configuration. Which means :envvar:`MODULES_VERBOSITY` overrides default - configuration and - :option:`--silent`/:option:`--verbose`/:option:`--debug`/:option:`--trace` - command line switches overrides every other ways to set verbosity level. + This environment variable value supersedes the default value set in the + :mconfig:`verbosity` configuration option. It can be defined with the + :subcmd:`config` sub-command. The :option:`--silent`, :option:`--verbose`, + :option:`--debug` and :option:`--trace` command line switches override this + environment variable. .. only:: html @@ -2878,6 +3500,14 @@ not be used anymore in shell alias definition otherwise the evaluation of the code produced by modulefiles will return a syntax error. + This environment variable value supersedes the default value set in the + :mconfig:`wa_277` configuration option. It can be defined with the + :subcmd:`config` sub-command. + + To enable this workaround, :envvar:`MODULES_WA_277` should be set to ``1`` + prior Modules initialization or the :mconfig:`wa_277` configuration option + should be set to ``1`` in the :file:`initrc` configuration file. + .. only:: html .. versionadded:: 4.3 @@ -2888,6 +3518,10 @@ command initialization scripts, the executable program :file:`modulecmd.tcl`, and a directory containing a collection of main *modulefiles*. + This environment variable value supersedes the default value set in the + :mconfig:`home` configuration option. It can be defined with the + :subcmd:`config` sub-command. + FILES ----- @@ -2906,7 +3540,7 @@ defines modulepaths to enable with :mfcmd:`module use<module>`, modules to load with :mfcmd:`module load<module>` and configuration to apply with :subcmd:`module config<config>`. As any modulefile :file:`initrc` must begin - with the magic cookie ``#%Module``. + with the Modules magic cookie (i.e., ``#%Module`` file signature). :file:`initrc` is optional. When this configuration file is present it is evaluated after the :file:`modulespath` configuration file. See the
View file
_service:tar_scm:modules-5.0.1.tar.bz2/doc/source/modulefile.rst -> _service:tar_scm:modules-5.1.1.tar.bz2/doc/source/modulefile.rst
Changed
@@ -13,15 +13,16 @@ while the user is working; and can be used to implement site policies regarding the access and use of applications. -A *modulefile* begins with the magic cookie, ``#%Module``. A version number -may be placed after this string. The version number is useful as the -*modulefile* format may change thus it reflects the minimum version of -:file:`modulecmd.tcl` required to interpret the modulefile. If a version -number doesn't exist, then :file:`modulecmd.tcl` will assume the *modulefile* -is compatible. Files without the magic cookie or with a version number greater -than the current version of :file:`modulecmd.tcl` will not be interpreted. If -the :mconfig:`mcookie_version_check` configuration is disabled the version -number set is not checked. +A *modulefile* begins with the ``#%Module`` file signature, also called the +Modules magic cookie. A version number may be placed after this string. The +version number is useful as the *modulefile* format may change thus it +reflects the minimum version of :file:`modulecmd.tcl` required to interpret +the modulefile. If a version number doesn't exist, then :file:`modulecmd.tcl` +will assume the *modulefile* is compatible. Files without the magic cookie or +with a version number greater than the current version of +:file:`modulecmd.tcl` will not be interpreted. If the +:mconfig:`mcookie_version_check` configuration is disabled the version number +set is not checked. Each *modulefile* contains the changes to a user's environment needed to access an application. Tcl is a simple programming language which permits @@ -65,6 +66,28 @@ when a *modulefile* is loaded or unloaded. The command descriptions assume the *modulefile* is being loaded. +.. mfcmd:: always-load --tag taglist modulefile... + + Load *modulefile* and apply the ``keep-loaded`` tag to it in order to avoid + the automatic unload of this *modulefile* when modules dependent of it are + unloaded. + + *modulefile* is declared as a requirement of currently loading module. This + command acts as an alias of :mfcmd:`module load<module>` command. If more + than one *modulefile* are specified, then this list acts as a Boolean AND + operation, which means all specified *modulefiles* are required. + + The ``--tag`` option accepts a list of module tags to apply to *modulefile* + once loaded in addition to the ``keep-loaded`` tag. *taglist* corresponds to + the concatenation of multiple tags separated by colon character. *taglist* + should not contain tags inherited from *modulefile* state or from other + modulefile commands. If module is already loaded, tags from *taglist* are + added to the list of tags already applied to this module. + + .. only:: html + + .. versionadded:: 5.1 + .. mfcmd:: append-path -d C|--delim C|--delim=C --duplicates variable value... See :mfcmd:`prepend-path`. @@ -106,23 +129,31 @@ Set the current working directory to *directory*. -.. mfcmd:: conflict modulefile... +.. mfcmd:: complete shell name body - :mfcmd:`prereq` and :mfcmd:`conflict` control whether or not the *modulefile* - will be loaded. The :mfcmd:`prereq` command lists *modulefiles* which must - have been previously loaded before the current *modulefile* will be loaded. - Similarly, the :mfcmd:`conflict` command lists *modulefiles* which - :mfcmd:`conflict` with the current *modulefile*. If a list contains more than - one *modulefile*, then each member of the list acts as a Boolean OR - operation. Multiple :mfcmd:`prereq` and :mfcmd:`conflict` commands may be - used to create a Boolean AND operation. If one of the requirements have not - been satisfied, an error is reported and the current *modulefile* makes no - changes to the user's environment. + Define shell completion for command *name* with specified *body* if *shell* + is the current shell under which :file:`modulecmd.tcl` was invoked. *Body* + corresponds to argument options accepted by the shell command which + defines completion. When a *modulefile* is unloaded, :mfcmd:`complete` + becomes :mfcmd:`uncomplete`. - If an argument for :mfcmd:`prereq` is a directory and any *modulefile* from - the directory has been loaded, then the prerequisite is met. For example, - specifying X11 as a :mfcmd:`prereq` means that any version of X11, X11/R4 or - X11/R5, must be loaded before proceeding. + The following *shells* are supported: bash, tcsh, bash and fish. Please refer + to the documentation of these shells to learn how to define completion. The + command is ignored if an unsupported shell is specified. + + .. only:: html + + .. versionadded:: 5.1 + +.. mfcmd:: conflict modulefile... + + :mfcmd:`conflict` controls whether or not the *modulefile* will be loaded. + The :mfcmd:`conflict` command lists *modulefiles* which conflict with the + current *modulefile*. If a list contains more than one *modulefile*, then + each member of the list acts as a Boolean OR operation. Multiple + :mfcmd:`conflict` commands may be used to create a Boolean AND operation. If + one of the requirements have not been satisfied, an error is reported and the + current *modulefile* makes no changes to the user's environment. If an argument for :mfcmd:`conflict` is a directory and any other *modulefile* from that directory has been loaded, then a conflict will occur. @@ -142,6 +173,14 @@ the command line. The :mfcmd:`continue` command will only have this effect if not used within a Tcl loop though. +.. mfcmd:: depends-on --tag taglist modulefile... + + Alias of :mfcmd:`prereq-all` command. + + .. only:: html + + .. versionadded:: 5.1 + .. mfcmd:: exit N This is not a modules specific command but another overloaded Tcl command @@ -151,7 +190,34 @@ modules will not be listed as loaded. No environment commands will be performed in the current module. -.. mfcmd:: getenv variable value +.. mfcmd:: family name + + Defines loading modulefile as a member of family *name*. Only one member of a + family could be loaded. Error is raised when attempting to load another + member of the same family *name*. + + :mfcmd:`family` corresponds to the definition of a :mfcmd:`conflict` on + *name* and the definition of a :mfcmd:`module-alias` *name* targeting + currently loading module. + + In addition, the :envvar:`MODULES_FAMILY_\<NAME\>` environment variable is + defined and set to the currently loading module name minus version. This + variable helps to know what module provides for the family *name* in the + currently loaded environment. For instance if loading modulefile ``foo/1.0`` + defines being member of the ``bar`` family, the + :envvar:`MODULES_FAMILY_BAR<MODULES_FAMILY_\<NAME\>>` will be set to the + ``foo`` value. For compatibility, the :envvar:`LMOD_FAMILY_\<NAME\>` + environment variable is also defined and set to the same value than + :envvar:`MODULES_FAMILY_\<NAME\>`. + + *name* should be a non-empty string only containing characters that could be + part of an environment variable name (i.e., *a-zA-Z0-9_*). + + .. only:: html + + .. versionadded:: 5.1 + +.. mfcmd:: getenv --return-value variable value Returns value of environment *variable*. If *variable* is not defined, *value* is returned if set, an empty string is returned otherwise. The @@ -159,7 +225,10 @@ ``env`` to query environment variables. When modulefile is evaluated in *display* mode, :mfcmd:`getenv` returns - *variable* name prefixed with dollar sign (e.g., ``$variable``). + *variable* name prefixed with dollar sign (e.g., ``$variable``) unless if the + ``--return-value`` option is set. When this option is set the value of + environment *variable* or defined fallback value is returned in *display* + mode. .. only:: html @@ -169,7 +238,10 @@ An empty string is returned instead of ``_UNDEFINED_`` when *variable* is not defined and no *value* is set -.. mfcmd:: getvariant variant value + .. versionchanged:: 5.1 + Option ``--return-value`` added. + +.. mfcmd:: getvariant --return-value variant value Returns value of designated *variant*. If *variant* is not defined, *value* is returned if set, an empty string is returned otherwise. The @@ -177,12 +249,17 @@ :mfvar:`ModuleVariant` Tcl array to query a variant value. When modulefile is evaluated in *display* mode, :mfcmd:`getvariant` returns - *variant* name enclosed in curly braces (e.g., ``{variant}``). + *variant* name enclosed in curly braces (e.g., ``{variant}``) unless if the + ``--return-value`` option is set. When this option is set the value of + *variant* or defined fallback value is returned in *display* mode. .. only:: html .. versionadded:: 4.8 + .. versionchanged:: 5.1 + Option ``--return-value`` added. + .. mfcmd:: is-avail modulefile... The :mfcmd:`is-avail` command returns a true value if any of the listed @@ -241,42 +318,107 @@ .. mfcmd:: module sub-command sub-command-options sub-command-args - Contains the same *sub-commands* as described in the :ref:`module(1)` man - page in the :ref:`Module Sub-Commands` section. Exception made for the - following sub-commands that can only be used outside of a modulefile context: - :subcmd:`path`, :subcmd:`paths`, :subcmd:`autoinit`, :subcmd:`help`, - :subcmd:`clear`, :subcmd:`sh-to-mod`, :subcmd:`edit`, :subcmd:`config`, - :subcmd:`refresh` and :subcmd:`source`. Also the following sub-commands - cannot be used but have a modulefile command counterpart: - :subcmd:`prepend-path`, :subcmd:`append-path`, :subcmd:`remove-path`, - :subcmd:`is-loaded`, :subcmd:`is-saved`, :subcmd:`is-used`, - :subcmd:`is-avail` and :subcmd:`info-loaded`. - This command permits a *modulefile* to :subcmd:`load` or :subcmd:`unload` - other *modulefiles*. No checks are made to ensure that the *modulefile* does - not try to load itself. Often it is useful to have a single *modulefile* that - performs a number of ``module load`` commands. For example, if every user on - the system requires a basic set of applications loaded, then a core - *modulefile* would contain the necessary ``module load`` commands. - - The ``--not-req`` option may be set for the ``load``, ``unload`` and - ``switch`` sub-commands to inhibit the definition of an implicit prereq or - conflict requirement onto specified modules. + other *modulefiles* or to :subcmd:`use` or :subcmd:`unuse` *modulepaths*. No + checks are made to ensure that the *modulefile* does not try to load itself. + Often it is useful to have a single *modulefile* that performs a number of + ``module load`` commands. For example, if every user on the system requires a + basic set of applications loaded, then a core *modulefile* would contain the + necessary ``module load`` commands. + + The ``--not-req`` option may be set for the ``load``, ``try-load``, + ``load-any``, ``unload`` and ``switch`` sub-commands to inhibit the + definition of an implicit prereq or conflict requirement onto specified + modules. On ``try-load`` sub-command, if specified *modulefile* is not found thus loaded, no implicit prereq requirement is defined over this module. + The ``load-any`` sub-command loads one *modulefile* from the specified list. + An error is obtained if no *modulefile* from the list can be loaded. No + operation is performed if a *modulefile* from the list is found already + loaded. + + The ``unuse`` sub-command accepts the ``--remove-on-unload``, + ``--noop-on-unload``, ``--append-on-unload`` and ``--prepend-on-unload`` + options to control the behavior to apply when *modulefile* is unloaded. See + :mfcmd:`remove-path` for further explanation. + + The ``load``, ``try-load``, ``load-any`` and ``switch`` sub-commands accept + the ``--tag`` option to apply specified tags to *modulefile* once loaded. + Option accepts a concatenation of multiple module tags separated by colon + character. *taglist* should not contain tags inherited from *modulefile* + state or from other modulefile commands. If module is already loaded, tags + from *taglist* are added to the list of tags already applied to this module. + Command line switches :option:`--auto`, :option:`--no-auto` and :option:`--force` are ignored when passed to a :mfcmd:`module` command set in a *modulefile*. + Not all the *sub-commands* described in the :ref:`Module Sub-Commands` + section of the :ref:`module(1)` man page are available when :mfcmd:`module` + is used as a Modules specific Tcl command. The following table summarizes the + different sub-commands available for each interpretation context. + + +--------------------------------+---------------------+---------------------+ + | Sub-commands available from | Sub-commands avail\ | Sub-commands avail\ | + | modulefile interpretation | able from :file:`i\ | able from run-comm\ | + | | nitrc` configuration| and (rc) file | + | | file and sourced | interpretation | + | | script file | | + +================================+=====================+=====================+ + | :subcmd:`load`, | Same sub-commands | *None* | + | :subcmd:`load-any`, | available than for | | + | :subcmd:`switch`, | modulefile and | | + | :subcmd:`try-load`, | :subcmd:`config` | | + | :subcmd:`unload`, | sub-command. | | + | :subcmd:`unuse`, :subcmd:`use`.| | | + | Also available but not recomm\ | | | + | anded for use from regular | | | + | modulefile: :subcmd:`aliases`, | | | + | :subcmd:`avail`, | | | + | :subcmd:`display`, | | | + | :subcmd:`initadd`, | | | + | :subcmd:`initclear`, | | | + | :subcmd:`initlist`, | | | + | :subcmd:`initprepend`, | | | + | :subcmd:`initrm`, | | | + | :subcmd:`initswitch`, | | | + | :subcmd:`list`, | | | + | :subcmd:`purge`, | | | + | :subcmd:`reload`, | | | + | :subcmd:`restore`, | | | + | :subcmd:`save`, | | | + | :subcmd:`savelist`, | | | + | :subcmd:`saverm`, | | | + | :subcmd:`saveshow`, | | | + | :subcmd:`search`, | | | + | :subcmd:`test`, | | | + | :subcmd:`whatis` | | | + +--------------------------------+---------------------+---------------------+ + + .. only:: html + .. versionchanged:: 4.7 - Sub-command option ``--no-req`` added + Option ``--not-req`` added for ``load``, ``unload`` and ``switch`` + sub-commands .. versionchanged:: 5.0 :subcmd:`source` sub-command is not allowed anymore and ``source`` Tcl command should be used instead + .. versionchanged:: 5.1 + Options ``--remove-on-unload``, ``--noop-on-unload``, + ``--append-on-unload`` and ``--prepend-on-unload`` added for ``use`` + sub-command + + .. versionchanged:: 5.1 + Option ``--tag`` added for ``load``, ``try-load``, ``load-any`` and + ``switch`` sub-commands + + .. versionchanged:: 5.1 + Option ``--not-req`` added for ``try-load`` and ``load-any`` + sub-commands .. mfcmd:: module-alias name modulefile @@ -455,8 +597,8 @@ Returns ``1`` if :file:`modulecmd.tcl`'s command is *commandname*. *commandname* can be: ``load``, ``unload``, ``refresh``, ``reload``, ``source``, ``switch``, ``display``, ``avail``, ``aliases``, ``list``, - ``whatis``, ``search``, ``purge``, ``restore``, ``help``, ``test`` or - ``try-load``. + ``whatis``, ``search``, ``purge``, ``restore``, ``help``, ``test``, + ``try-load`` or ``load-any``. .. only:: html @@ -626,13 +768,20 @@ are: ``auto-loaded``, ``forbidden``, ``hidden``, ``hidden-loaded``, ``loaded`` and ``nearly-forbidden``. - When *tag* equals ``sticky`` or ``super-sticky``, designated *modulefile* are + When *tag* equals ``sticky`` or ``super-sticky``, designated *modulefile* is defined :ref:`Sticky modules`. + When *tag* equals ``keep-loaded``, designated *modulefile* is not + automatically unloaded when it has been auto-loaded and its dependent modules + are getting unloaded. + .. only:: html .. versionadded:: 4.7 + .. versionchanged:: 5.1 + Tag ``keep-loaded`` added + .. mfcmd:: module-version modulefile version-name... Assigns the symbolic *version-name* to the *modulefile*. This command @@ -714,14 +863,125 @@ .. versionchanged:: 4.1 Option ``--duplicates`` added -.. mfcmd:: prereq modulefile... +.. mfcmd:: prereq --tag taglist modulefile... + + :mfcmd:`prereq` controls whether or not the *modulefile* will be loaded. The + :mfcmd:`prereq` command lists *modulefiles* which must have been previously + loaded before the current *modulefile* will be loaded. If a list contains + more than one *modulefile*, then each member of the list acts as a Boolean OR + operation. Multiple :mfcmd:`prereq` commands may be used to create a Boolean + AND operation. If one of the requirements have not been satisfied, an error + is reported and the current *modulefile* makes no changes to the user's + environment. + + If an argument for :mfcmd:`prereq` is a directory and any *modulefile* from + the directory has been loaded, then the prerequisite is met. For example, + specifying X11 as a :mfcmd:`prereq` means that any version of X11, X11/R4 or + X11/R5, must be loaded before proceeding. + + The parameter *modulefile* may also be a symbolic modulefile name or a + modulefile alias. It may also leverage a specific syntax to finely select + module version (see `Advanced module version specifiers`_ section below). + + If the :mconfig:`auto_handling` configuration option is enabled + :mfcmd:`prereq` will attempt to load specified modulefile if not found loaded + yet (see :envvar:`MODULES_AUTO_HANDLING` in :ref:`module(1)`). + + The ``--tag`` option accepts a list of module tags to apply to *modulefile* + once loaded. *taglist* corresponds to the concatenation of multiple tags + separated by colon character. *taglist* should not contain tags inherited + from *modulefile* state or from other modulefile commands. If module is + already loaded, tags from *taglist* are added to the list of tags already + applied to this module. + + .. only:: html + + .. versionchanged:: 4.2 + An attempt to load modulefile is made if :mconfig:`auto_handling` + configuration option is enabled + + .. versionchanged:: 5.1 + Option ``--tag`` added + +.. mfcmd:: prereq-all --tag taglist modulefile... + + Declare *modulefile* as a requirement of currently loading module. This + command acts as an alias of :mfcmd:`prereq` command. If more than one + *modulefile* are specified, then this list acts as a Boolean AND operation, + which means all specified *modulefiles* are required. + + .. only:: html + + .. versionadded:: 5.1 + +.. mfcmd:: prereq-any --tag taglist modulefile... + + Alias of :mfcmd:`prereq` command. + + .. only:: html + + .. versionadded:: 5.1 + +.. mfcmd:: pushenv variable value - See :mfcmd:`conflict`. + Set environment *variable* to *value* and save previous value of *variable* + to restore it when *modulefile* is unloaded. Like for :mfcmd:`setenv` + modulefile command, changes made to *variable* with :mfcmd:`pushenv` are + applied to *variable* in Tcl's ``env`` array to update environment *variable* + value in current evaluation context. -.. mfcmd:: remove-path -d C|--delim C|--delim=C --index variable value... + When *modulefile* is unloaded, the *value* saved from the :mfcmd:`pushenv` + command of this modulefile is removed from saved value stack list. *variable* + is then set to the remaining *value* on top of the stack or it is unset if + stack becomes empty. + + Saved value stack list for *variable* is stored in an environment variable + which is named by prefixing *variable* by :envvar:`__MODULES_PUSHENV_\ + <__MODULES_PUSHENV_\<VAR\>>`. + + .. only:: html + + .. versionadded:: 5.1 + +.. mfcmd:: puts -nonewline channelId string + + Writes the characters given by *string* to the channel given by *channelId*. + This command is not a Modules-specific command, it is actually part of Tcl. + See the :manpage:`puts(n)` Tcl man page for a complete description of this + command. + + Content written to the ``stderr`` channel is rendered as output message + produced by modulefile. Content written to the ``stdout`` channel is rendered + as shell command evaluated in the user current shell environment. Content + sent to ``stdout`` is spooled to be rendered after the environment changes + made by modulefile. + + When *channelId* equals ``prestdout``, content is rendered as shell command + evaluated in current shell environment. This content is spooled and rendered + prior any other environment changes. + + .. only:: html + + .. versionchanged:: 4.1 + Content sent to ``stdout`` is spooled to apply it after the rendering + of the environment changes made by modulefile + + .. versionchanged:: 5.1 + Channel ``prestdout`` added to render content prior any other + environment changes + +.. mfcmd:: remove-path options variable value... --append-on-unload|--prepend-on-unload value... Remove *value* from the colon, or *delimiter*, separated list in - *variable*. See :mfcmd:`prepend-path` or :mfcmd:`append-path` for further + *variable*. + + :mfcmd:`remove-path` command accepts the following options: + + * ``-d C|--delim C|--delim=C`` + * ``--index`` + * ``--remove-on-unload|--noop-on-unload|--append-on-unload|--prepend-on-unload`` + + See :mfcmd:`prepend-path` or :mfcmd:`append-path` for further explanation of using an arbitrary delimiter. Every string between colons, or delimiters, in *variable* is compared to *value*. If the two match, *value* is removed from *variable* if its reference counter is equal to 1 or unknown. @@ -729,6 +989,14 @@ When ``--index`` option is set, *value* refers to an index in *variable* list. The string element pointed by this index is set for removal. + When *modulefile* is unloaded, no operation is performed by default or if the + ``--noop-on-unload`` option is set. If the ``--remove-on-unload`` option is + set, *value* is removed. If the ``--append-on-unload`` option is set, append + back *value* removed at load time or specific *value* if any set. If the + ``--prepend-on-unload`` option is set, prepend back *value* removed at load + time or specific *value* if any set. These options cannot be set if + ``--index`` option is also set. + Reference counter of *value* in *variable* denotes the number of times *value* has been added to *variable*. This information is stored in environment :envvar:`__MODULES_SHARE_variable<__MODULES_SHARE_\<VAR\>>`. When @@ -746,6 +1014,39 @@ .. versionchanged:: 4.1 Option ``--index`` added + .. versionchanged:: 5.1 + Options ``--remove-on-unload``, ``--noop-on-unload``, + ``--append-on-unload`` and ``--prepend-on-unload`` added + +.. mfcmd:: reportError string + + Output *string* as an error message during *modulefile* evaluation and raise + error count. :mfcmd:`reportError` does not abort modulefile evaluation. Use + the :manpage:`error(n)` Tcl command to abort evaluation in addition to emit + an error message. + + .. only:: html + + .. versionadded:: 4.0 + +.. mfcmd:: reportWarning string + + Output *string* as a warning message during *modulefile* evaluation. + + .. only:: html + + .. versionadded:: 4.0 + +.. mfcmd:: require-fullname + + Abort *load* evaluation of *modulefile* if name specified to designate it is + not the fully qualified one. Module alias or a symbolic version names are + considered fully qualified names, exception made for the *default* symbol. + + .. only:: html + + .. versionadded:: 5.1 + .. mfcmd:: set-alias alias-name alias-string Sets an alias or function with the name *alias-name* in the user's @@ -764,7 +1065,7 @@ .. versionadded:: 4.2 -.. mfcmd:: setenv variable value +.. mfcmd:: setenv --set-if-undef variable value Set environment *variable* to *value*. The :mfcmd:`setenv` command will also change the process' environment. A reference using Tcl's env associative @@ -777,8 +1078,16 @@ :mfcmd:`setenv` becomes :mfcmd:`unsetenv`. If the environment *variable* had been defined it will be overwritten while loading the *modulefile*. A subsequent :subcmd:`unload` will unset the environment *variable* - the - previous value cannot be restored! (Unless you handle it explicitly ... see - below.) + previous value cannot be restored! (Unless you handle it explicitly or if you + use the :mfcmd:`pushenv` modulefile command instead of :mfcmd:`setenv`) + + When the ``--set-if-undef`` option is set, environment variable is defined + when *modulefile* is loaded only if not yet defined. + + .. only:: html + + .. versionchanged:: 5.1 + Option ``--set-if-undef`` added .. mfcmd:: source-sh shell script arg... @@ -793,8 +1102,11 @@ were recorded in the :envvar:`__MODULES_LMSOURCESH` environment variable at ``load`` time. - Changes on environment variables, shell aliases, shell functions and current - working directory are tracked. + Changes on environment variables, shell aliases, shell functions, shell + completions and current working directory are tracked. + + Changes made on environment variable intended for Modules private use (e.g., + :envvar:`LOADEDMODULES`, :envvar:`_LMFILES_`, ``__MODULES_*``) are ignored. *Shell* could be specified as a command name or a fully qualified pathname. The following shells are supported: sh, dash, csh, tcsh, bash, ksh, ksh93, @@ -804,6 +1116,13 @@ .. versionadded:: 4.6 + .. versionchanged:: 5.1 + Changes on Modules private environment variable are ignored + + .. versionchanged:: 5.1 + Support for tracking shell completion changes on bash, tcsh and fish + shells added + .. mfcmd:: system string Run *string* command through shell. On Unix, command is passed to the @@ -836,6 +1155,17 @@ * ``machine``: a standard name that identifies the system's hardware +.. mfcmd:: uncomplete name + + Unsets completion for command *name* in the user's environment. When a + *modulefile* is unloaded, no operation is performed. + + The following shells are supported: bash, tcsh and fish. + + .. only:: html + + .. versionadded:: 5.1 + .. mfcmd:: unset-alias alias-name Unsets an alias with the name *alias-name* in the user's environment. @@ -848,20 +1178,28 @@ .. versionadded:: 4.2 -.. mfcmd:: unsetenv variable value +.. mfcmd:: unsetenv options variable value Unsets environment *variable*. When a *modulefile* is unloaded, no operation is performed unless if an optional *value* is defined, in which case *variable* is to *value*. The :mfcmd:`unsetenv` command changes the process' environment like :mfcmd:`setenv`. + If the ``--noop-on-unload`` option is set, no operation is performed when + *modulefile* is unloaded. If the ``--unset-on-unload`` option is set, + environment *variable* is also unset when *modulefile* is unloaded. These + behaviors are applied even if an optional *value* is defined. + .. only:: html .. versionchanged:: 5.0 *variable* is not unset when unloading *modulefile* and no optional value is provided -.. mfcmd:: variant --boolean --default value name value... + .. versionchanged:: 5.1 + Options ``--noop-on-unload`` and ``--unset-on-unload`` added + +.. mfcmd:: variant --boolean --default value name value... Declare :ref:`module variant<Module variants>` *name* with list of accepted *value* and instantiate it in the :mfvar:`ModuleVariant` array variable. @@ -872,10 +1210,11 @@ Selected variant value is transmitted to the evaluating modulefile. A value must be specified for variant *name* and it must corresponds to a value in - the accepted value list. Otherwise an error is raised. An exception is made - if modulefile is evaluated in ``display`` mode: no error is raised if no - value is specified for a given variant and variant is not instantiated in the - :mfvar:`ModuleVariant` array variable. + the accepted value list if such list is defined. Otherwise an error is + raised. An exception is made if modulefile is evaluated in ``display`` mode: + no error is raised if no value is specified for a given variant and variant + is not instantiated in the :mfvar:`ModuleVariant` array variable. When no + list of accepted value is defined, variant could be set to any value. When the ``--default`` option is set, variant *name* is set to the *value* associated with this option in case no value is specified for variant in @@ -902,6 +1241,9 @@ No error raised if a defined variant is not specified when modulefile is evaluated in ``display`` mode + .. versionchanged:: 5.1 + Accepted value list is made optional + .. mfcmd:: versioncmp version1 version2 Compare version string *version1* against version string *version2*. Returns @@ -941,6 +1283,32 @@ Merge the Ileaf resource into the X11 resource database. +.. _Modulefile and run-command interp diff: + +Modulefiles and run-command (rc) files are differently interpreted. A limited +number of the Modules specific Tcl commands are available for rc files +interpretation since such files are intended to set parameters for modulefiles +(like defining alias, hiding, tagging, etc) and not to change user +environment. The following table summarizes the different commands available +for each interpretation context. + ++---------------------------+------------------------------------------------+ +| Commands available from | Commands available from run-command (rc) file | +| modulefile interpretation | interpretation | ++===========================+================================================+ +| All the Modules specific | :mfcmd:`is-loaded`, :mfcmd:`is-used`, | +| and standard Tcl commands | :mfcmd:`module-alias`, :mfcmd:`module-forbid`, | +| | :mfcmd:`module-hide`, :mfcmd:`module-info`, | +| | :mfcmd:`module-tag`, :mfcmd:`module-version`, | +| | :mfcmd:`module-virtual`, :mfcmd:`system`, | +| | :mfcmd:`uname`, :mfcmd:`versioncmp` and | +| | standard Tcl commands | ++---------------------------+------------------------------------------------+ + +.. note:: Global and user run-command files are interpreted like modulefiles + and benefit from all Modules specific Tcl commands. However it not advised + to perform environment changes from such files. + Modules Variables ----------------- @@ -950,6 +1318,12 @@ The :mfvar:`ModulesCurrentModulefile` variable contains the full pathname of the *modulefile* being interpreted. +.. mfvar:: ModulesVersion + + The :mfvar:`ModulesVersion` variable can be set in :file:`.version` file to + designate the name of the *modulefile* version which should be considered + as default in current directory (see `Locating Modulefiles`_ section below). + .. mfvar:: ModuleTool The :mfvar:`ModuleTool` variable contains the name of the *module* @@ -1011,13 +1385,13 @@ If the :file:`.version` file exists, it is opened and interpreted as Tcl code and takes precedence over a :file:`.modulerc` file in the same directory. If -the Tcl variable ``ModulesVersion`` is set by the :file:`.version` file, +the Tcl variable :mfvar:`ModulesVersion` is set by the :file:`.version` file, :file:`modulecmd.tcl` will use the name as if it specifies a *modulefile* in this directory. This will become the default *modulefile* in this case. -``ModulesVersion`` cannot refer to a *modulefile* located in a different +:mfvar:`ModulesVersion` cannot refer to a *modulefile* located in a different directory. -If ``ModulesVersion`` is a directory, the search begins anew down that +If :mfvar:`ModulesVersion` is a directory, the search begins anew down that directory. If the name does not match any files located in the current directory, the search continues through the remaining directories in :envvar:`MODULEPATH`. @@ -1072,6 +1446,12 @@ in case of deep *modulefile*). Unless a symbolic version, alias, or regular module version already exists for these version names. +Every file in searched directories is checked to see if it begins with the +Modules magic cookie (i.e., ``#%Module`` file signature) to determine if it is +a *modulefile* (see `DESCRIPTION`_ section). When the :mconfig:`mcookie_check` +configuration is set to ``eval``, this check is skipped and all files in +search directories are considered *modulefiles*. + If user names a *modulefile* that cannot be found in the first *modulepath* directory, *modulefile* will be searched in next *modulepath* directory and so on until a matching *modulefile* is found. If search goes through @@ -1117,6 +1497,11 @@ taken into account. When explicitly named for evaluation selection, such modules are unveiled to return an access error. +.. note:: When the :mconfig:`mcookie_check` configuration is set to ``eval``, + file access permissions are not checked thus files with restricted + permissions are included in search results but still lead to error if + evaluated. + A symbolic version-name assigned to a hidden module is displayed or taken into account only if explicitly named and if module is not hard-hidden. Non-hidden module alias targeting a hidden *modulefile* appears like any other non-hidden @@ -1246,6 +1631,81 @@ .. versionchanged:: 4.8 Support for module variant added +.. _Dependencies between modulefiles: + +Dependencies between modulefiles +-------------------------------- + +A modulefile may express dependencies on other modulefiles. Two kind of +dependency exist: pre-requirement and conflict. The former means specified +modulefiles should be loaded prior the modulefile that express the +requirement. The latter means specified modulefiles should not be loaded for +the modulefile that express the conflict to be loaded too. + +Pre-requirement could be expressed with :mfcmd:`prereq`, :mfcmd:`prereq-any`, +:mfcmd:`prereq-all`, :mfcmd:`depends-on`, :mfcmd:`always-load`, +:mfcmd:`module load<module>`, :mfcmd:`module switch<module>`, +:mfcmd:`module try-load<module>` or :mfcmd:`module load-any<module>` +modulefile commands. When the :mconfig:`auto_handling` configuration option is +disabled, required modulefile should be manually loaded prior their dependent +modulefile when expressed with the :mfcmd:`prereq`, :mfcmd:`prereq-any`, +:mfcmd:`prereq-all` or :mfcmd:`depends-on` modulefile commands. For other +commands or when :mconfig:`auto_handling` is enabled, pre-required modulefiles +are automatically loaded. + +Conflict is expressed with :mfcmd:`conflict` or :mfcmd:`module unload<module>` +modulefile commands. A conflicting loaded modulefile should be manually +unloaded prior loading the modulefile that express such conflict when defined +with :mfcmd:`conflict`. It is automatically unloaded when expressed with +:mfcmd:`module unload<module>`. + +It is strongly advised to define dependencies prior environment changes in a +modulefile. Dependency resolution should be done before any environment change +to ensure the environment is getting set in the same order whether +pre-requirements are already loaded, or if they are automatically loaded when +loading the modulefile which depends on them, or if all loaded modules are +reloaded or refreshed. This is especially important when the modulefile +updates an environment variable also altered by other modulefiles like +:envvar:`PATH`. As the order of the path elements in such variable defines +priority, it is important that this order does not change depending on the way +the modulefiles are loaded. + +:command:`module` keeps environment consistent which means a modulefile cannot +be loaded if its requirements are not loaded or if a conflicting module is +loaded. In addition a loaded module cannot be unloaded if other loaded modules +depends on it. The :envvar:`automated module handling +mechanisms<MODULES_AUTO_HANDLING>` attempt to solve the dependencies expressed +by loading or unloading additional modulefiles. When the :option:`--no-auto` +option is set on :command:`module` command when loading or unload modulefile, +automated module handling mechanisms are disabled and dependencies have to be +solved manually. When dependencies are not satisfied, modulefile fails to load +or unload. + +Adding the ``--not-req`` option when expressing dependencies in modulefile +with the :mfcmd:`module` command will attempt to load or unload the designated +modulefile but it will not mark them as pre-requirement or conflict. + +By adding the :option:`--force` option to the :command:`module` command when +loading or unloading modulefile, the consistency checks are by-passed. This +option cannot be used when expressing dependencies in modulefiles. If a module +has been force loaded whereas its requirements are not loaded or whereas a +conflicting module is also loaded, the user environment is said inconsistent. + +Note that a pre-requirement should be found in the loaded module list prior +its dependent module. User environment is considered inconsistent if +pre-requirement module is found loaded after dependent module, as the +environment changes may have been done in the wrong priority order. + +When user environment is considered inconsistent global operations achieved by +:subcmd:`refresh`, :subcmd:`reload` and :subcmd:`save` sub-commands cannot +perform. This mechanism is there to avoid the situation to worsen by +re-evaluating all loaded modules or recording this environment. + +When the :mconfig:`auto_handling` configuration option is enabled, if missing +pre-requirement modulefile gets loaded or conflicting modulefile gets unloaded +the inconsistent loaded module will be automatically reloaded to make user +environment consistent again. + Modulefile Specific Help ------------------------ @@ -1279,6 +1739,58 @@ additional descriptive information about the *modulefile*. +.. _Compatibility with Lmod Tcl modulefile: + +Compatibility with Lmod Tcl modulefile +-------------------------------------- + +The :file:`modulecmd.tcl` program supports Tcl modulefile written for Lmod, +the alternative :command:`module` implementation developed in Lua. Such +modulefiles can be evaluated by Modules without raising error. Differences +between the two implementations are listed below. + +The ``add-property``, ``remove-property`` and ``extensions`` modulefile +commands are evaluated as a *no-operation* command. No error is obtained if +these commands are used in modulefiles but no change occurs. + +The :mfcmd:`break` command does not accept any argument. A ``msg`` argument +can be set on Lmod to provide a customized break error message. + +Use of :mfcmd:`reportError` command aborts modulefile evaluation on Lmod. This +command only reports an error message on Modules. + +The :mfcmd:`require-fullname` command only aborts *load* modulefile evaluation +whereas the Lmod implementation also aborts *unload* and *display* +evaluations. + +When processing a :mfcmd:`family` command, the :envvar:`LMOD_FAMILY_\<NAME\>` +environment variable is also defined to be compatible with modulefiles or +scripts relying on such variable. + +When unloading a modulefile, the :mfcmd:`pushenv` command does not update the +value of the environment variable if this modulefile was not defining the +value currently in use. + +The third optional argument of :mfcmd:`append-path` and :mfcmd:`prepend-path` +commands corresponds to a priority specification on Lmod whereas these two +commands accept multiple path element arguments on Modules. + +The :mfcmd:`prereq` command is equivalent to the :mfcmd:`prereq-any` command +on Modules whereas on Lmod it is equivalent to the :mfcmd:`prereq-all` +command. + +If the :mconfig:`auto_handling` configuration option is disabled, the +requirements defined with the :mfcmd:`depends-on` command are not +automatically loaded and an error is raised if none of these requirements are +found loaded. + +On :subcmd:`module load-any<load-any>` sub-command and modulefile command, a +modulefile evaluation error is not reported and :subcmd:`module +load-any<load-any>` continues to the next modulefile instead of aborting the +whole process. No attempt to load listed modulefiles is made if one of these +modulefiles is found already loaded. + + ENVIRONMENT -----------
View file
_service:tar_scm:modules-5.0.1.tar.bz2/init/Makefile -> _service:tar_scm:modules-5.1.1.tar.bz2/init/Makefile
Changed
@@ -4,7 +4,7 @@ # use bash shell to correctly expand the $'' syntax used in translate-in-script SHELL = /usr/bin/env bash -SH_LIKE = sh ksh bash zsh profile.sh bash_completion +SH_LIKE = sh ksh bash zsh profile.sh CSH_LIKE = csh tcsh tcsh_completion profile.csh OTHER = perl.pm python.py ruby.rb lisp tcl fish cmake r.R @@ -43,7 +43,7 @@ ALL_SHELLS = $(SH_LIKE) $(CSH_LIKE) $(OTHER) -all: $(ALL_SHELLS) initrc zsh-functions/_module $(EXAMPLE_MODFILES_SRCDIR)/modules +all: $(ALL_SHELLS) initrc bash_completion zsh-functions/_module $(EXAMPLE_MODFILES_SRCDIR)/modules ifeq ($(versioning),y) all: $(EXAMPLE_MODFILES_SRCDIR)/version endif @@ -54,14 +54,6 @@ all: modulespath endif -../version.inc: - $(MAKE) --no-print-directory -C .. version.inc - -# source version definitions shared across the Makefiles of this project -ifeq ($(findstring clean,$(MAKECMDGOALS)),) --include ../version.inc -endif - # define init configs location ifeq ($(initconfin),etcdir) modulespath := $(etcdir)/modulespath @@ -71,6 +63,30 @@ initrc := $(initdir)/modulerc endif +# define shell completion location +ifeq ($(bashcompletiondir),) + bashcompletiondir := $(initdir) + makebashcompdir := n + sourcebashcompre := s|@sourcebashcomp@||g +else + makebashcompdir := y + sourcebashcompre := /@sourcebashcomp@/d +endif +ifeq ($(fishcompletiondir),) + fishcompletiondir := $(initdir) + makefishcompdir := n + sourcefishcompre := s|@sourcefishcomp@||g +else + makefishcompdir := y + sourcefishcompre := /@sourcefishcomp@/d +endif +ifeq ($(zshcompletiondir),) + zshcompletiondir := $(initdir)/zsh-functions + setzshfpathre := s|@setzshfpath@||g +else + setzshfpathre := /@setzshfpath@/d +endif + # if enabled translate to keep text after markup elsewhere remove the # entire line ifeq ($(setmanpath),y) @@ -131,9 +147,10 @@ endif # define variables for shell completion -comp_cmds := add apropos aliases avail append-path clear config del display edit help initadd initclear initlist initprepend initrm is-loaded is-saved is-used is-avail info-loaded keyword list load path paths purge prepend-path refresh reload restore rm remove remove-path save savelist saveshow saverm search show sh-to-mod source swap switch test try-add try-load unload unuse use whatis +comp_cmds := add add-any apropos aliases avail append-path clear config del display edit help initadd initclear initlist initprepend initrm is-loaded is-saved is-used is-avail info-loaded keyword list load load-any path paths purge prepend-path refresh reload restore rm remove remove-path save savelist saveshow saverm search show sh-to-mod source state swap switch test try-add try-load unload unuse use whatis comp_opts := -D -h -s -T -v -V -w --debug --help --silent --trace --verbose --version --paginate --no-pager --color --color= --width --width= -comp_load_opts := --auto --no-auto --force -f --icase -i +comp_load_opts := --auto --no-auto --force -f --icase -i --tag --tag= +comp_unload_opts := --auto --no-auto --force -f --icase -i comp_list_opts := -a -j -l -o -t --all --json --long --output --output= --terse comp_clear_opts := --force -f comp_avail_opts := -a -C -d -i -j -L -l -o -S -t --all --contains --default --icase --json --latest --long --output --output= --starts-with --terse --indepth --no-indepth @@ -144,7 +161,7 @@ comp_isavail_opts := -a -i --all --icase comp_path_opts := -d --delim --duplicates comp_rm_path_opts := -d --delim --index -comp_config_opts := --dump-state --reset advanced_version_spec auto_handling avail_indepth avail_output avail_terse_output collection_pin_version collection_target color colors contact editor extended_default extra_siteconfig home icase implicit_default implicit_requirement list_output list_terse_output locked_configs mcookie_version_check ml nearly_forbidden_days pager quarantine_support rcfile run_quarantine search_match set_shell_startup shells_with_ksh_fpath silent_shell_debug tag_abbrev tag_color_name term_background term_width unload_match_order variant_shortcut verbosity wa_277 +comp_config_opts := --dump-state --reset advanced_version_spec auto_handling avail_indepth avail_output avail_terse_output collection_pin_version collection_pin_tag collection_target color colors contact editor extended_default extra_siteconfig home icase implicit_default implicit_requirement list_output list_terse_output locked_configs mcookie_check mcookie_version_check ml nearly_forbidden_days pager quarantine_support rcfile redirect_output run_quarantine search_match set_shell_startup shells_with_ksh_fpath silent_shell_debug tag_abbrev tag_color_name term_background term_width unload_match_order variant_shortcut verbosity wa_277 define translate-in-script $(ECHO_GEN) @@ -159,6 +176,7 @@ -e 's|@comp_cmds@|$(comp_cmds)|g' \ -e 's|@comp_opts@|$(comp_opts)|g' \ -e 's|@comp_load_opts@|$(comp_load_opts)|g' \ + -e 's|@comp_unload_opts@|$(comp_unload_opts)|g' \ -e 's|@comp_list_opts@|$(comp_list_opts)|g' \ -e 's|@comp_clear_opts@|$(comp_clear_opts)|g' \ -e 's|@comp_avail_opts@|$(comp_avail_opts)|g' \ @@ -178,6 +196,9 @@ -e '$(prependbinpathre)' \ -e '$(usemanpathre)' \ -e '$(notusemanpathre)' \ + -e '$(setzshfpathre)' \ + -e '$(sourcebashcompre)' \ + -e '$(sourcefishcompre)' \ -e $$'s|@modulerc@|$(modulerc)|g' \ -e 's|@modulepath@|$(modulepath)|g' \ -e '$(setquarvarsre)' $(quarvarsre) \ @@ -212,10 +233,10 @@ profile.sh: profile.sh.in $(translate-in-script) -$(EXAMPLE_MODFILES_SRCDIR)/modules: $(EXAMPLE_MODFILES_SRCDIR)/modules.in ../version.inc +$(EXAMPLE_MODFILES_SRCDIR)/modules: $(EXAMPLE_MODFILES_SRCDIR)/modules.in $(translate-in-script) -$(EXAMPLE_MODFILES_SRCDIR)/version: $(EXAMPLE_MODFILES_SRCDIR)/version.in ../version.inc +$(EXAMPLE_MODFILES_SRCDIR)/version: $(EXAMPLE_MODFILES_SRCDIR)/version.in $(translate-in-script) dist-win: @@ -243,14 +264,30 @@ install: all mkdir -p $(DESTDIR)$(initdir) mkdir -p $(DESTDIR)$(initdir)/ksh-functions - mkdir -p $(DESTDIR)$(initdir)/zsh-functions +ifeq ($(makebashcompdir),y) + mkdir -p $(DESTDIR)$(bashcompletiondir) +endif +ifeq ($(makefishcompdir),y) + mkdir -p $(DESTDIR)$(fishcompletiondir) +endif + mkdir -p $(DESTDIR)$(zshcompletiondir) mkdir -p $(DESTDIR)$(modulefilesdir) cp $(ALL_SHELLS) $(DESTDIR)$(initdir)/ ifeq ($(windowssupport),y) cp cmd.cmd $(DESTDIR)$(initdir)/ endif - cp fish_completion $(DESTDIR)$(initdir)/ - cp zsh-functions/_module $(DESTDIR)$(initdir)/zsh-functions/ +ifeq ($(makefishcompdir),y) + cp fish_completion $(DESTDIR)$(fishcompletiondir)/module.fish +else + cp fish_completion $(DESTDIR)$(fishcompletiondir)/ +endif +ifeq ($(makebashcompdir),y) + cp bash_completion $(DESTDIR)$(bashcompletiondir)/module + ln -s module $(DESTDIR)$(bashcompletiondir)/ml +else + cp bash_completion $(DESTDIR)$(bashcompletiondir)/ +endif + cp zsh-functions/_module $(DESTDIR)$(zshcompletiondir)/ cp ksh $(DESTDIR)$(initdir)/ksh-functions/module cp ksh $(DESTDIR)$(initdir)/ksh-functions/ml rm -f $(DESTDIR)$(modulespath) $(DESTDIR)$(initrc) @@ -267,18 +304,35 @@ endif uninstall: - rm -f $(addprefix $(DESTDIR)$(initdir)/,$(ALL_SHELLS) fish_completion) + rm -f $(addprefix $(DESTDIR)$(initdir)/,$(ALL_SHELLS)) ifeq ($(windowssupport),y) rm -f $(DESTDIR)$(initdir)/cmd.cmd endif rm -f $(DESTDIR)$(initdir)/ksh-functions/module rm -f $(DESTDIR)$(initdir)/ksh-functions/ml - rm -f $(DESTDIR)$(initdir)/zsh-functions/_module +ifeq ($(makebashcompdir),y) + rm -f $(DESTDIR)$(bashcompletiondir)/ml + rm -f $(DESTDIR)$(bashcompletiondir)/module +else + rm -f $(DESTDIR)$(bashcompletiondir)/bash_completion +endif +ifeq ($(makefishcompdir),y) + rm -f $(DESTDIR)$(fishcompletiondir)/module.fish +else + rm -f $(DESTDIR)$(fishcompletiondir)/fish_completion +endif + rm -f $(DESTDIR)$(zshcompletiondir)/_module rm -f $(DESTDIR)$(modulespath) $(DESTDIR)$(initrc) $(RMDIR_IGN_NON_EMPTY) $(DESTDIR)$(modulefilesdir) || true @if -d $(DESTDIR)$(modulefilesdir) ; then echo; echo "WARNING: $(DESTDIR)$(modulefilesdir) is not empty so skip removal" >&2; echo; fi rmdir $(DESTDIR)$(initdir)/ksh-functions - rmdir $(DESTDIR)$(initdir)/zsh-functions +ifeq ($(makebashcompdir),y) + $(RMDIR_IGN_NON_EMPTY) $(DESTDIR)$(bashcompletiondir) || true +endif +ifeq ($(makefishcompdir),y) + $(RMDIR_IGN_NON_EMPTY) $(DESTDIR)$(fishcompletiondir) || true +endif + $(RMDIR_IGN_NON_EMPTY) $(DESTDIR)$(zshcompletiondir) || true $(RMDIR_IGN_NON_EMPTY) $(DESTDIR)$(initdir) || true @if -d $(DESTDIR)$(initdir) ; then echo; echo "WARNING: $(DESTDIR)$(initdir) is not empty so skip removal" >&2; echo; fi ifeq ($(versioning),y) @@ -288,7 +342,7 @@ endif clean: - rm -f $(ALL_SHELLS) initrc zsh-functions/_module modulespath $(EXAMPLE_MODFILES_SRCDIR)/modules + rm -f $(ALL_SHELLS) initrc bash_completion zsh-functions/_module modulespath $(EXAMPLE_MODFILES_SRCDIR)/modules ifeq ($(versioning),y) rm -f $(EXAMPLE_MODFILES_SRCDIR)/version endif @@ -298,7 +352,7 @@ V = 1 endif # let verbose by default the install/clean/test and other specific non-build targets -$(V).SILENT: ../version.inc sh ksh bash zsh csh tcsh fish perl.pm python.py ruby.rb \ - lisp tcl cmake r.R bash_completion tcsh_completion zsh-functions/_module \ - profile.sh profile.csh modulespath initrc $(EXAMPLE_MODFILES_SRCDIR)/modules \ +$(V).SILENT: sh ksh bash zsh csh tcsh fish perl.pm python.py ruby.rb lisp tcl \ + cmake r.R bash_completion tcsh_completion zsh-functions/_module profile.sh \ + profile.csh modulespath initrc $(EXAMPLE_MODFILES_SRCDIR)/modules \ $(EXAMPLE_MODFILES_SRCDIR)/version
View file
_service:tar_scm:modules-5.0.1.tar.bz2/init/bash.in -> _service:tar_scm:modules-5.1.1.tar.bz2/init/bash.in
Changed
@@ -10,7 +10,7 @@ esac; fi; -# define modules runtine quarantine configuration +# define modules runtime quarantine configuration @setquarvars@export MODULES_RUN_QUARANTINE='@RUN_QUARANTINE@' @setquarvars@@export RUNENV_VAR='RUNENV_VAL'@ @notsetquarvars@#export MODULES_RUN_QUARANTINE='ENVVARNAME' @@ -23,11 +23,11 @@ IFS=' '; for _mlv in ${MODULES_RUN_QUARANTINE:-}; do if "${_mlv}" = "${_mlv##*!A-Za-z0-9_}" -a "${_mlv}" = "${_mlv#0-9}" ; then - if -n "`eval 'echo ${'$_mlv'+x}'`" ; then - _mlre="${_mlre:-}__MODULES_QUAR_${_mlv}='`eval 'echo ${'$_mlv'}'`' "; + if -n "$(eval 'echo ${'$_mlv'+x}')" ; then + _mlre="${_mlre:-}__MODULES_QUAR_${_mlv}='$(eval 'echo ${'$_mlv'}')' "; fi; _mlrv="MODULES_RUNENV_${_mlv}"; - _mlre="${_mlre:-}${_mlv}='`eval 'echo ${'$_mlrv':-}'`' "; + _mlre="${_mlre:-}${_mlv}='$(eval 'echo ${'$_mlrv':-}')' "; fi; done; if -n "${_mlre:-}" ; then @@ -36,7 +36,7 @@ # define module command and surrounding initial environment (default value # for MODULESHOME, MODULEPATH, LOADEDMODULES and parse of init config files) -_mlcode=`${_mlre:-}@TCLSH@ @libexecdir@/modulecmd.tcl bash autoinit` +_mlcode=$(${_mlre:-}@TCLSH@ @libexecdir@/modulecmd.tcl bash autoinit) _mlret=$? # clean temp variables used to setup quarantine @@ -53,19 +53,17 @@ eval "$_mlcode" # export functions to get them defined in sub-shells - if -t 2 ; then - export -f _module_raw - fi + export -f _module_raw export -f module if "$(type -t ml)" = 'function' ; then export -f ml fi - - # enable completion only in interactive mode - if ${BASH_VERSINFO:-0} -ge 3 && $- =~ i && - -r @initdir@/bash_completion ; then - source @initdir@/bash_completion - fi +@sourcebashcomp@ +@sourcebashcomp@ # enable completion only in interactive mode +@sourcebashcomp@ if ${BASH_VERSINFO:-0} -ge 3 && $- =~ i && +@sourcebashcomp@ -r @initdir@/bash_completion ; then +@sourcebashcomp@ source @initdir@/bash_completion +@sourcebashcomp@ fi @setbinpath@ @setbinpath@ if ! ":$PATH:" =~ ':@bindir@:' ; then @setbinpath@@prependbinpath@ PATH=@bindir@${PATH:+:}$PATH @@ -79,7 +77,7 @@ @setmanpath@ MANPATH=: @setmanpath@ export MANPATH @setmanpath@ fi -@setmanpath@@usemanpath@ if ! ":`manpath 2>/dev/null`:" =~ ':@mandir@:' ; then +@setmanpath@@usemanpath@ if ! ":$(manpath 2>/dev/null):" =~ ':@mandir@:' ; then @setmanpath@@notusemanpath@ if ! ":$MANPATH:" =~ ':@mandir@:' ; then @setmanpath@ if "$MANPATH" = ':' || "$MANPATH" = '' ; then @setmanpath@ _mlpathsep=''
View file
_service:tar_scm:modules-5.0.1.tar.bz2/init/bash_completion.in -> _service:tar_scm:modules-5.1.1.tar.bz2/init/bash_completion.in
Changed
@@ -60,7 +60,7 @@ COMPREPLY=() case "$prev" in - add|load|try-add|try-load) + add|add-any|load|load-any|try-add|try-load) _module_comgen_words_and_files "@comp_load_opts@ $(_module_not_yet_loaded $cur)" "$cur";; avail) _module_comgen_words_and_files "@comp_avail_opts@ $(_module_avail $cur)" "$cur";; edit) _module_comgen_words_and_files "$(_module_avail $cur)" "$cur";; @@ -69,8 +69,9 @@ clear) COMPREPLY=( $(compgen -W "@comp_clear_opts@" -- "$cur") );; restore|save|saveshow|saverm|is-saved) COMPREPLY=( $(compgen -W "$(_module_savelist)" -- "$cur") );; - rm|del|remove|unload|switch|swap) - COMPREPLY=( $(compgen -W "@comp_load_opts@ ${LOADEDMODULES//:/ }" -- "$cur") );; + rm|del|remove|unload) + COMPREPLY=( $(compgen -W "@comp_unload_opts@ ${LOADEDMODULES//:/ }" -- "$cur") );; + switch|swap) COMPREPLY=( $(compgen -W "@comp_load_opts@ ${LOADEDMODULES//:/ }" -- "$cur") );; unuse|is-used) COMPREPLY=( $(IFS=: compgen -W "${MODULEPATH}" -- "$cur") );; use|-a|--append) ;; # let readline handle the completion display|help|show|test|path|paths|is-loaded|info-loaded) @@ -82,7 +83,7 @@ apropos|keyword|search) COMPREPLY=( $(compgen -W "@comp_search_opts@" -- "$cur") );; config|--reset) COMPREPLY=( $(compgen -W "@comp_config_opts@" -- "$cur") );; - -h|--help|-V|--version|purge|refresh|reload|sh-to-mod|source) + -h|--help|-V|--version|purge|refresh|reload|sh-to-mod|source|state) ;; append-path|prepend-path) COMPREPLY=( $(compgen -W "@comp_path_opts@" -- "$cur") );; @@ -114,7 +115,7 @@ COMPREPLY=() case "$prev" in - add|load|try-add|try-load) + add|add-any|load|load-any|try-add|try-load) _module_comgen_words_and_files "@comp_load_opts@ $(_module_not_yet_loaded $cur)" "$cur";; avail) _module_comgen_words_and_files "@comp_avail_opts@ $(_module_avail $cur)" "$cur";; edit) _module_comgen_words_and_files "$(_module_avail $cur)" "$cur";; @@ -123,8 +124,9 @@ clear) COMPREPLY=( $(compgen -W "@comp_clear_opts@" -- "$cur") );; restore|save|saveshow|saverm|is-saved) COMPREPLY=( $(compgen -W "$(_module_savelist)" -- "$cur") );; - rm|del|remove|unload|switch|swap) - COMPREPLY=( $(compgen -W "@comp_load_opts@ ${LOADEDMODULES//:/ }" -- "$cur") );; + rm|del|remove|unload) + COMPREPLY=( $(compgen -W "@comp_unload_opts@ ${LOADEDMODULES//:/ }" -- "$cur") );; + switch|swap) COMPREPLY=( $(compgen -W "@comp_load_opts@ ${LOADEDMODULES//:/ }" -- "$cur") );; unuse|is-used) COMPREPLY=( $(IFS=: compgen -W "${MODULEPATH}" -- "$cur") );; use|-a|--append) ;; # let readline handle the completion display|help|show|test|path|paths|is-loaded|info-loaded) @@ -136,7 +138,7 @@ apropos|keyword|search) COMPREPLY=( $(compgen -W "@comp_search_opts@" -- "$cur") );; config|--reset) COMPREPLY=( $(compgen -W "@comp_config_opts@" -- "$cur") );; - -h|--help|-V|--version|purge|refresh|reload|sh-to-mod|source) + -h|--help|-V|--version|purge|refresh|reload|sh-to-mod|source|state) ;; append-path|prepend-path) COMPREPLY=( $(compgen -W "@comp_path_opts@" -- "$cur") );;
View file
_service:tar_scm:modules-5.0.1.tar.bz2/init/cmake.in -> _service:tar_scm:modules-5.1.1.tar.bz2/init/cmake.in
Changed
@@ -1,4 +1,4 @@ -# define modules runtine quarantine configuration +# define modules runtime quarantine configuration @setquarvars@set(ENV{MODULES_RUN_QUARANTINE} "@RUN_QUARANTINE@") @setquarvars@@set(ENV{RUNENV_VAR} "RUNENV_VAL")@ @notsetquarvars@#set(ENV{MODULES_RUN_QUARANTINE} "ENVVARNAME")
View file
_service:tar_scm:modules-5.0.1.tar.bz2/init/fish.in -> _service:tar_scm:modules-5.1.1.tar.bz2/init/fish.in
Changed
@@ -1,4 +1,4 @@ -# define modules runtine quarantine configuration +# define modules runtime quarantine configuration @setquarvars@set -xg MODULES_RUN_QUARANTINE '@RUN_QUARANTINE@' @setquarvars@@set -xg RUNENV_VAR 'RUNENV_VAL'@ @notsetquarvars@#set -xg MODULES_RUN_QUARANTINE 'ENVVARNAME' @@ -24,12 +24,12 @@ # no environment alteration if the above autoinit command failed if $status -eq 0 - if status -i - if -r @initdir@/fish_completion - source @initdir@/fish_completion - end - end - +@sourcefishcomp@ if status -i +@sourcefishcomp@ if -r @initdir@/fish_completion +@sourcefishcomp@ source @initdir@/fish_completion +@sourcefishcomp@ end +@sourcefishcomp@ end +@sourcefishcomp@ @setbinpath@ if not contains @bindir@ $PATH @setbinpath@@prependbinpath@ set -xg PATH @bindir@ $PATH @setbinpath@@appendbinpath@ set -xg PATH $PATH @bindir@
View file
_service:tar_scm:modules-5.0.1.tar.bz2/init/fish_completion -> _service:tar_scm:modules-5.1.1.tar.bz2/init/fish_completion
Changed
@@ -2,7 +2,7 @@ function __fish_module_no_subcommand --description 'Test if modulecmd has yet to be given the subcommand' for i in (commandline -opc) - if contains -- $i add load try-add try-load rm remove del unload swap switch show display list avail is-loaded is-saved is-used is-avail info-loaded aliases use unuse refresh reload purge source whatis apropos keyword search test save restore saverm saveshow savelist initadd initprepend initrm initswitch initlist initclear path paths append-path prepend-path remove-path clear config sh-to-mod edit + if contains -- $i add add-any load load-any try-add try-load rm remove del unload swap switch show display list avail is-loaded is-saved is-used is-avail info-loaded aliases use unuse refresh reload purge source whatis apropos keyword search test save restore saverm saveshow savelist initadd initprepend initrm initswitch initlist initclear path paths append-path prepend-path remove-path clear config sh-to-mod edit state return 1 end end @@ -11,7 +11,7 @@ function __fish_module_use_avail --description 'Test if module command should have available packages as potential completion' for i in (commandline -opc) - if contains -- $i help add load try-add try-load swap switch show display avail is-loaded is-avail info-loaded whatis test initadd initprepend path paths edit + if contains -- $i help add add-any load load-any try-add try-load swap switch show display avail is-loaded is-avail info-loaded whatis test initadd initprepend path paths edit return 0 end end @@ -63,12 +63,13 @@ /Named collection list\$/d; \ /:\$/d; \ /:ERROR:/d;')" -complete -c module -n '__fish_module_use_config' -f -a "--dump-state --reset advanced_version_spec auto_handling avail_indepth avail_output avail_terse_output collection_pin_version collection_target color colors contact editor extended_default extra_siteconfig home icase implicit_default implicit_requirement list_output list_terse_output locked_configs mcookie_version_check ml nearly_forbidden_days pager quarantine_support rcfile run_quarantine search_match set_shell_startup shells_with_ksh_fpath silent_shell_debug tag_abbrev tag_color_name term_background term_width unload_match_order variant_shortcut verbosity wa_277" +complete -c module -n '__fish_module_use_config' -f -a "--dump-state --reset advanced_version_spec auto_handling avail_indepth avail_output avail_terse_output collection_pin_version collection_pin_tag collection_target color colors contact editor extended_default extra_siteconfig home icase implicit_default implicit_requirement list_output list_terse_output locked_configs mcookie_check mcookie_version_check ml nearly_forbidden_days pager quarantine_support rcfile redirect_output run_quarantine search_match set_shell_startup shells_with_ksh_fpath silent_shell_debug tag_abbrev tag_color_name term_background term_width unload_match_order variant_shortcut verbosity wa_277" complete -f -n '__fish_module_no_subcommand' -c module -a 'help' --description 'Print this or modulefile(s) help info' complete -f -n '__fish_module_no_subcommand' -c module -a 'avail' --description 'List all or matching available modules' complete -f -n '__fish_module_no_subcommand' -c module -a 'is-avail' --description 'Is any of the modulefile(s) available' complete -f -n '__fish_module_no_subcommand' -c module -a 'add load' --description 'Load modulefile(s)' +complete -f -n '__fish_module_no_subcommand' -c module -a 'add-any load-any' --description 'Load first available modulefile in list' complete -f -n '__fish_module_no_subcommand' -c module -a 'try-add try-load' --description 'Attempt to load modulefile(s), no complain' complete -f -n '__fish_module_no_subcommand' -c module -a 'rm remove del unload' --description 'Remove modulefile(s)' complete -f -n '__fish_module_no_subcommand' -c module -a 'swap switch' --description 'Unload mod1 and load mod2' @@ -108,6 +109,7 @@ complete -f -n '__fish_module_no_subcommand' -c module -a 'config' --description 'Display or set Modules configuration' complete -f -n '__fish_module_no_subcommand' -c module -a 'sh-to-mod' --description 'Make modulefile from script env changes' complete -f -n '__fish_module_no_subcommand' -c module -a 'edit' --description 'Open modulefile in editor' +complete -f -n '__fish_module_no_subcommand' -c module -a 'state' --description 'Display Modules state' complete -c module -s V -l version --description 'Module version' complete -c module -s T -l trace --description 'Enable trace and debug messages' @@ -120,6 +122,8 @@ complete -c module -s j -l json --description 'Display output in JSON format' complete -c module -s o -l output --description 'Define elements to output in addition to module names' complete -c module -l output= --description 'Define elements to output in addition to module names' +complete -c module -l tag --description 'Apply tag to loading module' +complete -c module -l tag= --description 'Apply tag to loading module' complete -c module -s a -l all --description 'Include hidden modules in search' complete -c module -s d -l default --description 'Only show default versions available' complete -c module -s L -l latest --description 'Only show latest versions available'
View file
_service:tar_scm:modules-5.0.1.tar.bz2/init/ksh.in -> _service:tar_scm:modules-5.1.1.tar.bz2/init/ksh.in
Changed
@@ -10,7 +10,7 @@ esac; fi; -# define modules runtine quarantine configuration +# define modules runtime quarantine configuration @setquarvars@export MODULES_RUN_QUARANTINE='@RUN_QUARANTINE@' @setquarvars@@export RUNENV_VAR='RUNENV_VAL'@ @notsetquarvars@#export MODULES_RUN_QUARANTINE='ENVVARNAME' @@ -23,11 +23,11 @@ IFS=' '; for _mlv in ${MODULES_RUN_QUARANTINE:-}; do if "${_mlv}" = "${_mlv##*!A-Za-z0-9_}" -a "${_mlv}" = "${_mlv#0-9}" ; then - if -n "`eval 'echo ${'$_mlv'+x}'`" ; then - _mlre="${_mlre:-}__MODULES_QUAR_${_mlv}='`eval 'echo ${'$_mlv'}'`' "; + if -n "$(eval 'echo ${'$_mlv'+x}')" ; then + _mlre="${_mlre:-}__MODULES_QUAR_${_mlv}='$(eval 'echo ${'$_mlv'}')' "; fi; _mlrv="MODULES_RUNENV_${_mlv}"; - _mlre="${_mlre:-}${_mlv}='`eval 'echo ${'$_mlrv':-}'`' "; + _mlre="${_mlre:-}${_mlv}='$(eval 'echo ${'$_mlrv':-}')' "; fi; done; if -n "${_mlre:-}" ; then @@ -36,7 +36,7 @@ # define module command and surrounding initial environment (default value # for MODULESHOME, MODULEPATH, LOADEDMODULES and parse of init config files) -_mlcode=`${_mlre:-}@TCLSH@ @libexecdir@/modulecmd.tcl ksh autoinit` +_mlcode=$(${_mlre:-}@TCLSH@ @libexecdir@/modulecmd.tcl ksh autoinit) _mlret=$? # clean temp variables used to setup quarantine @@ -66,7 +66,7 @@ @setmanpath@ MANPATH=: @setmanpath@ export MANPATH @setmanpath@ fi -@setmanpath@@usemanpath@ _mlinstr=":`manpath 2>/dev/null`:" +@setmanpath@@usemanpath@ _mlinstr=":$(manpath 2>/dev/null):" @setmanpath@@notusemanpath@ _mlinstr=":$MANPATH:" @setmanpath@ if "${_mlinstr#*:@mandir@:}" = "$_mlinstr" ; then @setmanpath@ if "$MANPATH" = ':' || "$MANPATH" = '' ; then
View file
_service:tar_scm:modules-5.0.1.tar.bz2/init/perl.pm.in -> _service:tar_scm:modules-5.1.1.tar.bz2/init/perl.pm.in
Changed
@@ -1,4 +1,4 @@ -# define modules runtine quarantine configuration +# define modules runtime quarantine configuration @setquarvars@$ENV{'MODULES_RUN_QUARANTINE'} = '@RUN_QUARANTINE@'; @setquarvars@@$ENV{'RUNENV_VAR'} = 'RUNENV_VAL';@ @notsetquarvars@#$ENV{'MODULES_RUN_QUARANTINE'} = 'ENVVARNAME';
View file
_service:tar_scm:modules-5.0.1.tar.bz2/init/python.py.in -> _service:tar_scm:modules-5.1.1.tar.bz2/init/python.py.in
Changed
@@ -1,6 +1,7 @@ -import os, re, subprocess +from __future__ import print_function +import os, sys, re, subprocess -# define modules runtine quarantine configuration +# define modules runtime quarantine configuration @setquarvars@os.environ'MODULES_RUN_QUARANTINE' = '@RUN_QUARANTINE@' @setquarvars@@os.environ'RUNENV_VAR' = 'RUNENV_VAL'@ @notsetquarvars@#os.environ'MODULES_RUN_QUARANTINE' = 'ENVVARNAME' @@ -21,7 +22,13 @@ # define module command and surrounding initial environment (default value # for MODULESHOME, MODULEPATH, LOADEDMODULES and parse of init config files) -exec(subprocess.Popen('@TCLSH@', '@libexecdir@/modulecmd.tcl', 'python', 'autoinit', stdout=subprocess.PIPE, env=_mlre).communicate()0) +out, err = subprocess.Popen('@TCLSH@', '@libexecdir@/modulecmd.tcl', 'python', 'autoinit', stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=_mlre).communicate() -# clean temp variable used to setup quarantine +exec(out) +if err.decode(): + print(err.decode(), end='', file=sys.stderr) + +# clean temp variables del _mlre +del out +del err
View file
_service:tar_scm:modules-5.0.1.tar.bz2/init/r.R.in -> _service:tar_scm:modules-5.1.1.tar.bz2/init/r.R.in
Changed
@@ -1,4 +1,4 @@ -# define modules runtine quarantine configuration +# define modules runtime quarantine configuration @setquarvars@Sys.setenv('MODULES_RUN_QUARANTINE'='@RUN_QUARANTINE@') @setquarvars@@Sys.setenv('RUNENV_VAR'='RUNENV_VAL')@ @notsetquarvars@#Sys.setenv('MODULES_RUN_QUARANTINE'='ENVVARNAME')
View file
_service:tar_scm:modules-5.0.1.tar.bz2/init/ruby.rb.in -> _service:tar_scm:modules-5.1.1.tar.bz2/init/ruby.rb.in
Changed
@@ -1,4 +1,4 @@ -# define modules runtine quarantine configuration +# define modules runtime quarantine configuration @setquarvars@ENV'MODULES_RUN_QUARANTINE' = '@RUN_QUARANTINE@' @setquarvars@@ENV'RUNENV_VAR' = 'RUNENV_VAL'@ @notsetquarvars@#ENV'MODULES_RUN_QUARANTINE' = 'ENVVARNAME'
View file
_service:tar_scm:modules-5.0.1.tar.bz2/init/sh.in -> _service:tar_scm:modules-5.1.1.tar.bz2/init/sh.in
Changed
@@ -10,7 +10,7 @@ esac; fi; -# define modules runtine quarantine configuration +# define modules runtime quarantine configuration @setquarvars@export MODULES_RUN_QUARANTINE='@RUN_QUARANTINE@' @setquarvars@@export RUNENV_VAR='RUNENV_VAL'@ @notsetquarvars@#export MODULES_RUN_QUARANTINE='ENVVARNAME' @@ -23,11 +23,11 @@ IFS=' '; for _mlv in ${MODULES_RUN_QUARANTINE:-}; do if "${_mlv}" = "${_mlv##*!A-Za-z0-9_}" -a "${_mlv}" = "${_mlv#0-9}" ; then - if -n "`eval 'echo ${'$_mlv'+x}'`" ; then - _mlre="${_mlre:-}__MODULES_QUAR_${_mlv}='`eval 'echo ${'$_mlv'}'`' "; + if -n "$(eval 'echo ${'$_mlv'+x}')" ; then + _mlre="${_mlre:-}__MODULES_QUAR_${_mlv}='$(eval 'echo ${'$_mlv'}')' "; fi; _mlrv="MODULES_RUNENV_${_mlv}"; - _mlre="${_mlre:-}${_mlv}='`eval 'echo ${'$_mlrv':-}'`' "; + _mlre="${_mlre:-}${_mlv}='$(eval 'echo ${'$_mlrv':-}')' "; fi; done; if -n "${_mlre:-}" ; then @@ -36,7 +36,7 @@ # define module command and surrounding initial environment (default value # for MODULESHOME, MODULEPATH, LOADEDMODULES and parse of init config files) -_mlcode=`${_mlre:-}@TCLSH@ @libexecdir@/modulecmd.tcl sh autoinit` +_mlcode=$(${_mlre:-}@TCLSH@ @libexecdir@/modulecmd.tcl sh autoinit) _mlret=$? # clean temp variables used to setup quarantine @@ -54,9 +54,7 @@ # if sh is bash, export functions to get them defined in sub-shells if "${BASH:-}" != '' ; then - if -t 2 ; then - export -f _module_raw - fi + export -f _module_raw export -f module if "$(type -t ml)" = 'function' ; then export -f ml @@ -76,7 +74,7 @@ @setmanpath@ MANPATH=: @setmanpath@ export MANPATH @setmanpath@ fi -@setmanpath@@usemanpath@ case ":`manpath 2>/dev/null`:" in +@setmanpath@@usemanpath@ case ":$(manpath 2>/dev/null):" in @setmanpath@@notusemanpath@ case ":$MANPATH:" in @setmanpath@ *:@mandir@:*) ;; @setmanpath@ *) if "$MANPATH" = ':' || "$MANPATH" = '' ; then
View file
_service:tar_scm:modules-5.0.1.tar.bz2/init/tcl.in -> _service:tar_scm:modules-5.1.1.tar.bz2/init/tcl.in
Changed
@@ -1,4 +1,4 @@ -# define modules runtine quarantine configuration +# define modules runtime quarantine configuration @setquarvars@set env(MODULES_RUN_QUARANTINE) "@RUN_QUARANTINE@" @setquarvars@@set env(RUNENV_VAR) "RUNENV_VAL"@ @notsetquarvars@#set env(MODULES_RUN_QUARANTINE) "ENVVARNAME"
View file
_service:tar_scm:modules-5.0.1.tar.bz2/init/tcsh_completion.in -> _service:tar_scm:modules-5.1.1.tar.bz2/init/tcsh_completion.in
Changed
@@ -26,12 +26,14 @@ complete module 'n/help/`_module_avail`/' \ 'n/add/`_module_not_yet_loaded; echo "@comp_load_opts@"`/' \ 'n/load/`_module_not_yet_loaded; echo "@comp_load_opts@"`/' \ + 'n/add-any/`_module_not_yet_loaded; echo "@comp_load_opts@"`/' \ + 'n/load-any/`_module_not_yet_loaded; echo "@comp_load_opts@"`/' \ 'n/try-add/`_module_not_yet_loaded; echo "@comp_load_opts@"`/' \ 'n/try-load/`_module_not_yet_loaded; echo "@comp_load_opts@"`/' \ - 'n/rm/`_module_loaded; echo "@comp_load_opts@"`/' \ - 'n/del/`_module_loaded; echo "@comp_load_opts@"`/' \ - 'n/remove/`_module_loaded; echo "@comp_load_opts@"`/' \ - 'n/unload/`_module_loaded; echo "@comp_load_opts@"`/' \ + 'n/rm/`_module_loaded; echo "@comp_unload_opts@"`/' \ + 'n/del/`_module_loaded; echo "@comp_unload_opts@"`/' \ + 'n/remove/`_module_loaded; echo "@comp_unload_opts@"`/' \ + 'n/unload/`_module_loaded; echo "@comp_unload_opts@"`/' \ 'n/swap/`_module_loaded; echo "@comp_load_opts@"`/' \ 'N/swap/`_module_not_yet_loaded; echo "@comp_load_opts@"`/' \ 'n/switch/`_module_loaded; echo "@comp_load_opts@"`/' \ @@ -77,6 +79,7 @@ "n/remove-path/(@comp_rm_path_opts@)/" \ "n/clear/(@comp_clear_opts@)/" \ "n/config/(@comp_config_opts@)/" \ + "n/state/n/" \ "n/--reset/(@comp_config_opts@)/" \ 'n/-h/n/' \ 'n/--help/n/' \
View file
_service:tar_scm:modules-5.0.1.tar.bz2/init/zsh-functions/_module.in -> _service:tar_scm:modules-5.1.1.tar.bz2/init/zsh-functions/_module.in
Changed
@@ -101,6 +101,8 @@ local -a cmds; cmds=( 'add:Load modulefile(s)' 'load:Load modulefile(s)' + 'add-any:Load first available modulefile in list' + 'load-any:Load first available modulefile in list' 'try-add:Attempt to load modulefile(s), no complain' 'try-load:Attempt to load modulefile(s), no complain' 'rm:Remove modulefile(s)' @@ -151,6 +153,7 @@ 'config:Display or set Modules configuration' 'sh-to-mod:Make modulefile from script env changes' 'edit:Open modulefile in editor' + 'state:Display Modules state' ) # show commands only with compatible options if (( !$+opt_args-h && !$+opt_args--help \ @@ -162,12 +165,13 @@ local cmd="${words1}" local cur="${wordsCURRENT}" case $cmd in - (load|add|try-load|try-add) + (load|add|load-any|add-any|try-load|try-add) _arguments \ '--autoEnable automated module handling mode' \ '--no-autoDisable automated module handling mode' \ '(-f --force)'{-f,--force}'By-pass dependency consistency' \ '(-i --icase)'{-i,--icase}'Case insensitive match' \ + '--tag=Apply tag to loading module' \ "*::modulefile:{_module_notloaded_mods $cur}" && ret=0 ;; (avail) @@ -233,6 +237,7 @@ '--no-autoDisable automated module handling mode' \ '(-f --force)'{-f,--force}'By-pass dependency consistency' \ '(-i --icase)'{-i,--icase}'Case insensitive match' \ + '--tag=Apply tag to loading module' \ '1:loaded modulefile:_module_loaded_mods' \ "2:modulefile:{_module_notloaded_mods $cur}" && ret=0 ;; @@ -286,7 +291,7 @@ _arguments \ '--dump-stateReport each state value of current Modules execution' \ '--resetUnset environment variable relative to configuration key' \ - '1:configuration key:(advanced_version_spec auto_handling avail_indepth avail_output avail_terse_output collection_pin_version collection_target color colors contact editor extended_default extra_siteconfig home icase implicit_default implicit_requirement list_output list_terse_output locked_configs mcookie_version_check ml nearly_forbidden_days pager quarantine_support rcfile run_quarantine search_match set_shell_startup shells_with_ksh_fpath silent_shell_debug tag_abbrev tag_color_name term_background term_width unload_match_order variant_shortcut verbosity wa_277)' \ + '1:configuration key:(advanced_version_spec auto_handling avail_indepth avail_output avail_terse_output collection_pin_version collection_pin_tag collection_target color colors contact editor extended_default extra_siteconfig home icase implicit_default implicit_requirement list_output list_terse_output locked_configs mcookie_check mcookie_version_check ml nearly_forbidden_days pager quarantine_support rcfile redirect_output run_quarantine search_match set_shell_startup shells_with_ksh_fpath silent_shell_debug tag_abbrev tag_color_name term_background term_width unload_match_order variant_shortcut verbosity wa_277)' \ && ret=0 ;; (edit)
View file
_service:tar_scm:modules-5.0.1.tar.bz2/init/zsh.in -> _service:tar_scm:modules-5.1.1.tar.bz2/init/zsh.in
Changed
@@ -10,7 +10,7 @@ esac; fi; -# define modules runtine quarantine configuration +# define modules runtime quarantine configuration @setquarvars@export MODULES_RUN_QUARANTINE='@RUN_QUARANTINE@' @setquarvars@@export RUNENV_VAR='RUNENV_VAL'@ @notsetquarvars@#export MODULES_RUN_QUARANTINE='ENVVARNAME' @@ -23,11 +23,11 @@ IFS=' '; for _mlv in ${=MODULES_RUN_QUARANTINE:-}; do if "${_mlv}" = "${_mlv##*!A-Za-z0-9_}" -a "${_mlv}" = "${_mlv#0-9}" ; then - if -n "`eval 'echo ${'$_mlv'+x}'`" ; then - _mlre="${_mlre:-}__MODULES_QUAR_${_mlv}='`eval 'echo ${'$_mlv'}'`' "; + if -n "$(eval 'echo ${'$_mlv'+x}')" ; then + _mlre="${_mlre:-}__MODULES_QUAR_${_mlv}='$(eval 'echo ${'$_mlv'}')' "; fi; _mlrv="MODULES_RUNENV_${_mlv}"; - _mlre="${_mlre:-}${_mlv}='`eval 'echo ${'$_mlrv':-}'`' "; + _mlre="${_mlre:-}${_mlv}='$(eval 'echo ${'$_mlrv':-}')' "; fi; done; if -n "${_mlre:-}" ; then @@ -36,7 +36,7 @@ # define module command and surrounding initial environment (default value # for MODULESHOME, MODULEPATH, LOADEDMODULES and parse of init config files) -_mlcode=`${^^=_mlre:-}@TCLSH@ @libexecdir@/modulecmd.tcl zsh autoinit` +_mlcode=$(${^^=_mlre:-}@TCLSH@ @libexecdir@/modulecmd.tcl zsh autoinit) _mlret=$? # clean temp variables used to setup quarantine @@ -51,12 +51,12 @@ # no environment alteration if the above autoinit command failed if $_mlret -eq 0 ; then eval "$_mlcode" - - # setup FPATH to put module completion at hand in case zsh completion enabled - if ! ":$FPATH:" =~ ':@initdir@/zsh-functions:' ; then - FPATH=@initdir@/zsh-functions${FPATH:+:}$FPATH - export FPATH - fi +@setzshfpath@ +@setzshfpath@ # setup FPATH to put module completion at hand in case zsh completion enabled +@setzshfpath@ if ! ":$FPATH:" =~ ':@initdir@/zsh-functions:' ; then +@setzshfpath@ FPATH=@initdir@/zsh-functions${FPATH:+:}$FPATH +@setzshfpath@ export FPATH +@setzshfpath@ fi @setbinpath@ @setbinpath@ if ! ":$PATH:" =~ ':@bindir@:' ; then @setbinpath@@prependbinpath@ PATH=@bindir@${PATH:+:}$PATH @@ -71,7 +71,7 @@ @setmanpath@ MANPATH=: @setmanpath@ export MANPATH @setmanpath@ fi -@setmanpath@@usemanpath@ if ! ":`manpath 2>/dev/null`:" =~ ':@mandir@:' ; then +@setmanpath@@usemanpath@ if ! ":$(manpath 2>/dev/null):" =~ ':@mandir@:' ; then @setmanpath@@notusemanpath@ if ! ":$MANPATH:" =~ ':@mandir@:' ; then @setmanpath@ if "$MANPATH" = ':' || "$MANPATH" = '' ; then @setmanpath@ _mlpathsep=''
View file
_service:tar_scm:modules-5.0.1.tar.bz2/lib/Makefile.in -> _service:tar_scm:modules-5.1.1.tar.bz2/lib/Makefile.in
Changed
@@ -64,6 +64,10 @@ $(ECHO_CC) $(LDCC) $< -o $@ +libtestutil-sysconf@SHLIB_SUFFIX@: testutil-sysconf.c + $(ECHO_CC) + $(LDCC) $< -o $@ + clean: rm -f envmodules.o rm -f libtclenvmodules@TCL_SHLIB_SUFFIX@ @@ -75,6 +79,7 @@ rm -f libtestutil-getgrgid@SHLIB_SUFFIX@ rm -f libtestutil-time@SHLIB_SUFFIX@ rm -f libtestutil-mktime@SHLIB_SUFFIX@ + rm -f libtestutil-sysconf@SHLIB_SUFFIX@ rm -f envmodules.c.gcov envmodules.gcda envmodules.gcno distclean: clean @@ -84,6 +89,7 @@ ifeq ($(wildcard ../.git),../.git) rm configure rm config.h.in + rm -f config.guess config.sub ifeq ($(wildcard autom4te.cache),autom4te.cache) rm -f autom4te.cache/* rmdir autom4te.cache @@ -99,4 +105,5 @@ libtestutil-closedir@SHLIB_SUFFIX@ libtestutil-getpwuid@SHLIB_SUFFIX@ \ libtestutil-getgroups@SHLIB_SUFFIX@ libtestutil-0getgroups@SHLIB_SUFFIX@ \ libtestutil-dupgetgroups@SHLIB_SUFFIX@ libtestutil-getgrgid@SHLIB_SUFFIX@ \ - libtestutil-time@SHLIB_SUFFIX@ libtestutil-mktime@SHLIB_SUFFIX@ + libtestutil-time@SHLIB_SUFFIX@ libtestutil-mktime@SHLIB_SUFFIX@\ + libtestutil-sysconf@SHLIB_SUFFIX@
View file
_service:tar_scm:modules-5.1.1.tar.bz2/lib/config.guess
Added
@@ -0,0 +1,1462 @@ +#!/usr/bin/sh +# Attempt to guess a canonical system name. +# Copyright 1992-2016 Free Software Foundation, Inc. + +timestamp='2016-10-02' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see <http://www.gnu.org/licenses/>. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). +# +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. +# +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +# +# Please send patches to <config-patches@gnu.org>. + + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 OPTION + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to <config-patches@gnu.org>." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright 1992-2016 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +case "${UNAME_SYSTEM}" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval $set_cc_for_build + cat <<-EOF > $dummy.c + #include <features.h> + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + ;; +esac + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + /sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || \ + echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + earmv*) + arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv0-9\).*$,\1,'` + endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` + machine=${arch}${endian}-unknown + ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently (or will in the future) and ABI. + case "${UNAME_MACHINE_ARCH}" in + earm*) + os=netbsdelf + ;; + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # Determine ABI tags. + case "${UNAME_MACHINE_ARCH}" in + earm*) + expr='s/^earmv0-9/-eabi/;s/eb$//' + abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE} | sed -e 's/-_.*//' | cut -d. -f1,2` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}${abi}" + exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:LibertyBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:Sortix:*:*) + echo ${UNAME_MACHINE}-unknown-sortix + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE=alpha ;; + "EV4.5 (21064)") + UNAME_MACHINE=alpha ;; + "LCA4 (21066/21068)") + UNAME_MACHINE=alpha ;; + "EV5 (21164)") + UNAME_MACHINE=alphaev5 ;; + "EV5.6 (21164A)") + UNAME_MACHINE=alphaev56 ;; + "EV5.6 (21164PC)") + UNAME_MACHINE=alphapca56 ;; + "EV5.7 (21164PC)") + UNAME_MACHINE=alphapca57 ;; + "EV6 (21264)") + UNAME_MACHINE=alphaev6 ;; + "EV6.7 (21264A)") + UNAME_MACHINE=alphaev67 ;; + "EV6.8CB (21264C)") + UNAME_MACHINE=alphaev68 ;; + "EV6.8AL (21264B)") + UNAME_MACHINE=alphaev68 ;; + "EV6.8CX (21264D)") + UNAME_MACHINE=alphaev68 ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE=alphaev69 ;; + "EV7 (21364)") + UNAME_MACHINE=alphaev7 ;; + "EV7.9 (21364A)") + UNAME_MACHINE=alphaev79 ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^PVTX//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:AamigaOoSs:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:MmorphOoSs:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.012*:*|arm:riscix:1.012*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm*:riscos:*:*|arm*:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + s390x:SunOS:*:*) + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/^.*//'` + exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/^.*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/^.*//'` + exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval $set_cc_for_build + SUN_ARCH=i386 + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if "$CC_FOR_BUILD" != no_compiler_found ; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH=x86_64 + fi + fi + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/^.*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/^.*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atariste:*MiNT:*:* | atariste:*mint:*:* | atariste:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atariste:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include <stdio.h> /* for printf() prototype */ + int main (int argc, char *argv) { +#else + int main (argc, argv) int argc; char *argv; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv1); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv1); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv1); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\(0-9*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if $UNAME_PROCESSOR = mc88100 || $UNAME_PROCESSOR = mc88110 + then + if ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx || \ + ${TARGET_BINARY_INTERFACE}x = x + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek430-90-9:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????:AIX?:12.1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if -x /usr/bin/oslevel ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include <sys/systemcfg.h> + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:4567) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if -x /usr/bin/lslpp ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/0-9*$/0/` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/34??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/34??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/34678??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/^.*.0B*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/34?? ) HP_ARCH=m68k ;; + 9000/6780-90-9) + if -x /usr/bin/getconf ; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 + 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH=hppa2.0n ;; + 64) HP_ARCH=hppa2.0w ;; + '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 + esac ;; + esac + fi + if "${HP_ARCH}" = "" ; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include <stdlib.h> + #include <unistd.h> + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if ${HP_ARCH} = hppa2.0w + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ + then + HP_ARCH=hppa2.0w + else + HP_ARCH=hppa64 + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/^.*.0B*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include <unistd.h> + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?79:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?79:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if -x /usr/sbin/sysversion ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.^.*$/.X/' + exit ;; + CRAY*A-Z90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\(A-Z90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.^.*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.^.*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.^.*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.^.*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.^.*$/.X/' + exit ;; + F3001:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/-(.*//'` ;; + *) + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/-(.*//'` ;; + esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + *:MINGW64*:*) + echo ${UNAME_MACHINE}-pc-mingw64 + exit ;; + *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + *:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + *:Interix*:*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + IA64) + echo ia64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; + 34586:Windows_95:* | 34586:Windows_98:* | 34586:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/^.*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,-/.*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^^/*/,,' | tr ":upper:" ":lower:"``echo ${UNAME_RELEASE}|sed -e 's/-(.*//'`-${LIBC} + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arm*:Linux:*:*) + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + else + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi + else + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf + fi + fi + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + cris:Linux:*:*) + echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + crisv32:Linux:*:*) + echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + e2k:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + frv:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + i*86:Linux:*:*) + echo ${UNAME_MACHINE}-pc-linux-${LIBC} + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + k1om:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=${UNAME_MACHINE}el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=${UNAME_MACHINE} + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } + ;; + mips64el:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + openrisc*:Linux:*:*) + echo or1k-unknown-linux-${LIBC} + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-${LIBC} + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-${LIBC} + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu^a-z*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; + esac + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-${LIBC} + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-${LIBC} + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-${LIBC} + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} + exit ;; + riscv32:Linux:*:* | riscv64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + tile*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-${LIBC} + exit ;; + x86_64:Linux:*:*) + echo ${UNAME_MACHINE}-pc-linux-${LIBC} + exit ;; + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.01*:* | i*86:LynxOS:4.02*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit ;; + i*86:*:5:678*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` + echo ${UNAME_MACHINE}-pc-isc$UNAME_REL + elif /bin/uname -X 2>/dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configure will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V5678*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3345??:*:4.0:3.0 | 334??A:*:4.0:3.0 | 334??,*:*:4.0:3.0 | 334??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/^ * ^ * \(0-90-9\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 334??:*:4.0:* | 334??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/^ * ^ * \(0-90-9\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.01*:* | PowerPC:LynxOS:4.02*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SMBES:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says <Richard.M.Bartel@ccMail.Census.GOV> + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes <hewes@openmarket.com>. + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R34000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if -d /usr/nec ; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; + SX-ACE:SUPER-UX:*:*) + echo sxace-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + eval $set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then + if "$CC_FOR_BUILD" != no_compiler_found ; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 + fi + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:0123456789*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = x86; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NEO-?:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk${UNAME_RELEASE} + exit ;; + NSE-*:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = 386; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/-(.*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'` + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; + x86_64:VMkernel:*:*) + echo ${UNAME_MACHINE}-unknown-esx + exit ;; + amd64:Isilon\ OneFS:*:*) + echo x86_64-unknown-onefs + exit ;; +esac + +cat >&2 <<EOF +$0: unable to guess system type + +This script (version $timestamp), has failed to recognize the +operating system you are using. If your script is old, overwrite +config.guess and config.sub with the latest versions from: + + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +and + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub + +If $0 has already been updated, send the following data and any +information you think might be pertinent to config-patches@gnu.org to +provide the necessary information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End:
View file
_service:tar_scm:modules-5.0.1.tar.bz2/lib/config.h.in -> _service:tar_scm:modules-5.1.1.tar.bz2/lib/config.h.in
Changed
@@ -43,9 +43,6 @@ /* Define to 1 if you have the `lseek64' function. */ #undef HAVE_LSEEK64 -/* Define to 1 if you have the <memory.h> header file. */ -#undef HAVE_MEMORY_H - /* Defined when mingw does not support SEH */ #undef HAVE_NO_SEH @@ -124,7 +121,9 @@ /* This a static build */ #undef STATIC_BUILD -/* Define to 1 if you have the ANSI C header files. */ +/* Define to 1 if all of the C90 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ #undef STDC_HEADERS /* Is memory debugging enabled? */
View file
_service:tar_scm:modules-5.1.1.tar.bz2/lib/config.sub
Added
@@ -0,0 +1,1823 @@ +#!/usr/bin/sh +# Configuration validation subroutine script. +# Copyright 1992-2016 Free Software Foundation, Inc. + +timestamp='2016-09-05' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see <http://www.gnu.org/licenses/>. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). + + +# Please send patches to <config-patches@gnu.org>. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 OPTION CPU-MFR-OPSYS or ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to <config-patches@gnu.org>." + +version="\ +GNU config.sub ($timestamp) + +Copyright 1992-2016 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\(^-*-^-*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ + kopensolaris*-gnu* | cloudabi*-eabi* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\(^-*-^-*\)$/\1/'` + ;; + android-linux) + os=-linux-android + basic_machine=`echo $1 | sed 's/^\(.*\)-\(^-*-^-*\)$/\1/'`-unknown + ;; + *) + basic_machine=`echo $1 | sed 's/-^-*$//'` + if $basic_machine != $1 + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun234* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c123* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray | -microblaze*) + os= + basic_machine=$1 + ;; + -bluegene*) + os=-cnk + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.4-9*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v4-9*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint0-9*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ + | alpha | alphaev4-8 | alphaev56 | alphaev678 | alphapca567 \ + | alpha64 | alpha64ev4-8 | alpha64ev56 | alpha64ev678 | alpha64pca567 \ + | am33_2.0 \ + | arc | arceb \ + | arm | armble | armelb | armv2-8 | armv3-8lb | armv7arm \ + | avr | avr32 \ + | ba \ + | be32 | be64 \ + | bfin \ + | c4x | c8051 | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | e2k | epiphany \ + | fido | fr30 | frv | ft32 \ + | h8300 | h8500 | hppa | hppa1.01 | hppa2.0 | hppa2.0nw | hppa64 \ + | hexagon \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nios | nios2 | nios2eb | nios2el \ + | ns16k | ns32k \ + | open8 | or1k | or1knd | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pyramid \ + | riscv32 | riscv64 \ + | rl78 | rx \ + | score \ + | sh | sh1234 | sh24a | sh24aeb | sh23e | sh234eb | sheb | shbe | shle | sh1234le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | visium \ + | we32k \ + | x86 | xc16x | xstormy16 | xtensa \ + | z8k | z80) + basic_machine=$basic_machine-unknown + ;; + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown + ;; + c6x) + basic_machine=tic6x-unknown + ;; + leon|leon3-9) + basic_machine=sparc-$basic_machine + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680123460 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + ms1) + basic_machine=mt-unknown + ;; + + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | aarch64-* | aarch64_be-* \ + | alpha-* | alphaev4-8-* | alphaev56-* | alphaev678-* \ + | alpha64-* | alpha64ev4-8-* | alpha64ev56-* | alpha64ev678-* \ + | alphapca567-* | alpha64pca567-* | arc-* | arceb-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | ba-* \ + | be32-* | be64-* \ + | bfin-* | bs2000-* \ + | c123* | c30-* | cjt90-* | c4x-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | e2k-* | elxsi-* \ + | f3001-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.01-* | hppa2.0-* | hppa2.0nw-* | hppa64-* \ + | hexagon-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | k1om-* \ + | le32-* | le64-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m6800123460-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ + | or1k*-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pyramid-* \ + | riscv32-* | riscv64-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ + | sh-* | sh1234-* | sh24a-* | sh24aeb-* | sh23e-* | sh34eb-* | sheb-* | shbe-* \ + | shle-* | sh1234le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ + | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile*-* \ + | tron-* \ + | ubicom32-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ + | visium-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-* | z80-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^^-*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aros) + basic_machine=i386-pc + os=-aros + ;; + asmjs) + basic_machine=asmjs-unknown + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^^-*-//'` + os=-linux + ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; + c54x-*) + basic_machine=tic54x-`echo $basic_machine | sed 's/^^-*-//'` + ;; + c55x-*) + basic_machine=tic55x-`echo $basic_machine | sed 's/^^-*-//'` + ;; + c6x-*) + basic_machine=tic6x-`echo $basic_machine | sed 's/^^-*-//'` + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16 | cr16-*) + basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + e500v12) + basic_machine=powerpc-unknown + os=$os"spe" + ;; + e500v12-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^^-*-//'` + os=$os"spe" + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k90-90-9 | hp90-90-9) + basic_machine=hppa1.0-hp + ;; + hp9k20-90-9 | hp9k310-9) + basic_machine=m68000-hp + ;; + hp9k32-90-9) + basic_machine=m68k-hp + ;; + hp9k60-90-9 | hp60-90-9) + basic_machine=hppa1.0-hp + ;; + hp9k70-790-9 | hp70-790-9) + basic_machine=hppa1.1-hp + ;; + hp9k780-9 | hp780-9) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8671 | hp8671 | hp9k8024 | hp8024 | hp9k8789 | hp8789 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k80-913679 | hp80-913679) + basic_machine=hppa1.1-hp + ;; + hp9k80-90-9 | hp80-90-9) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + leon-*|leon3-9-*) + basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^^-*-//'` + os=-linux + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + microblaze*) + basic_machine=microblaze-xilinx + ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 + ;; + mingw32) + basic_machine=i686-pc + os=-mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint0-9* | *MiNT | *MiNT0-9*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + msys) + basic_machine=i686-pc + os=-msys + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh45000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^^-*-//'` + os=-linux + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^^-*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^^-*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^^-*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^^-*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^^-*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc | ppcbe) basic_machine=powerpc-unknown + ;; + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^^-*-//'` + ;; + ppcle | powerpclittle) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^^-*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^^-*-//'` + ;; + ppc64le | powerpc64little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^^-*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm4600) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo $basic_machine | sed 's/^^-*-//'` + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tile*) + basic_machine=$basic_machine-unknown + os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + xscale-* | xscaleebl-*) + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + z80-*-coff) + basic_machine=z80-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh1234 | sh24a | sh24aeb | sh34eb | sh1234le | sh23ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if x"$os" != x"" +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos34*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* | -plan9* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* | -aros* | -cloudabi* | -sortix* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* | -cegcc* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ + | -onefs* | -tirtos* | -phoenix*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint0-9* | -*MiNT | -MiNT0-9*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -zvmoe) + os=-zvmoe + ;; + -dicos*) + os=-dicos + ;; + -nacl*) + ;; + -ios) + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/^-*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + c8051-*) + os=-elf + ;; + hexagon-*) + os=-elf + ;; + tic54x-*) + os=-coff + ;; + tic55x-*) + os=-coff + ;; + tic6x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + ;; + m68*-cisco) + os=-aout + ;; + mep-*) + os=-elf + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f3001-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -cnk*|-aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint0-9* | -*MiNT | -MiNT0-9*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End:
View file
_service:tar_scm:modules-5.0.1.tar.bz2/lib/configure -> _service:tar_scm:modules-5.1.1.tar.bz2/lib/configure
Changed
@@ -1,11 +1,12 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Envmodules 1.4.0. +# Generated by GNU Autoconf 2.71 for Envmodules 1.4.1. # # Report bugs to <modules-interest@lists.sourceforge.net>. # # -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, +# Inc. # # # This configure script is free software; the Free Software Foundation @@ -16,14 +17,16 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +as_nop=: +if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else +else $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -33,46 +36,46 @@ fi + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi +if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then +if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -81,13 +84,6 @@ fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -96,8 +92,12 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS @@ -109,30 +109,10 @@ as_myself=$0 fi if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. @@ -154,20 +134,22 @@ exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + as_bourne_compatible="as_nop=: +if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST -else +else \$as_nop case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( @@ -187,42 +169,53 @@ as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : +if ( set x; as_fn_ret_success y && test x = \"\$1\" ) +then : -else +else \$as_nop exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 +blah=\$(echo \$(echo blah)) +test x\"\$blah\" = xblah || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : + if (eval "$as_required") 2>/dev/null +then : as_have_required=yes -else +else $as_nop as_have_required=no fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null +then : -else +else $as_nop as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base + as_shell=$as_dir$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null +then : break 2 fi fi @@ -230,14 +223,21 @@ esac as_found=false done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } IFS=$as_save_IFS +if $as_found +then : + +else $as_nop + if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi +fi - if test "x$CONFIG_SHELL" != x; then : + if test "x$CONFIG_SHELL" != x +then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also @@ -255,18 +255,19 @@ exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." + if test x$as_have_required = xno +then : + printf "%s\n" "$0: This script requires a shell more modern than all" + printf "%s\n" "$0: the shells that I found on your system." + if test ${ZSH_VERSION+y} ; then + printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" + printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." else - $as_echo "$0: Please tell bug-autoconf@gnu.org and + printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and $0: modules-interest@lists.sourceforge.net about your $0: system, including any error possibly output before this $0: message. Then install a modern shell, or manually run @@ -294,6 +295,7 @@ } as_unset=as_fn_unset + # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -311,6 +313,14 @@ as_fn_set_status $1 exit $1 } # as_fn_exit +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop # as_fn_mkdir_p # ------------- @@ -325,7 +335,7 @@ as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -334,7 +344,7 @@ X"$as_dir" : 'X\(//\)^/' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | +printf "%s\n" X"$as_dir" | sed '/^X\(.*^/\)\/\/*^/^/*\/*$/{ s//\1/ q @@ -373,12 +383,13 @@ # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null +then : eval 'as_fn_append () { eval $1+=\$2 }' -else +else $as_nop as_fn_append () { eval $1=\$$1\$2 @@ -390,18 +401,27 @@ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else +else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop # as_fn_error STATUS ERROR LINENO LOG_FD # ---------------------------------------- @@ -413,9 +433,9 @@ as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $2" >&2 + printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -442,7 +462,7 @@ $as_expr X/"$0" : '.*/\(^/^/*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +printf "%s\n" X/"$0" | sed '/^.*\/\(^/^/*\)\/*$/{ s//\1/ q @@ -486,7 +506,7 @@ s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall @@ -500,6 +520,10 @@ exit } + +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -513,6 +537,13 @@ ECHO_N='-n';; esac +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO("message") and AS_ECHO_N("message"), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' + + rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -580,48 +611,44 @@ # Identity of this package. PACKAGE_NAME='Envmodules' PACKAGE_TARNAME='envmodules' -PACKAGE_VERSION='1.4.0' -PACKAGE_STRING='Envmodules 1.4.0' +PACKAGE_VERSION='1.4.1' +PACKAGE_STRING='Envmodules 1.4.1' PACKAGE_BUGREPORT='modules-interest@lists.sourceforge.net' PACKAGE_URL='http://modules.sf.net' ac_unique_file="envmodules.c" # Factoring default headers for most tests. ac_includes_default="\ -#include <stdio.h> -#ifdef HAVE_SYS_TYPES_H -# include <sys/types.h> -#endif -#ifdef HAVE_SYS_STAT_H -# include <sys/stat.h> +#include <stddef.h> +#ifdef HAVE_STDIO_H +# include <stdio.h> #endif -#ifdef STDC_HEADERS +#ifdef HAVE_STDLIB_H # include <stdlib.h> -# include <stddef.h> -#else -# ifdef HAVE_STDLIB_H -# include <stdlib.h> -# endif #endif #ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include <memory.h> -# endif # include <string.h> #endif -#ifdef HAVE_STRINGS_H -# include <strings.h> -#endif #ifdef HAVE_INTTYPES_H # include <inttypes.h> #endif #ifdef HAVE_STDINT_H # include <stdint.h> #endif +#ifdef HAVE_STRINGS_H +# include <strings.h> +#endif +#ifdef HAVE_SYS_TYPES_H +# include <sys/types.h> +#endif +#ifdef HAVE_SYS_STAT_H +# include <sys/stat.h> +#endif #ifdef HAVE_UNISTD_H # include <unistd.h> #endif" +ac_header_c_list= ac_subst_vars='LTLIBOBJS SHLIB_SUFFIX TCL_SHLIB_SUFFIX @@ -656,6 +683,14 @@ TCL_INCLUDES RANLIB SET_MAKE +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build EGREP GREP CPP @@ -826,8 +861,6 @@ *) ac_optarg=yes ;; esac - # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; @@ -868,9 +901,9 @@ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*^-+._$as_cr_alnum" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/-+./_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/-+./_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -894,9 +927,9 @@ ac_useropt=`expr "x$ac_option" : 'x-*enable-\(^=*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*^-+._$as_cr_alnum" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/-+./_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/-+./_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1107,9 +1140,9 @@ ac_useropt=`expr "x$ac_option" : 'x-*with-\(^=*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*^-+._$as_cr_alnum" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/-+./_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/-+./_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1123,9 +1156,9 @@ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*^-+._$as_cr_alnum" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/-+./_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/-+./_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1169,9 +1202,9 @@ *) # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*^-._$as_cr_alnum" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; @@ -1187,7 +1220,7 @@ case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1251,7 +1284,7 @@ X"$as_myself" : 'X\(//\)^/' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | +printf "%s\n" X"$as_myself" | sed '/^X\(.*^/\)\/\/*^/^/*\/*$/{ s//\1/ q @@ -1308,7 +1341,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Envmodules 1.4.0 to adapt to many kinds of systems. +\`configure' configures Envmodules 1.4.1 to adapt to many kinds of systems. Usage: $0 OPTION... VAR=VALUE... @@ -1365,12 +1398,16 @@ _ACEOF cat <<\_ACEOF + +System types: + --build=BUILD configure for building on BUILD guessed + --host=HOST cross-compile to build programs to run on HOST BUILD _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Envmodules 1.4.0:";; + short | recursive ) echo "Configuration of Envmodules 1.4.1:";; esac cat <<\_ACEOF @@ -1423,9 +1460,9 @@ case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.\\/||'` + ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.\\/||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/^\\/*|/..|g;s|/||'` + ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/^\\/*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -1453,7 +1490,8 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. + # Check for configure.gnu first; this name is used for a wrapper for + # Metaconfig's "Configure" on case-insensitive file systems. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive @@ -1461,7 +1499,7 @@ echo && $SHELL "$ac_srcdir/configure" --help=recursive else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1470,10 +1508,10 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Envmodules configure 1.4.0 -generated by GNU Autoconf 2.69 +Envmodules configure 1.4.1 +generated by GNU Autoconf 2.71 -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) 2021 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1490,14 +1528,14 @@ ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext + rm -f conftest.$ac_objext conftest.beam if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1505,14 +1543,15 @@ cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then : + } && test -s conftest.$ac_objext +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1522,6 +1561,96 @@ } # ac_fn_c_try_compile +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval "$3=yes" +else $as_nop + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +eval ac_res=\$$3 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile + +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES +# ------------------------------------------- +# Tests whether TYPE exists after having included INCLUDES, setting cache +# variable VAR accordingly. +ac_fn_c_check_type () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + +else $as_nop + eval "$3=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +eval ac_res=\$$3 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_type + # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. @@ -1534,7 +1663,7 @@ *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1542,14 +1671,15 @@ cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err - }; then : + } +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1559,101 +1689,10 @@ } # ac_fn_c_try_cpp -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## ----------------------------------------------------- ## -## Report this to modules-interest@lists.sourceforge.net ## -## ----------------------------------------------------- ##" - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_mongrel - # ac_fn_c_try_run LINENO # ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. +# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that +# executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack @@ -1663,25 +1702,26 @@ *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } +then : ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: program exited with status $ac_status" >&5 + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status @@ -1692,105 +1732,20 @@ } # ac_fn_c_try_run -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_compile - -# ac_fn_c_check_type LINENO TYPE VAR INCLUDES -# ------------------------------------------- -# Tests whether TYPE exists after having included INCLUDES, setting cache -# variable VAR accordingly. -ac_fn_c_check_type () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=no" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof ($2)) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof (($2))) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - eval "$3=yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_type - # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext + rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1798,17 +1753,18 @@ cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext - }; then : + } +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1829,11 +1785,12 @@ ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case <limits.h> declares $2. @@ -1841,16 +1798,9 @@ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif + which can conflict with char $2 (); below. */ +#include <limits.h> #undef $2 /* Override any GCC internal prototype to avoid an error. @@ -1868,35 +1818,56 @@ #endif int -main () +main (void) { return $2 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : eval "$3=yes" -else +else $as_nop eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func +ac_configure_args_raw= +for ac_arg +do + case $ac_arg in + *\'*) + ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append ac_configure_args_raw " '$ac_arg'" +done + +case $ac_configure_args_raw in + *$as_nl*) + ac_safe_unquote= ;; + *) + ac_unsafe_z='|&;<>()$`\\"*? '' ' # This string ends in space, tab. + ac_unsafe_a="$ac_unsafe_z#~" + ac_safe_unquote="s/ '\\(^$ac_unsafe_a^$ac_unsafe_z*\\)'/ \\1/g" + ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; +esac + cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Envmodules $as_me 1.4.0, which was -generated by GNU Autoconf 2.69. Invocation command line was +It was created by Envmodules $as_me 1.4.1, which was +generated by GNU Autoconf 2.71. Invocation command line was - $ $0 $@ + $ $0$ac_configure_args_raw _ACEOF exec 5>>config.log @@ -1929,8 +1900,12 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + printf "%s\n" "PATH: $as_dir" done IFS=$as_save_IFS @@ -1965,7 +1940,7 @@ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; @@ -2000,11 +1975,13 @@ # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? + # Sanitize IFS. + IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo - $as_echo "## ---------------- ## + printf "%s\n" "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo @@ -2015,8 +1992,8 @@ case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -2040,7 +2017,7 @@ ) echo - $as_echo "## ----------------- ## + printf "%s\n" "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo @@ -2048,14 +2025,14 @@ do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## + printf "%s\n" "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo @@ -2063,15 +2040,15 @@ do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then - $as_echo "## ----------- ## + printf "%s\n" "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo @@ -2079,8 +2056,8 @@ echo fi test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" + printf "%s\n" "$as_me: caught signal $ac_signal" + printf "%s\n" "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && @@ -2094,63 +2071,48 @@ # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h -$as_echo "/* confdefs.h */" > confdefs.h +printf "%s\n" "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF +printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF +printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF +printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF +printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF +printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF +printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac + ac_site_files="$CONFIG_SITE" elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site + ac_site_files="$prefix/share/config.site $prefix/etc/config.site" else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site + ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" + +for ac_site_file in $ac_site_files do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} + case $ac_site_file in #( + */*) : + ;; #( + *) : + ac_site_file=./$ac_site_file ;; +esac + if test -f "$ac_site_file" && test -r "$ac_site_file"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi @@ -2160,19 +2122,434 @@ # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +printf "%s\n" "$as_me: loading cache $cache_file" >&6;} case $cache_file in \\/* | ?:\\/* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +printf "%s\n" "$as_me: creating cache $cache_file" >&6;} >$cache_file fi +# Test code for whether the C compiler supports C89 (global declarations) +ac_c_conftest_c89_globals=' +/* Does the compiler advertise C89 conformance? + Do not test the value of __STDC__, because some compilers set it to 0 + while being otherwise adequately conformant. */ +#if !defined __STDC__ +# error "Compiler does not advertise C89 conformance" +#endif + +#include <stddef.h> +#include <stdarg.h> +struct stat; +/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ +struct buf { int x; }; +struct buf * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return pi; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not \xHH hex character constants. + These do not provoke an error unfortunately, instead are silently treated + as an "x". The following induces an error, until -std is added to get + proper ANSI mode. Curiously \x00 != x always comes out true, for an + array size at least. It is necessary to write \x00 == 0 to get something + that is true only with -std. */ +int osf4_cc_array '\''\x00'\'' == 0 ? 1 : -1; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) '\''x'\'' +int xlc6_cc_arrayFOO(a) == '\''x'\'' ? 1 : -1; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), + int, int);' + +# Test code for whether the C compiler supports C89 (body of main). +ac_c_conftest_c89_main=' +ok |= (argc == 0 || f (e, argv, 0) != argv0 || f (e, argv, 1) != argv1); +' + +# Test code for whether the C compiler supports C99 (global declarations) +ac_c_conftest_c99_globals=' +// Does the compiler advertise C99 conformance? +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L +# error "Compiler does not advertise C99 conformance" +#endif + +#include <stdbool.h> +extern int puts (const char *); +extern int printf (const char *, ...); +extern int dprintf (int, const char *, ...); +extern void *malloc (size_t); + +// Check varargs macros. These examples are taken from C99 6.10.3.5. +// dprintf is used instead of fprintf to avoid needing to declare +// FILE and stderr. +#define debug(...) dprintf (2, __VA_ARGS__) +#define showlist(...) puts (#__VA_ARGS__) +#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) +static void +test_varargs_macros (void) +{ + int x = 1234; + int y = 5678; + debug ("Flag"); + debug ("X = %d\n", x); + showlist (The first, second, and third items.); + report (x>y, "x is %d but y is %d", x, y); +} + +// Check long long types. +#define BIG64 18446744073709551615ull +#define BIG32 4294967295ul +#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) +#if !BIG_OK + #error "your preprocessor is broken" +#endif +#if BIG_OK +#else + #error "your preprocessor is broken" +#endif +static long long int bignum = -9223372036854775807LL; +static unsigned long long int ubignum = BIG64; + +struct incomplete_array +{ + int datasize; + double data; +}; + +struct named_init { + int number; + const wchar_t *name; + double average; +}; + +typedef const char *ccp; + +static inline int +test_restrict (ccp restrict text) +{ + // See if C++-style comments work. + // Iterate through items via the restricted pointer. + // Also check for declarations in for loops. + for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) + continue; + return 0; +} + +// Check varargs and va_copy. +static bool +test_varargs (const char *format, ...) +{ + va_list args; + va_start (args, format); + va_list args_copy; + va_copy (args_copy, args); + + const char *str = ""; + int number = 0; + float fnumber = 0; + + while (*format) + { + switch (*format++) + { + case '\''s'\'': // string + str = va_arg (args_copy, const char *); + break; + case '\''d'\'': // int + number = va_arg (args_copy, int); + break; + case '\''f'\'': // float + fnumber = va_arg (args_copy, double); + break; + default: + break; + } + } + va_end (args_copy); + va_end (args); + + return *str && number && fnumber; +} +' + +# Test code for whether the C compiler supports C99 (body of main). +ac_c_conftest_c99_main=' + // Check bool. + _Bool success = false; + success |= (argc != 0); + + // Check restrict. + if (test_restrict ("String literal") == 0) + success = true; + char *restrict newvar = "Another string"; + + // Check varargs. + success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); + test_varargs_macros (); + + // Check flexible array members. + struct incomplete_array *ia = + malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); + ia->datasize = 10; + for (int i = 0; i < ia->datasize; ++i) + ia->datai = i * 1.234; + + // Check named initializers. + struct named_init ni = { + .number = 34, + .name = L"Test wide string", + .average = 543.34343, + }; + + ni.number = 58; + + int dynamic_arrayni.number; + dynamic_array0 = argv00; + dynamic_arrayni.number - 1 = 543; + + // work around unused variable warnings + ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar0 == '\''x'\'' + || dynamic_arrayni.number - 1 != 543); +' + +# Test code for whether the C compiler supports C11 (global declarations) +ac_c_conftest_c11_globals=' +// Does the compiler advertise C11 conformance? +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L +# error "Compiler does not advertise C11 conformance" +#endif + +// Check _Alignas. +char _Alignas (double) aligned_as_double; +char _Alignas (0) no_special_alignment; +extern char aligned_as_int; +char _Alignas (0) _Alignas (int) aligned_as_int; + +// Check _Alignof. +enum +{ + int_alignment = _Alignof (int), + int_array_alignment = _Alignof (int100), + char_alignment = _Alignof (char) +}; +_Static_assert (0 < -_Alignof (int), "_Alignof is signed"); + +// Check _Noreturn. +int _Noreturn does_not_return (void) { for (;;) continue; } + +// Check _Static_assert. +struct test_static_assert +{ + int x; + _Static_assert (sizeof (int) <= sizeof (long int), + "_Static_assert does not work in struct"); + long int y; +}; + +// Check UTF-8 literals. +#define u8 syntax error! +char const utf8_literal = u8"happens to be ASCII" "another string"; + +// Check duplicate typedefs. +typedef long *long_ptr; +typedef long int *long_ptr; +typedef long_ptr long_ptr; + +// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. +struct anonymous +{ + union { + struct { int i; int j; }; + struct { int k; long int l; } w; + }; + int m; +} v1; +' + +# Test code for whether the C compiler supports C11 (body of main). +ac_c_conftest_c11_main=' + _Static_assert ((offsetof (struct anonymous, i) + == offsetof (struct anonymous, w.k)), + "Anonymous union alignment botch"); + v1.i = 2; + v1.w.k = 5; + ok |= v1.i != 5; +' + +# Test code for whether the C compiler supports C11 (complete). +ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} +${ac_c_conftest_c99_globals} +${ac_c_conftest_c11_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + ${ac_c_conftest_c99_main} + ${ac_c_conftest_c11_main} + return ok; +} +" + +# Test code for whether the C compiler supports C99 (complete). +ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} +${ac_c_conftest_c99_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + ${ac_c_conftest_c99_main} + return ok; +} +" + +# Test code for whether the C compiler supports C89 (complete). +ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + return ok; +} +" + +as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" +as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" +as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" +as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" +as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" +as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" +as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" +as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" +as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" + +# Auxiliary files required by this configure script. +ac_aux_files="config.guess config.sub" + +# Locations in which to look for auxiliary files. +ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.." + +# Search for a directory containing all of the required auxiliary files, +# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. +# If we don't find one directory that contains all the files we need, +# we report the set of missing files from the *first* directory in +# $ac_aux_dir_candidates and give up. +ac_missing_aux_files="" +ac_first_candidate=: +printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in $ac_aux_dir_candidates +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + as_found=: + + printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 + ac_aux_dir_found=yes + ac_install_sh= + for ac_aux in $ac_aux_files + do + # As a special case, if "install-sh" is required, that requirement + # can be satisfied by any of "install-sh", "install.sh", or "shtool", + # and $ac_install_sh is set appropriately for whichever one is found. + if test x"$ac_aux" = x"install-sh" + then + if test -f "${as_dir}install-sh"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 + ac_install_sh="${as_dir}install-sh -c" + elif test -f "${as_dir}install.sh"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 + ac_install_sh="${as_dir}install.sh -c" + elif test -f "${as_dir}shtool"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 + ac_install_sh="${as_dir}shtool install -c" + else + ac_aux_dir_found=no + if $ac_first_candidate; then + ac_missing_aux_files="${ac_missing_aux_files} install-sh" + else + break + fi + fi + else + if test -f "${as_dir}${ac_aux}"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 + else + ac_aux_dir_found=no + if $ac_first_candidate; then + ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" + else + break + fi + fi + fi + done + if test "$ac_aux_dir_found" = yes; then + ac_aux_dir="$as_dir" + break + fi + ac_first_candidate=false + + as_found=false +done +IFS=$as_save_IFS +if $as_found +then : + +else $as_nop + as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 +fi + + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +if test -f "${ac_aux_dir}config.guess"; then + ac_config_guess="$SHELL ${ac_aux_dir}config.guess" +fi +if test -f "${ac_aux_dir}config.sub"; then + ac_config_sub="$SHELL ${ac_aux_dir}config.sub" +fi +if test -f "$ac_aux_dir/configure"; then + ac_configure="$SHELL ${ac_aux_dir}configure" +fi + # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false @@ -2183,12 +2560,12 @@ eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) @@ -2197,24 +2574,24 @@ ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -2224,11 +2601,12 @@ fi done if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' + and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -2249,14 +2627,14 @@ TEA_VERSION="3.13" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking TEA configuration" >&5 -$as_echo_n "checking TEA configuration... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking TEA configuration" >&5 +printf %s "checking TEA configuration... " >&6; } if test x"${PACKAGE_NAME}" = x ; then as_fn_error $? " The PACKAGE_NAME variable must be defined by your TEA configure.ac" "$LINENO" 5 fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok (TEA ${TEA_VERSION})" >&5 -$as_echo "ok (TEA ${TEA_VERSION})" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok (TEA ${TEA_VERSION})" >&5 +printf "%s\n" "ok (TEA ${TEA_VERSION})" >&6; } # If the user did not set CFLAGS, set it now to keep macros # like AC_PROG_CC and AC_TRY_COMPILE from adding "-g -O2". @@ -2268,11 +2646,12 @@ *win32*|*WIN32*|*MINGW32_*|*MINGW64_*|*MSYS_*) # Extract the first word of "cygpath", so it can be a program name with args. set dummy cygpath; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CYGPATH+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CYGPATH+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CYGPATH"; then ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test. else @@ -2280,11 +2659,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CYGPATH="cygpath -m" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2296,11 +2679,11 @@ fi CYGPATH=$ac_cv_prog_CYGPATH if test -n "$CYGPATH"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5 -$as_echo "$CYGPATH" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5 +printf "%s\n" "$CYGPATH" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -2336,8 +2719,8 @@ exec_prefix=$prefix fi - { $as_echo "$as_me:${as_lineno-$LINENO}: configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}" >&5 -$as_echo "$as_me: configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}" >&5 +printf "%s\n" "$as_me: configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}" >&6;} @@ -2366,11 +2749,12 @@ INSTALL_SCRIPT='${INSTALL} -m 755' - { $as_echo "$as_me:${as_lineno-$LINENO}: checking system version" >&5 -$as_echo_n "checking system version... " >&6; } -if ${tcl_cv_sys_version+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking system version" >&5 +printf %s "checking system version... " >&6; } +if test ${tcl_cv_sys_version+y} +then : + printf %s "(cached) " >&6 +else $as_nop # TEA specific: if test "${TEA_PLATFORM}" = "windows" ; then @@ -2378,8 +2762,8 @@ else tcl_cv_sys_version=`uname -s`-`uname -r` if test "$?" -ne 0 ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: can't find uname command" >&5 -$as_echo "$as_me: WARNING: can't find uname command" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: can't find uname command" >&5 +printf "%s\n" "$as_me: WARNING: can't find uname command" >&2;} tcl_cv_sys_version=unknown else if test "`uname -s`" = "AIX" ; then @@ -2392,8 +2776,8 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_sys_version" >&5 -$as_echo "$tcl_cv_sys_version" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_sys_version" >&5 +printf "%s\n" "$tcl_cv_sys_version" >&6; } system=$tcl_cv_sys_version case $system in @@ -2424,15 +2808,17 @@ no_tcl=true # Check whether --with-tcl was given. -if test "${with_tcl+set}" = set; then : +if test ${with_tcl+y} +then : withval=$with_tcl; with_tclconfig="${withval}" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5 -$as_echo_n "checking for Tcl configuration... " >&6; } - if ${ac_cv_c_tclconfig+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5 +printf %s "checking for Tcl configuration... " >&6; } + if test ${ac_cv_c_tclconfig+y} +then : + printf %s "(cached) " >&6 +else $as_nop # First check to see if --with-tcl was specified. @@ -2440,8 +2826,8 @@ case "${with_tclconfig}" in */tclConfig.sh ) if test -f "${with_tclconfig}"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&5 -$as_echo "$as_me: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&5 +printf "%s\n" "$as_me: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&2;} with_tclconfig="`echo "${with_tclconfig}" | sed 's!/tclConfig\.sh$!!'`" fi ;; esac @@ -2560,11 +2946,20 @@ else no_tcl= TCL_BIN_DIR="${ac_cv_c_tclconfig}" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5 -$as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5 +printf "%s\n" "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; } fi fi + + + + + + + + + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -2573,11 +2968,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -2585,11 +2981,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2600,11 +3000,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -2613,11 +3013,12 @@ ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -2625,11 +3026,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2640,11 +3045,11 @@ fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -2652,8 +3057,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -2666,11 +3071,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -2678,11 +3084,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2693,11 +3103,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -2706,11 +3116,12 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -2719,15 +3130,19 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2743,18 +3158,18 @@ # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -2765,11 +3180,12 @@ do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -2777,11 +3193,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2792,11 +3212,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -2809,11 +3229,12 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -2821,11 +3242,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2836,11 +3261,11 @@ fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -2852,8 +3277,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -2861,25 +3286,129 @@ fi fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. +set dummy ${ac_tool_prefix}clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "clang", so it can be a program name with args. +set dummy clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +fi + + +test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -for ac_option in --version -v -V -qversion; do +for ac_option in --version -v -V -qversion -version; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2889,7 +3418,7 @@ cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done @@ -2897,7 +3426,7 @@ /* end confdefs.h. */ int -main () +main (void) { ; @@ -2909,9 +3438,9 @@ # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest^ *//'` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +printf %s "checking whether the C compiler works... " >&6; } +ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest^ *//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" @@ -2932,11 +3461,12 @@ *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, @@ -2953,7 +3483,7 @@ # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '^.*\(\..*\)'` fi @@ -2969,44 +3499,46 @@ done test "$ac_cv_exeext" = no && ac_cv_exeext= -else +else $as_nop ac_file='' fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 +if test -z "$ac_file" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +printf %s "checking for C compiler default output file name... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +printf "%s\n" "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +printf %s "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -3020,15 +3552,15 @@ * ) break;; esac done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +printf "%s\n" "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext @@ -3037,7 +3569,7 @@ /* end confdefs.h. */ #include <stdio.h> int -main () +main (void) { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; @@ -3049,8 +3581,8 @@ ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +printf %s "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in @@ -3058,10 +3590,10 @@ *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in @@ -3069,39 +3601,40 @@ *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +printf "%s\n" "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +printf %s "checking for suffix of object files... " >&6; } +if test ${ac_cv_objext+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; @@ -3115,11 +3648,12 @@ *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in @@ -3128,31 +3662,32 @@ break;; esac done -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +printf "%s\n" "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 +printf %s "checking whether the compiler supports GNU C... " >&6; } +if test ${ac_cv_c_compiler_gnu+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { #ifndef __GNUC__ choke me @@ -3162,29 +3697,33 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_compiler_gnu=yes -else +else $as_nop ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } +ac_compiler_gnu=$ac_cv_c_compiler_gnu + if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi -ac_test_CFLAGS=${CFLAGS+set} +ac_test_CFLAGS=${CFLAGS+y} ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +printf %s "checking whether $CC accepts -g... " >&6; } +if test ${ac_cv_prog_cc_g+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no @@ -3193,57 +3732,60 @@ /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_g=yes -else +else $as_nop CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : -else +else $as_nop ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +printf "%s\n" "$ac_cv_prog_cc_g" >&6; } +if test $ac_test_CFLAGS; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then @@ -3258,94 +3800,144 @@ CFLAGS= fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no +ac_prog_cc_stdc=no +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 +printf %s "checking for $CC option to enable C11 features... " >&6; } +if test ${ac_cv_prog_cc_c11+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include <stdarg.h> -#include <stdio.h> -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return pi; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array '\x00' == 0 ? 1 : -1; +$ac_c_conftest_c11_program +_ACEOF +for ac_arg in '' -std=gnu11 +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c11=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c11" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_arrayFOO(a) == 'x' ? 1 : -1; +if test "x$ac_cv_prog_cc_c11" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c11" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 +printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } + CC="$CC $ac_cv_prog_cc_c11" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 + ac_prog_cc_stdc=c11 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 +printf %s "checking for $CC option to enable C99 features... " >&6; } +if test ${ac_cv_prog_cc_c99+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c99=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c99_program +_ACEOF +for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c99=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c99" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv0 || f (e, argv, 1) != argv1; - ; - return 0; -} +if test "x$ac_cv_prog_cc_c99" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c99" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } + CC="$CC $ac_cv_prog_cc_c99" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 + ac_prog_cc_stdc=c99 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 +printf %s "checking for $CC option to enable C89 features... " >&6; } +if test ${ac_cv_prog_cc_c89+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c89_program _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : + if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_c89=$ac_arg fi -rm -f core conftest.err conftest.$ac_objext +rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC - fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : +if test "x$ac_cv_prog_cc_c89" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c89" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } + CC="$CC $ac_cv_prog_cc_c89" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 + ac_prog_cc_stdc=c89 +fi fi ac_ext=c @@ -3356,16 +3948,16 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5 -$as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5 +printf %s "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; } if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 -$as_echo "loading" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: loading" >&5 +printf "%s\n" "loading" >&6; } . "${TCL_BIN_DIR}/tclConfig.sh" else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5 -$as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5 +printf "%s\n" "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } fi # If the TCL_BIN_DIR is the build directory (not the install directory), @@ -3414,14 +4006,14 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking platform" >&5 -$as_echo_n "checking platform... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking platform" >&5 +printf %s "checking platform... " >&6; } hold_cc=$CC; CC="$TCL_CC" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { #ifdef _WIN32 @@ -3432,22 +4024,24 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : # first test we've already retrieved platform (cross-compile), fallback to unix otherwise: TEA_PLATFORM="${TEA_PLATFORM-unix}" CYGPATH=echo -else +else $as_nop TEA_PLATFORM="windows" # Extract the first word of "cygpath", so it can be a program name with args. set dummy cygpath; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CYGPATH+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CYGPATH+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CYGPATH"; then ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test. else @@ -3455,11 +4049,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CYGPATH="cygpath -m" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3471,27 +4069,25 @@ fi CYGPATH=$ac_cv_prog_CYGPATH if test -n "$CYGPATH"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5 -$as_echo "$CYGPATH" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5 +printf "%s\n" "$CYGPATH" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CC=$hold_cc - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEA_PLATFORM" >&5 -$as_echo "$TEA_PLATFORM" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $TEA_PLATFORM" >&5 +printf "%s\n" "$TEA_PLATFORM" >&6; } # The BUILD_$pkg is to define the correct extern storage class # handling when making this package -cat >>confdefs.h <<_ACEOF -#define BUILD_${PACKAGE_NAME} /**/ -_ACEOF +printf "%s\n" "#define BUILD_${PACKAGE_NAME} /**/" >>confdefs.h # Do this here as we have fully defined TEA_PLATFORM now if test "${TEA_PLATFORM}" = "windows" ; then @@ -3513,45 +4109,151 @@ # Checks for libraries. # Checks for header files. +ac_header= ac_cache= +for ac_item in $ac_header_c_list +do + if test $ac_cache; then + ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" + if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then + printf "%s\n" "#define $ac_item 1" >> confdefs.h + fi + ac_header= ac_cache= + elif test $ac_header; then + ac_cache=$ac_item + else + ac_header=$ac_item + fi +done + + + + + + + + +if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes +then : + +printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default" +if test "x$ac_cv_header_fcntl_h" = xyes +then : + printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" +if test "x$ac_cv_header_unistd_h" = xyes +then : + printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default" +if test "x$ac_cv_header_errno_h" = xyes +then : + printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default" +if test "x$ac_cv_header_limits_h" = xyes +then : + printf "%s\n" "#define HAVE_LIMITS_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_types_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "pwd.h" "ac_cv_header_pwd_h" "$ac_includes_default" +if test "x$ac_cv_header_pwd_h" = xyes +then : + printf "%s\n" "#define HAVE_PWD_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "grp.h" "ac_cv_header_grp_h" "$ac_includes_default" +if test "x$ac_cv_header_grp_h" = xyes +then : + printf "%s\n" "#define HAVE_GRP_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" +if test "x$ac_cv_header_stdlib_h" = xyes +then : + printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default" +if test "x$ac_cv_header_stdio_h" = xyes +then : + printf "%s\n" "#define HAVE_STDIO_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "dirent.h" "ac_cv_header_dirent_h" "$ac_includes_default" +if test "x$ac_cv_header_dirent_h" = xyes +then : + printf "%s\n" "#define HAVE_DIRENT_H 1" >>confdefs.h + +fi +ac_fn_c_check_header_compile "$LINENO" "time.h" "ac_cv_header_time_h" "$ac_includes_default" +if test "x$ac_cv_header_time_h" = xyes +then : + printf "%s\n" "#define HAVE_TIME_H 1" >>confdefs.h + +fi + + +# Checks for typedefs, structures, and compiler characteristics. +ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" +if test "x$ac_cv_type_ssize_t" = xyes +then : + +else $as_nop + +printf "%s\n" "#define ssize_t int" >>confdefs.h + +fi + + +# Checks for library functions. ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +printf %s "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + if test ${ac_cv_prog_CPP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + # Double quotes because $CC needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. - # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - # <limits.h> exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif +#include <limits.h> Syntax error _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +if ac_fn_c_try_cpp "$LINENO" +then : -else +else $as_nop # Broken: fails on valid input. continue fi @@ -3563,10 +4265,11 @@ /* end confdefs.h. */ #include <ac_nonexistent.h> _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +if ac_fn_c_try_cpp "$LINENO" +then : # Broken: success on invalid input. continue -else +else $as_nop # Passes both tests. ac_preproc_ok=: break @@ -3576,7 +4279,8 @@ done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : +if $ac_preproc_ok +then : break fi @@ -3588,29 +4292,24 @@ else ac_cv_prog_CPP=$CPP fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +printf "%s\n" "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. - # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - # <limits.h> exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif +#include <limits.h> Syntax error _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +if ac_fn_c_try_cpp "$LINENO" +then : -else +else $as_nop # Broken: fails on valid input. continue fi @@ -3622,10 +4321,11 @@ /* end confdefs.h. */ #include <ac_nonexistent.h> _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +if ac_fn_c_try_cpp "$LINENO" +then : # Broken: success on invalid input. continue -else +else $as_nop # Passes both tests. ac_preproc_ok=: break @@ -3635,11 +4335,12 @@ done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : +if $ac_preproc_ok +then : -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi @@ -3651,11 +4352,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +printf %s "checking for grep that handles long lines and -e... " >&6; } +if test ${ac_cv_path_GREP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST @@ -3663,10 +4365,15 @@ for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in grep ggrep + do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + ac_path_GREP="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP @@ -3675,13 +4382,13 @@ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 - $as_echo_n 0123456789 >"conftest.in" + printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" + printf "%s\n" 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -3709,16 +4416,17 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +printf "%s\n" "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +printf %s "checking for egrep... " >&6; } +if test ${ac_cv_path_EGREP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else @@ -3729,10 +4437,15 @@ for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in egrep + do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP @@ -3741,13 +4454,13 @@ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 - $as_echo_n 0123456789 >"conftest.in" + printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" + printf "%s\n" 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -3776,206 +4489,53 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +printf "%s\n" "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdlib.h> -#include <stdarg.h> -#include <string.h> -#include <float.h> - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <string.h> - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdlib.h> - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <ctype.h> -#include <stdlib.h> -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in fcntl.h unistd.h errno.h limits.h sys/types.h pwd.h grp.h stdlib.h stdio.h dirent.h time.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -# Checks for typedefs, structures, and compiler characteristics. -ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" -if test "x$ac_cv_type_ssize_t" = xyes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define ssize_t int -_ACEOF - -fi - - -# Checks for library functions. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 -$as_echo_n "checking for uid_t in sys/types.h... " >&6; } -if ${ac_cv_type_uid_t+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 +printf %s "checking for uid_t in sys/types.h... " >&6; } +if test ${ac_cv_type_uid_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <sys/types.h> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "uid_t" >/dev/null 2>&1; then : + $EGREP "uid_t" >/dev/null 2>&1 +then : ac_cv_type_uid_t=yes -else +else $as_nop ac_cv_type_uid_t=no fi -rm -f conftest* +rm -rf conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 -$as_echo "$ac_cv_type_uid_t" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 +printf "%s\n" "$ac_cv_type_uid_t" >&6; } if test $ac_cv_type_uid_t = no; then -$as_echo "#define uid_t int" >>confdefs.h +printf "%s\n" "#define uid_t int" >>confdefs.h -$as_echo "#define gid_t int" >>confdefs.h +printf "%s\n" "#define gid_t int" >>confdefs.h fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5 -$as_echo_n "checking type of array argument to getgroups... " >&6; } -if ${ac_cv_type_getgroups+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5 +printf %s "checking type of array argument to getgroups... " >&6; } +if test ${ac_cv_type_getgroups+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : ac_cv_type_getgroups=cross -else +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Thanks to Mike Rendell for this test. */ @@ -3985,7 +4545,7 @@ #define MAX(x, y) ((x) > (y) ? (x) : (y)) int -main () +main (void) { gid_t gidsetNGID; int i, n; @@ -4002,9 +4562,10 @@ return n > 0 && gidsetn != val.gval; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_run "$LINENO" +then : ac_cv_type_getgroups=gid_t -else +else $as_nop ac_cv_type_getgroups=int fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -4018,36 +4579,111 @@ _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then : + $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1 +then : ac_cv_type_getgroups=gid_t -else +else $as_nop ac_cv_type_getgroups=int fi -rm -f conftest* +rm -rf conftest* fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5 -$as_echo "$ac_cv_type_getgroups" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5 +printf "%s\n" "$ac_cv_type_getgroups" >&6; } -cat >>confdefs.h <<_ACEOF -#define GETGROUPS_T $ac_cv_type_getgroups -_ACEOF +printf "%s\n" "#define GETGROUPS_T $ac_cv_type_getgroups" >>confdefs.h ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = xyes; then : +if test "x$ac_cv_type_size_t" = xyes +then : -else +else $as_nop -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF +printf "%s\n" "#define size_t unsigned int" >>confdefs.h fi + + + + # Make sure we can run config.sub. +$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +printf %s "checking build system type... " >&6; } +if test ${ac_cv_build+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +printf "%s\n" "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +printf %s "checking host system type... " >&6; } +if test ${ac_cv_host+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || + as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +printf "%s\n" "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups" -if test "x$ac_cv_func_getgroups" = xyes; then : +if test "x$ac_cv_func_getgroups" = xyes +then : fi @@ -4056,11 +4692,12 @@ # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1. ac_save_LIBS=$LIBS if test $ac_cv_func_getgroups = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5 -$as_echo_n "checking for getgroups in -lbsd... " >&6; } -if ${ac_cv_lib_bsd_getgroups+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5 +printf %s "checking for getgroups in -lbsd... " >&6; } +if test ${ac_cv_lib_bsd_getgroups+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4069,30 +4706,29 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char getgroups (); int -main () +main (void) { return getgroups (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bsd_getgroups=yes -else +else $as_nop ac_cv_lib_bsd_getgroups=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5 -$as_echo "$ac_cv_lib_bsd_getgroups" >&6; } -if test "x$ac_cv_lib_bsd_getgroups" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5 +printf "%s\n" "$ac_cv_lib_bsd_getgroups" >&6; } +if test "x$ac_cv_lib_bsd_getgroups" = xyes +then : GETGROUPS_LIB=-lbsd fi @@ -4101,19 +4737,26 @@ # Run the program to test the functionality of the system-supplied # getgroups function only if there is such a function. if test $ac_cv_func_getgroups = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5 -$as_echo_n "checking for working getgroups... " >&6; } -if ${ac_cv_func_getgroups_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_func_getgroups_works=no -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5 +printf %s "checking for working getgroups... " >&6; } +if test ${ac_cv_func_getgroups_works+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : + case "$host_os" in # (( + # Guess yes on glibc systems. + *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;; + # If we don't know, assume the worst. + *) ac_cv_func_getgroups_works="guessing no" ;; + esac +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int -main () +main (void) { /* On Ultrix 4.3, getgroups (0, 0) always fails. */ return getgroups (0, 0) == -1; @@ -4121,9 +4764,10 @@ return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_run "$LINENO" +then : ac_cv_func_getgroups_works=yes -else +else $as_nop ac_cv_func_getgroups_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -4132,22 +4776,25 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5 -$as_echo "$ac_cv_func_getgroups_works" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5 +printf "%s\n" "$ac_cv_func_getgroups_works" >&6; } else ac_cv_func_getgroups_works=no fi -if test $ac_cv_func_getgroups_works = yes; then +case "$ac_cv_func_getgroups_works" in + *yes) -$as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h +printf "%s\n" "#define HAVE_GETGROUPS 1" >>confdefs.h -fi + ;; +esac LIBS=$ac_save_LIBS ac_fn_c_check_func "$LINENO" "sysconf" "ac_cv_func_sysconf" -if test "x$ac_cv_func_sysconf" = xyes; then : +if test "x$ac_cv_func_sysconf" = xyes +then : -$as_echo "#define HAVE_SYSCONF 1" >>confdefs.h +printf "%s\n" "#define HAVE_SYSCONF 1" >>confdefs.h fi @@ -4165,11 +4812,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -4177,11 +4825,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4192,11 +4844,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -4205,11 +4857,12 @@ ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -4217,11 +4870,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4232,11 +4889,11 @@ fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -4244,8 +4901,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -4258,11 +4915,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -4270,11 +4928,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4285,11 +4947,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -4298,11 +4960,12 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -4311,15 +4974,19 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4335,18 +5002,18 @@ # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -4357,11 +5024,12 @@ do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -4369,11 +5037,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4384,11 +5056,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -4401,11 +5073,12 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -4413,11 +5086,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4428,11 +5105,11 @@ fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -4444,8 +5121,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -4453,25 +5130,129 @@ fi fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. +set dummy ${ac_tool_prefix}clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "clang", so it can be a program name with args. +set dummy clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +fi + + +test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -for ac_option in --version -v -V -qversion; do +for ac_option in --version -v -V -qversion -version; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -4481,20 +5262,21 @@ cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 +printf %s "checking whether the compiler supports GNU C... " >&6; } +if test ${ac_cv_c_compiler_gnu+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { #ifndef __GNUC__ choke me @@ -4504,29 +5286,33 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_compiler_gnu=yes -else +else $as_nop ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } +ac_compiler_gnu=$ac_cv_c_compiler_gnu + if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi -ac_test_CFLAGS=${CFLAGS+set} +ac_test_CFLAGS=${CFLAGS+y} ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +printf %s "checking whether $CC accepts -g... " >&6; } +if test ${ac_cv_prog_cc_g+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no @@ -4535,57 +5321,60 @@ /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_g=yes -else +else $as_nop CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : -else +else $as_nop ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +printf "%s\n" "$ac_cv_prog_cc_g" >&6; } +if test $ac_test_CFLAGS; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then @@ -4600,94 +5389,144 @@ CFLAGS= fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no +ac_prog_cc_stdc=no +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 +printf %s "checking for $CC option to enable C11 features... " >&6; } +if test ${ac_cv_prog_cc_c11+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include <stdarg.h> -#include <stdio.h> -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return pi; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array '\x00' == 0 ? 1 : -1; +$ac_c_conftest_c11_program +_ACEOF +for ac_arg in '' -std=gnu11 +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c11=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c11" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_arrayFOO(a) == 'x' ? 1 : -1; +if test "x$ac_cv_prog_cc_c11" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c11" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 +printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } + CC="$CC $ac_cv_prog_cc_c11" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 + ac_prog_cc_stdc=c11 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 +printf %s "checking for $CC option to enable C99 features... " >&6; } +if test ${ac_cv_prog_cc_c99+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c99=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c99_program +_ACEOF +for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c99=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c99" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv0 || f (e, argv, 1) != argv1; - ; - return 0; -} +if test "x$ac_cv_prog_cc_c99" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c99" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } + CC="$CC $ac_cv_prog_cc_c99" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 + ac_prog_cc_stdc=c99 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 +printf %s "checking for $CC option to enable C89 features... " >&6; } +if test ${ac_cv_prog_cc_c89+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c89_program _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : + if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_c89=$ac_arg fi -rm -f core conftest.err conftest.$ac_objext +rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC - fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : +if test "x$ac_cv_prog_cc_c89" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c89" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } + CC="$CC $ac_cv_prog_cc_c89" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 + ac_prog_cc_stdc=c89 +fi fi ac_ext=c @@ -4701,40 +5540,36 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +printf %s "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + if test ${ac_cv_prog_CPP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + # Double quotes because $CC needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. - # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - # <limits.h> exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif +#include <limits.h> Syntax error _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +if ac_fn_c_try_cpp "$LINENO" +then : -else +else $as_nop # Broken: fails on valid input. continue fi @@ -4746,10 +5581,11 @@ /* end confdefs.h. */ #include <ac_nonexistent.h> _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +if ac_fn_c_try_cpp "$LINENO" +then : # Broken: success on invalid input. continue -else +else $as_nop # Passes both tests. ac_preproc_ok=: break @@ -4759,7 +5595,8 @@ done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : +if $ac_preproc_ok +then : break fi @@ -4771,29 +5608,24 @@ else ac_cv_prog_CPP=$CPP fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +printf "%s\n" "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. - # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - # <limits.h> exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif +#include <limits.h> Syntax error _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +if ac_fn_c_try_cpp "$LINENO" +then : -else +else $as_nop # Broken: fails on valid input. continue fi @@ -4805,10 +5637,11 @@ /* end confdefs.h. */ #include <ac_nonexistent.h> _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +if ac_fn_c_try_cpp "$LINENO" +then : # Broken: success on invalid input. continue -else +else $as_nop # Passes both tests. ac_preproc_ok=: break @@ -4818,11 +5651,12 @@ done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : +if $ac_preproc_ok +then : -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi @@ -4838,13 +5672,14 @@ # Checks to see if the make program sets the $MAKE variable. #-------------------------------------------------------------------- - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/^a-zA-Z0-9_/_/g'` -if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : - $as_echo_n "(cached) " >&6 -else +ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/^a-zA-Z0-9_/_/g'` +if eval test \${ac_cv_prog_make_${ac_make}_set+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @@ -4860,12 +5695,12 @@ rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } SET_MAKE= else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -4877,11 +5712,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_RANLIB+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else @@ -4889,11 +5725,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4904,11 +5744,11 @@ fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +printf "%s\n" "$RANLIB" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -4917,11 +5757,12 @@ ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_RANLIB+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else @@ -4929,11 +5770,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4944,11 +5789,11 @@ fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +printf "%s\n" "$ac_ct_RANLIB" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then @@ -4956,8 +5801,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB @@ -4984,34 +5829,36 @@ #------------------------------------------------------------------------ if test -z "$no_pipe" -a -n "$GCC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler understands -pipe" >&5 -$as_echo_n "checking if the compiler understands -pipe... " >&6; } -if ${tcl_cv_cc_pipe+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the compiler understands -pipe" >&5 +printf %s "checking if the compiler understands -pipe... " >&6; } +if test ${tcl_cv_cc_pipe+y} +then : + printf %s "(cached) " >&6 +else $as_nop hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : tcl_cv_cc_pipe=yes -else +else $as_nop tcl_cv_cc_pipe=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CFLAGS=$hold_cflags fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_pipe" >&5 -$as_echo "$tcl_cv_cc_pipe" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_pipe" >&5 +printf "%s\n" "$tcl_cv_cc_pipe" >&6; } if test $tcl_cv_cc_pipe = yes; then CFLAGS="$CFLAGS -pipe" fi @@ -5021,11 +5868,12 @@ # Common compiler flag setup #-------------------------------------------------------------------- - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 -$as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if ${ac_cv_c_bigendian+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 +printf %s "checking whether byte ordering is bigendian... " >&6; } +if test ${ac_cv_c_bigendian+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5036,7 +5884,8 @@ typedef int dummy; _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. @@ -5060,7 +5909,7 @@ fi done fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5069,7 +5918,7 @@ #include <sys/param.h> int -main () +main (void) { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ @@ -5081,7 +5930,8 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5089,7 +5939,7 @@ #include <sys/param.h> int -main () +main (void) { #if BYTE_ORDER != BIG_ENDIAN not big endian @@ -5099,14 +5949,15 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_c_bigendian=yes -else +else $as_nop ac_cv_c_bigendian=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). @@ -5115,7 +5966,7 @@ #include <limits.h> int -main () +main (void) { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros @@ -5125,14 +5976,15 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : # It does; now see whether it defined to _BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <limits.h> int -main () +main (void) { #ifndef _BIG_ENDIAN not big endian @@ -5142,31 +5994,33 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_c_bigendian=yes -else +else $as_nop ac_cv_c_bigendian=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. - if test "$cross_compiling" = yes; then : + if test "$cross_compiling" = yes +then : # Try to guess by grepping values from an object file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -short int ascii_mm = +unsigned short int ascii_mm = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; - short int ascii_ii = + unsigned short int ascii_ii = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mmi + ascii_iii; } - short int ebcdic_ii = + unsigned short int ebcdic_ii = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; - short int ebcdic_mm = + unsigned short int ebcdic_mm = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mmi + ebcdic_iii; @@ -5174,14 +6028,15 @@ extern int foo; int -main () +main (void) { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi @@ -5194,13 +6049,13 @@ fi fi fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int -main () +main (void) { /* Are we little or big endian? From Harbison&Steele. */ @@ -5216,9 +6071,10 @@ return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_run "$LINENO" +then : ac_cv_c_bigendian=no -else +else $as_nop ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -5227,17 +6083,17 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 -$as_echo "$ac_cv_c_bigendian" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 +printf "%s\n" "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) - $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h + printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h ;; #( no) ;; #( universal) -$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h +printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) @@ -5247,19 +6103,21 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl public headers" >&5 -$as_echo_n "checking for Tcl public headers... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Tcl public headers" >&5 +printf %s "checking for Tcl public headers... " >&6; } # Check whether --with-tclinclude was given. -if test "${with_tclinclude+set}" = set; then : +if test ${with_tclinclude+y} +then : withval=$with_tclinclude; with_tclinclude=${withval} fi - if ${ac_cv_c_tclh+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test ${ac_cv_c_tclh+y} +then : + printf %s "(cached) " >&6 +else $as_nop # Use the value from --with-tclinclude, if it was given @@ -5318,8 +6176,8 @@ if test x"${ac_cv_c_tclh}" = x ; then as_fn_error $? "tcl.h not found. Please specify its location with --with-tclinclude" "$LINENO" 5 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_c_tclh}" >&5 -$as_echo "${ac_cv_c_tclh}" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_c_tclh}" >&5 +printf "%s\n" "${ac_cv_c_tclh}" >&6; } fi # Convert to a native path and substitute into the output files. @@ -5333,11 +6191,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_RANLIB+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else @@ -5345,11 +6204,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5360,11 +6223,11 @@ fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +printf "%s\n" "$RANLIB" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -5373,11 +6236,12 @@ ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_RANLIB+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else @@ -5385,11 +6249,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5400,11 +6268,11 @@ fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +printf "%s\n" "$ac_ct_RANLIB" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then @@ -5412,8 +6280,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB @@ -5427,44 +6295,48 @@ # Step 0.a: Enable 64 bit support? - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 64bit support is requested" >&5 -$as_echo_n "checking if 64bit support is requested... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if 64bit support is requested" >&5 +printf %s "checking if 64bit support is requested... " >&6; } # Check whether --enable-64bit was given. -if test "${enable_64bit+set}" = set; then : +if test ${enable_64bit+y} +then : enableval=$enable_64bit; do64bit=$enableval -else +else $as_nop do64bit=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $do64bit" >&5 -$as_echo "$do64bit" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $do64bit" >&5 +printf "%s\n" "$do64bit" >&6; } # Step 0.b: Enable Solaris 64 bit VIS support? - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 64bit Sparc VIS support is requested" >&5 -$as_echo_n "checking if 64bit Sparc VIS support is requested... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if 64bit Sparc VIS support is requested" >&5 +printf %s "checking if 64bit Sparc VIS support is requested... " >&6; } # Check whether --enable-64bit-vis was given. -if test "${enable_64bit_vis+set}" = set; then : +if test ${enable_64bit_vis+y} +then : enableval=$enable_64bit_vis; do64bitVIS=$enableval -else +else $as_nop do64bitVIS=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $do64bitVIS" >&5 -$as_echo "$do64bitVIS" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $do64bitVIS" >&5 +printf "%s\n" "$do64bitVIS" >&6; } # Force 64bit on with VIS - if test "$do64bitVIS" = "yes"; then : + if test "$do64bitVIS" = "yes" +then : do64bit=yes fi # Step 0.c: Check if visibility support is available. Do this here so # that platform specific alternatives can be used below if this fails. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports visibility \"hidden\"" >&5 -$as_echo_n "checking if compiler supports visibility \"hidden\"... " >&6; } -if ${tcl_cv_cc_visibility_hidden+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler supports visibility \"hidden\"" >&5 +printf %s "checking if compiler supports visibility \"hidden\"... " >&6; } +if test ${tcl_cv_cc_visibility_hidden+y} +then : + printf %s "(cached) " >&6 +else $as_nop hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5473,58 +6345,62 @@ extern __attribute__((__visibility__("hidden"))) void f(void); void f(void) {} int -main () +main (void) { f(); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : tcl_cv_cc_visibility_hidden=yes -else +else $as_nop tcl_cv_cc_visibility_hidden=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_visibility_hidden" >&5 -$as_echo "$tcl_cv_cc_visibility_hidden" >&6; } - if test $tcl_cv_cc_visibility_hidden = yes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_visibility_hidden" >&5 +printf "%s\n" "$tcl_cv_cc_visibility_hidden" >&6; } + if test $tcl_cv_cc_visibility_hidden = yes +then : -$as_echo "#define MODULE_SCOPE extern __attribute__((__visibility__(\"hidden\")))" >>confdefs.h +printf "%s\n" "#define MODULE_SCOPE extern __attribute__((__visibility__(\"hidden\")))" >>confdefs.h -$as_echo "#define HAVE_HIDDEN 1" >>confdefs.h +printf "%s\n" "#define HAVE_HIDDEN 1" >>confdefs.h fi # Step 0.d: Disable -rpath support? - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if rpath support is requested" >&5 -$as_echo_n "checking if rpath support is requested... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if rpath support is requested" >&5 +printf %s "checking if rpath support is requested... " >&6; } # Check whether --enable-rpath was given. -if test "${enable_rpath+set}" = set; then : +if test ${enable_rpath+y} +then : enableval=$enable_rpath; doRpath=$enableval -else +else $as_nop doRpath=yes fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $doRpath" >&5 -$as_echo "$doRpath" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $doRpath" >&5 +printf "%s\n" "$doRpath" >&6; } # Set the variable "system" to hold the name and version number # for the system. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking system version" >&5 -$as_echo_n "checking system version... " >&6; } -if ${tcl_cv_sys_version+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking system version" >&5 +printf %s "checking system version... " >&6; } +if test ${tcl_cv_sys_version+y} +then : + printf %s "(cached) " >&6 +else $as_nop # TEA specific: if test "${TEA_PLATFORM}" = "windows" ; then @@ -5532,8 +6408,8 @@ else tcl_cv_sys_version=`uname -s`-`uname -r` if test "$?" -ne 0 ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: can't find uname command" >&5 -$as_echo "$as_me: WARNING: can't find uname command" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: can't find uname command" >&5 +printf "%s\n" "$as_me: WARNING: can't find uname command" >&2;} tcl_cv_sys_version=unknown else if test "`uname -s`" = "AIX" ; then @@ -5546,8 +6422,8 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_sys_version" >&5 -$as_echo "$tcl_cv_sys_version" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_sys_version" >&5 +printf "%s\n" "$tcl_cv_sys_version" >&6; } system=$tcl_cv_sys_version @@ -5572,12 +6448,13 @@ ECHO_VERSION='`echo ${PACKAGE_VERSION}`' TCL_LIB_VERSIONS_OK=ok CFLAGS_DEBUG=-g - if test "$GCC" = yes; then : + if test "$GCC" = yes +then : CFLAGS_OPTIMIZE=-O2 CFLAGS_WARNING="-Wall" -else +else $as_nop CFLAGS_OPTIMIZE=-O CFLAGS_WARNING="" @@ -5586,11 +6463,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_AR+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else @@ -5598,11 +6476,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AR="${ac_tool_prefix}ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5613,11 +6495,11 @@ fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +printf "%s\n" "$AR" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -5626,11 +6508,12 @@ ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_AR+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else @@ -5638,11 +6521,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5653,11 +6540,11 @@ fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +printf "%s\n" "$ac_ct_AR" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_AR" = x; then @@ -5665,8 +6552,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR @@ -5677,9 +6564,10 @@ STLIB_LD='${AR} cr' LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH" - if test "x$SHLIB_VERSION" = x; then : + if test "x$SHLIB_VERSION" = x +then : SHLIB_VERSION="" -else +else $as_nop SHLIB_VERSION=".$SHLIB_VERSION" fi case $system in @@ -5756,11 +6644,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. set dummy ${ac_tool_prefix}windres; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_RC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$RC"; then ac_cv_prog_RC="$RC" # Let the user override the test. else @@ -5768,11 +6657,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_RC="${ac_tool_prefix}windres" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5783,11 +6676,11 @@ fi RC=$ac_cv_prog_RC if test -n "$RC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5 -$as_echo "$RC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RC" >&5 +printf "%s\n" "$RC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -5796,11 +6689,12 @@ ac_ct_RC=$RC # Extract the first word of "windres", so it can be a program name with args. set dummy windres; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_RC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_RC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_RC"; then ac_cv_prog_ac_ct_RC="$ac_ct_RC" # Let the user override the test. else @@ -5808,11 +6702,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RC="windres" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5823,11 +6721,11 @@ fi ac_ct_RC=$ac_cv_prog_ac_ct_RC if test -n "$ac_ct_RC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RC" >&5 -$as_echo "$ac_ct_RC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RC" >&5 +printf "%s\n" "$ac_ct_RC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_RC" = x; then @@ -5835,8 +6733,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RC=$ac_ct_RC @@ -5852,11 +6750,12 @@ LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}" LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cross-compile version of gcc" >&5 -$as_echo_n "checking for cross-compile version of gcc... " >&6; } -if ${ac_cv_cross+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cross-compile version of gcc" >&5 +printf %s "checking for cross-compile version of gcc... " >&6; } +if test ${ac_cv_cross+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5865,23 +6764,24 @@ #endif int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_cross=yes -else +else $as_nop ac_cv_cross=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cross" >&5 -$as_echo "$ac_cv_cross" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cross" >&5 +printf "%s\n" "$ac_cv_cross" >&6; } if test "$ac_cv_cross" = "yes"; then case "$do64bit" in amd64|x64|yes) @@ -5924,7 +6824,8 @@ TCL_LIB_VERSIONS_OK=nodots ;; AIX-*) - if test "$GCC" != "yes"; then : + if test "$GCC" != "yes" +then : # AIX requires the _r compiler when gcc isn't being used case "${CC}" in @@ -5936,8 +6837,8 @@ CC=`echo "$CC" | sed -e 's/^\(^ *\)/\1_r/'` ;; esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using $CC for compiling with threads" >&5 -$as_echo "Using $CC for compiling with threads" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using $CC for compiling with threads" >&5 +printf "%s\n" "Using $CC for compiling with threads" >&6; } fi LIBS="$LIBS -lc" @@ -5947,14 +6848,16 @@ LD_LIBRARY_PATH_VAR="LIBPATH" # Check to enable 64-bit flags for compiler/linker - if test "$do64bit" = yes; then : + if test "$do64bit" = yes +then : - if test "$GCC" = yes; then : + if test "$GCC" = yes +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5 -$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5 +printf "%s\n" "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;} -else +else $as_nop do64bit_ok=yes CFLAGS="$CFLAGS -q64" @@ -5967,28 +6870,31 @@ fi - if test "`uname -m`" = ia64; then : + if test "`uname -m`" = ia64 +then : # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC SHLIB_LD="/usr/ccs/bin/ld -G -z text" - if test "$GCC" = yes; then : + if test "$GCC" = yes +then : CC_SEARCH_FLAGS='"-Wl,-R,${LIB_RUNTIME_DIR}"' -else +else $as_nop CC_SEARCH_FLAGS='"-R${LIB_RUNTIME_DIR}"' fi LD_SEARCH_FLAGS='-R "${LIB_RUNTIME_DIR}"' -else +else $as_nop - if test "$GCC" = yes; then : + if test "$GCC" = yes +then : SHLIB_LD='${CC} -shared -Wl,-bexpall' -else +else $as_nop SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bexpall -H512 -T512 -bnoentry" LDFLAGS="$LDFLAGS -brtl" @@ -6010,11 +6916,12 @@ # -lsocket, even if the network functions are in -lnet which # is always linked to, for compatibility. #----------------------------------------------------------- - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lbind" >&5 -$as_echo_n "checking for inet_ntoa in -lbind... " >&6; } -if ${ac_cv_lib_bind_inet_ntoa+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lbind" >&5 +printf %s "checking for inet_ntoa in -lbind... " >&6; } +if test ${ac_cv_lib_bind_inet_ntoa+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lbind $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6023,30 +6930,29 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char inet_ntoa (); int -main () +main (void) { return inet_ntoa (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_bind_inet_ntoa=yes -else +else $as_nop ac_cv_lib_bind_inet_ntoa=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind_inet_ntoa" >&5 -$as_echo "$ac_cv_lib_bind_inet_ntoa" >&6; } -if test "x$ac_cv_lib_bind_inet_ntoa" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind_inet_ntoa" >&5 +printf "%s\n" "$ac_cv_lib_bind_inet_ntoa" >&6; } +if test "x$ac_cv_lib_bind_inet_ntoa" = xyes +then : LIBS="$LIBS -lbind -lsocket" fi @@ -6089,11 +6995,12 @@ SHLIB_CFLAGS="-fPIC" SHLIB_SUFFIX=".so" SHLIB_LD='${CC} ${CFLAGS} ${LDFLAGS} -shared' - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lnetwork" >&5 -$as_echo_n "checking for inet_ntoa in -lnetwork... " >&6; } -if ${ac_cv_lib_network_inet_ntoa+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inet_ntoa in -lnetwork" >&5 +printf %s "checking for inet_ntoa in -lnetwork... " >&6; } +if test ${ac_cv_lib_network_inet_ntoa+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lnetwork $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6102,30 +7009,29 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char inet_ntoa (); int -main () +main (void) { return inet_ntoa (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_network_inet_ntoa=yes -else +else $as_nop ac_cv_lib_network_inet_ntoa=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_inet_ntoa" >&5 -$as_echo "$ac_cv_lib_network_inet_ntoa" >&6; } -if test "x$ac_cv_lib_network_inet_ntoa" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_inet_ntoa" >&5 +printf "%s\n" "$ac_cv_lib_network_inet_ntoa" >&6; } +if test "x$ac_cv_lib_network_inet_ntoa" = xyes +then : LIBS="$LIBS -lnetwork" fi @@ -6133,26 +7039,28 @@ HP-UX-*.11.*) # Use updated header definitions where possible -$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h +printf "%s\n" "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h # TEA specific: Needed by Tcl, but not most extensions #AC_DEFINE(_XOPEN_SOURCE, 1, Do we want to use the XOPEN network library?) #LIBS="$LIBS -lxnet" # Use the XOPEN network library - if test "`uname -m`" = ia64; then : + if test "`uname -m`" = ia64 +then : SHLIB_SUFFIX=".so" -else +else $as_nop SHLIB_SUFFIX=".sl" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if ${ac_cv_lib_dld_shl_load+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +printf %s "checking for shl_load in -ldld... " >&6; } +if test ${ac_cv_lib_dld_shl_load+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6161,36 +7069,36 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char shl_load (); int -main () +main (void) { return shl_load (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dld_shl_load=yes -else +else $as_nop ac_cv_lib_dld_shl_load=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = xyes +then : tcl_ok=yes -else +else $as_nop tcl_ok=no fi - if test "$tcl_ok" = yes; then : + if test "$tcl_ok" = yes +then : SHLIB_CFLAGS="+z" SHLIB_LD="ld -b" @@ -6200,40 +7108,44 @@ LD_LIBRARY_PATH_VAR="SHLIB_PATH" fi - if test "$GCC" = yes; then : + if test "$GCC" = yes +then : SHLIB_LD='${CC} -shared' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} -else +else $as_nop CFLAGS="$CFLAGS -z" fi # Check to enable 64-bit flags for compiler/linker - if test "$do64bit" = "yes"; then : + if test "$do64bit" = "yes" +then : - if test "$GCC" = yes; then : + if test "$GCC" = yes +then : case `${CC} -dumpmachine` in hppa64*) # 64-bit gcc in use. Fix flags for GNU ld. do64bit_ok=yes SHLIB_LD='${CC} -shared' - if test $doRpath = yes; then : + if test $doRpath = yes +then : CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"' fi LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} ;; *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5 -$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5 +printf "%s\n" "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;} ;; esac -else +else $as_nop do64bit_ok=yes CFLAGS="$CFLAGS +DD64" @@ -6244,11 +7156,12 @@ fi ;; HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*) SHLIB_SUFFIX=".sl" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if ${ac_cv_lib_dld_shl_load+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +printf %s "checking for shl_load in -ldld... " >&6; } +if test ${ac_cv_lib_dld_shl_load+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6257,36 +7170,36 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char shl_load (); int -main () +main (void) { return shl_load (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dld_shl_load=yes -else +else $as_nop ac_cv_lib_dld_shl_load=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = xyes +then : tcl_ok=yes -else +else $as_nop tcl_ok=no fi - if test "$tcl_ok" = yes; then : + if test "$tcl_ok" = yes +then : SHLIB_CFLAGS="+z" SHLIB_LD="ld -b" @@ -6307,7 +7220,8 @@ ;; esac - if test $doRpath = yes; then : + if test $doRpath = yes +then : CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"' LD_SEARCH_FLAGS='-rpath "${LIB_RUNTIME_DIR}"' @@ -6317,17 +7231,19 @@ SHLIB_CFLAGS="" SHLIB_LD="ld -n32 -shared -rdata_shared" SHLIB_SUFFIX=".so" - if test $doRpath = yes; then : + if test $doRpath = yes +then : CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"' LD_SEARCH_FLAGS='-rpath "${LIB_RUNTIME_DIR}"' fi - if test "$GCC" = yes; then : + if test "$GCC" = yes +then : CFLAGS="$CFLAGS -mabi=n32" LDFLAGS="$LDFLAGS -mabi=n32" -else +else $as_nop case $system in IRIX-6.3) @@ -6346,7 +7262,8 @@ SHLIB_CFLAGS="" SHLIB_LD="ld -n32 -shared -rdata_shared" SHLIB_SUFFIX=".so" - if test $doRpath = yes; then : + if test $doRpath = yes +then : CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"' LD_SEARCH_FLAGS='-rpath "${LIB_RUNTIME_DIR}"' @@ -6354,14 +7271,16 @@ # Check to enable 64-bit flags for compiler/linker - if test "$do64bit" = yes; then : + if test "$do64bit" = yes +then : - if test "$GCC" = yes; then : + if test "$GCC" = yes +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported by gcc" >&5 -$as_echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported by gcc" >&5 +printf "%s\n" "$as_me: WARNING: 64bit mode not supported by gcc" >&2;} -else +else $as_nop do64bit_ok=yes SHLIB_LD="ld -64 -shared -rdata_shared" @@ -6385,7 +7304,8 @@ case $system in DragonFly-*|FreeBSD-*) - if test "${TCL_THREADS}" = "1"; then : + if test "${TCL_THREADS}" = "1" +then : # The -pthread needs to go in the LDFLAGS, not LIBS LIBS=`echo $LIBS | sed s/-pthread//` @@ -6395,21 +7315,25 @@ ;; esac - if test $doRpath = yes; then : + if test $doRpath = yes +then : CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"' fi LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} - if test "`uname -m`" = "alpha"; then : + if test "`uname -m`" = "alpha" +then : CFLAGS="$CFLAGS -mieee" fi - if test $do64bit = yes; then : + if test $do64bit = yes +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -m64 flag" >&5 -$as_echo_n "checking if compiler accepts -m64 flag... " >&6; } -if ${tcl_cv_cc_m64+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -m64 flag" >&5 +printf %s "checking if compiler accepts -m64 flag... " >&6; } +if test ${tcl_cv_cc_m64+y} +then : + printf %s "(cached) " >&6 +else $as_nop hold_cflags=$CFLAGS CFLAGS="$CFLAGS -m64" @@ -6417,25 +7341,27 @@ /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : tcl_cv_cc_m64=yes -else +else $as_nop tcl_cv_cc_m64=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_m64" >&5 -$as_echo "$tcl_cv_cc_m64" >&6; } - if test $tcl_cv_cc_m64 = yes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_m64" >&5 +printf "%s\n" "$tcl_cv_cc_m64" >&6; } + if test $tcl_cv_cc_m64 = yes +then : CFLAGS="$CFLAGS -m64" do64bit_ok=yes @@ -6450,7 +7376,8 @@ # of overkill but it works. Disable inlining only when one of the # files in compat/*.c is being linked in. - if test x"${USE_COMPAT}" != x; then : + if test x"${USE_COMPAT}" != x +then : CFLAGS="$CFLAGS -fno-inline" fi ;; @@ -6460,7 +7387,8 @@ CFLAGS_OPTIMIZE=-02 SHLIB_LD='${CC} -shared' LD_FLAGS="-Wl,--export-dynamic" - if test $doRpath = yes; then : + if test $doRpath = yes +then : CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"' LD_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"' @@ -6478,7 +7406,8 @@ esac SHLIB_LD='${CC} ${SHLIB_CFLAGS} -shared' SHLIB_SUFFIX=".so" - if test $doRpath = yes; then : + if test $doRpath = yes +then : CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"' fi @@ -6500,7 +7429,8 @@ SHLIB_LD='${CC} ${SHLIB_CFLAGS} -shared' SHLIB_SUFFIX=".so" LDFLAGS="$LDFLAGS -export-dynamic" - if test $doRpath = yes; then : + if test $doRpath = yes +then : CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"' fi @@ -6522,15 +7452,17 @@ CFLAGS="`echo " ${CFLAGS}" | \ awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \ if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`" - if test $do64bit = yes; then : + if test $do64bit = yes +then : case `arch` in ppc) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch ppc64 flag" >&5 -$as_echo_n "checking if compiler accepts -arch ppc64 flag... " >&6; } -if ${tcl_cv_cc_arch_ppc64+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch ppc64 flag" >&5 +printf %s "checking if compiler accepts -arch ppc64 flag... " >&6; } +if test ${tcl_cv_cc_arch_ppc64+y} +then : + printf %s "(cached) " >&6 +else $as_nop hold_cflags=$CFLAGS CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" @@ -6538,36 +7470,39 @@ /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : tcl_cv_cc_arch_ppc64=yes -else +else $as_nop tcl_cv_cc_arch_ppc64=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_ppc64" >&5 -$as_echo "$tcl_cv_cc_arch_ppc64" >&6; } - if test $tcl_cv_cc_arch_ppc64 = yes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_ppc64" >&5 +printf "%s\n" "$tcl_cv_cc_arch_ppc64" >&6; } + if test $tcl_cv_cc_arch_ppc64 = yes +then : CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5" do64bit_ok=yes fi;; i386) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch x86_64 flag" >&5 -$as_echo_n "checking if compiler accepts -arch x86_64 flag... " >&6; } -if ${tcl_cv_cc_arch_x86_64+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch x86_64 flag" >&5 +printf %s "checking if compiler accepts -arch x86_64 flag... " >&6; } +if test ${tcl_cv_cc_arch_x86_64+y} +then : + printf %s "(cached) " >&6 +else $as_nop hold_cflags=$CFLAGS CFLAGS="$CFLAGS -arch x86_64" @@ -6575,40 +7510,43 @@ /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : tcl_cv_cc_arch_x86_64=yes -else +else $as_nop tcl_cv_cc_arch_x86_64=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_x86_64" >&5 -$as_echo "$tcl_cv_cc_arch_x86_64" >&6; } - if test $tcl_cv_cc_arch_x86_64 = yes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_x86_64" >&5 +printf "%s\n" "$tcl_cv_cc_arch_x86_64" >&6; } + if test $tcl_cv_cc_arch_x86_64 = yes +then : CFLAGS="$CFLAGS -arch x86_64" do64bit_ok=yes fi;; *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5 -$as_echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5 +printf "%s\n" "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};; esac -else +else $as_nop # Check for combined 32-bit and 64-bit fat build if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \ - && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '; then : + && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) ' +then : fat_32_64=yes fi @@ -6616,11 +7554,12 @@ fi # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}' - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -single_module flag" >&5 -$as_echo_n "checking if ld accepts -single_module flag... " >&6; } -if ${tcl_cv_ld_single_module+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ld accepts -single_module flag" >&5 +printf %s "checking if ld accepts -single_module flag... " >&6; } +if test ${tcl_cv_ld_single_module+y} +then : + printf %s "(cached) " >&6 +else $as_nop hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module" @@ -6628,25 +7567,27 @@ /* end confdefs.h. */ int -main () +main (void) { int i; ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : tcl_cv_ld_single_module=yes -else +else $as_nop tcl_cv_ld_single_module=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_single_module" >&5 -$as_echo "$tcl_cv_ld_single_module" >&6; } - if test $tcl_cv_ld_single_module = yes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_single_module" >&5 +printf "%s\n" "$tcl_cv_ld_single_module" >&6; } + if test $tcl_cv_ld_single_module = yes +then : SHLIB_LD="${SHLIB_LD} -Wl,-single_module" @@ -6656,11 +7597,12 @@ SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}" SHLIB_SUFFIX=".dylib" LDFLAGS="$LDFLAGS -headerpad_max_install_names" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld accepts -search_paths_first flag" >&5 -$as_echo_n "checking if ld accepts -search_paths_first flag... " >&6; } -if ${tcl_cv_ld_search_paths_first+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ld accepts -search_paths_first flag" >&5 +printf %s "checking if ld accepts -search_paths_first flag... " >&6; } +if test ${tcl_cv_ld_search_paths_first+y} +then : + printf %s "(cached) " >&6 +else $as_nop hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,-search_paths_first" @@ -6668,33 +7610,36 @@ /* end confdefs.h. */ int -main () +main (void) { int i; ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : tcl_cv_ld_search_paths_first=yes -else +else $as_nop tcl_cv_ld_search_paths_first=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_search_paths_first" >&5 -$as_echo "$tcl_cv_ld_search_paths_first" >&6; } - if test $tcl_cv_ld_search_paths_first = yes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_search_paths_first" >&5 +printf "%s\n" "$tcl_cv_ld_search_paths_first" >&6; } + if test $tcl_cv_ld_search_paths_first = yes +then : LDFLAGS="$LDFLAGS -Wl,-search_paths_first" fi - if test "$tcl_cv_cc_visibility_hidden" != yes; then : + if test "$tcl_cv_cc_visibility_hidden" != yes +then : -$as_echo "#define MODULE_SCOPE __private_extern__" >>confdefs.h +printf "%s\n" "#define MODULE_SCOPE __private_extern__" >>confdefs.h tcl_cv_cc_visibility_hidden=yes @@ -6704,15 +7649,18 @@ LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH" # TEA specific: for combined 32 & 64 bit fat builds of Tk # extensions, verify that 64-bit build is possible. - if test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"; then : + if test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}" +then : - if test "${TEA_WINDOWINGSYSTEM}" = x11; then : + if test "${TEA_WINDOWINGSYSTEM}" = x11 +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit X11" >&5 -$as_echo_n "checking for 64-bit X11... " >&6; } -if ${tcl_cv_lib_x11_64+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit X11" >&5 +printf %s "checking for 64-bit X11... " >&6; } +if test ${tcl_cv_lib_x11_64+y} +then : + printf %s "(cached) " >&6 +else $as_nop for v in CFLAGS CPPFLAGS LDFLAGS; do eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"' @@ -6723,35 +7671,38 @@ /* end confdefs.h. */ #include <X11/Xlib.h> int -main () +main (void) { XrmInitialize(); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : tcl_cv_lib_x11_64=yes -else +else $as_nop tcl_cv_lib_x11_64=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext for v in CFLAGS CPPFLAGS LDFLAGS; do eval $v'="$hold_'$v'"' done fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_x11_64" >&5 -$as_echo "$tcl_cv_lib_x11_64" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_x11_64" >&5 +printf "%s\n" "$tcl_cv_lib_x11_64" >&6; } fi - if test "${TEA_WINDOWINGSYSTEM}" = aqua; then : + if test "${TEA_WINDOWINGSYSTEM}" = aqua +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit Tk" >&5 -$as_echo_n "checking for 64-bit Tk... " >&6; } -if ${tcl_cv_lib_tk_64+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit Tk" >&5 +printf %s "checking for 64-bit Tk... " >&6; } +if test ${tcl_cv_lib_tk_64+y} +then : + printf %s "(cached) " >&6 +else $as_nop for v in CFLAGS CPPFLAGS LDFLAGS; do eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"' @@ -6762,34 +7713,36 @@ /* end confdefs.h. */ #include <tk.h> int -main () +main (void) { Tk_InitStubs(NULL, "", 0); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : tcl_cv_lib_tk_64=yes -else +else $as_nop tcl_cv_lib_tk_64=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext for v in CFLAGS CPPFLAGS LDFLAGS; do eval $v'="$hold_'$v'"' done fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_tk_64" >&5 -$as_echo "$tcl_cv_lib_tk_64" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_lib_tk_64" >&5 +printf "%s\n" "$tcl_cv_lib_tk_64" >&6; } fi # remove 64-bit arch flags from CFLAGS et al. if configuration # does not support 64-bit. - if test "$tcl_cv_lib_tk_64" = no -o "$tcl_cv_lib_x11_64" = no; then : + if test "$tcl_cv_lib_tk_64" = no -o "$tcl_cv_lib_x11_64" = no +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: Removing 64-bit architectures from compiler & linker flags" >&5 -$as_echo "$as_me: Removing 64-bit architectures from compiler & linker flags" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Removing 64-bit architectures from compiler & linker flags" >&5 +printf "%s\n" "$as_me: Removing 64-bit architectures from compiler & linker flags" >&6;} for v in CFLAGS CPPFLAGS LDFLAGS; do eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"' done @@ -6800,30 +7753,33 @@ OS/390-*) CFLAGS_OPTIMIZE="" # Optimizer is buggy -$as_echo "#define _OE_SOCKETS 1" >>confdefs.h +printf "%s\n" "#define _OE_SOCKETS 1" >>confdefs.h ;; OSF1-V*) # Digital OSF/1 SHLIB_CFLAGS="" - if test "$SHARED_BUILD" = 1; then : + if test "$SHARED_BUILD" = 1 +then : SHLIB_LD='ld -shared -expect_unresolved "*"' -else +else $as_nop SHLIB_LD='ld -non_shared -expect_unresolved "*"' fi SHLIB_SUFFIX=".so" - if test $doRpath = yes; then : + if test $doRpath = yes +then : CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"' LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' fi - if test "$GCC" = yes; then : + if test "$GCC" = yes +then : CFLAGS="$CFLAGS -mieee" -else +else $as_nop CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee" fi @@ -6831,11 +7787,12 @@ CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE" CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64" LIBS=`echo $LIBS | sed s/-lpthreads//` - if test "$GCC" = yes; then : + if test "$GCC" = yes +then : LIBS="$LIBS -lpthread -lmach -lexc" -else +else $as_nop CFLAGS="$CFLAGS -pthread" LDFLAGS="$LDFLAGS -pthread" @@ -6853,12 +7810,13 @@ LD_SEARCH_FLAGS="" ;; SCO_SV-3.2*) - if test "$GCC" = yes; then : + if test "$GCC" = yes +then : SHLIB_CFLAGS="-fPIC -melf" LDFLAGS="$LDFLAGS -melf -Wl,-Bexport" -else +else $as_nop SHLIB_CFLAGS="-Kpic -belf" LDFLAGS="$LDFLAGS -belf -Wl,-Bexport" @@ -6877,21 +7835,22 @@ # won't define thread-safe library routines. -$as_echo "#define _REENTRANT 1" >>confdefs.h +printf "%s\n" "#define _REENTRANT 1" >>confdefs.h -$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h +printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h SHLIB_CFLAGS="-KPIC" SHLIB_SUFFIX=".so" - if test "$GCC" = yes; then : + if test "$GCC" = yes +then : SHLIB_LD='${CC} -shared' CC_SEARCH_FLAGS='"-Wl,-R,${LIB_RUNTIME_DIR}"' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} -else +else $as_nop SHLIB_LD="/usr/ccs/bin/ld -G -z text" CC_SEARCH_FLAGS='-R "${LIB_RUNTIME_DIR}"' @@ -6904,28 +7863,32 @@ # won't define thread-safe library routines. -$as_echo "#define _REENTRANT 1" >>confdefs.h +printf "%s\n" "#define _REENTRANT 1" >>confdefs.h -$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h +printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h SHLIB_CFLAGS="-KPIC" # Check to enable 64-bit flags for compiler/linker - if test "$do64bit" = yes; then : + if test "$do64bit" = yes +then : arch=`isainfo` - if test "$arch" = "sparcv9 sparc"; then : + if test "$arch" = "sparcv9 sparc" +then : - if test "$GCC" = yes; then : + if test "$GCC" = yes +then : - if test "`${CC} -dumpversion | awk -F. '{print $1}'`" -lt 3; then : + if test "`${CC} -dumpversion | awk -F. '{print $1}'`" -lt 3 +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5 -$as_echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5 +printf "%s\n" "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;} -else +else $as_nop do64bit_ok=yes CFLAGS="$CFLAGS -m64 -mcpu=v9" @@ -6934,15 +7897,16 @@ fi -else +else $as_nop do64bit_ok=yes - if test "$do64bitVIS" = yes; then : + if test "$do64bitVIS" = yes +then : CFLAGS="$CFLAGS -xarch=v9a" LDFLAGS_ARCH="-xarch=v9a" -else +else $as_nop CFLAGS="$CFLAGS -xarch=v9" LDFLAGS_ARCH="-xarch=v9" @@ -6953,10 +7917,12 @@ fi -else - if test "$arch" = "amd64 i386"; then : +else $as_nop + if test "$arch" = "amd64 i386" +then : - if test "$GCC" = yes; then : + if test "$GCC" = yes +then : case $system in SunOS-5.11-9*|SunOS-5.2-90-9*) @@ -6964,11 +7930,11 @@ CFLAGS="$CFLAGS -m64" LDFLAGS="$LDFLAGS -m64";; *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5 -$as_echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;};; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported with GCC on $system" >&5 +printf "%s\n" "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;};; esac -else +else $as_nop do64bit_ok=yes case $system in @@ -6982,23 +7948,26 @@ fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported for $arch" >&5 -$as_echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;} +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 64bit mode not supported for $arch" >&5 +printf "%s\n" "$as_me: WARNING: 64bit mode not supported for $arch" >&2;} fi fi fi SHLIB_SUFFIX=".so" - if test "$GCC" = yes; then : + if test "$GCC" = yes +then : SHLIB_LD='${CC} -shared' CC_SEARCH_FLAGS='"-Wl,-R,${LIB_RUNTIME_DIR}"' LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} - if test "$do64bit_ok" = yes; then : + if test "$do64bit_ok" = yes +then : - if test "$arch" = "sparcv9 sparc"; then : + if test "$arch" = "sparcv9 sparc" +then : # We need to specify -static-libgcc or we need to # add the path to the sparv9 libgcc. @@ -7010,8 +7979,9 @@ #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..." #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir" -else - if test "$arch" = "amd64 i386"; then : +else $as_nop + if test "$arch" = "amd64 i386" +then : # JH: static-libgcc is necessary for core Tcl, but may # not be necessary for extensions. @@ -7022,7 +7992,7 @@ fi -else +else $as_nop case $system in SunOS-5.1-90-9*) @@ -7043,11 +8013,12 @@ SHLIB_SUFFIX=".so" # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers # that don't grok the -Bexport option. Test that it does. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld accepts -Bexport flag" >&5 -$as_echo_n "checking for ld accepts -Bexport flag... " >&6; } -if ${tcl_cv_ld_Bexport+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld accepts -Bexport flag" >&5 +printf %s "checking for ld accepts -Bexport flag... " >&6; } +if test ${tcl_cv_ld_Bexport+y} +then : + printf %s "(cached) " >&6 +else $as_nop hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,-Bexport" @@ -7055,25 +8026,27 @@ /* end confdefs.h. */ int -main () +main (void) { int i; ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : tcl_cv_ld_Bexport=yes -else +else $as_nop tcl_cv_ld_Bexport=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$hold_ldflags fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_Bexport" >&5 -$as_echo "$tcl_cv_ld_Bexport" >&6; } - if test $tcl_cv_ld_Bexport = yes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_Bexport" >&5 +printf "%s\n" "$tcl_cv_ld_Bexport" >&6; } + if test $tcl_cv_ld_Bexport = yes +then : LDFLAGS="$LDFLAGS -Wl,-Bexport" @@ -7083,10 +8056,11 @@ ;; esac - if test "$do64bit" = yes -a "$do64bit_ok" = no; then : + if test "$do64bit" = yes -a "$do64bit_ok" = no +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5 -$as_echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5 +printf "%s\n" "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;} fi @@ -7100,7 +8074,8 @@ # libraries to the right flags for gcc, instead of those for the # standard manufacturer compiler. - if test "$GCC" = yes; then : + if test "$GCC" = yes +then : case $system in AIX-*) ;; @@ -7115,34 +8090,39 @@ esac fi - if test "$tcl_cv_cc_visibility_hidden" != yes; then : + if test "$tcl_cv_cc_visibility_hidden" != yes +then : -$as_echo "#define MODULE_SCOPE extern" >>confdefs.h +printf "%s\n" "#define MODULE_SCOPE extern" >>confdefs.h fi - if test "$SHARED_LIB_SUFFIX" = ""; then : + if test "$SHARED_LIB_SUFFIX" = "" +then : # TEA specific: use PACKAGE_VERSION instead of VERSION SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}' fi - if test "$UNSHARED_LIB_SUFFIX" = ""; then : + if test "$UNSHARED_LIB_SUFFIX" = "" +then : # TEA specific: use PACKAGE_VERSION instead of VERSION UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a' fi if test "${GCC}" = "yes" -a ${SHLIB_SUFFIX} = ".dll"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SEH support in compiler" >&5 -$as_echo_n "checking for SEH support in compiler... " >&6; } -if ${tcl_cv_seh+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SEH support in compiler" >&5 +printf %s "checking for SEH support in compiler... " >&6; } +if test ${tcl_cv_seh+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test "$cross_compiling" = yes +then : tcl_cv_seh=no -else +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -7162,9 +8142,10 @@ } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_run "$LINENO" +then : tcl_cv_seh=yes -else +else $as_nop tcl_cv_seh=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -7173,11 +8154,11 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_seh" >&5 -$as_echo "$tcl_cv_seh" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_seh" >&5 +printf "%s\n" "$tcl_cv_seh" >&6; } if test "$tcl_cv_seh" = "no" ; then -$as_echo "#define HAVE_NO_SEH 1" >>confdefs.h +printf "%s\n" "#define HAVE_NO_SEH 1" >>confdefs.h fi @@ -7187,11 +8168,12 @@ # with Cygwin's version as of 2002-04-10, define it to be int, # sufficient for getting the current code to work. # - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXCEPTION_DISPOSITION support in include files" >&5 -$as_echo_n "checking for EXCEPTION_DISPOSITION support in include files... " >&6; } -if ${tcl_cv_eh_disposition+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EXCEPTION_DISPOSITION support in include files" >&5 +printf %s "checking for EXCEPTION_DISPOSITION support in include files... " >&6; } +if test ${tcl_cv_eh_disposition+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -7200,7 +8182,7 @@ # undef WIN32_LEAN_AND_MEAN int -main () +main (void) { EXCEPTION_DISPOSITION x; @@ -7209,19 +8191,20 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : tcl_cv_eh_disposition=yes -else +else $as_nop tcl_cv_eh_disposition=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_eh_disposition" >&5 -$as_echo "$tcl_cv_eh_disposition" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_eh_disposition" >&5 +printf "%s\n" "$tcl_cv_eh_disposition" >&6; } if test "$tcl_cv_eh_disposition" = "no" ; then -$as_echo "#define EXCEPTION_DISPOSITION int" >>confdefs.h +printf "%s\n" "#define EXCEPTION_DISPOSITION int" >>confdefs.h fi @@ -7229,11 +8212,12 @@ # even if VOID has already been #defined. The win32api # used by mingw and cygwin is known to do this. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winnt.h that ignores VOID define" >&5 -$as_echo_n "checking for winnt.h that ignores VOID define... " >&6; } -if ${tcl_cv_winnt_ignore_void+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for winnt.h that ignores VOID define" >&5 +printf %s "checking for winnt.h that ignores VOID define... " >&6; } +if test ${tcl_cv_winnt_ignore_void+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -7243,7 +8227,7 @@ #undef WIN32_LEAN_AND_MEAN int -main () +main (void) { CHAR c; @@ -7254,19 +8238,20 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : tcl_cv_winnt_ignore_void=yes -else +else $as_nop tcl_cv_winnt_ignore_void=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_winnt_ignore_void" >&5 -$as_echo "$tcl_cv_winnt_ignore_void" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_winnt_ignore_void" >&5 +printf "%s\n" "$tcl_cv_winnt_ignore_void" >&6; } if test "$tcl_cv_winnt_ignore_void" = "yes" ; then -$as_echo "#define HAVE_WINNT_IGNORE_VOID 1" >>confdefs.h +printf "%s\n" "#define HAVE_WINNT_IGNORE_VOID 1" >>confdefs.h fi fi @@ -7275,16 +8260,17 @@ # This is used to stop gcc from printing a compiler # warning when initializing a union member. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cast to union support" >&5 -$as_echo_n "checking for cast to union support... " >&6; } -if ${tcl_cv_cast_to_union+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cast to union support" >&5 +printf %s "checking for cast to union support... " >&6; } +if test ${tcl_cv_cast_to_union+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { union foo { int i; double d; }; @@ -7294,26 +8280,28 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : tcl_cv_cast_to_union=yes -else +else $as_nop tcl_cv_cast_to_union=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cast_to_union" >&5 -$as_echo "$tcl_cv_cast_to_union" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cast_to_union" >&5 +printf "%s\n" "$tcl_cv_cast_to_union" >&6; } if test "$tcl_cv_cast_to_union" = "yes"; then -$as_echo "#define HAVE_CAST_TO_UNION 1" >>confdefs.h +printf "%s\n" "#define HAVE_CAST_TO_UNION 1" >>confdefs.h fi - ac_fn_c_check_header_mongrel "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default" -if test "x$ac_cv_header_stdbool_h" = xyes; then : + ac_fn_c_check_header_compile "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default" +if test "x$ac_cv_header_stdbool_h" = xyes +then : -$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h +printf "%s\n" "#define HAVE_STDBOOL_H 1" >>confdefs.h fi @@ -7332,168 +8320,177 @@ - # These must be called after we do the basic CFLAGS checks and # verify any possible 64-bit or similar switches are necessary - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for required early compiler flags" >&5 -$as_echo_n "checking for required early compiler flags... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for required early compiler flags" >&5 +printf %s "checking for required early compiler flags... " >&6; } tcl_flags="" - if ${tcl_cv_flag__isoc99_source+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test ${tcl_cv_flag__isoc99_source+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdlib.h> int -main () +main (void) { char *p = (char *)strtoll; char *q = (char *)strtoull; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : tcl_cv_flag__isoc99_source=no -else +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _ISOC99_SOURCE 1 #include <stdlib.h> int -main () +main (void) { char *p = (char *)strtoll; char *q = (char *)strtoull; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : tcl_cv_flag__isoc99_source=yes -else +else $as_nop tcl_cv_flag__isoc99_source=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then -$as_echo "#define _ISOC99_SOURCE 1" >>confdefs.h +printf "%s\n" "#define _ISOC99_SOURCE 1" >>confdefs.h tcl_flags="$tcl_flags _ISOC99_SOURCE" fi - if ${tcl_cv_flag__largefile64_source+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test ${tcl_cv_flag__largefile64_source+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <sys/stat.h> int -main () +main (void) { struct stat64 buf; int i = stat64("/", &buf); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : tcl_cv_flag__largefile64_source=no -else +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGEFILE64_SOURCE 1 #include <sys/stat.h> int -main () +main (void) { struct stat64 buf; int i = stat64("/", &buf); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : tcl_cv_flag__largefile64_source=yes -else +else $as_nop tcl_cv_flag__largefile64_source=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then -$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h +printf "%s\n" "#define _LARGEFILE64_SOURCE 1" >>confdefs.h tcl_flags="$tcl_flags _LARGEFILE64_SOURCE" fi - if ${tcl_cv_flag__largefile_source64+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test ${tcl_cv_flag__largefile_source64+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <sys/stat.h> int -main () +main (void) { char *p = (char *)open64; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : tcl_cv_flag__largefile_source64=no -else +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGEFILE_SOURCE64 1 #include <sys/stat.h> int -main () +main (void) { char *p = (char *)open64; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : tcl_cv_flag__largefile_source64=yes -else +else $as_nop tcl_cv_flag__largefile_source64=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then -$as_echo "#define _LARGEFILE_SOURCE64 1" >>confdefs.h +printf "%s\n" "#define _LARGEFILE_SOURCE64 1" >>confdefs.h tcl_flags="$tcl_flags _LARGEFILE_SOURCE64" fi if test "x${tcl_flags}" = "x" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5 +printf "%s\n" "none" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${tcl_flags}" >&5 -$as_echo "${tcl_flags}" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${tcl_flags}" >&5 +printf "%s\n" "${tcl_flags}" >&6; } fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit integer type" >&5 -$as_echo_n "checking for 64-bit integer type... " >&6; } - if ${tcl_cv_type_64bit+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit integer type" >&5 +printf %s "checking for 64-bit integer type... " >&6; } + if test ${tcl_cv_type_64bit+y} +then : + printf %s "(cached) " >&6 +else $as_nop tcl_cv_type_64bit=none # See if the compiler knows natively about __int64 @@ -7501,19 +8498,20 @@ /* end confdefs.h. */ int -main () +main (void) { __int64 value = (__int64) 0; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : tcl_type_64bit=__int64 -else +else $as_nop tcl_type_64bit="long long" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext # See if we could use long anyway Note that we substitute in the # type that is our current guess for a 64-bit type inside this check # program, so it should be modified only carefully... @@ -7521,7 +8519,7 @@ /* end confdefs.h. */ int -main () +main (void) { switch (0) { case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ; @@ -7530,79 +8528,81 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : tcl_cv_type_64bit=${tcl_type_64bit} fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test "${tcl_cv_type_64bit}" = none ; then -$as_echo "#define TCL_WIDE_INT_IS_LONG 1" >>confdefs.h +printf "%s\n" "#define TCL_WIDE_INT_IS_LONG 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } elif test "${tcl_cv_type_64bit}" = "__int64" \ -a "${TEA_PLATFORM}" = "windows" ; then # TEA specific: We actually want to use the default tcl.h checks in # this case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: using Tcl header defaults" >&5 -$as_echo "using Tcl header defaults" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using Tcl header defaults" >&5 +printf "%s\n" "using Tcl header defaults" >&6; } else -cat >>confdefs.h <<_ACEOF -#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit} -_ACEOF +printf "%s\n" "#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${tcl_cv_type_64bit}" >&5 -$as_echo "${tcl_cv_type_64bit}" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${tcl_cv_type_64bit}" >&5 +printf "%s\n" "${tcl_cv_type_64bit}" >&6; } # Now check for auxiliary declarations - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent64" >&5 -$as_echo_n "checking for struct dirent64... " >&6; } -if ${tcl_cv_struct_dirent64+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct dirent64" >&5 +printf %s "checking for struct dirent64... " >&6; } +if test ${tcl_cv_struct_dirent64+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <sys/types.h> #include <dirent.h> int -main () +main (void) { struct dirent64 p; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : tcl_cv_struct_dirent64=yes -else +else $as_nop tcl_cv_struct_dirent64=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_dirent64" >&5 -$as_echo "$tcl_cv_struct_dirent64" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_dirent64" >&5 +printf "%s\n" "$tcl_cv_struct_dirent64" >&6; } if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then -$as_echo "#define HAVE_STRUCT_DIRENT64 1" >>confdefs.h +printf "%s\n" "#define HAVE_STRUCT_DIRENT64 1" >>confdefs.h fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIR64" >&5 -$as_echo_n "checking for DIR64... " >&6; } -if ${tcl_cv_DIR64+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for DIR64" >&5 +printf %s "checking for DIR64... " >&6; } +if test ${tcl_cv_DIR64+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <sys/types.h> #include <dirent.h> int -main () +main (void) { struct dirent64 *p; DIR64 d = opendir64("."); p = readdir64(d); rewinddir64(d); closedir64(d); @@ -7610,32 +8610,34 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : tcl_cv_DIR64=yes -else +else $as_nop tcl_cv_DIR64=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_DIR64" >&5 -$as_echo "$tcl_cv_DIR64" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_DIR64" >&5 +printf "%s\n" "$tcl_cv_DIR64" >&6; } if test "x${tcl_cv_DIR64}" = "xyes" ; then -$as_echo "#define HAVE_DIR64 1" >>confdefs.h +printf "%s\n" "#define HAVE_DIR64 1" >>confdefs.h fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct stat64" >&5 -$as_echo_n "checking for struct stat64... " >&6; } -if ${tcl_cv_struct_stat64+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct stat64" >&5 +printf %s "checking for struct stat64... " >&6; } +if test ${tcl_cv_struct_stat64+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <sys/stat.h> int -main () +main (void) { struct stat64 p; @@ -7643,44 +8645,47 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : tcl_cv_struct_stat64=yes -else +else $as_nop tcl_cv_struct_stat64=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_stat64" >&5 -$as_echo "$tcl_cv_struct_stat64" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_struct_stat64" >&5 +printf "%s\n" "$tcl_cv_struct_stat64" >&6; } if test "x${tcl_cv_struct_stat64}" = "xyes" ; then -$as_echo "#define HAVE_STRUCT_STAT64 1" >>confdefs.h +printf "%s\n" "#define HAVE_STRUCT_STAT64 1" >>confdefs.h fi - for ac_func in open64 lseek64 -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF + ac_fn_c_check_func "$LINENO" "open64" "ac_cv_func_open64" +if test "x$ac_cv_func_open64" = xyes +then : + printf "%s\n" "#define HAVE_OPEN64 1" >>confdefs.h fi -done +ac_fn_c_check_func "$LINENO" "lseek64" "ac_cv_func_lseek64" +if test "x$ac_cv_func_lseek64" = xyes +then : + printf "%s\n" "#define HAVE_LSEEK64 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for off64_t" >&5 -$as_echo_n "checking for off64_t... " >&6; } - if ${tcl_cv_type_off64_t+:} false; then : - $as_echo_n "(cached) " >&6 -else +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for off64_t" >&5 +printf %s "checking for off64_t... " >&6; } + if test ${tcl_cv_type_off64_t+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <sys/types.h> int -main () +main (void) { off64_t offset; @@ -7688,51 +8693,53 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : tcl_cv_type_off64_t=yes -else +else $as_nop tcl_cv_type_off64_t=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test "x${tcl_cv_type_off64_t}" = "xyes" && \ test "x${ac_cv_func_lseek64}" = "xyes" && \ test "x${ac_cv_func_open64}" = "xyes" ; then -$as_echo "#define HAVE_TYPE_OFF64_T 1" >>confdefs.h +printf "%s\n" "#define HAVE_TYPE_OFF64_T 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build with symbols" >&5 -$as_echo_n "checking for build with symbols... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for build with symbols" >&5 +printf %s "checking for build with symbols... " >&6; } # Check whether --enable-symbols was given. -if test "${enable_symbols+set}" = set; then : +if test ${enable_symbols+y} +then : enableval=$enable_symbols; tcl_ok=$enableval -else +else $as_nop tcl_ok=no fi if test "$tcl_ok" = "no"; then CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE} -DNDEBUG" LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } else CFLAGS_DEFAULT="${CFLAGS_DEBUG}" LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}" if test "$tcl_ok" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (standard debugging)" >&5 -$as_echo "yes (standard debugging)" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes (standard debugging)" >&5 +printf "%s\n" "yes (standard debugging)" >&6; } fi fi @@ -7740,17 +8747,17 @@ if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then -$as_echo "#define TCL_MEM_DEBUG 1" >>confdefs.h +printf "%s\n" "#define TCL_MEM_DEBUG 1" >>confdefs.h fi if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then if test "$tcl_ok" = "all"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled symbols mem debugging" >&5 -$as_echo "enabled symbols mem debugging" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: enabled symbols mem debugging" >&5 +printf "%s\n" "enabled symbols mem debugging" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled $tcl_ok debugging" >&5 -$as_echo "enabled $tcl_ok debugging" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: enabled $tcl_ok debugging" >&5 +printf "%s\n" "enabled $tcl_ok debugging" >&6; } fi fi @@ -7767,7 +8774,8 @@ _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "manifest needed" >/dev/null 2>&1; then : + $EGREP "manifest needed" >/dev/null 2>&1 +then : # Could do a CHECK_PROG for mt, but should always be with MSVC8+ VC_MANIFEST_EMBED_DLL="if test -f \$@.manifest ; then mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;2 ; fi" @@ -7778,7 +8786,7 @@ fi -rm -f conftest* +rm -rf conftest* MAKE_STUB_LIB="\${STLIB_LD} -nodefaultlib -out:\$@ \$(PKG_STUB_OBJECTS)" else @@ -7857,12 +8865,13 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to build libraries" >&5 -$as_echo_n "checking how to build libraries... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to build libraries" >&5 +printf %s "checking how to build libraries... " >&6; } # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : +if test ${enable_shared+y} +then : enableval=$enable_shared; shared_ok=$enableval -else +else $as_nop shared_ok=yes fi @@ -7875,9 +8884,10 @@ fi # Check whether --enable-stubs was given. -if test "${enable_stubs+set}" = set; then : +if test ${enable_stubs+y} +then : enableval=$enable_stubs; stubs_ok=$enableval -else +else $as_nop stubs_ok=yes fi @@ -7891,16 +8901,16 @@ # Stubs are always enabled for shared builds if test "$shared_ok" = "yes" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: shared" >&5 -$as_echo "shared" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: shared" >&5 +printf "%s\n" "shared" >&6; } SHARED_BUILD=1 STUBS_BUILD=1 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5 -$as_echo "static" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: static" >&5 +printf "%s\n" "static" >&6; } SHARED_BUILD=0 -$as_echo "#define STATIC_BUILD 1" >>confdefs.h +printf "%s\n" "#define STATIC_BUILD 1" >>confdefs.h if test "$stubs_ok" = "yes" ; then STUBS_BUILD=1 @@ -7910,14 +8920,14 @@ fi if test "${STUBS_BUILD}" = "1" ; then -$as_echo "#define USE_TCL_STUBS 1" >>confdefs.h +printf "%s\n" "#define USE_TCL_STUBS 1" >>confdefs.h -$as_echo "#define USE_TCLOO_STUBS 1" >>confdefs.h +printf "%s\n" "#define USE_TCLOO_STUBS 1" >>confdefs.h if test "${TEA_WINDOWINGSYSTEM}" != ""; then -$as_echo "#define USE_TK_STUBS 1" >>confdefs.h +printf "%s\n" "#define USE_TK_STUBS 1" >>confdefs.h fi fi @@ -7964,8 +8974,8 @@ case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -7995,15 +9005,15 @@ /^ac_cv_env_/b end t clear :clear - s/^\(^=*\)=\(.*{}.*\)$/test "${\1+set}" = set || &/ + s/^\(^=*\)=\(.*{}.*\)$/test ${\1+y} || &/ t end s/^\(^=*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +printf "%s\n" "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else @@ -8017,8 +9027,8 @@ fi fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -8035,7 +9045,7 @@ for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" @@ -8053,8 +9063,8 @@ ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL @@ -8077,14 +9087,16 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +as_nop=: +if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else +else $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -8094,46 +9106,46 @@ fi + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi +if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then +if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -8142,13 +9154,6 @@ fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -8157,8 +9162,12 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS @@ -8170,30 +9179,10 @@ as_myself=$0 fi if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR LINENO LOG_FD @@ -8206,13 +9195,14 @@ as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $2" >&2 + printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error + # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -8239,18 +9229,20 @@ { eval $1=; unset $1;} } as_unset=as_fn_unset + # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null +then : eval 'as_fn_append () { eval $1+=\$2 }' -else +else $as_nop as_fn_append () { eval $1=\$$1\$2 @@ -8262,12 +9254,13 @@ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else +else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` @@ -8298,7 +9291,7 @@ $as_expr X/"$0" : '.*/\(^/^/*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +printf "%s\n" X/"$0" | sed '/^.*\/\(^/^/*\)\/*$/{ s//\1/ q @@ -8320,6 +9313,10 @@ as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits + +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -8333,6 +9330,12 @@ ECHO_N='-n';; esac +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO("message") and AS_ECHO_N("message"), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' + rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -8374,7 +9377,7 @@ as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -8383,7 +9386,7 @@ X"$as_dir" : 'X\(//\)^/' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | +printf "%s\n" X"$as_dir" | sed '/^X\(.*^/\)\/\/*^/^/*\/*$/{ s//\1/ q @@ -8445,8 +9448,8 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Envmodules $as_me 1.4.0, which was -generated by GNU Autoconf 2.69. Invocation command line was +This file was extended by Envmodules $as_me 1.4.1, which was +generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -8505,14 +9508,16 @@ Envmodules home page: <http://modules.sf.net>." _ACEOF +ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` +ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/\\""\`\$/\\\\&/g'`" +ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Envmodules config.status 1.4.0 -configured by $0, generated by GNU Autoconf 2.69, +Envmodules config.status 1.4.1 +configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) 2021 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -8549,15 +9554,15 @@ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; + printf "%s\n" "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; + printf "%s\n" "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" @@ -8565,7 +9570,7 @@ --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; @@ -8574,7 +9579,7 @@ as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; + printf "%s\n" "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; @@ -8602,7 +9607,7 @@ if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" @@ -8616,7 +9621,7 @@ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - $as_echo "$ac_log" + printf "%s\n" "$ac_log" } >&5 _ACEOF @@ -8642,8 +9647,8 @@ # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files + test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers fi # Have a temporary directory for convenience. Make it in the build tree @@ -8979,7 +9984,7 @@ esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done @@ -8987,17 +9992,17 @@ # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` - $as_echo "$*" | sed 's|^^:*/||;s|:^:*/|, |g' + printf "%s\n" "$*" | sed 's|^^:*/||;s|:^:*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +printf "%s\n" "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | + ac_sed_conf_input=`printf "%s\n" "$configure_input" | sed 's/\\\\&|/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac @@ -9014,7 +10019,7 @@ X"$ac_file" : 'X\(//\)^/' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | +printf "%s\n" X"$ac_file" | sed '/^X\(.*^/\)\/\/*^/^/*\/*$/{ s//\1/ q @@ -9038,9 +10043,9 @@ case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.\\/||'` + ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.\\/||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/^\\/*|/..|g;s|/||'` + ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/^\\/*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -9093,8 +10098,8 @@ case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' @@ -9136,9 +10141,9 @@ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^ *datarootdir *:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" @@ -9154,20 +10159,20 @@ # if test x"$ac_file" != x-; then { - $as_echo "/* $configure_input */" \ + printf "%s\n" "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +printf "%s\n" "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else - $as_echo "/* $configure_input */" \ + printf "%s\n" "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi @@ -9208,7 +10213,8 @@ $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi +
View file
_service:tar_scm:modules-5.0.1.tar.bz2/lib/configure.ac -> _service:tar_scm:modules-5.1.1.tar.bz2/lib/configure.ac
Changed
@@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.69) -AC_INIT(Envmodules,1.4.0,modules-interest@lists.sourceforge.net,,http://modules.sf.net) +AC_INIT(Envmodules,1.4.1,modules-interest@lists.sourceforge.net,,http://modules.sf.net) AC_CONFIG_SRCDIR(envmodules.c) AC_CONFIG_HEADERS(config.h)
View file
_service:tar_scm:modules-5.0.1.tar.bz2/lib/envmodules.c -> _service:tar_scm:modules-5.1.1.tar.bz2/lib/envmodules.c
Changed
@@ -1,7 +1,7 @@ /************************************************************************* * * ENVMODULES.C, Modules Tcl extension library - * Copyright (C) 2018-2021 Xavier Delaruelle + * Copyright (C) 2018-2022 Xavier Delaruelle * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -352,7 +352,15 @@ /* Get actually configured number of groups */ #if defined(HAVE_SYSCONF) && defined(_SC_NGROUPS_MAX) - maxgroups = sysconf(_SC_NGROUPS_MAX); + errno = 0; + // just -1 means 'no limit' so errno must checked as well + if ((maxgroups = sysconf(_SC_NGROUPS_MAX)) == -1 && errno != 0) { + Tcl_SetErrno(errno); + Tcl_SetObjResult(interp, + Tcl_ObjPrintf("couldn't get NGROUPS_MAX variable: %s", + Tcl_PosixError(interp))); + return TCL_ERROR; + } #else # if defined(NGROUPS_MAX) maxgroups = NGROUPS_MAX;
View file
_service:tar_scm:modules-5.1.1.tar.bz2/lib/testutil-sysconf.c
Added
@@ -0,0 +1,30 @@ +/************************************************************************* + * + * TESTUTIL-SYSCONF.C, Superseded sysconf function for test purpose + * Copyright (C) 2020-2022 Xavier Delaruelle + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + ************************************************************************/ + +#include <unistd.h> +#include <errno.h> + +long sysconf(int name) +{ + errno = 1; + return -1; +} + +/* vim:set tabstop=3 shiftwidth=3 expandtab autoindent: */
View file
_service:tar_scm:modules-5.0.1.tar.bz2/site.exp.in -> _service:tar_scm:modules-5.1.1.tar.bz2/site.exp.in
Changed
@@ -93,6 +93,10 @@ set install_editor "@editor@" +set install_bashcompletiondir "@bashcompletiondir@" +set install_fishcompletiondir "@fishcompletiondir@" +set install_zshcompletiondir "@zshcompletiondir@" + # command location set install_tclsh "@TCLSH@" set install_python "@PYTHON@"
View file
_service:tar_scm:modules-5.1.1.tar.bz2/tcl/coll.tcl.in
Added
@@ -0,0 +1,309 @@ +########################################################################## + +# COLL.TCL, collection management procedures +# Copyright (C) 2016-2022 Xavier Delaruelle +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +########################################################################## + +# build list of what to undo then do to move from an initial list to a target +# list, eventually checking element presence in extra from/to lists +proc getMovementBetweenList {from to {extfrom {}} {extto {}} {cmp eq}} { + reportDebug "from($from) to($to) with extfrom($extfrom) extto($extto)" + + set undo {} + set do {} + + # determine what element to undo then do + # to restore a target list from a current list + # with preservation of the element order + set imax if {llength $to > llength $from} {llength $to} {llength\ + $from} + set list_equal 1 + for {set i 0} {$i < $imax} {incr i} { + set to_obj lindex $to $i + set from_obj lindex $from $i + # check from/to element presence in extra from/to list + set in_extfrom expr {$from_obj in $extfrom} + set in_extto expr {$to_obj in $extto} + # are elts the sames and are both part of or missing from extra lists + # when comparing modules, ask comparison against loaded module + # alternative and simplified names (modEq will also compare variants) + if {($cmp eq {modeq} && !modEq $to_obj $from_obj equal 1 3 1) ||\ + ($cmp eq {eq} && $to_obj ne $from_obj) || $in_extfrom != $in_extto} { + set list_equal 0 + } + if {$list_equal == 0} { + if {$to_obj ne {}} { + lappend do $to_obj + } + if {$from_obj ne {}} { + lappend undo $from_obj + } + } + } + + return list $undo $do +} + +# build list of currently loaded modules where modulename is registered minus +# module version if loaded version is the default one +proc getSimplifiedLoadedModuleList {} { + set curr_mod_list {} + array set curr_tag_arr {} + set modpathlist getModulePathList + foreach mod getLoadedModuleList { + set altandsimplist getLoadedAltAndSimplifiedName $mod + + set parentmod file dirname $mod + set simplemod $mod + # simplify to parent name as long as it is found in simplified name list + while {$parentmod ne {.}} { + if {$parentmod in $altandsimplist} { + set simplemod $parentmod + set parentmod file dirname $parentmod + } else { + set parentmod . + } + } + + # add each module specification as list to correctly enclose spaces in + # module name or variant name or value + set simplemodvr list $simplemod {*}getVariantList $mod 5 1 + lappend curr_mod_list $simplemodvr + # record tags applying to module in simplified version form + set tag_list getSaveTagList $mod + if {llength $tag_list > 0} { + set curr_tag_arr($simplemodvr) $tag_list + } + } + + return list $curr_mod_list array get curr_tag_arr +} + +# return saved collections found in user directory which corresponds to +# enabled collection target if any set. extract one collection specifically +# when search mode is set to exact. only compute collection name if mode is +# set to name +proc findCollections {{coll *} {search glob} {errnomatch 0} {checkvalid 1}} { + # initialize description with collection name + set colldesc $coll + + if {$coll eq {}} { + reportErrorAndExit getEmptyNameMsg collection + # is collection a filepath + } elseif {string first / $coll > -1} { + # collection target has no influence when + # collection is specified as a filepath + set collfile $coll + # elsewhere collection is a name + } elseif {info exists ::env(HOME)} { + set collfile $::env(HOME)/.module/$coll + # find saved collections (matching target suffix) + # a target is a domain on which a collection is only valid. + # when a target is set, only the collections made for that target + # will be available to list and restore, and saving will register + # the target footprint + set colltarget getConf collection_target + if {$colltarget ne {}} { + append collfile .$colltarget + # add knowledge of collection target on description + append colldesc " (for target \"$colltarget\")" + } + } else { + reportErrorAndExit {HOME not defined} + } + + if {$search eq {glob}} { + # glob excludes by default files starting with "." + if {catch {set clist glob -nocomplain $collfile} errMsg} { + reportErrorAndExit "Cannot access collection directory.\n$errMsg" + } else { + set res {} + foreach cfile $clist { + if {checkValidColl $cfile} { + lappend res $cfile + } + } + } + } else { + # verify that file exists + if {$search eq {exact}} { + if {!file exists $collfile} { + if {$errnomatch} { + reportErrorAndExit "Collection $colldesc cannot be found" + } else { + set collfile {} + } + # error will be raised if collection no valid + } elseif {$checkvalid && !checkValidColl $collfile $errnomatch} { + set collfile {} + } + } + # return coll filename and its description for exact and name modes + set res list $collfile $colldesc + } + + return $res +} + +proc checkValidColl {collfile {report_issue 0}} { + set res 0 + if {catch { + set fdata readFile $collfile 1 + # extract magic cookie (first word) + set fh string trimright lindex split string range $fdata 0 32\ + 0 # + } errMsg } { + if {$report_issue} { + reportErrorAndExit parseAccessIssue $collfile + } + } else { + # collection without magic cookie are valid + # check if min version requirement is met + if {string equal -length 8 $fh {#%Module} && string length $fh \ + > 8 && versioncmp {@MODULES_RELEASE@} string range $fh 8 end \ + < 0} { + if {$report_issue} { + reportErrorAndExit "Collection $collfile requires at least\ + Modules version string range $fh 8 end" + } + } else { + set res 1 + } + } + return $res +} + +# generate collection content based on provided path and module lists +proc formatCollectionContent {path_list mod_list tag_arrser header {sgr 0}} { + set content {} + array set tag_arr $tag_arrser + + # graphically enhance module command if asked + set modcmd expr {$sgr ? sgr cm module : {module}} + + # start collection content with modulepaths + foreach path $path_list { + # enclose path if space character found in it + if {string first { } $path != -1} { + set path "{$path}" + } + # 'module use' prepends paths by default so we clarify + # path order here with --append flag + append content "$modcmd use --append $path" \n + } + + # then add modules + foreach mod $mod_list { + # save tags associated to module (like auto-loaded tag) + if {info exists tag_arr($mod) && llength $tag_arr($mod) > 0} { + set opt "--tag=join $tag_arr($mod) : " + } else { + set opt {} + } + # no need to specifically enclose module specification if space char + # used in it as $mod is a list so elements including space will be + # automatically enclosed + append content "$modcmd load $opt$mod" \n + } + + # prepend header if defined and some content has been generated + if {string length $header != 0 && string length $content != 0} { + set content "$header\n$content" + } + + return $content +} + +# read given collection file and return the path and module lists it defines +proc readCollectionContent {collfile colldesc} { + # init lists (maybe coll does not set mod to load) + set path_list {} + set mod_list {} + set nuasked_list {} + array set tag_arr {} + + # read file + if {catch { + set fdata split readFile $collfile \n + } errMsg } { + reportErrorAndExit "Collection $colldesc cannot be read.\n$errMsg" + } + + # analyze collection content + foreach fline $fdata { + if {regexp {module use (.*)$} $fline match patharg == 1} { + # paths are appended by default + set stuff_path append + # manage multiple paths and path options specified on single line, + # for instance "module use --append path1 path2 path3", with list + # representation of patharg (which handles quoted elements containing + # space in their name) + foreach path $patharg { + # following path is asked to be appended + if {($path eq {--append}) || ($path eq {-a})\ + || ($path eq {-append})} { + set stuff_path append + # following path is asked to be prepended + # collection generated with 'save' does not prepend + } elseif {($path eq {--prepend}) || ($path eq {-p})\ + || ($path eq {-prepend})} { + set stuff_path prepend + } else { + # ensure given path is absolute to be able to correctly + # compare with paths registered in MODULEPATH + set path getAbsolutePath $path + # add path to end of list + if {$stuff_path eq {append}} { + lappend path_list $path + # insert path to first position + } else { + set path_list linsert $path_list 0 $path + } + } + } + } elseif {regexp {module load (.*)$} $fline match modarg == 1} { + # extract collection-specific flags from module specification + switch -glob -- lindex $modarg 0 { + --notuasked { + set tag_list list auto-loaded + set cleanlist lrange $modarg 1 end + } + --tag=* { + set tag_list split string range lindex $modarg 0 6 end : + set cleanlist lrange $modarg 1 end + } + default { + set tag_list {} + set cleanlist $modarg + } + } + # parse module specification to distinguish between module + variant + # specified and multiple modules specified on a single line + set parsedlist parseModuleSpecification 0 {*}$cleanlist + foreach parsed $parsedlist { + set tag_arr($parsed) $tag_list + } + lappend mod_list {*}$parsedlist + } + } + return list $path_list $mod_list array get tag_arr +} + +# ;;; Local Variables: *** +# ;;; mode:tcl *** +# ;;; End: *** +# vim:set tabstop=3 shiftwidth=3 expandtab autoindent:
View file
_service:tar_scm:modules-5.0.1.tar.bz2/tcl/envmngt.tcl.in -> _service:tar_scm:modules-5.1.1.tar.bz2/tcl/envmngt.tcl.in
Changed
@@ -3,7 +3,7 @@ # ENVMNGT.TCL, environment management procedures # Copyright (C) 2002-2004 Mark Lakata # Copyright (C) 2004-2017 Kent Mein -# Copyright (C) 2016-2021 Xavier Delaruelle +# Copyright (C) 2016-2022 Xavier Delaruelle # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -71,8 +71,6 @@ } proc renderTrue {} { - reportDebug called. - # render a true value most of the time through a variable assignment that # will be looked at in the shell module function calling modulecmd.tcl to # return in turns a boolean status. Except for python and cmake, the @@ -111,8 +109,6 @@ } proc renderText {text} { - reportDebug "called ($text)." - # render a text value most of the time through a variable assignment that # will be looked at in the shell module function calling modulecmd.tcl to # return in turns a string value. @@ -154,10 +150,8 @@ } proc renderSettings {} { - global g_stateEnvVars g_stateAliases g_stateFunctions g_newXResources\ - g_delXResources - - reportDebug called. + global g_stateEnvVars g_stateAliases g_stateFunctions g_stateCompletes\ + g_newXResources g_delXResources # required to work on cygwin, shouldn't hurt real linux fconfigure stdout -translation lf @@ -165,8 +159,9 @@ # preliminaries if there is stuff to render if {getState autoinit || array size g_stateEnvVars > 0 ||\ array size g_stateAliases > 0 || array size g_newXResources > 0 ||\ - array size g_stateFunctions > 0 || array size g_delXResources > 0\ - || info exists ::g_changeDir || info exists ::g_stdoutPuts ||\ + array size g_stateFunctions > 0 || array size g_stateCompletes > 0\ + || array size g_delXResources > 0 || info exists ::g_changeDir ||\ + info exists ::g_stdoutPuts || info exists ::g_prestdoutPuts ||\ info exists ::g_return_text} { switch -- getState shelltype { python { @@ -178,6 +173,18 @@ set has_rendered 0 } + # send pre content deferred during modulefile interpretation + if {info exists ::g_prestdoutPuts} { + foreach putsArgs $::g_prestdoutPuts { + puts {*}$putsArgs + # check if a finishing newline will be needed after content sent + set needPutsNl expr {lindex $putsArgs 0 eq {-nonewline}} + } + if {$needPutsNl} { + puts stdout {} + } + } + if {getState autoinit} { renderAutoinit } @@ -372,6 +379,46 @@ } } } + foreach compname array names g_stateCompletes { + switch -- $g_stateCompletes($compname) { + new { + foreach {compshell body} $::g_Completes($compname) { + # skip definition not made for current shell + if {$compshell eq getState shell} { + switch -- getState shell { + bash { + puts stdout "complete $body $compname;" + } + tcsh { + puts stdout "complete $compname $body;" + } + fish { + # ensure pre-existing fish completion is cleared + if {!info exists fishcompclear($compname)} { + puts stdout "complete -e -c $compname;" + set fishcompclear($compname) 1 + } + puts stdout "complete -c $compname $body;" + } + } + } + } + } + del { + switch -- getState shell { + bash { + puts stdout "complete -r $compname;" + } + tcsh { + puts stdout "uncomplete $compname;" + } + fish { + puts stdout "complete -e -c $compname;" + } + } + } + } + } # preliminaries for x-resources stuff if {array size g_newXResources > 0 || array size g_delXResources > 0} { @@ -615,8 +662,6 @@ } proc renderAutoinit {} { - reportDebug called. - # automatically detect which tclsh should be used for # future module commands set tclshbin info nameofexecutable @@ -658,15 +703,11 @@ # on zsh, word splitting should be enabled explicitly set wsplit expr {getState shell eq {zsh} ? {^^=} : {}} - # only redirect module from stderr to stdout when session is - # attached to a terminal to avoid breaking non-terminal session - # (scp, sftp, etc) - set fname expr {getState is_stderr_tty ? {_module_raw} : {module}} # build quarantine mechanism in module function # an empty runtime variable is set even if no corresponding # MODULES_RUNENV_* variable found, as var cannot be unset on # modified environment command-line - set fdef "${fname}() {" + set fdef "_module_raw() {" if {getConf silent_shell_debug} { append fdef { unset _mlshdbg; @@ -689,23 +730,23 @@ for _mlv in \${${wsplit}MODULES_RUN_QUARANTINE:-}; do" append fdef { if "${_mlv}" = "${_mlv##*!A-Za-z0-9_}" -a "${_mlv}" = "${_mlv#0-9}" ; then - if -n "`eval 'echo ${'$_mlv'+x}'`" ; then - _mlre="${_mlre:-}__MODULES_QUAR_${_mlv}='`eval 'echo ${'$_mlv'}'`' "; + if -n "$(eval 'echo ${'$_mlv'+x}')" ; then + _mlre="${_mlre:-}__MODULES_QUAR_${_mlv}='$(eval 'echo ${'$_mlv'}')' "; fi; _mlrv="MODULES_RUNENV_${_mlv}"; - _mlre="${_mlre:-}${_mlv}='`eval 'echo ${'$_mlrv':-}'`' "; + _mlre="${_mlre:-}${_mlv}='$(eval 'echo ${'$_mlrv':-}')' "; fi; done; if -n "${_mlre:-}" ; then _mlre="${_mlre:-}__MODULES_QUARANTINE_SET=1 ";} - append fdef "\n eval `eval \${${wsplit}_mlre} $tclshbin\ - $::argv0 getState shell '\"\$@\"'`; + append fdef "\n eval \"\$(eval \${${wsplit}_mlre} $tclshbin\ + $::argv0 getState shell '\"\$@\"')\"; else - eval `$tclshbin $::argv0 getState shell \"\$@\"`; + eval \"\$($tclshbin $::argv0 getState shell \"\$@\")\"; fi;" } else { append fdef " - eval `$tclshbin $::argv0 getState shell \"\$@\"`;" + eval \"\$($tclshbin $::argv0 getState shell \"\$@\")\";" } append fdef { _mlstatus=$?;} @@ -727,18 +768,41 @@ } append fdef { return $_mlstatus;} + # define both _module_raw and _module functions in any cases to allow + # content redirection when commend-line switch is used (--redirect or + # --no-redirect) + # content is redirected by default when shell session is attached to + # a terminal (non-terminal session are not redirected to avoid + # breaking things like scp or sftp transfer) + # use local/typeset variable in this context as we cannot unset it + # afterward (since _module_raw should be the cmd to return status) + set localcmd expr {getState shell eq {ksh} ? {typeset} : {local}} + append fdef "\n};\nmodule() { + $localcmd _mlredir=getState is_stderr_tty;\n" + append fdef { if -n "${MODULES_REDIRECT_OUTPUT+x}" ; then + if "$MODULES_REDIRECT_OUTPUT" = '0' ; then + _mlredir=0; + elif "$MODULES_REDIRECT_OUTPUT" = '1' ; then + _mlredir=1; + fi; + fi; + case " $@ " in + *' --no-redirect '*) _mlredir=0 ;; + *' --redirect '*) _mlredir=1 ;; + esac; + if $_mlredir -eq 0 ; then + _module_raw "$@"; + else + _module_raw "$@" 2>&1; + fi;} append fdef "\n};" - if {getState is_stderr_tty} { - append fdef "\nmodule() { _module_raw \"\$@\" 2>&1; };" - } if {getConf ml} { append fdef { ml() { module ml "$@"; };} } } fish { - set fdef expr {getState is_stderr_tty ? "function _module_raw\n"\ - : "function module\n"} + set fdef "function _module_raw\n" if {getConf quarantine_support} { append fdef { set -l _mlre ''; set -l _mlv; set -l _mlrv; for _mlv in (string split ' ' $MODULES_RUN_QUARANTINE) @@ -761,14 +825,23 @@ append fdef " eval $tclshbin $::argv0 getState shell\ (string escape -- \$argv) | source -\n" } - if {getState is_stderr_tty} { - append fdef {end + append fdef "end function module - _module_raw $argv 2>&1 -end} - } else { - append fdef end - } + set _mlredir getState is_stderr_tty + if set -q MODULES_REDIRECT_OUTPUT + if \ \"\$MODULES_REDIRECT_OUTPUT\" = '0' \ + set _mlredir 0 + else if \ \"\$MODULES_REDIRECT_OUTPUT\" = '1' \ + set _mlredir 1 + end + end + if contains -- --no-redirect \$argv; or begin ; \ \$_mlredir -eq 0\ + \; and not contains -- --redirect \$argv ; end + _module_raw \$argv + else + _module_raw \$argv 2>&1 + end +end" if {getConf ml} { append fdef { function ml @@ -863,7 +936,7 @@ } } python { - set fdef {import re, subprocess + set fdef {import sys, re, subprocess def module(*arguments):} if {getConf quarantine_support} { append fdef { @@ -883,18 +956,22 @@ append fdef { ns = {}} if {getConf quarantine_support} { - append fdef "\n exec(subprocess.Popen(\'$tclshbin',\ + append fdef "\n out, err = subprocess.Popen(\'$tclshbin',\ '$::argv0', 'python'\ + list(arguments),\ - stdout=subprocess.PIPE, env=_mlre).communicate()\0\, ns)\n" + stdout=subprocess.PIPE, stderr=subprocess.PIPE,\ + env=_mlre).communicate()\n" } else { - append fdef "\n exec(subprocess.Popen(\'$tclshbin',\ + append fdef "\n out, err = subprocess.Popen(\'$tclshbin',\ '$::argv0', 'python'\ + list(arguments),\ - stdout=subprocess.PIPE).communicate()\0\, ns)\n" + stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()\n" } - append fdef { if '_mlstatus' in ns: + append fdef { exec(out, ns) + if '_mlstatus' in ns: _mlstatus = ns'_mlstatus' else: _mlstatus = True + if err.decode(): + print(err.decode(), end='', file=sys.stderr) return _mlstatus} if {getConf ml} { append fdef { @@ -1133,6 +1210,10 @@ } } +proc getPushenvVarName {var} { + return __MODULES_PUSHENV_${var} +} + proc getModshareVarName {var} { # no modshare variable for Modules-specific path variables as each entry # should be unique (no reference counting mechanism for these variables @@ -1220,11 +1301,25 @@ } } -proc unload-path {args} { - reportDebug ($args) +proc unload-path {cmd mode dflbhv args} { + reportDebug "($args) cmd=$cmd, mode=$mode, dflbhv=$dflbhv" + + lassign parsePathCommandArgs $cmd $mode $dflbhv {*}$args separator\ + allow_dup idx_val ign_refcount bhv var path_list - lassign parsePathCommandArgs unload-path {*}$args separator allow_dup\ - idx_val ign_refcount var path_list + switch -- $bhv { + noop { + return list $bhv $var + } + append - prepend { + # set paths instead of removing them + add-path unload-path load $bhv $cmd $separator $var {*}$path_list + return list $bhv $var + } + } + + # clean any previously defined pushenv stack + unset-env getPushenvVarName $var 1 # no reference count management when no share variable is returned set isrefcount expr {set sharevar getModshareVarName $var ne {}} @@ -1236,7 +1331,7 @@ # for deletion if {info exists ::g_stateEnvVars($var) && $::g_stateEnvVars($var) eq\ {del}} { - return {} + return list $bhv $var } # save initial variable content to match index arguments @@ -1330,14 +1425,25 @@ if {$isrefcount} { setReferenceCountRecordValue $sharevar array get countarr } - return {} + return list $bhv $var } -proc add-path {pos args} { - reportDebug "($args) pos=$pos" +proc add-path {cmd mode dflbhv args} { + reportDebug "($args) cmd=$cmd, mode=$mode, dflbhv=$dflbhv" - lassign parsePathCommandArgs add-path {*}$args separator allow_dup\ - idx_val ign_refcount var path_list + # may be called from unload-path where argument parsing was already done + if {$cmd eq {unload-path}} { + set path_list lassign $args cmd separator var + set allow_dup 0 + set ign_refcount 0 + set bhv $dflbhv + } else { + lassign parsePathCommandArgs $cmd $mode $dflbhv {*}$args separator\ + allow_dup idx_val ign_refcount bhv var path_list + } + + # clean any previously defined pushenv stack + unset-env getPushenvVarName $var 1 # no reference count management when no share variable is returned set isrefcount expr {set sharevar getModshareVarName $var ne {}} @@ -1345,7 +1451,7 @@ array set countarr getReferenceCountArray $var $separator } - if {$pos eq {prepend}} { + if {$bhv eq {prepend}} { set path_list lreverse $path_list } @@ -1357,7 +1463,7 @@ # counter array (sometimes var is cleared by setting it empty not # unsetting it) if {$val ne {} || info exists countarr()} { - set val expr {$pos eq {prepend} ? "$dir$separator$val" :\ + set val expr {$bhv eq {prepend} ? "$dir$separator$val" :\ "$val$separator$dir"} } else { set val $dir @@ -1384,31 +1490,68 @@ # analyze argument list passed to a path command to set default value or raise # error in case some attributes are missing -proc parsePathCommandArgs {cmd args} { +proc parsePathCommandArgs {cmd mode dflbhv args} { # parse argument list set next_is_delim 0 + set next_is_ignored 0 + set next_is_reset 0 set allow_dup 0 set idx_val 0 set ign_refcount 0 + set bhv $dflbhv foreach arg $args { # everything passed after variable name is considered a value if {info exists var} { - # set multiple passed values in a list - lappend val_raw_list $arg + switch -- $arg { + --append-on-unload - --prepend-on-unload { + if {$cmd ne {remove-path}} { + knerror "invalid option '$arg' for $cmd" + } elseif {$mode ne {unload}} { + # ignore value set after this argument if not unloading + # unless if no list is already set for load mode + if {info exists val_raw_list} { + set next_is_ignored 1 + } + } else { + set bhv expr {$arg eq {--append-on-unload} ? {append} :\ + {prepend}} + # if another argument is set, current value list will be + # withdrawn to start from new list set after this argument + set next_is_reset 1 + } + set bhvopt $arg + } + --remove-on-unload - --noop-on-unload { + if {$cmd ne {remove-path}} { + knerror "invalid option '$arg' for $cmd" + } elseif {$mode eq {unload}} { + set bhv expr {$arg eq {--remove-on-unload} ? {remove} :\ + {noop}} + } + set bhvopt $arg + } + default { + if {$next_is_reset} { + set next_is_reset 0 + set val_raw_list list $arg + } elseif {!$next_is_ignored} { + # set multiple passed values in a list + lappend val_raw_list $arg + } + } + } } else { switch -glob -- $arg { --index { - if {$cmd eq {add-path}} { + if {$cmd ne {remove-path}} { reportWarning "--index option has no effect on $cmd" } else { set idx_val 1 } } --duplicates { - # raise warning when option is used by remove-path but not for - # append-path/prepend-path on unload mode - if {$cmd eq {unload-path} && (lindex info level -2 0 ne\ - {remove-path} || getState mode eq {load})} { + # raise warning when option is used by remove-path + if {$cmd eq {remove-path}} { reportWarning "--duplicates option has no effect on $cmd" } else { set allow_dup 1 @@ -1423,6 +1566,20 @@ --ignore-refcount { set ign_refcount 1 } + --append-on-unload - --prepend-on-unload - --remove-on-unload -\ + --noop-on-unload { + if {$cmd ne {remove-path}} { + knerror "invalid option '$arg' for $cmd" + } elseif {$mode eq {unload}} { + switch -- string range $arg 2 5 { + noop { set bhv noop } + remo { set bhv remove } + appe { set bhv append } + prep { set bhv prepend } + } + } + set bhvopt $arg + } -* { knerror "invalid option '$arg' for $cmd" } @@ -1453,6 +1610,12 @@ knerror "$cmd should get a value for environment variable $var" } + # some options cannot be mixed + if {$idx_val != 0 && (info exists bhvopt && $bhvopt !=\ + {--noop-on-unload})} { + knerror "--index and $bhvopt options cannot be simultaneously set" + } + # set list of value to add set val_list list foreach val $val_raw_list { @@ -1476,10 +1639,10 @@ } reportDebug "(delim=$delim, allow_dup=$allow_dup, idx_val=$idx_val,\ - ign_refcount=$ign_refcount, var=$var, val=$val_list, nbval=llength\ - $val_list)" + ign_refcount=$ign_refcount, bhv=$bhv, var=$var, val=$val_list,\ + nbval=llength $val_list)" - return list $delim $allow_dup $idx_val $ign_refcount $var $val_list + return list $delim $allow_dup $idx_val $ign_refcount $bhv $var $val_list } # ;;; Local Variables: ***
View file
_service:tar_scm:modules-5.0.1.tar.bz2/tcl/init.tcl.in -> _service:tar_scm:modules-5.1.1.tar.bz2/tcl/init.tcl.in
Changed
@@ -3,7 +3,7 @@ # INIT.TCL, configuration and state handing procedures # Copyright (C) 2002-2004 Mark Lakata # Copyright (C) 2004-2017 Kent Mein -# Copyright (C) 2016-2021 Xavier Delaruelle +# Copyright (C) 2016-2022 Xavier Delaruelle # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -70,6 +70,7 @@ avail_terse_output {MODULES_AVAIL_TERSE_OUTPUT {@availterseoutput@} 0\ {modulepath alias dirwsym sym tag key} {} {} eltlist}\ collection_pin_version {MODULES_COLLECTION_PIN_VERSION 0 0 {0 1}}\ + collection_pin_tag {MODULES_COLLECTION_PIN_TAG 0 0 {0 1}}\ collection_target {MODULES_COLLECTION_TARGET <undef> 0}\ color {MODULES_COLOR @color@ 0 {never auto always} {0 1 2} initConfColor}\ colors {MODULES_COLORS {} 0 {} {} initConfColors}\ @@ -86,6 +87,7 @@ list_terse_output {MODULES_LIST_TERSE_OUTPUT {@listterseoutput@} 0 {header\ idx variant sym tag key} {} {} eltlist}\ locked_configs {{} {@lockedconfigs@} 0}\ + mcookie_check {MODULES_MCOOKIE_CHECK always 0 {eval always}}\ mcookie_version_check {MODULES_MCOOKIE_VERSION_CHECK\ @mcookieversioncheck@ 0 {0 1}}\ ml {MODULES_ML @ml@ 0 {0 1}}\ @@ -93,6 +95,7 @@ 0 {0 365} {} {} intbe}\ pager {MODULES_PAGER {@pagercmd@} 0}\ rcfile {MODULERCFILE <undef> 0}\ + redirect_output {MODULES_REDIRECT_OUTPUT 1 0 {0 1}}\ quarantine_support {MODULES_QUARANTINE_SUPPORT @quarantinesupport@ 0 {0\ 1}}\ run_quarantine {MODULES_RUN_QUARANTINE <undef> 0}\ @@ -410,7 +413,7 @@ proc initStateTermColumns {} { set cols getConf term_width if {$cols == 0} { - # determine col number from tty capabilites + # determine col number from tty capabilities # tty info query depends on running OS switch -- $::tcl_platform(os) { SunOS { @@ -723,7 +726,7 @@ # depending on current sub-command, list values that equal to a case # insensitive match enablement lappend enabledValList always - if {currentState commandname in list avail whatis search paths} { + if {currentState commandname in list avail list whatis search paths} { lappend enabledValList search } return expr {getConf icase in $enabledValList}
View file
_service:tar_scm:modules-5.0.1.tar.bz2/tcl/main.tcl.in -> _service:tar_scm:modules-5.1.1.tar.bz2/tcl/main.tcl.in
Changed
@@ -3,7 +3,7 @@ # MAIN.TCL, main procedures and code # Copyright (C) 2002-2004 Mark Lakata # Copyright (C) 2004-2017 Kent Mein -# Copyright (C) 2016-2021 Xavier Delaruelle +# Copyright (C) 2016-2022 Xavier Delaruelle # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -56,8 +56,6 @@ proc runModulerc {} { set rclist {} - reportDebug running... - if {set rcfile getConf rcfile ne {}} { # if MODULERCFILE is a dir, look at a modulerc file in it if {file isdirectory $rcfile\ @@ -118,6 +116,7 @@ switch -- $command { add {set command load} try-add {set command try-load} + add-any {set command load-any} rm - remove {set command unload} show {set command display} apropos - keyword {set command search} @@ -149,8 +148,9 @@ restore saverm saveshow savelist initadd initprepend initswitch initrm\ initlist initclear autoinit clear config help test prepend-path\ append-path remove-path is-loaded is-saved is-used is-avail info-loaded\ - sh-to-mod edit try-load refresh} + sh-to-mod edit try-load refresh state load-any} + reportDebug "(command=$command, cmdvalid=$cmdvalid, cmdempty=$cmdempty)" return list $command $cmdvalid $cmdempty } @@ -164,6 +164,7 @@ set dump_state 0 set addpath_pos prepend set not_req 0 + set tag_list {} set otherargs {} # parse argument list @@ -171,6 +172,9 @@ if {info exists nextargisval} { set $nextargisval $arg unset nextargisval + } elseif {info exists nextargisvaltosplit} { + set $nextargisvaltosplit split $arg : + unset nextargisvaltosplit } elseif {info exists ignore_next_arg} { unset ignore_next_arg } else { @@ -214,6 +218,22 @@ knerror "Unsupported option '--output' on $cmd sub-command" } } + --tag=* - --tag { + # option is only valid for specific sub-commands + # unload allowed not to raise error on unload/load mixed ml cmd + if {$cmd in list load try-load load-any switch unload} { + if {$arg eq {--tag}} { + set nextargisvaltosplit tag_list + } else { + set tag_list split string range $arg 6 end : + if {llength $tag_list == 0} { + knerror "Missing value for '--tag' option" + } + } + } elseif {!$ignerr} { + knerror "Unsupported option '--tag' on $cmd sub-command" + } + } --append - -append { if {$cmd eq {use}} { set addpath_pos append @@ -278,7 +298,8 @@ reportWarning "Unsupported option '$arg'" } --not-req { - if {!$topcall && $cmd in list load unload switch} { + if {!$topcall && $cmd in list load try-load load-any unload\ + switch} { set not_req 1 } else { knerror "Unsupported option '$arg' on $cmd sub-command" @@ -295,10 +316,17 @@ } } - if {info exists nextargisval} { + if {info exists nextargisval || info exists nextargisvaltosplit} { knerror "Missing value for '$prevarg' option" } + foreach tag $tag_list { + if {$tag in list loaded auto-loaded forbidden nearly-forbidden\ + hidden} { + knerror "Tag '$tag' cannot be manually set" + } + } + if {info exists asked_output} { if {getState report_format in list long json} { knerror "Unsupported option '$output_arg' on getState\ @@ -328,15 +356,13 @@ reportDebug "(show_oneperline=$show_oneperline, show_mtime=$show_mtime,\ show_filter=$show_filter, search_filter=$search_filter,\ search_match=$search_match, dump_state=$dump_state,\ - addpath_pos=$addpath_pos, not_req=$not_req, otherargs=$otherargs)" + addpath_pos=$addpath_pos, not_req=$not_req, tag_list=$tag_list,\ + otherargs=$otherargs)" return list $show_oneperline $show_mtime $show_filter $search_filter\ - $search_match $dump_state $addpath_pos $not_req $otherargs + $search_match $dump_state $addpath_pos $not_req $tag_list $otherargs } proc module {command args} { - set mode currentState mode - reportDebug "cmd='$command', args='$args'" - # guess if called from top level set topcall isTopEvaluation 0 set tryhelpmsg expr {$topcall ? "\nTry 'module --help' for more\ @@ -347,6 +373,9 @@ set msgprefix {module: } } + # get mode, set to load if called from top level + set mode expr {$topcall ? {load} : currentState mode} + # resolve and check command name lassign parseModuleCommandName $command help command cmdvalid cmdempty # clear other args if no command name supplied @@ -362,12 +391,12 @@ # module sub-command (exclude them from arg list) lassign parseModuleCommandArgs $topcall $command 0 {*}$args\ show_oneperline show_mtime show_filter search_filter search_match\ - dump_state addpath_pos not_req args + dump_state addpath_pos not_req tag_list args # parse module version specification defineParseModuleSpecificationProc getConf advanced_version_spec if {$command in list avail paths whatis load unload switch help test\ - display path is-avail edit try-load} { + display path is-avail edit try-load load-any list} { set args parseModuleSpecification 0 {*}$args } @@ -376,7 +405,7 @@ switch -- $command { path - paths - autoinit - help - prepend-path - append-path -\ remove-path - is-loaded - is-saved - is-used - is-avail -\ - info-loaded - clear - sh-to-mod - edit - refresh - source { + info-loaded - clear - sh-to-mod - edit - refresh - source - state { knerror "${msgprefix}Command '$command' not supported$tryhelpmsg" } } @@ -395,13 +424,13 @@ # argument number check switch -- $command { unload - source - display - initadd - initprepend - initrm - test -\ - is-avail - try-load { + is-avail - try-load - load-any { if {llength $args == 0} { set argnberr 1 } } - refresh - reload - aliases - list - purge - savelist - initlist -\ - initclear - autoinit { + refresh - reload - aliases - purge - savelist - initlist - initclear -\ + autoinit { if {llength $args != 0} { set argnberr 1 } @@ -416,7 +445,7 @@ set argnberr 1 } } - search - save - restore - saverm - saveshow - clear { + search - save - restore - saverm - saveshow - clear - state { if {llength $args > 1} { set argnberr 1 } @@ -446,7 +475,9 @@ list avail aliases edit} lappendState commandname $command # is evaluation a regular attempt or a try (silence not found error) - lappendState try_modulefile expr {$command eq {try-load}} + lappendState try_modulefile expr {$command in {try-load load-any}} + # stop evaluation after first successful load + lappendState any_modulefile expr {$command eq {load-any}} if {$topcall} { # Find and execute any global rc file found @@ -455,7 +486,7 @@ switch -- $command { - load - try-load { + load - try-load - load-any { # ignore flag used in collection to track non-user asked state set args replaceFromList $args --notuasked # no error raised on empty argument list to cope with @@ -465,31 +496,39 @@ # if top command is source, consider module load commands made # within sourced file evaluation as top load command if {isTopEvaluation} { - set ret cmdModuleLoad load 1 {*}$args + set ret cmdModuleLoad load 1 $tag_list {*}$args } elseif {$mode eq {load}} { # load here if try-load or no auto mode (done through prereq # elsewhere, inhibited if currently in DepRe context) if {$command eq {try-load} || (!getConf auto_handling &&\ currentModuleEvalContext ne {depre})} { - # attempt load of not already loaded modules - foreach arg $args { - if {!is-loaded $arg && !is-loading $arg} { - lappend modlist $arg - } - } - if {info exists modlist} { - set ret cmdModuleLoad reqlo 0 {*}$modlist - # ignore obtained error if force mode enabled - if {getState force} { - set ret 0 + # load requirement in a OR-operation like done through + # prereq cmd when auto_handling is enabled + if {$command eq {load-any}} { + loadRequirementModuleList $tag_list {*}$args + } else { + # attempt load of not already loaded modules + foreach arg $args { + lassign loadRequirementModuleList $tag_list $arg\ + retlo + # update return value if an issue occurred unless + # force mode is enabled + if {$retlo != 0 && !getState force} { + set ret $retlo + } } } } - # register modulefiles to load as individual prereqs - foreach arg $args { - # no prereq record if try-load did not succeed - if {$command ne {try-load} || is-loaded $arg} { - prereq $arg + # register modulefiles to load as individual prereqs or all at + # once for load-any sub-command + if {$command eq {load-any}} { + prereq --tag join $tag_list : {*}$args + } else { + foreach arg $args { + # no prereq record if try-load did not succeed + if {$command ne {try-load} || is-loaded $arg} { + prereq --tag join $tag_list : $arg + } } } # mods unload is handled via UReqUn mechanism when auto enabled @@ -553,14 +592,10 @@ cmdModuleReload } use { - if {$topcall || $mode eq {load}} { - cmdModuleUse $addpath_pos {*}$args - } else { - cmdModuleUnuse {*}$args - } + cmdModuleUse $mode $addpath_pos {*}$args } unuse { - cmdModuleUnuse {*}$args + cmdModuleUnuse $mode {*}$args } source { cmdModuleSource load {*}$args @@ -569,7 +604,7 @@ # pass 'user asked state' to switch procedure set uasked isTopEvaluation if {$uasked} { - cmdModuleSwitch $uasked {*}$args + cmdModuleSwitch $uasked $tag_list {*}$args } else { # CAUTION: it is not recommended to use the `switch` # sub-command in modulefiles as this command is intended for @@ -579,7 +614,7 @@ switch -- $mode { load { - cmdModuleSwitch $uasked {*}$args + cmdModuleSwitch $uasked $tag_list {*}$args } unload { # find what has been asked for unload and load @@ -637,7 +672,7 @@ cmdModulePaths {*}$args } list { - cmdModuleList $show_oneperline $show_mtime + cmdModuleList $show_oneperline $show_mtime $search_match {*}$args } whatis { if {$args ne {}} { @@ -697,6 +732,9 @@ config { cmdModuleConfig $dump_state {*}$args } + state { + cmdModuleState {*}$args + } sh-to-mod { cmdModuleShToMod {*}$args } @@ -717,6 +755,7 @@ cmdModuleResurface module-info loaded {*}$args } } + lpopState any_modulefile lpopState try_modulefile lpopState commandname lpopState always_read_full_file @@ -738,7 +777,7 @@ # without them in the way lassign parseModuleCommandArgs 1 ml 1 {*}$args show_oneperline\ show_mtime show_filter search_filter search_match dump_state\ - addpath_pos not_req fargs + addpath_pos not_req tag_list fargs # determine if first argument is a known module sub-command lassign parseModuleCommandName lindex $fargs 0 list command cmdvalid\ @@ -770,13 +809,15 @@ set mlcmd expr {llength $modunlist > 0 ? {unload} : {load}} lassign parseModuleCommandArgs 1 $mlcmd 0 {*}$args show_oneperline\ show_mtime show_filter search_filter search_match dump_state\ - addpath_pos not_req fargs + addpath_pos not_req tag_list fargs # define if modfile should always be fully read even for validity check lappendState always_read_full_file 1 lappendState commandname ml - # is evaluation a regular attempt or a try (silence not found error) - lappendState try_modulefile expr {$command eq {try-load}} + # initialize try and any load states: as the load/unload shortcut is + # analyzed in this branch, no try-load/load-any command can occur + lappendState try_modulefile 0 + lappendState any_modulefile 0 # Find and execute any global rc file found runModulerc @@ -790,7 +831,7 @@ } # then load other modules unless unload phase failed if {!$ret && llength $modlolist > 0} { - set ret cmdModuleLoad load 1 {*}$modlolist + set ret cmdModuleLoad load 1 $tag_list {*}$modlolist } # rollback changes if any load or unload failed @@ -799,6 +840,7 @@ } popSettings + lpopState any_modulefile lpopState try_modulefile lpopState commandname lpopState always_read_full_file @@ -843,8 +885,14 @@ # source site configuration script if any sourceSiteConfig + setState supported_shells {sh bash ksh zsh csh tcsh fish cmd tcl perl\ + python ruby lisp cmake r} + # Parse shell setState shell lindex $argv 0 + if {getState shell ni getState supported_shells} { + reportErrorAndExit "Unknown shell type \'(getState shell)\'" + } switch -- getState shell { sh - bash - ksh - zsh { setState shelltype sh @@ -852,11 +900,8 @@ csh - tcsh { setState shelltype csh } - fish - cmd - tcl - perl - python - ruby - lisp - cmake - r { - setState shelltype getState shell - } default { - reportErrorAndExit "Unknown shell type \'(getState shell)\'" + setState shelltype getState shell } } @@ -907,6 +952,17 @@ --no-pager { set asked_paginate 0 } + --redirect { + if {getState shelltype ni {sh fish}} { + reportWarning "Unsupported option '--redirect' on getState\ + shell shell" + } else { + set asked_redirect_output 1 + } + } + --no-redirect - --no_redirect { + set asked_redirect_output 0 + } --auto { set asked_auto_handling 1 } @@ -958,7 +1014,7 @@ -a - --append - -append - --all - -p - --prepend - -prepend -\ --delim - -delim - --delim=* - -delim=* - --duplicates - --index\ - --notuasked - --indepth - --no-indepth - --dump-state -\ - --reset { + --reset - --tag - --tag=* { # command-specific switches interpreted later on lappend otherargv $arg } @@ -983,6 +1039,9 @@ reportErrorAndExit "Missing value for '$arg' option\nTry\ 'module --help' for more information." } + --initial_load { + # ignore option for compatibility + } {-} - {--} - {--*} { reportErrorAndExit "Invalid option '$arg'\nTry 'module --help'\ for more information." @@ -1000,8 +1059,8 @@ # and command can receive boolean variant specification set accept_minus_arg expr {$subcmdtest eq {ml} ||\ (getConf advanced_version_spec && $subcmdtest in\ - {avail display help is-avail is-loaded load path paths\ - switch test unload whatis})} + {avail list display help is-avail is-loaded load path\ + paths switch test unload whatis})} } # spare argument if minus arg is accepted if {info exists accept_minus_arg && $accept_minus_arg} {
View file
_service:tar_scm:modules-5.0.1.tar.bz2/tcl/mfinterp.tcl.in -> _service:tar_scm:modules-5.1.1.tar.bz2/tcl/mfinterp.tcl.in
Changed
@@ -3,7 +3,7 @@ # MFINTERP.TCL, modulefile interpretation procedures # Copyright (C) 2002-2004 Mark Lakata # Copyright (C) 2004-2017 Kent Mein -# Copyright (C) 2016-2021 Xavier Delaruelle +# Copyright (C) 2016-2022 Xavier Delaruelle # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -32,6 +32,13 @@ reportWarning "'$cmd' command not implemented" } + +# Get identifier name of current Tcl modulefile interpreter. An interp is +# dedicated to each mode/depth level of modulefile interpretation +proc getCurrentModfileInterpName {} { + return __modfile_currentState mode_depthState modulename +} + # synchronize environment variable change over all started sub interpreters proc interp-sync-env {op var {val {}}} { set envvar ::env($var) @@ -89,9 +96,15 @@ # the evaluation mode set ::g_modfileEvalModes {load unload display help test whatis refresh} array set g_modfilePerModeAliases { -append-path {append-path remove-path append-path append-path append-path edit-path-wh nop } +add-property {nop nop nop nop nop nop nop } +always-load {always-load nop reportCmd nop nop nop nop } +append-path {append-path append-path-un append-path append-path append-path edit-path-wh nop } chdir {chdir nop reportCmd nop nop nop nop } +complete {complete complete-un reportCmd nop nop nop complete } conflict {conflict nop reportCmd nop nop nop nop } +depends-on {prereq-all nop reportCmd nop nop nop nop } +extensions {nop nop nop nop nop nop nop } +family {family family-un reportCmd nop nop nop nop } module {module module reportCmd nop nop nop nop } module-alias {module-alias module-alias module-alias module-alias module-alias module-alias nop } module-log {nimp nimp reportCmd nop nop nop nop } @@ -104,17 +117,23 @@ module-hide {module-hide module-hide module-hide module-hide module-hide module-hide nop } module-tag {module-tag module-tag module-tag module-tag module-tag module-tag nop } module-whatis {nop nop reportCmd nop nop module-whatis nop } -prepend-path {prepend-path remove-path prepend-path prepend-path prepend-path edit-path-wh nop } +prepend-path {prepend-path prepend-path-un prepend-path prepend-path prepend-path edit-path-wh nop } +prereq-all {prereq-all nop reportCmd nop nop nop nop } +prereq-any {prereq nop reportCmd nop nop nop nop } prereq {prereq nop reportCmd nop nop nop nop } +pushenv {pushenv pushenv-un pushenv pushenv pushenv pushenv-wh nop } remove-path {remove-path remove-path-un remove-path remove-path remove-path edit-path-wh nop } +remove-property {nop nop nop nop nop nop nop } +require-fullname {require-fullname nop reportCmd nop nop nop nop } set-alias {set-alias set-alias-un reportCmd nop nop nop set-alias } set-function {set-function set-function-un reportCmd nop nop nop set-function} setenv {setenv setenv-un setenv setenv setenv setenv-wh nop } source-sh {source-sh source-sh-un source-sh-di nop nop nop source-sh } system {system system reportCmd nop nop nop nop } +uncomplete {uncomplete nop reportCmd nop nop nop nop } unset-alias {unset-alias nop reportCmd nop nop nop nop } unset-function {unset-function nop reportCmd nop nop nop nop } -unsetenv {unsetenv unsetenv-un unsetenv unsetenv unsetenv setenv-wh nop } +unsetenv {unsetenv unsetenv-un unsetenv unsetenv unsetenv unsetenv-wh nop } variant {variant variant variant variant variant variant-wh variant } x-resource {x-resource x-resource reportCmd nop nop nop nop } } @@ -133,7 +152,7 @@ set aliastarget set aliases($alias) lindex\ $g_modfilePerModeAliases($alias) $modeidx # some target procedures need command name as first arg - if {$aliastarget eq {reportCmd} || $aliastarget eq {nimp}} { + if {$aliastarget in {reportCmd nimp edit-path-wh}} { set aliasesPassArg($alias) $alias # associate a trace command if per-mode alias command is not reportCmd # in display mode (except for source-sh) @@ -217,7 +236,7 @@ } # dedicate an interpreter per mode and per level of interpretation to have # a dedicated interpreter in case of cascaded multi-mode interpretations - set itrp __modfile_${mode}_depthState modulename + set itrp getCurrentModfileInterpName # evaluation mode-specific configuration set dumpCommandsVN g_modfile${mode}Commands @@ -466,6 +485,8 @@ interp eval $itrp set ::ModulesCurrentModulefile "{$modfile}" interp eval $itrp {set ::ModulesVersion {}} + # create an alias ModuleVersion on ModulesVersion + interp eval $itrp {upvar 0 ::ModulesVersion ::ModuleVersion} set errorVal interp eval $itrp { set modcontent readModuleContent $::ModulesCurrentModulefile @@ -573,6 +594,23 @@ } } + if {$fresh} { + # trace each modulefile command call if verbosity is set to debug + # (when higher verbosity level is set all cmds are already traced) + if {getConf verbosity eq {debug}} { + interp alias $itrp reportTraceExecEnter {} reportTraceExecEnter + foreach alias array names aliases { + # exclude internal commands expoxed to modulerc/file interpreter + if {$alias ni {report reportDebug reportError reportWarning\ + reportCmdTrace raiseErrorCount reportInternalBug\ + formatErrStackTrace isVerbosityLevel}} { + interp eval $itrp list trace add execution $alias enter\ + reportTraceExecEnter + } + } + } + } + foreach alias array names traces { interp eval $itrp list trace add execution $alias leave\ $traces($alias) @@ -673,8 +711,6 @@ proc module-info {what {more {}}} { set mode currentState mode - reportDebug "$what $more" - switch -- $what { mode { if {$more ne {}} { @@ -813,9 +849,7 @@ } proc module-whatis {args} { - set message join $args - reportDebug $message - lappend ::g_whatis $message + lappend ::g_whatis join $args return {} } @@ -826,7 +860,6 @@ # directory will apply to modules of the same name found in other # directories. proc module-version {args} { - reportDebug $args lassign getModuleNameVersion lindex $args 0 1 mod modname modversion # go for registration only if valid modulename @@ -1139,25 +1172,69 @@ } } -proc setenv {var val} { - reportDebug "var='$var', val='$val'" +# parse arguments sent to the unsetenv modulefile command +proc parseSetenvCommandArgs {mode dflbhv args} { + set bhv $dflbhv + foreach arg $args { + switch -- $arg { + --set-if-undef { + if {$mode eq {load}} { + set setifundef 1 + } + } + default { + if {!info exists var} { + set var $arg + } elseif {!info exists val} { + set val $arg + } else { + # too much argument + set wrongargnum 1 + } + } + } + } - # clean any previously defined reference counter array - unset-env getModshareVarName $var 1 + if {info exists wrongargnum || !info exists var || !info exists\ + val} { + knerror {wrong # args: should be "setenv ?--set-if-undef? var val"} + } - # Set the variable for later use during the modulefile evaluation - set-env $var $val + if {info exists setifundef && info exists ::env($var)} { + set bhv noop + } + + reportDebug "bhv=$bhv, var=$var, val=$val" + return list $bhv $var $val +} + +proc setenv {args} { + lassign parseSetenvCommandArgs load set {*}$args bhv var val + + if {$bhv eq {set}} { + # clean any previously defined reference counter array + unset-env getModshareVarName $var 1 + + # clean any previously defined pushenv stack + unset-env getPushenvVarName $var 1 + + # Set the variable for later use during the modulefile evaluation + set-env $var $val + } return {} } # undo setenv in unload mode -proc setenv-un {var val} { - reportDebug "var='$var', val='$val'" +proc setenv-un {args} { + lassign parseSetenvCommandArgs unload unset {*}$args bhv var val # clean any existing reference counter array unset-env getModshareVarName $var 1 + # clean any previously defined pushenv stack + unset-env getPushenvVarName $var 1 + # Add variable to the list of variable to unset in shell output code but # set it in interp context as done on load mode for later use during the # modulefile evaluation @@ -1166,39 +1243,132 @@ return {} } -# optimized setenv/unsetenv for whatis mode: init env variable with an empty +# optimized setenv for whatis mode: init env variable with an empty # value if undefined. do not care about value, just avoid variable to be # undefined for later use during the modulefile evaluation -proc setenv-wh {var args} { +proc setenv-wh {args} { + lassign parseSetenvCommandArgs load set {*}$args bhv var val + if {!info exists ::env($var)} { - reportDebug "var='$var', val=''" set ::env($var) {} } return {} } -proc getenv {var {valifundef {}}} { - reportDebug "var='$var', valifundef='$valifundef'" +# parse arguments sent to the getenv modulefile command +proc parseGetenvCommandArgs {cmd args} { + set returnval 0 + set valifundef {} + switch -- llength $args { + 1 { + set var lindex $args 0 + } + 2 { + switch -- lindex $args 0 { + --return-value { + set returnval 1 + set var lindex $args 1 + } + default { + set var lindex $args 0 + set valifundef lindex $args 1 + } + } + } + 3 { + if {lindex $args 0 ne {--return-value}} { + set wrongargs 1 + } else { + set returnval 1 + set var lindex $args 1 + set valifundef lindex $args 2 + } + } + default { + set wrongargs 1 + } + } - if {currentState mode ne {display}} { + set argname expr {$cmd eq {getenv} ? {variable} : {name}} + if {info exists wrongargs} { + knerror "wrong # args: should be \"$cmd ?--return-value? $argname\ + ?valifundef?\"" + } + + reportDebug "$argname='$var', valifundef='$valifundef',\ + returnval='$returnval'" + return list $var $valifundef $returnval +} + +proc getenv {args} { + # parse args + lassign parseGetenvCommandArgs getenv {*}$args var valifundef returnval + + if {currentState mode ne {display} || $returnval} { return get-env $var $valifundef } else { return "\$$var" } } -proc unsetenv {var args} { - reportDebug "var='$var', val='lindex $args 0'" +# parse arguments sent to the unsetenv modulefile command +proc parseUnsetenvCommandArgs {mode dflbhv args} { + foreach arg $args { + switch -- $arg { + --unset-on-unload { + if {$mode eq {unload}} { + set bhv unset + } + } + --noop-on-unload { + if {$mode eq {unload}} { + set bhv noop + } + } + default { + if {!info exists var} { + set var $arg + } elseif {!info exists val} { + set val $arg + if {$mode eq {unload} && !info exists bhv} { + set bhv set + } + } else { + # too much argument + set wrongargnum 1 + } + } + } + } + + if {info exists wrongargnum || !info exists var} { + knerror {wrong # args: should be "unsetenv ?--noop-on-unload?\ + ?--unset-on-unload? var ?val?"} + } + + if {!info exists bhv} { + set bhv $dflbhv + } - # error if bad argument number, use args list to distinguish between no - # value to restore and an empty string value to restore - if {llength $args > 1} { - knerror {wrong # args: should be "unsetenv var ?val?"} + # initialize val to always return same structure, val is only used if bhv + # equals 'set' + if {!info exists val} { + set val {} } + reportDebug "bhv=$bhv, var=$var, val=$val" + return list $bhv $var $val +} + +proc unsetenv {args} { + lassign parseUnsetenvCommandArgs load unset {*}$args bhv var val + # clean any existing reference counter array unset-env getModshareVarName $var 1 + # clean any previously defined pushenv stack + unset-env getPushenvVarName $var 1 + # Set the variable for later use during the modulefile evaluation unset-env $var @@ -1206,27 +1376,41 @@ } # undo unsetenv in unload mode -proc unsetenv-un {var args} { - # error if bad argument number, use args list to distinguish between no - # value to restore and an empty string value to restore - if {llength $args > 1} { - knerror {wrong # args: should be "unsetenv var ?val?"} - } - - # apply value specified for set on unload - if {llength $args == 1} { - return setenv $var lindex $args 0 - # otherwise just clear variable if it does not exist on unload mode for - # later use during the modulefile evaluation - } elseif {!info exists ::env($var)} { - reset-to-unset-env $var +proc unsetenv-un {args} { + lassign parseUnsetenvCommandArgs unload noop {*}$args bhv var val + + switch -- $bhv { + set { + # apply value specified for set on unload + return setenv $var $val + } + unset { + return unsetenv $var + } + noop { + # otherwise just clear variable if it does not exist on unload mode + # for later use during the modulefile evaluation + if {!info exists ::env($var)} { + reset-to-unset-env $var + } + } } return {} } -proc chdir {dir} { - reportDebug $dir +# optimized unsetenv for whatis mode: init env variable with an empty +# value if undefined. do not care about value, just avoid variable to be +# undefined for later use during the modulefile evaluation +proc unsetenv-wh {args} { + lassign parseUnsetenvCommandArgs load noop {*}$args bhv var val + + if {!info exists ::env($var)} { + set ::env($var) {} + } + return {} +} +proc chdir {dir} { if {file exists $dir && file isdirectory $dir} { set ::g_changeDir $dir } else { @@ -1241,8 +1425,6 @@ # supersede exit command to handle it if called within a modulefile # rather than exiting the whole process proc exitModfileCmd {{code 0}} { - reportDebug ($code) - if {currentState mode in {load refresh}} { setState inhibit_interp 1 } @@ -1261,8 +1443,6 @@ # enabled) or postpone content channel send after rendering on stdout the # relative environment changes required by the modulefile proc putsModfileCmd {itrp args} { - reportDebug "$args (itrp=$itrp)" - # determine if puts call targets the stdout or stderr channel switch -- llength $args { 1 { @@ -1273,6 +1453,10 @@ -nonewline - stdout { set deferPuts 1 } + prestdout { + set deferPrePuts 1 + set args lreplace $args 0 0 stdout + } stderr { set reportArgs list lindex $args 1 } @@ -1284,6 +1468,10 @@ stdout { set deferPuts 1 } + prestdout { + set deferPrePuts 1 + set args lreplace $args 1 1 stdout + } stderr { set reportArgs list lindex $args 2 1 } @@ -1304,6 +1492,8 @@ # defer puts if it targets stdout (see renderSettings) } elseif {info exists deferPuts} { lappend ::g_stdoutPuts $args + } elseif {info exists deferPrePuts} { + lappend ::g_prestdoutPuts $args # if it targets stderr call report, which knows what channel to use } elseif {info exists reportArgs} { # report message only if not silent @@ -1321,38 +1511,49 @@ } proc prepend-path {args} { - reportDebug $args + # Set the variable for later use during the modulefile evaluation + add-path prepend-path load prepend {*}$args + return {} +} + +proc prepend-path-un {args} { # Set the variable for later use during the modulefile evaluation - add-path prepend {*}$args + unload-path prepend-path unload remove {*}$args return {} } proc append-path {args} { - reportDebug $args + # Set the variable for later use during the modulefile evaluation + add-path append-path load append {*}$args + + return {} +} +proc append-path-un {args} { # Set the variable for later use during the modulefile evaluation - add-path append {*}$args + unload-path append-path unload remove {*}$args return {} } proc remove-path {args} { - reportDebug $args - # Set the variable for later use during the modulefile evaluation - unload-path {*}$args + unload-path remove-path load remove {*}$args return {} } # undo remove-path in unload mode proc remove-path-un {args} { + lassign unload-path remove-path unload noop {*}$args bhv var + + # clean any previously defined pushenv stack + unset-env getPushenvVarName $var 1 + # clear variable if it does not exist on unload mode for later use # during the modulefile evaluation - lassign parsePathCommandArgs unload-path {*}$args separator allow_dup\ - idx_val ign_refcount var path_list if {!info exists ::env($var)} { reset-to-unset-env $var } @@ -1361,12 +1562,10 @@ # optimized *-path for whatis mode: init env variable with an empty value if # undefined. do not care about value, just avoid variable to be undefined for # later use during the modulefile evaluation -proc edit-path-wh {args} { - reportDebug $args - +proc edit-path-wh {cmd args} { # get variable name - lassign parsePathCommandArgs edit-path-wh {*}$args separator allow_dup\ - idx_val ign_refcount var path_list + lassign parsePathCommandArgs $cmd load noop {*}$args separator allow_dup\ + idx_val ign_refcount bhv var path_list if {!info exists ::env($var)} { set ::env($var) {} @@ -1376,8 +1575,6 @@ } proc set-alias {alias what} { - reportDebug "alias='$alias', val='$what'" - set ::g_Aliases($alias) $what set ::g_stateAliases($alias) new @@ -1390,8 +1587,6 @@ } proc unset-alias {alias} { - reportDebug alias='$alias' - set ::g_Aliases($alias) {} set ::g_stateAliases($alias) del @@ -1399,8 +1594,6 @@ } proc set-function {function what} { - reportDebug "function='$function', val='$what'" - set ::g_Functions($function) $what set ::g_stateFunctions($function) new @@ -1413,8 +1606,6 @@ } proc unset-function {function} { - reportDebug function='$function' - set ::g_Functions($function) {} set ::g_stateFunctions($function) del @@ -1423,7 +1614,6 @@ proc is-loaded {args} { - reportDebug $args # parse module version specification set args parseModuleSpecification 0 {*}$args @@ -1437,8 +1627,6 @@ } proc is-loading {args} { - reportDebug $args - foreach mod $args { if {getLoadedMatchingName $mod returnfirst 1 ne {}} { return 1 @@ -1449,7 +1637,6 @@ } proc conflict {args} { - reportDebug $args set currentModule currentState modulename set curmodnamevr currentState modulenamevr # get module short name if loaded by its full pathname @@ -1474,33 +1661,50 @@ is-loading $mod} # if the conflicting module is loaded, we cannot either if {is-loaded $mod || $isloading} { - set retisconun isModuleEvaluated conun $curmodnamevr $mod - # report message on currently evaluated module message block - if {!set retiseval isModuleEvaluated any $curmodnamevr $mod ||\ - currentState msgrecordid ne topState msgrecordid ||\ - !$retisconun} { - # more appropriate msg if an eval was attempted or is by-passed - set msg expr {$retiseval || getState force ?\ - getConIsLoadedMsg list $mod $isloading :\ - getErrConflictMsg $mod} - - # still proceed if force mode enabled - if {getState force} { - reportWarning $msg - # indicate message has already been reported - lappend ::report_conflict(currentState evalid) $mod - } else { - knerror $msg MODULES_ERR_GLOBAL - } - } + reportPresentConflictError $curmodnamevr $mod $isloading } } return {} } +proc parsePrereqCommandArgs {cmd args} { + # parse tags defined + switch -glob -- lindex $args 0 { + --tag { + set tag_list split lindex $args 1 : + set tag_opt list --tag lindex $args 1 + set args lrange $args 2 end + } + --tag=* { + set tag_list split string range lindex $args 0 6 end : + set tag_opt list lindex $args 0 + set args lrange $args 1 end + if {llength $tag_list == 0} { + knerror "Missing value for '--tag' option" + } + } + default { + set tag_list {} + set tag_opt {} + } + } + foreach tag $tag_list { + if {$tag in list loaded auto-loaded forbidden nearly-forbidden\ + hidden} { + knerror "Tag '$tag' cannot be manually set" + } + } + if {llength $args == 0} { + knerror "wrong # args: should be \"$cmd ?--tag? ?taglist? modulefile\ + ?...?\"" + } + return list $tag_list $tag_opt $args +} + proc prereq {args} { - reportDebug $args + lassign parsePrereqCommandArgs prereq {*}$args tag_list tag_opt args + set currentModule currentState modulename set curmodnamevr currentState modulenamevr @@ -1514,83 +1718,30 @@ } # if dependency resolving is enabled try to load prereq - if {getConf auto_handling && !is-loaded {*}$args && !is-loading\ - {*}$args} { - set imax llength $args - set prereqloaded 0 - # if prereq list specified, try to load first then - # try next if load of first module not successful - for {set i 0} {$i<$imax && $prereqloaded==0} {incr i 1} { - set arg lindex $args $i - - # hold output of each evaluation until they are all done to drop - # those that failed if one succeed - set curholdid load-$i-$arg - lappendState reportholdid $curholdid - if {catch {cmdModuleLoad reqlo 0 $arg} errorMsg} { - # if an error is raised, release output and rethrow the error - # (could be raised if no modulepath defined for instance) - lpopState reportholdid - lappend holdidlist $curholdid report - releaseHeldReport {*}$holdidlist - knerror $errorMsg - } - lpopState reportholdid - - if {is-loaded $arg} { - set prereqloaded 1 - # set previous reports to be dropped as this one succeed - if {info exists holdidlist} { - foreach {holdid action} $holdidlist { - lappend newholdidlist $holdid drop - } - set holdidlist $newholdidlist - } - } - lappend holdidlist $curholdid report - } - # output held messages - releaseHeldReport {*}$holdidlist + if {getConf auto_handling} { + loadRequirementModuleList $tag_list {*}$args } - if {!is-loaded {*}$args && !is-loading {*}$args} { - set retisreqlo isModuleEvaluated reqlo $curmodnamevr {*}$args - # report message on currently evaluated module message block - if {!set retiseval isModuleEvaluated any $curmodnamevr {*}$args ||\ - currentState msgrecordid ne topState msgrecordid ||\ - !$retisreqlo} { - - # more appropriate msg if an evaluation was attempted or is by-passed - set msg expr {$retiseval || getState force ? getReqNotLoadedMsg\ - $args : getErrPrereqMsg $args} - # still proceed if force mode enabled - if {getState force} { - reportWarning $msg - # no error raise if done later - } elseif {$retisreqlo} { - reportError $msg - } else { - knerror $msg MODULES_ERR_GLOBAL - } + set loadedmod_list {} + foreach mod $args { + # get all loaded or loading mod in args list + if {set loadedmod getLoadedMatchingName $mod returnfirst ne {} ||\ + set loadedmod getLoadedMatchingName $mod returnfirst 1 ne {}} { + lappend loadedmod_list $loadedmod } + } - # raise reqlo-specific msg to top level if attempted - if {$retisreqlo} { - set msg getErrReqLoMsg $args - if {getState force} { - reportWarning $msg 1 - } else { - knerror $msg MODULES_ERR_GLOBALTOP - } - } + if {llength $loadedmod_list == 0} { + reportMissingPrereqError $curmodnamevr {*}$args + } elseif {!getConf auto_handling} { + # apply missing tag to all loaded module found + cmdModuleTag 0 0 $tag_list {*}$loadedmod_list } return {} } proc x-resource {resource {value {}}} { - reportDebug "($resource, $value)" - # sometimes x-resource value may be provided within resource name # as the "x-resource {Ileaf.popup.saveUnder: True}" example provided # in manpage. so here is an attempt to extract real resource name and @@ -1632,8 +1783,6 @@ } proc uname {what} { - reportDebug $what - return switch -- $what { sysname {getState os} machine {getState machine} @@ -1647,8 +1796,6 @@ # run shell command proc system {args} { - reportDebug $args - # run through the appropriate shell if {getState is_win} { set shell cmd.exe @@ -1671,11 +1818,9 @@ # test at least one of the collections passed as argument exists proc is-saved {args} { - reportDebug $args - foreach coll $args { - lassign getCollectionFilename $coll collfile colldesc - if {file exists $collfile} { + lassign findCollections $coll exact collfile colldesc + if {string length $collfile > 0} { return 1 } } @@ -1685,8 +1830,6 @@ # test at least one of the directories passed as argument is set in MODULEPATH proc is-used {args} { - reportDebug $args - set modpathlist getModulePathList foreach path $args { # transform given path in an absolute path to compare with dirs @@ -1702,7 +1845,6 @@ # test at least one of the modulefiles passed as argument exists proc is-avail {args} { - reportDebug $args # parse module version specification set args parseModuleSpecification 0 {*}$args set ret 0 @@ -1731,12 +1873,14 @@ proc execShAndGetEnv {shell script args} { set sep {%ModulesShToMod%} + set subsep {%ModulesSubShToMod%} set shdesc list $script {*}$args set sherr 0 set shellopts list upvar ignvarlist ignvarlist - set ignvarlist list OLDPWD PWD _ _AST_FEATURES PS1 + set ignvarlist list OLDPWD PWD _ _AST_FEATURES PS1 _LMFILES_\ + LOADEDMODULES # define shell command to run to source script and analyze the environment # changes it performs @@ -1747,9 +1891,9 @@ # execution error. dash does not pass arguments to sourced script but # it does not raise error if arguments are set set command "export -p; echo $sep; declare -f 2>/dev/null; echo\ - $sep; alias; echo $sep; pwd; echo $sep; . listTo shell $shdesc\ - 2>&1; echo $sep; export -p; echo $sep; declare -f 2>/dev/null;\ - echo $sep; alias; echo $sep; pwd" + $sep; alias; echo $sep; echo $sep; pwd; echo $sep; . listTo\ + shell $shdesc 2>&1; echo $sep; export -p; echo $sep; declare -f\ + 2>/dev/null; echo $sep; alias; echo $sep; echo $sep; pwd" set varre {export (\S+?)="'?(.*?)"'?$} set funcre {(\S+?) \(\)\s?\n?{\s?\n(.+?)\n}$} set aliasre {(\S+?)='(.*?)'$} @@ -1758,12 +1902,14 @@ } bash { set command "export -p; echo $sep; declare -f; echo $sep; alias;\ - echo $sep; pwd; echo $sep; . listTo shell $shdesc 2>&1; echo\ - $sep; export -p; echo $sep; declare -f; echo $sep; alias; echo\ - $sep; pwd" + echo $sep; complete; echo $sep; pwd; echo $sep; . listTo shell\ + $shdesc 2>&1; echo $sep; export -p; echo $sep; declare -f; echo\ + $sep; alias; echo $sep; complete; echo $sep; pwd" set varre {declare -x (\S+?)="(.*?)"$} set funcre {(\S+?) \(\)\s?\n{\s?\n(.+?)\n}$} set aliasre {alias (\S+?)='(.*?)'$} + set compre {complete (.+?) (\S+?)$} + set comprevar list match value name set varvalmap list {\"} {"} \\\\ \\ set alvalmap list {'\''} ' lappend shellopts --noprofile --norc @@ -1771,9 +1917,10 @@ ksh - ksh93 { set command "typeset -x; echo $sep; typeset +f | while read f; do\ typeset -f \${f%\\(\\)}; echo; done; echo $sep; alias; echo $sep;\ - pwd; echo $sep; . listTo shell $shdesc 2>&1; echo $sep; typeset\ - -x; echo $sep; typeset +f | while read f; do typeset -f\ - \${f%\\(\\)}; echo; done; echo $sep; alias; echo $sep; pwd" + echo $sep; pwd; echo $sep; . listTo shell $shdesc 2>&1; echo\ + $sep; typeset -x; echo $sep; typeset +f | while read f; do\ + typeset -f \${f%\\(\\)}; echo; done; echo $sep; alias; echo $sep;\ + echo $sep; pwd" set varre {(\S+?)=\$?'?(.*?)'?$} set funcre {(\S+?)\(\) {\n?(.+?)};\n?$} set aliasre {(\S+?)=\$?'?(.*?)'?$} @@ -1782,44 +1929,64 @@ } zsh { set command "typeset -x; echo $sep; declare -f; echo $sep; alias;\ - echo $sep; pwd; echo $sep; . listTo shell $shdesc 2>&1; echo\ - $sep; typeset -x; echo $sep; declare -f; echo $sep; alias; echo\ - $sep; pwd" + echo $sep; echo $sep; pwd; echo $sep; . listTo shell $shdesc\ + 2>&1; echo $sep; typeset -x; echo $sep; declare -f; echo $sep;\ + alias; echo $sep; echo $sep; pwd" set varre {(\S+?)=\$?'?(.*?)'?$} set funcre {(\S+?) \(\) {\n(.+?)\n}$} set aliasre {(\S+?)=\$?'?(.*?)'?$} set varvalmap list {'\''} ' set alvalmap list {'\''} ' } - csh - tcsh { - set command "setenv; echo $sep; echo $sep; alias; echo $sep; pwd;\ - echo $sep; source listTo shell $shdesc >& /dev/stdout; echo\ - $sep; setenv; echo $sep; echo $sep; alias; echo $sep; pwd" + csh { + set command "setenv; echo $sep; echo $sep; alias; echo $sep; echo\ + $sep; pwd; echo $sep; source listTo shell $shdesc >&\ + /dev/stdout; echo $sep; setenv; echo $sep; echo $sep; alias; echo\ + $sep; echo $sep; pwd" set varre {(\S+?)=(.*?)$} set aliasre {(\S+?)\t(.*?)$} set varvalmap list set alvalmap list lappend shellopts -f } + tcsh { + set command "setenv; echo $sep; echo $sep; alias; echo $sep;\ + complete; echo $sep; pwd; echo $sep; source listTo shell\ + $shdesc >& /dev/stdout; echo $sep; setenv; echo $sep; echo $sep;\ + alias; echo $sep; complete; echo $sep; pwd" + set varre {(\S+?)=(.*?)$} + set aliasre {(\S+?)\t\(?(.*?)\)?$} + set compre {(\S+?)\t(.*?)$} + set comprevar list match name value + set varvalmap list + set alvalmap list + lappend shellopts -f + } fish { - # exclude builtins and fish-specific functions from search to reduce - # the number of functions to parse - set getfunc {set funcout (string match -r -v $funcfilter (functions\ - -n) | while read f; functions $f; end);} - set command "set -xgL; echo '$sep'; set funcfilter (string join '|'\ - (string replace -r '(\\\|\\.)' '\\\\\\\\\\\$1' (builtin -n)))\\|fish\\.\\*;\ - $getfunc; $getfunc; string split \$funcout; echo '$sep'; string\ - split \$funcout; echo '$sep'; pwd; echo '$sep'; source listTo\ + # exclude from search builtins, fish-specific functions and private + # functions defined prior script evaluation: reduce this way the + # the number of functions to parse. + set getfunc "set funcout (string match -r -v \$funcfilter (functions\ + -a -n) | while read f; functions \$f; echo '$subsep'; end)" + set command "set -xgL; echo '$sep'; set funcfilter \\^\\((string\ + join '|' (string replace -r '(\\\|\\.)' '\\\\\\\\\\\\\\\$1'\ + (builtin -n; functions -a -n | string split ', ' | string match\ + -e -r '^_')))\\|fish\\.\\*\\)\\\$; $getfunc; $getfunc; string\ + split \$funcout; echo '$sep'; string split \$funcout; echo\ + '$sep'; complete; echo '$sep'; pwd; echo '$sep'; source listTo\ shell $shdesc 2>&1; or exit \$status; echo '$sep'; set -xgL;\ echo '$sep'; $getfunc; string split \$funcout; echo '$sep';\ - string split \$funcout; echo '$sep'; pwd" + string split \$funcout; echo '$sep'; complete; echo '$sep'; pwd" set varre {^(\S+?\M) ?'?(.*?)'?$} # exclude alias from function list - set funcre {^function (\S+?)(?: ^\n*?--description\ - (?!'?alias)^\n+)?\n(.+?)\s*\nend$} + set funcre "^function (\\S+?)(?: \^\\n\*?--description\ + (?!'?alias)\^\\n\+)?\\n(.+?)?\\s*\\nend\\n$subsep\$" # fetch aliases from available functions - set aliasre {^function (\S+?) ^\n*?--description\ - '?alias^\n+\n\s*(.+?)\s*\nend$} + set aliasre "^function (\\S+?) \^\\n\*?--description\ + '?alias\^\\n\+\\n\\s*(.+?)\\s*\\nend\\n$subsep\$" + set compre {complete ((?:-\S+? )*?)(?:(?:-c|--command)\ + )?(^-\S+)(.*?)$} + set comprevar list match valpart1 name valpart2 # translate back fish-specific code set varvalmap list {' '} : {\'} ' {\"} \" \\\\ \\ set alvalmap list { $argv;} {} @@ -1852,8 +2019,8 @@ # extract each output sections set idx 0 - foreach varout {varbefout funcbefout aliasbefout cwdbefout scriptout\ - varaftout funcaftout aliasaftout cwdaftout} { + foreach varout {varbefout funcbefout aliasbefout compbefout cwdbefout\ + scriptout varaftout funcaftout aliasaftout compaftout cwdaftout} { if {set sepidx string first $sep $output $idx == -1} { set $varout string trimright string range $output $idx end \n if {$varout ne {cwdaftout} && !$sherr} { @@ -1889,6 +2056,7 @@ upvar varbef varbef varaft varaft upvar funcbef funcbef funcaft funcaft upvar aliasbef aliasbef aliasaft aliasaft + upvar compbef compbef compaft compaft # extract environment variable information foreach {out arr} list varbefout varbef varaftout varaft { @@ -1915,6 +2083,19 @@ set ${arr}($name) string map $alvalmap $value } } + # extract complete information if supported by shell + if {info exists compre} { + foreach {out arr} list compbefout compbef compaftout compaft { + foreach $comprevar regexp -all -inline -lineanchor $compre set\ + $out { + if {info exists valpart1} { + set value concat $valpart1 $valpart2 + } + # no specific escaping to convert for completes + lappend ${arr}($name) $value + } + } + } } # execute script with args through shell and convert environment changes into @@ -1922,6 +2103,7 @@ proc sh-to-mod {args} { set modcontent list set pathsep getState path_separator + set shell lindex $args 0 # evaluate script and retrieve environment before and after evaluation # procedure will set result variables in current context @@ -1930,12 +2112,15 @@ # check environment variable change lassign getDiffBetweenArray varbef varaft notaft diff notbef foreach name $notaft { - if {$name ni $ignvarlist} { + # also ignore Modules variables intended for internal use + if {$name ni $ignvarlist && !string equal -length 10 $name\ + __MODULES_} { lappend modcontent list unsetenv $name } } foreach name $diff { - if {$name ni $ignvarlist} { + if {$name ni $ignvarlist && !string equal -length 10 $name\ + __MODULES_} { # new value is totally different (also consider a bare ':' as a # totally different value to avoid erroneous matches) if {$varbef($name) eq $pathsep || set idx string first\ @@ -1986,7 +2171,8 @@ } } foreach name $notbef { - if {$name ni $ignvarlist} { + if {$name ni $ignvarlist && !string equal -length 10 $name\ + __MODULES_} { if {string first $pathsep $varaft($name) == -1} { lappend modcontent list setenv $name $varaft($name) } else { @@ -2014,6 +2200,16 @@ foreach name list {*}$diff {*}$notbef { lappend modcontent list set-alias $name $aliasaft($name) } + # check complete change + lassign getDiffBetweenArray compbef compaft notaft diff notbef + foreach name $notaft { + lappend modcontent list uncomplete $name + } + foreach name list {*}$diff {*}$notbef { + foreach body $compaft($name) { + lappend modcontent list complete $shell $name $body + } + } # check current working directory change if {$cwdbefout ne $cwdaftout} { lappend modcontent list chdir $cwdaftout @@ -2037,7 +2233,7 @@ {*}$modcontent # get name of current module Tcl interp - set itrp __modfile_currentState mode_depthState modulename + set itrp getCurrentModfileInterpName # evaluate resulting modulefile commands through current Tcl interp foreach modcmd $modcontent { @@ -2058,7 +2254,7 @@ } # get name of current module unload Tcl interp - set itrp __modfile_currentState mode_depthState modulename + set itrp getCurrentModfileInterpName # evaluate each recorded command in unload Tcl interp to get them reversed foreach modcmd $modcontent { @@ -2081,14 +2277,25 @@ set reccontent {} } - # need to evaluate script to get alias and function definition + # need to evaluate script to get alias/function/complete definition execShAndGetEnv {*}$shtomodargs set modcontent {} foreach cmd $reccontent { - # build modulefile content to show with recorded elements in env - # and alias/function definition obtained by reevaluating script + # build modulefile content to show with recorded elements in env and + # alias/function/complete definition obtained by reevaluating script switch -- lindex $cmd 0 { + complete { + set cpname lindex $cmd 2 + if {info exists compaft($cpname)} { + set cpbodylist $compaft($cpname) + } else { + set cpbodylist list {} + } + foreach cpbody $cpbodylist { + lappend modcontent list complete $shell $cpname $cpbody + } + } set-alias { set alname lindex $cmd 1 if {info exists aliasaft($alname)} { @@ -2118,7 +2325,7 @@ } # get name of current module unload Tcl interp - set itrp __modfile_currentState mode_depthState modulename + set itrp getCurrentModfileInterpName # evaluate each recorded command in display Tcl interp to get them printed foreach modcmd $modcontent { @@ -2178,14 +2385,10 @@ set values {1 0 yes no true false on off} } } else { - if {llength $values == 0} { - knerror "No allowed value list defined for variant '$name'" - } else { - foreach val $values { - if {string is boolean -strict $val && !string is integer\ - -strict $val} { - knerror "Boolean value defined on non-boolean variant '$name'" - } + foreach val $values { + if {string is boolean -strict $val && !string is integer\ + -strict $val} { + knerror "Boolean value defined on non-boolean variant '$name'" } } } @@ -2242,14 +2445,16 @@ } elseif {currentState mode eq {display}} { return } else { - knerror "No value specified for variant '$name'\nAllowed\ - values are: $values" MODULES_ERR_GLOBAL + set allowedmsg expr {llength $values == 0 ? {} : "\nAllowed\ + values are: $values"} + knerror "No value specified for variant '$name'$allowedmsg"\ + MODULES_ERR_GLOBAL } } # check defined value if {($isboolean && !string is boolean -strict $value) || (!$isboolean &&\ - $value ni $values)} { + llength $values > 0 && $value ni $values)} { # invalid value error is not a modulefile error knerror "Invalid value '$value' for variant '$name'\nAllowed values\ are: $values" MODULES_ERR_GLOBAL @@ -2280,21 +2485,178 @@ $itrp eval set "{::ModuleVariant($name)}" "{}" } -proc getvariant {itrp name {valifundef {}}} { - reportDebug "name='$name', valifundef='$valifundef'" +proc getvariant {itrp args} { + # parse args + lassign parseGetenvCommandArgs getvariant {*}$args name valifundef\ + returnval - if {currentState mode ne {display}} { + if {currentState mode ne {display} || $returnval} { if {$itrp eval info exists "{::ModuleVariant($name)}"} { return $itrp eval set "{::ModuleVariant($name)}" } else { return $valifundef } - } else { return sgr va "{$name}" } } +proc require-fullname {} { + # test specified name is any alternative name of currently evaluating mod + # expect the default and parent dir name (which are considered unqualified) + if {!modEq currentState specifiedname currentState modulename eqspec\ + 1 4} { + knerror {Module version must be specified to load module}\ + MODULES_ERR_GLOBAL + } +} + +proc prereq-all {args} { + lassign parsePrereqCommandArgs prereq-all {*}$args tag_list tag_opt args + # call prereq over each arg independently to emulate a prereq-all + foreach arg $args { + prereq {*}$tag_opt $arg + } +} + +proc always-load {args} { + lassign parsePrereqCommandArgs always-load {*}$args tag_list tag_opt args + lappend tag_list keep-loaded + # load all module specified, call module rather directly cmdModuleLoad to + # get prereq recording + module load --tag join $tag_list : {*}$args +} + +proc family {name} { + # ensure name is valid to be part of the name of an environment variable + if {string length $name == 0 || !regexp {^A-Za-z0-9_*$} $name} { + knerror "Invalid family name '$name'" + } + + # only one loaded module could provide a given family + conflict $name + # set name as an alias for currently loading module + setLoadedAltname currentState modulename al|$name + + # set variable in environment to know what module name provides family + set upname string toupper $name + lassign getModuleNameVersion mod modname modversion + if {$modname eq {.}} { + set modname currentState modulename + } + setenv MODULES_FAMILY_$upname $modname + # also set Lmod-specific variable for compatibility + setenv LMOD_FAMILY_$upname $modname +} + +proc family-un {name} { + # ensure name is valid to be part of the name of an environment variable + if {string length $name == 0 || !regexp {^A-Za-z0-9_*$} $name} { + knerror "Invalid family name '$name'" + } + + # unset family-related environment variable + set upname string toupper $name + unsetenv MODULES_FAMILY_$upname + unsetenv LMOD_FAMILY_$upname +} + +proc complete {shell name body} { + if {string length $name == 0} { + knerror "Invalid command name '$name'" + } + # append definition retaining for which shell they are made + # also some shells may set multiple definitions for a single name + lappend ::g_Completes($name) $shell $body + set ::g_stateCompletes($name) new +} + +# undo complete in unload mode +proc complete-un {shell name body} { + return uncomplete $name +} + +proc uncomplete {name} { + if {string length $name == 0} { + knerror "Invalid command name '$name'" + } + set ::g_Completes($name) {} + set ::g_stateCompletes($name) del +} + +proc pushenv {var val} { + # save initial value in pushenv value stack + set pushvar getPushenvVarName $var + if {!info exists ::env($pushvar) && info exists ::env($var)} { + prepend-path $pushvar &$::env($var) + } + + # clean any previously defined reference counter array + unset-env getModshareVarName $var 1 + + # Set the variable for later use during the modulefile evaluation + set-env $var $val + + # add this value to the stack associated to current module name in order to + # know what element to remove from stack when unloading + prepend-path $pushvar currentState modulename&$val + + return {} +} + +# undo pushenv in unload mode +proc pushenv-un {var val} { + # clean any existing reference counter array + unset-env getModshareVarName $var 1 + + # update value stack + set pushvar getPushenvVarName $var + if {info exists ::env($pushvar)} { + set pushlist split $::env($pushvar) : + # find value pushed by currently evaluated module and remove it + set popidx lsearch -exact $pushlist currentState modulename&$val + if {$popidx != -1} { + set pushlist lreplace $pushlist $popidx $popidx + remove-path --index $pushvar $popidx + } + + if {llength $pushlist > 0} { + # fetch value on top of the stack + set validx expr {string first & lindex $pushlist 0 + 1} + set popval string range lindex $pushlist 0 $validx end + + # restore top value if different from current one + # env array is used instead of get-env to know if env var is undefined + if {!info exists ::env($var) || $::env($var) ne $popval} { + set-env $var $popval + } + + # if last element remaining in stack is the initial value prior first + # pushenv, then clear the stack totally + if {$validx == 1} { + remove-path --index $pushvar 0 + } + } else { + unset-env $var 0 $val + } + } else { + # Add variable to the list of variable to unset in shell output code but + # set it in interp context as done on load mode for later use during the + # modulefile evaluation + unset-env $var 0 $val + } + + return {} +} + +# optimized pushenv for whatis mode (same approach than setenv-wh) +proc pushenv-wh {var val} { + if {!info exists ::env($var)} { + set ::env($var) {} + } + return {} +} + # ;;; Local Variables: *** # ;;; mode:tcl *** # ;;; End: ***
View file
_service:tar_scm:modules-5.0.1.tar.bz2/tcl/modeval.tcl -> _service:tar_scm:modules-5.1.1.tar.bz2/tcl/modeval.tcl
Changed
@@ -3,7 +3,7 @@ # MODEVAL.TCL, module evaluation procedures # Copyright (C) 2002-2004 Mark Lakata # Copyright (C) 2004-2017 Kent Mein -# Copyright (C) 2016-2021 Xavier Delaruelle +# Copyright (C) 2016-2022 Xavier Delaruelle # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -222,7 +222,6 @@ # return list of loaded modules having an unmet requirement on passed mod # and their recursive dependent proc getUnmetDependentLoadedModuleList {modnamevr} { - reportDebug "get dependent of upcoming loaded '$modnamevr'" set unmetdeplist {} set depmodlist {} defineModEqProc isIcase getConf extended_default 1 @@ -451,8 +450,10 @@ set unmodlist getUnloadingModuleList } - # loaded tag means module was not auto-loaded - if {isModuleTagged $mod loaded 1} { + # loaded tag means module was not auto-loaded. keep-loaded means module is + # not auto-unloadable even if auto-loaded + if {isModuleTagged $mod loaded 1 || isModuleTagged $mod keep-loaded\ + 1} { set ret 0 } else { # mod is unloadable if all its dependent are unloaded or unloading @@ -470,8 +471,6 @@ # gets the list of all loaded modules which are required by passed modlist # ordered by load position. proc getRequiredLoadedModuleList {modlist} { - reportDebug "get mods required by '$modlist'" - # search over all list of loaded modules, starting with passed module # list, then adding in turns their requirements set fulllist $modlist @@ -491,8 +490,6 @@ # they have been loaded automatically and are not depended (mandatory or # optionally) by other module proc getUnloadableLoadedModuleList {modlist} { - reportDebug "get unloadable mods once '$modlist' unloaded" - # search over all list of unloaded modules, starting with passed module # list, then adding in turns unloadable requirements set fulllist $modlist @@ -534,17 +531,18 @@ # correct set in case of failure proc pushSettings {} { foreach var {env g_clearedEnvVars g_Aliases g_stateEnvVars g_stateAliases\ - g_stateFunctions g_Functions g_newXResources g_delXResources\ - g_loadedModules g_loadedModuleFiles g_loadedModuleVariant\ - g_loadedModuleConflict g_loadedModulePrereq g_loadedModuleAltname\ - g_loadedModuleAutoAltname g_loadedModuleAliasAltname g_moduleDepend\ - g_dependHash g_moduleNPODepend g_dependNPOHash g_prereqViolation\ + g_stateFunctions g_Functions g_stateCompletes g_Completes\ + g_newXResources g_delXResources g_loadedModules g_loadedModuleFiles\ + g_loadedModuleVariant g_loadedModuleConflict g_loadedModulePrereq\ + g_loadedModuleAltname g_loadedModuleAutoAltname\ + g_loadedModuleAliasAltname g_moduleDepend g_dependHash\ + g_moduleNPODepend g_dependNPOHash g_prereqViolation\ g_prereqNPOViolation g_conflictViolation g_moduleUnmetDep\ g_unmetDepHash g_moduleEval g_moduleHiddenEval} { lappend ::g_SAVE_$var array get ::$var } # save non-array variable and indication if it was set - foreach var {g_changeDir g_stdoutPuts g_return_text} { + foreach var {g_changeDir g_stdoutPuts g_prestdoutPuts g_return_text} { if {info exists ::$var} { lappend ::g_SAVE_$var list 1 set ::$var } else { @@ -557,12 +555,13 @@ proc popSettings {} { set flushedid getSavedSettingsStackDepth foreach var {env g_clearedEnvVars g_Aliases g_stateEnvVars g_stateAliases\ - g_stateFunctions g_Functions g_newXResources g_delXResources\ - g_changeDir g_stdoutPuts g_return_text\ - g_loadedModules g_loadedModuleFiles g_loadedModuleVariant\ - g_loadedModuleConflict g_loadedModulePrereq g_loadedModuleAltname\ - g_loadedModuleAutoAltname g_loadedModuleAliasAltname g_moduleDepend\ - g_dependHash g_moduleNPODepend g_dependNPOHash g_prereqViolation\ + g_stateFunctions g_Functions g_stateCompletes g_Completes\ + g_newXResources g_delXResources g_changeDir g_stdoutPuts\ + g_prestdoutPuts g_return_text g_loadedModules g_loadedModuleFiles\ + g_loadedModuleVariant g_loadedModuleConflict g_loadedModulePrereq\ + g_loadedModuleAltname g_loadedModuleAutoAltname\ + g_loadedModuleAliasAltname g_moduleDepend g_dependHash\ + g_moduleNPODepend g_dependNPOHash g_prereqViolation\ g_prereqNPOViolation g_conflictViolation g_moduleUnmetDep\ g_unmetDepHash g_moduleEval g_moduleHiddenEval} { set ::g_SAVE_$var lrange set ::g_SAVE_$var 0 end-1 @@ -572,11 +571,12 @@ proc restoreSettings {} { foreach var {g_clearedEnvVars g_Aliases g_stateEnvVars g_stateAliases\ - g_stateFunctions g_Functions g_newXResources g_delXResources\ - g_loadedModules g_loadedModuleFiles g_loadedModuleVariant\ - g_loadedModuleConflict g_loadedModulePrereq g_loadedModuleAltname\ - g_loadedModuleAutoAltname g_loadedModuleAliasAltname g_moduleDepend\ - g_dependHash g_moduleNPODepend g_dependNPOHash g_prereqViolation\ + g_stateFunctions g_Functions g_stateCompletes g_Completes\ + g_newXResources g_delXResources g_loadedModules g_loadedModuleFiles\ + g_loadedModuleVariant g_loadedModuleConflict g_loadedModulePrereq\ + g_loadedModuleAltname g_loadedModuleAutoAltname\ + g_loadedModuleAliasAltname g_moduleDepend g_dependHash\ + g_moduleNPODepend g_dependNPOHash g_prereqViolation\ g_prereqNPOViolation g_conflictViolation g_moduleUnmetDep\ g_unmetDepHash g_moduleEval g_moduleHiddenEval} { # clear current $var arrays @@ -599,7 +599,7 @@ } } # restore non-array variable if it was set - foreach var {g_changeDir g_stdoutPuts g_return_text} { + foreach var {g_changeDir g_stdoutPuts g_prestdoutPuts g_return_text} { if {info exists ::$var} { unset ::$var } @@ -612,6 +612,70 @@ (#getSavedSettingsStackDepth)" } +# load modules passed as args designated as requirement +proc loadRequirementModuleList {tag_list args} { + set ret 0 + set prereqloaded 0 + + # calling procedure must have already parsed module specification in args + set loadedmod_list {} + foreach mod $args { + # get all loaded or loading mod in args list + if {set loadedmod getLoadedMatchingName $mod returnfirst ne {} ||\ + set loadedmod getLoadedMatchingName $mod returnfirst 1 ne {}} { + lappend loadedmod_list $loadedmod + } + } + + if {llength $loadedmod_list == 0} { + set imax llength $args + # if prereq list specified, try to load first then + # try next if load of first module not successful + for {set i 0} {$i<$imax && $prereqloaded==0} {incr i 1} { + set arg lindex $args $i + + # hold output of each evaluation until they are all done to drop + # those that failed if one succeed + set curholdid load-$i-$arg + lappendState reportholdid $curholdid + if {catch {set retlo cmdModuleLoad reqlo 0 $tag_list $arg}\ + errorMsg} { + # if an error is raised, release output and rethrow the error + # (could be raised if no modulepath defined for instance) + lpopState reportholdid + lappend holdidlist $curholdid report + releaseHeldReport {*}$holdidlist + knerror $errorMsg + } + # update return value if an issue occurred in cmdModuleLoad + if {$retlo != 0} { + set ret $retlo + } + lpopState reportholdid + + if {is-loaded $arg} { + set prereqloaded 1 + # set previous reports to be dropped as this one succeed + if {info exists holdidlist} { + foreach {holdid action} $holdidlist { + lappend newholdidlist $holdid drop + } + set holdidlist $newholdidlist + } + } + lappend holdidlist $curholdid report + } + # output held messages + releaseHeldReport {*}$holdidlist + } else { + set prereqloaded 1 + # apply missing tag to all loaded module found + cmdModuleTag 0 0 $tag_list {*}$loadedmod_list + } + + return list $ret $prereqloaded +} + # unload phase of a list of modules reload process proc reloadModuleListUnloadPhase {lmname {force 0} {errmsgtpl {}} {context\ unload}} { @@ -625,6 +689,8 @@ set isuasked($mod) isModuleTagged $mod loaded 1 # save variants set for modules set vr($mod) getVariantList $mod 1 2 + # save extra tags set + set extratag($mod) getExtraTagList $mod # force unload even if requiring mods are not part of the unload list # (violation state) as modules are loaded again just after if {cmdModuleUnload $context match 0 1 0 0 $mod} { @@ -646,15 +712,16 @@ lpopState reloading_sticky lpopState reloading_supersticky } - return list array get isuasked array get vr + return list array get isuasked array get vr array get extratag } # load phase of a list of modules reload process -proc reloadModuleListLoadPhase {lmname isuaskedlist vrlist {force 0}\ - {errmsgtpl {}} {context load}} { +proc reloadModuleListLoadPhase {lmname isuaskedlist vrlist extrataglist\ + {force 0} {errmsgtpl {}} {context load}} { upvar $lmname lmlist array set isuasked $isuaskedlist array set vr $vrlist + array set extratag $extrataglist # loads are made with auto handling mode disabled to avoid disturbances # from a missing prereq automatically reloaded, so these module loads may @@ -663,8 +730,9 @@ foreach mod $lmlist { # if an auto set default was excluded, module spec need parsing lassign parseModuleSpecification 0 $mod {*}$vr($mod) modnamevr - # reload module with user asked property preserved - if {cmdModuleLoad $context $isuasked($mod) $modnamevr} { + # reload module with user asked property and extra tags preserved + if {cmdModuleLoad $context $isuasked($mod) $extratag($mod)\ + $modnamevr} { set errMsg string map list _MOD_ getModuleDesignation spec\ $modnamevr $errmsgtpl if {$force} { @@ -682,7 +750,7 @@ # test if loaded module 'mod' is sticky and if stickiness definition applies # to one of the reloading module -proc isStickynessReloading {mod reloading_modlist {tag sticky}} { +proc isStickinessReloading {mod reloading_modlist {tag sticky}} { set res 0 set modname getModuleNameAndVersFromVersSpec $mod if {isModuleTagged $modname $tag 1} {
View file
_service:tar_scm:modules-5.0.1.tar.bz2/tcl/modfind.tcl.in -> _service:tar_scm:modules-5.1.1.tar.bz2/tcl/modfind.tcl.in
Changed
@@ -3,7 +3,7 @@ # MODFIND.TCL, available or loaded module find procedures # Copyright (C) 2002-2004 Mark Lakata # Copyright (C) 2004-2017 Kent Mein -# Copyright (C) 2016-2021 Xavier Delaruelle +# Copyright (C) 2016-2022 Xavier Delaruelle # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -307,7 +307,8 @@ } # retrieve all names that resolve to passed mod -proc getAllModuleResolvedName {mod {flag_type 0} {modspec {}}} { +proc getAllModuleResolvedName {mod {flag_type 0} {modspec {}} {filter_default\ + 0}} { set namelist {} set resmodlist {} set icase isIcase @@ -322,6 +323,9 @@ lappend resmodlist $modroot } + set modpar file dirname $mod + set moddfl $modpar/default + # add additionally all the altnames set on directories, parents of mod # or on distant directories whose default version resolves to mod for {set i 0} {$i < llength $resmodlist} {incr i 1} { @@ -342,6 +346,8 @@ # whose default version bridge resolution toward mod) # if modspec arg is set, exclude hidden entries not explicitly # matching modspec. auto symbols cannot be hidden + # if filter_default is asked, skip parent module name and /default + # symbol name from result list if {($modspec eq {} || (info exists ::g_autoSymbol($resmod) &&\ $::g_autoSymbol($resmod) eq $mod) || (!isModuleHidden $resmod\ $modspec && ($resmoddfl eq {} || !isModuleHidden $resmoddfl\ @@ -349,7 +355,8 @@ ne {} && modEq $modspec $resmodpar eqspec)) && (modEq\ $modelt $mod eqstart || $::g_moduleResolved($resmod) eq $mod\ || $mod eq lindex getPathToModule\ - $::g_moduleResolved($resmod) {} 0 1)} { + $::g_moduleResolved($resmod) {} 0 1) && (!$filter_default ||\ + (!modEq $resmod $modpar && !modEq $resmod $moddfl))} { # prefix automatically generated syms with type flag if asked if {$flag_type && info exists ::g_moduleAlias($resmod)} { appendNoDupToList namelist al|$resmod @@ -568,6 +575,21 @@ return $modtaglist } +# return list of loaded module extra tags by parsing __MODULES_LMEXTRATAG +proc getLoadedModuleExtraTagList {} { + set modtaglist list + set sub1sep getState sub1_separator + foreach modtagser split get-env __MODULES_LMEXTRATAG getState\ + path_separator { + set taglist split $modtagser $sub1sep + # ignore empty element (1 is meaningless as first elt is loaded mod) + if {llength $taglist > 1} { + lappend modtaglist $taglist + } + } + return $modtaglist +} + # return list of module paths by parsing MODULEPATH env variable # behavior param enables to exit in error when no MODULEPATH env variable # is set. by default an empty list is returned if no MODULEPATH set @@ -678,33 +700,98 @@ } proc setModuleTag {mod args} { - lappend ::g_tagHash($mod) {*}$args + appendNoDupToList ::g_tagHash($mod) {*}$args } -proc getTagList {mod {serialized 0}} { +proc setModuleExtraTag {mod args} { + appendNoDupToList ::g_extraTagHash($mod) {*}$args +} + +proc unsetModuleTag {mod args} { if {info exists ::g_tagHash($mod)} { - if {$serialized} { - # get tag info as a string that can be registered in an env var - # remove loaded/hidden tags from the list to register - lassign getDiffBetweenList $::g_tagHash($mod) list loaded hidden\ - tag_list - if {llength $tag_list > 0} { - # extract mod name and version from full spec with variants - set ret join list getModuleNameAndVersFromVersSpec $mod\ - {*}$tag_list getState sub1_separator - } else { - set ret {} - } + lassign getDiffBetweenList $::g_tagHash($mod) $args diff_list + if {llength $diff_list > 0} { + set ::g_tagHash($mod) $diff_list } else { + unset ::g_tagHash($mod) + } + } +} + +proc unsetModuleExtraTag {mod args} { + if {info exists ::g_extraTagHash($mod)} { + lassign getDiffBetweenList $::g_extraTagHash($mod) $args diff_list + if {llength $diff_list > 0} { + set ::g_extraTagHash($mod) $diff_list + } else { + unset ::g_extraTagHash($mod) + } + } +} + +proc getTagList {mod {sort 1}} { + if {info exists ::g_tagHash($mod)} { + if {$sort} { set ret lsort -dictionary $::g_tagHash($mod) - reportDebug "'$mod' has tag list '$ret'" + } else { + set ret $::g_tagHash($mod) } + reportDebug "'$mod' has tag list '$ret'" } else { set ret {} } return $ret } +# return tags applying to mod that can be exported +proc getExportTagList {mod {serialized 0}} { + # remove loaded/hidden tags from the list to register + lassign getDiffBetweenList getTagList $mod 0 list loaded hidden ret + if {$serialized && llength $ret > 0} { + # extract mod name and version from full spec with variants + set ret join list getModuleNameAndVersFromVersSpec $mod {*}$ret\ + getState sub1_separator + } + return $ret +} + +# return extra tags set on mod +proc getExtraTagList {mod {serialized 0}} { + if {info exists ::g_extraTagHash($mod)} { + if {$serialized} { + # extract mod name and version from full spec with variants + set ret join list getModuleNameAndVersFromVersSpec $mod\ + {*}$::g_extraTagHash($mod) getState sub1_separator + } else { + set ret $::g_extraTagHash($mod) + } + } else { + set ret {} + } + return $ret +} + +# return tags set on mod to record in collection +proc getSaveTagList {mod} { + # return all tags if pin tag is enabled, except nearly-forbidden that is + # not intended for save + if {getConf collection_pin_tag} { + lassign getDiffBetweenList getExportTagList $mod list\ + nearly-forbidden ret + } else { + set ret getExtraTagList $mod + # in addition to those set with --tag option, add tags obtained by the + # way mod has been loaded + if {isModuleTagged $mod auto-loaded 1} { + lappend ret auto-loaded + } + if {isModuleTagged $mod keep-loaded 1} { + lappend ret keep-loaded + } + } + return $ret +} + proc abbrevTagList {taglist} { set ret list foreach tag $taglist { @@ -920,7 +1007,7 @@ set vrlist getVariantList $mod 1 0 1 if {$mod eq {}} { set retlist list {} {} {} none getEmptyNameMsg module - # try first to look at loaded modules if enabled to find maching module + # try first to look at loaded modules if enabled to find matching module # or to find a closest match (used when switching with single name arg) } elseif {$look_loaded ne {no}} { switch -- $look_loaded { @@ -1125,24 +1212,15 @@ set ::g_loadedModules($mod) $modfile # a loaded modfile may correspond to multiple loaded virtual modules lappend ::g_loadedModuleFiles($modfile) $mod + # record if mod has been asked by user and relative loaded/auto-loaded tag - if {$uasked} { - setModuleTag $mod loaded - # also record tag for module designation including variants if specified - if {$modvr ne {} && $mod ne $modvr} { - setModuleTag $modvr loaded - } - # do not register auto-loaded tag if already done (when called from - # cacheCurrentModules proc) - } else { - if {!isModuleTagged $mod auto-loaded 1} { - setModuleTag $mod auto-loaded - } - if {$modvr ne {} && $mod ne $modvr && !isModuleTagged $modvr\ - auto-loaded 1} { - setModuleTag $modvr auto-loaded - } + set loadedtag expr {$uasked ? {loaded} : {auto-loaded}} + setModuleTag $mod $loadedtag + # also record tag for module designation including variants if specified + if {$modvr ne {} && $mod ne $modvr} { + setModuleTag $modvr $loadedtag } + # build dependency chain setModuleDependency $mod } @@ -1319,15 +1397,26 @@ set modcontent lrange $arg 1 end if {!info exists ::g_loadedModuleSourceSh($mod) || $shtomodargs ni\ $::g_loadedModuleSourceSh($mod)} { - # filter alias or function definition not to record them + # filter alias/function/complete definition not to record them set filtmodcont list foreach modcmdlist $modcontent { set modcmd lindex $modcmdlist 0 - if {$modcmd eq {set-alias} || $modcmd eq {set-function}} { - # set an empty body to make valid unset-* call - lappend filtmodcont list {*}lrange $modcmdlist 0 1 {} - } else { - lappend filtmodcont $modcmdlist + switch -- $modcmd { + set-alias - set-function { + # set an empty body to make valid unset-* call + lappend filtmodcont list {*}lrange $modcmdlist 0 1 {} + } + complete { + set complist lrange $modcmdlist 0 2 + # ensure only one order is recorded for each shell-name + if {!info exists filtcomp($complist)} { + lappend filtmodcont list {*}$complist {} + set filtcomp($complist) 1 + } + } + default { + lappend filtmodcont $modcmdlist + } } } lappend ::g_loadedModuleSourceSh($mod) $shtomodargs $filtmodcont @@ -1490,9 +1579,6 @@ appendNoDupToList ::g_loadedModuleAltname($mod) $arg } } - if {string range $arg 0 2 eq {as|}} { - } else { - } } } @@ -1591,17 +1677,21 @@ return $modvrlist } -proc getLoadedModuleWithVariantNotUserAskedList {} { - set modvrlist list - foreach mod getTaggedLoadedModuleList auto-loaded { +proc getLoadedModuleWithVariantSaveTagArrayList {} { + array set tag_arr {} + foreach mod getLoadedModuleList { set modvr list $mod set vrlist getVariantList $mod 1 if {llength $vrlist > 0} { lappend modvr {*}$vrlist } - lappend modvrlist $modvr + # create entry in array only if tags set + set tag_list getSaveTagList $mod + if {llength $tag_list > 0} { + set tag_arr($modvr) $tag_list + } } - return $modvrlist + return array get tag_arr } # register conflict violation state between loaded modules @@ -1763,7 +1853,7 @@ foreach depmodlist $::g_moduleNPODepend($lmmod) { if {set depidx lsearch -exact $depmodlist $mod != -1} { set depmodlist lreplace $depmodlist $depidx $depidx - # implies to update consistenly alternate requirement or + # implies to update consistently alternate requirement or # violation state if no alternative loaded switch -- llength $depmodlist { 0 { @@ -1966,6 +2056,14 @@ setModuleTag $modvrarr($mod) {*}lrange $modtag 1 end } } + foreach modtag getLoadedModuleExtraTagList { + setModuleExtraTag {*}$modtag + # also record tag over full mod and vr designation + set mod lindex $modtag 0 + if {info exists modvrarr($mod)} { + setModuleExtraTag $modvrarr($mod) {*}lrange $modtag 1 end + } + } # cache declared alternative names of loaded modules foreach modalt getLoadedModuleAltnameList { @@ -2044,12 +2142,12 @@ } proc checkValidModule {modfile} { - reportDebug $modfile - # test file only once, cache result obtained to minimize file query + # consider modfile valid without reading it if mcookie_check < always return expr {info exists ::g_modfileValid($modfile)\ ? $::g_modfileValid($modfile)\ - : set ::g_modfileValid($modfile) readModuleContent $modfile 1 1} + : set ::g_modfileValid($modfile) expr {getConf mcookie_check eq\ + {always} ? readModuleContent $modfile 1 1 : list true {}}} } # get file modification time, cache it at first query, use cache afterward @@ -2057,7 +2155,15 @@ if {info exists ::g_fileMtime($fpath)} { return $::g_fileMtime($fpath) } else { - return set ::g_fileMtime($fpath) file mtime $fpath + # protect 'file mtime' call in case we do not know what we are checking + # when mcookie is not checked + if {catch { + set mtime file mtime $fpath + } errMsg } { + reportError parseAccessIssue $fpath + set mtime {} + } + return set ::g_fileMtime($fpath) $mtime } } @@ -2083,7 +2189,6 @@ proc readModuleContent {modfile {report_read_issue 0} {only_check_validity\ 0}} { - reportDebug $modfile set res {} # read file
View file
_service:tar_scm:modules-5.0.1.tar.bz2/tcl/modspec.tcl -> _service:tar_scm:modules-5.1.1.tar.bz2/tcl/modspec.tcl
Changed
@@ -1,7 +1,7 @@ ########################################################################## # MODSPEC.TCL, module specification procedures -# Copyright (C) 2016-2021 Xavier Delaruelle +# Copyright (C) 2016-2022 Xavier Delaruelle # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -28,9 +28,15 @@ # define proc if not done yet or if it was defined for another context if {info procs modStartNb eq {} || $::g_modStartNb_proc ne $procname} { if {info exists ::g_modStartNb_proc} { + # remove existing debug trace if any + trace remove execution modStartNb enter reportTraceExecEnter rename ::modStartNb ::$::g_modStartNb_proc } rename ::$procname ::modStartNb + # set debug trace if verbosity is set to debug2 or higher + if {isVerbosityLevel debug2} { + trace add execution modStartNb enter reportTraceExecEnter + } set ::g_modStartNb_proc $procname } } @@ -93,9 +99,15 @@ if {info procs getEqArrayKey eq {} || $::g_getEqArrayKey_proc ne\ $procname} { if {info exists ::g_getEqArrayKey_proc} { + # remove existing debug trace if any + trace remove execution getEqArrayKey enter reportTraceExecEnter rename ::getEqArrayKey ::$::g_getEqArrayKey_proc } rename ::$procname ::getEqArrayKey + # set debug trace if verbosity is set to debug2 or higher + if {isVerbosityLevel debug2} { + trace add execution getEqArrayKey enter reportTraceExecEnter + } set ::g_getEqArrayKey_proc $procname } @@ -213,6 +225,8 @@ if {info procs doesModMatchAtDepth eq {} ||\ $::g_doesModMatchAtDepth_procprops ne $procprops} { if {info exists ::g_doesModMatchAtDepth_procprops} { + # remove existing debug trace if any + trace remove execution doesModMatchAtDepth enter reportTraceExecEnter rename ::doesModMatchAtDepth {} } set ::g_doesModMatchAtDepth_procprops $procprops @@ -224,6 +238,10 @@ set atdepth "\join \lrange \split \$mod /\ 0 $querydepth\ /\" } proc doesModMatchAtDepth {mod} "return \modEqStatic $atdepth $test *\" + # set debug trace if verbosity is set to debug2 or higher + if {isVerbosityLevel debug2} { + trace add execution doesModMatchAtDepth enter reportTraceExecEnter + } } } @@ -241,9 +259,15 @@ # define proc if not done yet or if it was defined for another context if {info procs modVersCmp eq {} || $::g_modVersCmp_proc ne $procname} { if {info exists ::g_modVersCmp_proc} { + # remove existing debug trace if any + trace remove execution modVersCmp enter reportTraceExecEnter rename ::modVersCmp ::$::g_modVersCmp_proc } rename ::$procname ::modVersCmp + # set debug trace if verbosity is set to debug2 or higher + if {isVerbosityLevel debug2} { + trace add execution modVersCmp enter reportTraceExecEnter + } set ::g_modVersCmp_proc $procname } } @@ -466,6 +490,8 @@ if {info procs modEqStatic eq {} || $::g_modEqStatic_procprops ne\ $procprops} { if {info exists ::g_modEqStatic_procprops} { + # remove existing debug trace if any + trace remove execution modEqStatic enter reportTraceExecEnter rename ::modEqStatic {} } else { # also define modVersCmp which is called by modEqStatic @@ -543,6 +569,10 @@ append procbody " return \$ret" proc modEqStatic {mod {test equal} {psuf {}}} $procbody + # set debug trace if verbosity is set to debug2 or higher + if {isVerbosityLevel debug2} { + trace add execution modEqStatic enter reportTraceExecEnter + } } } @@ -560,9 +590,15 @@ # define proc if not done yet or if it was defined for another context if {info procs modEq eq {} || $::g_modEq_proc ne $procname} { if {info exists ::g_modEq_proc} { + # remove existing debug trace if any + trace remove execution modEq enter reportTraceExecEnter rename ::modEq ::$::g_modEq_proc } rename ::$procname ::modEq + # set debug trace if verbosity is set to debug2 or higher + if {isVerbosityLevel debug2} { + trace add execution modEq enter reportTraceExecEnter + } set ::g_modEq_proc $procname } @@ -577,7 +613,7 @@ # alternative definitions of modEq proc proc modEqProc {pattern mod {test equal} {trspec 1} {ismodlo 0} {vrcmp 0}\ - {modvrlist 0}} { + {modvrlist 0} {psuf {}}} { # extract specified module name from name and version spec if {$trspec} { lassign getModuleVersSpec $pattern pmod pmodname cmpspec versspec\ @@ -585,12 +621,16 @@ } else { set pmod $pattern } - # trim dup trailing / char + # trim dup trailing / char and adapt pmod suffix if it starts with / if {string index $pmod end eq {/}} { set pmod string trimright $pmod // + set endwslash 1 + } else { + set endwslash 0 } # get alternative names if mod is loading(1) or loaded(2) set altlist switch -- $ismodlo { + 4 {getAllModuleResolvedName $mod 0 {} 1} 3 {getLoadedAltAndSimplifiedName $mod} 2 {getLoadedAltname $mod} 1 {getAllModuleResolvedName $mod} @@ -602,6 +642,13 @@ } # specified module can be translated in a simple mod name/vers or is empty if {$pmod ne {} || $pattern eq {}} { + if {$psuf ne {}} { + if {$endwslash && string index $psuf 0 eq {/}} { + append pmod string range $psuf 1 end + } else { + append pmod $psuf + } + } if {$test eq {eqstart}} { set ret string equal -length string length $pmod/ $pmod/ $mod/ # apply comparison to alternative names if any and no match for mod @@ -633,7 +680,7 @@ } } elseif {$test eq {eqspec}} { # test equality against all version described in spec (list or range - # boundaries), trspec is considered enabled + # boundaries), trspec is considered enabled and psuf empty foreach pmod getAllModulesFromVersSpec $pattern { if {set ret string equal $pmod $mod} { break @@ -656,7 +703,7 @@ $pmodname/ $pmodname/ $mod/} { # then compare versions set modvers string range $mod string length $pmodname/ end - set ret modVersCmp $cmpspec $versspec $modvers $test + set ret modVersCmp $cmpspec $versspec $modvers $test $psuf } else { set ret 0 } @@ -668,7 +715,8 @@ -length string length $pmodname/ $pmodname/ $alt/} { # then compare versions set modvers string range $alt string length $pmodname/ end - if {set ret modVersCmp $cmpspec $versspec $modvers $test} { + if {set ret modVersCmp $cmpspec $versspec $modvers $test\ + $psuf} { break } } @@ -688,7 +736,7 @@ return $ret } proc modEqProcIcase {pattern mod {test equal} {trspec 1} {ismodlo 0} {vrcmp\ - 0} {modvrlist 0}} { + 0} {modvrlist 0} {psuf {}}} { if {$trspec} { lassign getModuleVersSpec $pattern pmod pmodname cmpspec versspec\ pmodnamere pmodescglob pmodroot pvrlist @@ -697,8 +745,12 @@ } if {string index $pmod end eq {/}} { set pmod string trimright $pmod // + set endwslash 1 + } else { + set endwslash 0 } set altlist switch -- $ismodlo { + 4 {getAllModuleResolvedName $mod 0 {} 1} 3 {getLoadedAltAndSimplifiedName $mod} 2 {getLoadedAltname $mod} 1 {getAllModuleResolvedName $mod} @@ -708,6 +760,13 @@ set mod getModuleNameAndVersFromVersSpec $mod } if {$pmod ne {} || $pattern eq {}} { + if {$psuf ne {}} { + if {$endwslash && string index $psuf 0 eq {/}} { + append pmod string range $psuf 1 end + } else { + append pmod $psuf + } + } if {$test eq {eqstart}} { set ret string equal -nocase -length string length $pmod/ $pmod/\ $mod/ @@ -738,7 +797,7 @@ } } elseif {$test eq {eqspec}} { # test equality against all version described in spec (list or range - # boundaries), trspec is considered enabled + # boundaries), trspec is considered enabled and psuf empty foreach pmod getAllModulesFromVersSpec $pattern { if {set ret string equal -nocase $pmod $mod} { break @@ -761,7 +820,7 @@ -length string length $pmodname/ $pmodname/ $mod/} { # then compare versions set modvers string range $mod string length $pmodname/ end - set ret modVersCmp $cmpspec $versspec $modvers $test + set ret modVersCmp $cmpspec $versspec $modvers $test $psuf } else { set ret 0 } @@ -772,7 +831,8 @@ -nocase -length string length $pmodname/ $pmodname/ $alt/} { # then compare versions set modvers string range $alt string length $pmodname/ end - if {set ret modVersCmp $cmpspec $versspec $modvers $test} { + if {set ret modVersCmp $cmpspec $versspec $modvers $test\ + $psuf} { break } } @@ -790,7 +850,7 @@ return $ret } proc modEqProcExtdfl {pattern mod {test equal} {trspec 1} {ismodlo 0} {vrcmp\ - 0} {modvrlist 0}} { + 0} {modvrlist 0} {psuf {}}} { if {$trspec} { lassign getModuleVersSpec $pattern pmod pmodname cmpspec versspec\ pmodnamere pmodescglob pmodroot pvrlist @@ -799,8 +859,12 @@ } if {string index $pmod end eq {/}} { set pmod string trimright $pmod // + set endwslash 1 + } else { + set endwslash 0 } set altlist switch -- $ismodlo { + 4 {getAllModuleResolvedName $mod 0 {} 1} 3 {getLoadedAltAndSimplifiedName $mod} 2 {getLoadedAltname $mod} 1 {getAllModuleResolvedName $mod} @@ -810,6 +874,13 @@ set mod getModuleNameAndVersFromVersSpec $mod } if {$pmod ne {} || $pattern eq {}} { + if {$psuf ne {}} { + if {$endwslash && string index $psuf 0 eq {/}} { + append pmod string range $psuf 1 end + } else { + append pmod $psuf + } + } if {$test eq {eqstart}} { set ret string equal -length string length $pmod/ $pmod/ $mod/ if {!$ret && llength $altlist > 0} { @@ -856,7 +927,7 @@ } } elseif {$test eq {eqspec}} { # test equality against all version described in spec (list or range - # boundaries), trspec is considered enabled + # boundaries), trspec is considered enabled and psuf empty foreach pmod getAllModulesFromVersSpec $pattern { if {set ret string equal $pmod $mod} { break @@ -879,7 +950,7 @@ $pmodname/ $pmodname/ $mod/} { # then compare versions set modvers string range $mod string length $pmodname/ end - set ret modVersCmp $cmpspec $versspec $modvers $test + set ret modVersCmp $cmpspec $versspec $modvers $test $psuf } else { set ret 0 } @@ -890,7 +961,8 @@ -length string length $pmodname/ $pmodname/ $alt/} { # then compare versions set modvers string range $alt string length $pmodname/ end - if {set ret modVersCmp $cmpspec $versspec $modvers $test} { + if {set ret modVersCmp $cmpspec $versspec $modvers $test\ + $psuf} { break } } @@ -908,7 +980,7 @@ return $ret } proc modEqProcIcaseExtdfl {pattern mod {test equal} {trspec 1} {ismodlo 0}\ - {vrcmp 0} {modvrlist 0}} { + {vrcmp 0} {modvrlist 0} {psuf {}}} { if {$trspec} { lassign getModuleVersSpec $pattern pmod pmodname cmpspec versspec\ pmodnamere pmodescglob pmodroot pvrlist @@ -917,8 +989,12 @@ } if {string index $pmod end eq {/}} { set pmod string trimright $pmod // + set endwslash 1 + } else { + set endwslash 0 } set altlist switch -- $ismodlo { + 4 {getAllModuleResolvedName $mod 0 {} 1} 3 {getLoadedAltAndSimplifiedName $mod} 2 {getLoadedAltname $mod} 1 {getAllModuleResolvedName $mod} @@ -928,6 +1004,13 @@ set mod getModuleNameAndVersFromVersSpec $mod } if {$pmod ne {} || $pattern eq {}} { + if {$psuf ne {}} { + if {$endwslash && string index $psuf 0 eq {/}} { + append pmod string range $psuf 1 end + } else { + append pmod $psuf + } + } if {$test eq {eqstart}} { set ret string equal -nocase -length string length $pmod/ $pmod/\ $mod/ @@ -975,7 +1058,7 @@ } } elseif {$test eq {eqspec}} { # test equality against all version described in spec (list or range - # boundaries), trspec is considered enabled + # boundaries), trspec is considered enabled and psuf empty foreach pmod getAllModulesFromVersSpec $pattern { if {set ret string equal -nocase $pmod $mod} { break @@ -998,7 +1081,7 @@ -length string length $pmodname/ $pmodname/ $mod/} { # then compare versions set modvers string range $mod string length $pmodname/ end - set ret modVersCmp $cmpspec $versspec $modvers $test + set ret modVersCmp $cmpspec $versspec $modvers $test $psuf } else { set ret 0 } @@ -1009,7 +1092,8 @@ -nocase -length string length $pmodname/ $pmodname/ $alt/} { # then compare versions set modvers string range $alt string length $pmodname/ end - if {set ret modVersCmp $cmpspec $versspec $modvers $test} { + if {set ret modVersCmp $cmpspec $versspec $modvers $test\ + $psuf} { break } } @@ -1098,10 +1182,18 @@ if {info procs parseModuleSpecification eq {} ||\ $::g_parseModuleSpecification_proc ne $procname} { if {info exists ::g_parseModuleSpecification_proc} { + # remove existing debug trace if any + trace remove execution parseModuleSpecification enter\ + reportTraceExecEnter rename ::parseModuleSpecification\ ::$::g_parseModuleSpecification_proc } rename ::$procname ::parseModuleSpecification + # set debug trace if verbosity is set to debug2 or higher + if {isVerbosityLevel debug2} { + trace add execution parseModuleSpecification enter\ + reportTraceExecEnter + } set ::g_parseModuleSpecification_proc $procname } }
View file
_service:tar_scm:modules-5.0.1.tar.bz2/tcl/report.tcl.in -> _service:tar_scm:modules-5.1.1.tar.bz2/tcl/report.tcl.in
Changed
@@ -3,7 +3,7 @@ # REPORT.TCL, output handling procedures # Copyright (C) 2002-2004 Mark Lakata # Copyright (C) 2004-2017 Kent Mein -# Copyright (C) 2016-2021 Xavier Delaruelle +# Copyright (C) 2016-2022 Xavier Delaruelle # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -326,10 +326,10 @@ set cmd1 $cmd2 } - # filter out stack element referring to or called by an unknown procedure - # (ie. a modulecmd.tcl internal procedure) - if {string index $cmd1 0 ne {$} && $cmd1 ne $unkcmd && ($cmdcaller in\ - $filtercmdlist || $cmd1 in $filtercmdlist)} { + # filter out stack element referring to or called by an unknown + # procedure (ie. a modulecmd.tcl internal procedure) + if {$cmd1 ne $unkcmd && ($cmdcaller in $filtercmdlist || $cmd1 in\ + $filtercmdlist)} { set errmsg string replace $errmsg $aftheadidx expr {string first\ $splitstr $errmsg + $splitstrlen - 1} } else { @@ -710,8 +710,8 @@ return $ret } -proc registerModuleDesignation {evalid mod vrlist} { - set ::g_moduleDesgination($evalid) list $mod $vrlist +proc registerModuleDesignation {evalid mod vrlist taglist} { + set ::g_moduleDesgination($evalid) list $mod $vrlist $taglist } proc getModuleDesignation {from {mod {}} {sgr 1}} { @@ -720,54 +720,55 @@ spec { set moddesig getModuleNameAndVersFromVersSpec $mod set vrlist getVariantList $mod 1 0 1 + set taglist {} } loaded { set moddesig $mod set vrlist getVariantList $mod 1 + set taglist {} } default { # fetch information from passed evaluation id if {info exists ::g_moduleDesgination($from)} { - lassign $::g_moduleDesgination($from) moddesig vrlist + lassign $::g_moduleDesgination($from) moddesig vrlist taglist # if not found, use passed spec to compute designation } else { set moddesig getModuleNameAndVersFromVersSpec $mod set vrlist getVariantList $mod 1 0 1 + set taglist getExportTagList $mod } } } # build module designation - # add module name and version to the designation - if {$sgr > 1} { - set desig sgr hi $moddesig - } else { - set desig $moddesig - } - # enclose module name between quotes if a space is found - if {string first { } $moddesig != -1} { - set desig '$desig' - } - - # add variant specification to the designation - if {llength $vrlist > 0} { - foreach vr $vrlist { - switch -- $sgr { - 2 {set vrdesig sgr va $vr} - 1 {set vrdesig sgr {se va} $vr} - 0 {set vrdesig $vr} - } - lappend vrdesiglist $vrdesig + switch -- $sgr { + 2 { + set vrsgr va + set himatchmap prepareMapToHightlightSubstr $moddesig + + set showtags 1 + # prepare list of tag abbreviations that can be substituted and list + # of tags whose name should be colored + getConf tag_abbrev + getConf tag_color_name + # abbreviate tags + set taglist abbrevTagList $taglist } - if {$sgr > 0} { - append desig sgr se "\{" join $vrdesiglist sgr se : sgr se\ - "\}" - } else { - append desig "\{" join $vrdesiglist : "\}" + 1 { + set vrsgr {se va} + set himatchmap {} + set showtags 0 + } + 0 { + set vrsgr {} + set himatchmap {} + set showtags 0 } } + lassign formatListEltToDisplay $moddesig {} {} {} {} 0 0 $taglist\ + $showtags $vrlist $vrsgr 1 $himatchmap disp dispsgr displen - return $desig + return $dispsgr } # @@ -939,9 +940,18 @@ } } - set disp $elt$eltsuffix + set displen 0 + set disp $elt lappend eltsgrlist $eltsgr - set dispsgr sgr $eltsgrlist $elt $himatchmap $tagsgrlist$eltsuffix + set dispsgr sgr $eltsgrlist $elt $himatchmap $tagsgrlist + # enclose name between quotes if a space is found + if {string first { } $elt != -1} { + incr displen 2 + set dispsgr '$dispsgr' + } + # append suffix + append disp $eltsuffix + append dispsgr $eltsuffix # format variant list if any if {$show_vrs && llength $vr_list > 0} { @@ -1008,21 +1018,37 @@ append dispsgr $tagssgr } - return list $disp $dispsgr + # compute length + incr displen string length $disp + + return list $disp $dispsgr $displen } # format an element with its syms for a long/detailed display in a list proc formatListEltToLongDisplay {elt eltsgr eltsuffix sym_list symsgr mtime\ sgrdef {himatchmap {}}} { - set disp $elt$eltsuffix - set displen string length $disp # display default sym graphically over element name if {set defidx lsearch -exact $sym_list default != -1 && $sgrdef} { set sym_list lreplace $sym_list $defidx $defidx lappend eltsgrlist de } lappend eltsgrlist $eltsgr - set dispsgr sgr $eltsgrlist $elt $himatchmap$eltsuffix + + set displen 0 + set disp $elt + set dispsgr sgr $eltsgrlist $elt $himatchmap + # enclose name between quotes if a space is found + if {string first { } $elt != -1} { + incr displen 2 + set dispsgr '$dispsgr' + } + # append suffix + append disp $eltsuffix + append dispsgr $eltsuffix + + # compute length + incr displen string length $disp + # format remaining sym list if {llength $sym_list > 0} { set symslen string length join $sym_list : @@ -1041,7 +1067,7 @@ set nbws1 expr {40 - $displen} set nbws2 expr {20 - $symslen + expr {$nbws1 < 0 ? $nbws1 : 0}} return list $disp $dispsgrstring repeat { } $nbws1$symssgrstring\ - repeat { } $nbws2$mtime + repeat { } $nbws2$mtime $displen } proc formatArrayValToJson {vallist} { @@ -1156,11 +1182,11 @@ } elseif {$show_mtime} { # append / char after name to clearly indicate this is a dir lassign formatListEltToLongDisplay $elt di / $sym_list sy {}\ - $default_colored $himatchmap disp dispsgr + $default_colored $himatchmap disp dispsgr displen } else { lassign formatListEltToDisplay $elt di / $sym_list sy\ $report_sym $default_colored {} 0 {} {} 0 $himatchmap disp\ - dispsgr + dispsgr displen } } modulefile - virtual { @@ -1175,11 +1201,12 @@ # add to display file modification time in addition # to potential syms lassign formatListEltToLongDisplay $elt {} {} $sym_list sy\ - $clock_mtime $default_colored $himatchmap disp dispsgr + $clock_mtime $default_colored $himatchmap disp dispsgr\ + displen } else { lassign formatListEltToDisplay $elt {} {} $sym_list sy\ $report_sym $default_colored $tag_list $report_tag $vr_list\ - va $report_variant $himatchmap disp dispsgr + va $report_variant $himatchmap disp dispsgr displen } } alias { @@ -1190,7 +1217,7 @@ } elseif {$show_mtime} { lassign formatListEltToLongDisplay $elt al " -> lindex\ $mod_list($elt) 1" $sym_list sy {} $default_colored\ - $himatchmap disp dispsgr + $himatchmap disp dispsgr displen } elseif {$report_alias} { # add a '@' sym to indicate elt is an alias if not colored if {!$alias_colored} { @@ -1202,7 +1229,7 @@ } lassign formatListEltToDisplay $elt al {} $sym_list sy\ $report_sym $default_colored $tag_list $report_tag {} {} 0\ - $himatchmap disp dispsgr + $himatchmap disp dispsgr displen } } } @@ -1212,6 +1239,7 @@ } else { lappend clean_list $disp set sgrmap($disp) $dispsgr + set lenmap($disp) $displen } } } @@ -1232,9 +1260,9 @@ foreach disp $clean_list { # compute display element length list on sorted result lappend display_list $sgrmap($disp) - lappend len_list set len string length $disp - if {$len > $max_len} { - set max_len $len + lappend len_list $lenmap($disp) + if {$lenmap($disp) > $max_len} { + set max_len $lenmap($disp) } } } @@ -1611,6 +1639,7 @@ Loading / Unloading commands: add | load modulefile ... Load modulefile(s) try-add | try-load modfile ... Load modfile(s), no complain if not found + add-any | load-any modfile ... Load first available modulefile in list rm | unload modulefile ... Remove modulefile(s) purge Unload all loaded modulefiles reload Unload then load all loaded modulefiles @@ -1618,8 +1647,9 @@ refresh Refresh loaded module volatile components Listing / Searching commands: - list -t|-l|-j List loaded modules - avail -d|-L -t|-l|-j -a -S|-C --indepth|--no-indepth mod ... + list -a -t|-l|-j -S|-C mod ... + List all or matching loaded modules + avail -a -t|-l|-j -S|-C -d|-L --indepth|--no-indepth mod ... List all or matching available modules aliases -a List all module aliases whatis -a -j modulefile ... Print whatis information of modulefile(s) @@ -1654,6 +1684,7 @@ clear -f Reset Modules-specific runtime information source scriptfile ... Execute scriptfile(s) config --dump-state|name val Display or set Modules configuration + state name Display Modules state sh-to-mod shell shellscript arg ... Make modulefile from script env changes edit modulefile Open modulefile in editor @@ -1678,6 +1709,9 @@ --auto Enable automated module handling mode --no-auto Disable automated module handling mode -f | --force By-pass dependency consistency or confirmation dialog + --tag=LIST Apply tag to loading module on 'load', 'try-load', 'load-any' + or 'switch' sub-commands (LIST is made of tag names + separated by ':') Options: -h | --help This usage info @@ -1688,12 +1722,68 @@ -s | --silent Turn off error, warning and informational messages --paginate Pipe mesg output into a pager if stream attached to terminal --no-pager Do not pipe message output into a pager + --redirect Send output to stdout (only for sh, bash, ksh, zsh and fish) + --no-redirect Send output to stderr --color=WHEN Colorize the output; WHEN can be 'always' (default if omitted), 'auto' or 'never' -w COLS | --width=COLS Set output width to COLS columns.} } +# create appropriate message and kind of report when a requirement is not +# satisfied +proc reportMissingPrereqError {curmodnamevr args} { + set retisreqlo isModuleEvaluated reqlo $curmodnamevr {*}$args + # report message on currently evaluated module message block + if {!set retiseval isModuleEvaluated any $curmodnamevr {*}$args ||\ + currentState msgrecordid ne topState msgrecordid || !$retisreqlo} { + + # more appropriate msg if an evaluation was attempted or is by-passed + set msg expr {$retiseval || getState force ? getReqNotLoadedMsg\ + $args : getErrPrereqMsg $args} + # still proceed if force mode enabled + if {getState force} { + reportWarning $msg + # no error raise if done later + } elseif {$retisreqlo} { + reportError $msg + } else { + knerror $msg MODULES_ERR_GLOBAL + } + } + + # raise reqlo-specific msg to top level if attempted + if {$retisreqlo} { + set msg getErrReqLoMsg $args + if {getState force} { + reportWarning $msg 1 + } else { + knerror $msg MODULES_ERR_GLOBALTOP + } + } +} + +# create appropriate message and kind of report when a conflict is detected +proc reportPresentConflictError {curmodnamevr mod isloading} { + set retisconun isModuleEvaluated conun $curmodnamevr $mod + # report message on currently evaluated module message block + if {!set retiseval isModuleEvaluated any $curmodnamevr $mod ||\ + currentState msgrecordid ne topState msgrecordid || !$retisconun} { + # more appropriate msg if an eval was attempted or is by-passed + set msg expr {$retiseval || getState force ? getConIsLoadedMsg\ + list $mod $isloading : getErrConflictMsg $mod} + + # still proceed if force mode enabled + if {getState force} { + reportWarning $msg + # indicate message has already been reported + lappend ::report_conflict(currentState evalid) $mod + } else { + knerror $msg MODULES_ERR_GLOBAL + } + } +} + # ;;; Local Variables: *** # ;;; mode:tcl *** # ;;; End: ***
View file
_service:tar_scm:modules-5.0.1.tar.bz2/tcl/subcmd.tcl.in -> _service:tar_scm:modules-5.1.1.tar.bz2/tcl/subcmd.tcl.in
Changed
@@ -3,7 +3,7 @@ # SUBCMD.TCL, module sub-commands procedures # Copyright (C) 2002-2004 Mark Lakata # Copyright (C) 2004-2017 Kent Mein -# Copyright (C) 2016-2021 Xavier Delaruelle +# Copyright (C) 2016-2022 Xavier Delaruelle # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -20,12 +20,26 @@ ########################################################################## -proc cmdModuleList {show_oneperline show_mtime} { +proc cmdModuleList {show_oneperline show_mtime search_match args} { set json isStateEqual report_format json # load tags from loaded modules cacheCurrentModules + if {llength $args > 0} { + defineModEqProc isIcase getConf extended_default + # match passed name against any part of loaded module names + set mtest expr {{contains} in $search_match ? {matchin} : {match}} + # use first arg as query to highlight as reportModules only accepts one + # search specification + set searchquery lindex $args 0 + # prepare header message which depend if search is performed + set loadedmsg {Currently Loaded Matching Modulefiles} + } else { + set searchquery {} + set loadedmsg {Currently Loaded Modulefiles} + } + # filter-out hidden loaded modules unless all module should be seen if {getState hiding_threshold > 1} { set loadedmodlist getLoadedModuleList @@ -38,9 +52,29 @@ } } + # same header msg if no module loaded at all whether search is made or not + set noloadedmsg expr {llength $loadedmodlist == 0 ? {No Modulefiles\ + Currently Loaded.} : {No Matching Modulefiles Currently Loaded.}} + + # filter loaded modules not matching any of the mod spec passed + if {llength $args > 0} { + set matchlist list + foreach mod $loadedmodlist { + foreach pattern $args { + # compare pattern against loaded module, its variant set and its + # alternative names + if {modEq $pattern $mod $mtest 1 2 1 0 *} { + lappend matchlist $mod + break + } + } + } + set loadedmodlist $matchlist + } + if {llength $loadedmodlist == 0} { if {!$json && isEltInReport header} { - report {No Modulefiles Currently Loaded.} + report $noloadedmsg } } else { # build mod_list array with loaded modules @@ -64,12 +98,12 @@ set one_per_line expr {$show_mtime || $show_oneperline} set show_idx expr {!$show_mtime && isEltInReport idx} - set header expr {!$json && isEltInReport header ? {Currently Loaded\ - Modulefiles} : {noheader}} + set header expr {!$json && isEltInReport header ? $loadedmsg :\ + {noheader}} set theader_cols list hi Package 39 Versions 19 {Last mod.} 19 - reportModules {} $header {} terse $show_mtime $show_idx $one_per_line\ - $theader_cols loaded $loadedmodlist + reportModules $searchquery $header {} terse $show_mtime $show_idx\ + $one_per_line $theader_cols loaded $loadedmodlist # display output key if {!$show_mtime && !$json && isEltInReport key} { @@ -79,8 +113,6 @@ } proc cmdModuleDisplay {args} { - reportDebug "displaying $args" - lappendState mode display set first_report 1 foreach mod $args { @@ -100,8 +132,6 @@ } proc cmdModulePaths {mod} { - reportDebug ($mod) - set dir_list getModulePathList exiterronundef foreach dir $dir_list { array unset mod_list @@ -151,7 +181,6 @@ } proc cmdModulePath {mod} { - reportDebug ($mod) lassign getPathToModule $mod modfile modname modnamevr # if no result set empty value to return empty if {$modfile eq {}} { @@ -170,8 +199,6 @@ } proc cmdModuleSearch {{mod {}} {search {}}} { - reportDebug "($mod, $search)" - # disable error reporting to avoid modulefile errors # to mix with valid search results inhibitErrorReport @@ -375,7 +402,7 @@ } } -proc cmdModuleSwitch {uasked old {new {}}} { +proc cmdModuleSwitch {uasked tag_list old {new {}}} { # if a single name is provided it matches for the module to load and in # this case the module to unload is searched to find the closest match # (loaded module that shares at least the same root name) @@ -410,10 +437,10 @@ # enable unload of sticky mod if stickiness is preserved on swapped-on mod # need to resolve swapped-off module here to get stickiness details lassign getPathToModule $old {} 0 $unload_match modfile oldmod oldmodvr - if {set sticky_reload isStickynessReloading $oldmodvr list $new} { + if {set sticky_reload isStickinessReloading $oldmodvr list $new} { lappendState reloading_sticky $oldmod } - if {set supersticky_reload isStickynessReloading $oldmodvr list $new\ + if {set supersticky_reload isStickinessReloading $oldmodvr list $new\ super-sticky} { lappendState reloading_supersticky $oldmod } @@ -446,13 +473,15 @@ if {info exists depreisuasked} { set undepreisuasked $depreisuasked set undeprevr $deprevr + set undepreextratag $depreextratag } - cmdModuleLoad swload $uasked $new + cmdModuleLoad swload $uasked $tag_list $new # merge depre info of unload and load phases if {info exists undepreisuasked} { set depreisuasked list {*}$undepreisuasked {*}$depreisuasked set deprevr list {*}$undeprevr {*}$deprevr + set depreextratag list {*}$undepreextratag {*}$depreextratag } if {getConf auto_handling && info exists deprelist && llength\ @@ -463,7 +492,7 @@ # for the load phase of the DepRe mechanism. # Try DepRe load phase: load failure will not lead to switch failure reloadModuleListLoadPhase deprelist $depreisuasked $deprevr\ - 1 {Reload of dependent _MOD_ failed} depre + $depreextratag 1 {Reload of dependent _MOD_ failed} depre } # report a summary of automated evaluations if no error @@ -493,8 +522,6 @@ } proc cmdModuleSave {{coll default}} { - reportDebug $coll - if {!areModuleConstraintsSatisfied} { reportErrorAndExit {Cannot save collection, some module constraints are\ not satistied} @@ -504,19 +531,24 @@ # version pinning is enabled if {getConf collection_pin_version} { set curr_mod_list getLoadedModuleWithVariantList - set curr_nuasked_list getLoadedModuleWithVariantNotUserAskedList + set curr_tag_arrser getLoadedModuleWithVariantSaveTagArrayList } else { - lassign getSimplifiedLoadedModuleList curr_mod_list curr_nuasked_list + lassign getSimplifiedLoadedModuleList curr_mod_list curr_tag_arrser } + # generate collection content with header indicating oldest Modules version + # compatible with collection syntax + set coll_header expr {llength $curr_tag_arrser > 0 ? {#%Module5.1} :\ + {}} + set save formatCollectionContent getModulePathList returnempty 0\ - $curr_mod_list $curr_nuasked_list + $curr_mod_list $curr_tag_arrser $coll_header if { string length $save == 0} { reportErrorAndExit {Nothing to save in a collection} } # get corresponding filename and its directory - lassign getCollectionFilename $coll collfile colldesc + lassign findCollections $coll name collfile colldesc set colldir file dirname $collfile if {!file exists $colldir} { @@ -538,18 +570,21 @@ } proc cmdModuleRestore {{coll default}} { - reportDebug $coll - - # get corresponding filename - lassign getCollectionFilename $coll collfile colldesc - - if {!file exists $collfile} { - reportErrorAndExit "Collection $colldesc cannot be found" - } + # get corresponding collection, raise error if it does not exist + lassign findCollections $coll exact 1 collfile colldesc # read collection lassign readCollectionContent $collfile $colldesc coll_path_list\ - coll_mod_list coll_nuasked_list + coll_mod_list coll_tag_arrser + + # build list of module tagged auto-loaded in collection + array set coll_tag_arr $coll_tag_arrser + set coll_nuasked_list {} + foreach mod array names coll_tag_arr { + if {{auto-loaded} in $coll_tag_arr($mod)} { + lappend coll_nuasked_list $mod + } + } # collection should at least define a path or a mod if {llength $coll_path_list == 0 && llength $coll_mod_list == 0} { @@ -591,10 +626,10 @@ } else { set modvr $mod } - if {set sticky_reload isStickynessReloading $modvr $mod_to_load} { + if {set sticky_reload isStickinessReloading $modvr $mod_to_load} { lappendState reloading_sticky $mod } - if {set supersticky_reload isStickynessReloading $modvr $mod_to_load\ + if {set supersticky_reload isStickinessReloading $modvr $mod_to_load\ super-sticky} { lappendState reloading_supersticky $mod } @@ -608,7 +643,7 @@ } # unuse paths if {llength $path_to_unuse > 0} { - cmdModuleUnuse {*}lreverse $path_to_unuse + cmdModuleUnuse load {*}lreverse $path_to_unuse } # since unloading a module may unload other modules or @@ -619,6 +654,19 @@ set curr_mod_list getLoadedModuleList set curr_nuasked_list getTaggedLoadedModuleList auto-loaded + # update tags sets on the modules already loaded at correct position + # remove extra tags that are not defined in collection + foreach modvr getLoadedModuleWithVariantList { + if {info exists coll_tag_arr($modvr)} { + set tag_list $coll_tag_arr($modvr) + } else { + set tag_list {} + } + # indicate if module has been asked by user + cmdModuleTag 1 expr {!isModuleTagged $modvr auto-loaded 1}\ + $tag_list $modvr + } + # determine what module to load to restore collection from current # situation with preservation of the load order # list of alternative and simplified names for loaded modules has been @@ -639,32 +687,28 @@ if {llength $path_to_use > 0} { # always append path here to guaranty the order # computed above in the movement lists - cmdModuleUse append {*}$path_to_use + cmdModuleUse load append {*}$path_to_use } # load modules one by one with user asked state preserved foreach mod $mod_to_load { - cmdModuleLoad load expr {$mod ni $coll_nuasked_list} $mod + cmdModuleLoad load expr {$mod ni $coll_nuasked_list}\ + $coll_tag_arr($mod) $mod } popMsgRecordId 0 } proc cmdModuleSaverm {{coll default}} { - reportDebug $coll - # avoid to remove any kind of file with this command if {string first / $coll > -1} { reportErrorAndExit {Command does not remove collection specified as\ filepath} } - # get corresponding filename - lassign getCollectionFilename $coll collfile colldesc - - if {!file exists $collfile} { - reportErrorAndExit "Collection $colldesc cannot be found" - } + # get corresponding collection, raise error if it does not exist, but do + # not check if collection is valid + lassign findCollections $coll exact 1 0 collfile colldesc # attempt to delete specified collection if {catch { @@ -675,18 +719,12 @@ } proc cmdModuleSaveshow {{coll default}} { - reportDebug $coll - - # get corresponding filename - lassign getCollectionFilename $coll collfile colldesc - - if {!file exists $collfile} { - reportErrorAndExit "Collection $colldesc cannot be found" - } + # get corresponding collection, raise error if it does not exist + lassign findCollections $coll exact 1 collfile colldesc # read collection lassign readCollectionContent $collfile $colldesc coll_path_list\ - coll_mod_list coll_nuasked_list + coll_mod_list coll_tag_arrser # collection should at least define a path or a mod if {llength $coll_path_list == 0 && llength $coll_mod_list == 0} { @@ -696,7 +734,7 @@ displaySeparatorLine report sgr hi $collfile:\n report formatCollectionContent $coll_path_list $coll_mod_list\ - $coll_nuasked_list 1 + $coll_tag_arrser {} 1 displaySeparatorLine } @@ -769,7 +807,6 @@ proc cmdModuleSource {mode args} { - reportDebug $args foreach fpath $args { set absfpath getAbsolutePath $fpath if {$fpath eq {}} { @@ -785,12 +822,18 @@ } } -proc cmdModuleLoad {context uasked args} { +proc cmdModuleLoad {context uasked tag_list args} { reportDebug "loading $args (context=$context, uasked=$uasked)" set ret 0 + set loadok 0 lappendState mode load foreach mod $args { + # stop when first module in list is loaded if processing load-any cmd + if {$loadok && currentState any_modulefile} { + break + } + # if a switch action is ongoing... if {$context eq {swload}} { set swprocessing 1 @@ -834,6 +877,7 @@ upvar deprelist swdeprelist upvar depreisuasked depreisuasked upvar deprevr deprevr + upvar depreextratag depreextratag # transmit loaded mod name for switch report summary uplevel 1 set new "{$modnamevr}" @@ -857,9 +901,11 @@ } } - # record module title (with the variant specified on load call) prior - # module evaluation to get this title ready in case of eval error - registerModuleDesignation $msgrecid $modname getVariantList $mod 1 0 1 + # record module title (with the variant specified on load call, and no + # tag list) prior module evaluation to get this title ready in case of + # eval error + registerModuleDesignation $msgrecid $modname getVariantList $mod 1 0\ + 1 {} pushSettings if {set errCode catch { @@ -874,15 +920,21 @@ set errlocalreport 1 knerror getModWithAltVrIsLoadedMsg $modname } else { + # apply missing tag to loaded module + set rettag cmdModuleTag 0 $uasked $tag_list $modname + # report module is already loaded if verbose2 or higher level - if {$isloaded && isVerbosityLevel verbose2} { + # and no new tag set + if {$isloaded && $rettag != 2 && isVerbosityLevel verbose2} { reportInfo "Module '$modname' is already loaded" registerModuleDesignation $msgrecid $modname\ - getVariantList $modname 1 + getVariantList $modname 1 getExportTagList $modname reportMsgRecord "Loading getModuleDesignation $msgrecid {}\ 2" } + # exit treatment but no need to restore settings + set loadok 1 continue } } @@ -905,7 +957,7 @@ if {llength $deprelist > 0} { lassign reloadModuleListUnloadPhase deprelist getState\ force {Unload of dependent _MOD_ failed} depun\ - depreisuasked deprevr + depreisuasked deprevr depreextratag if {info exists swprocessing} { if {info exists swdeprelist} { set swdeprelist list {*}$deprelist {*}$swdeprelist @@ -916,6 +968,25 @@ } } + # record additional tags passed through --tag option prior mod eval + # to make them known within evaluation + if {llength $tag_list > 0} { + # record tags set with --tag as extra tag excluding tags relative + # to the way module is loaded (auto, keep) + lassign getDiffBetweenList $tag_list list auto-loaded\ + keep-loaded extratag_list + setModuleTag $modname {*}$tag_list + if {llength $extratag_list > 0} { + setModuleExtraTag $modname {*}$extratag_list + } + if {$modnamevr ne {} && $modname ne $modnamevr} { + setModuleTag $modnamevr {*}$tag_list + if {llength $extratag_list > 0} { + setModuleExtraTag $modnamevr {*}$extratag_list + } + } + } + if {execute-modulefile $modfile $modname modnamevr $mod} { break } @@ -997,45 +1068,44 @@ # loading visibility depends on hidden-loaded tag set hidden isModuleTagged $modnamevr hidden-loaded 1 - add-path append LOADEDMODULES $modname + append-path LOADEDMODULES $modname # allow duplicate modfile entries for virtual modules - add-path append --duplicates _LMFILES_ $modfile + append-path --duplicates _LMFILES_ $modfile # update cache arrays setLoadedModule $modname $modfile $uasked $modnamevr # register declared source-sh in environment if {set modsrcsh getLoadedSourceSh $modname 1 ne {}} { - add-path append __MODULES_LMSOURCESH $modsrcsh + append-path __MODULES_LMSOURCESH $modsrcsh } # register declared conflict in environment if {set modcon getLoadedConflict $modname 1 ne {}} { - add-path append __MODULES_LMCONFLICT $modcon + append-path __MODULES_LMCONFLICT $modcon } # declare the prereq of this module if {set modpre getLoadedPrereq $modname 1 ne {}} { - add-path append __MODULES_LMPREREQ $modpre + append-path __MODULES_LMPREREQ $modpre } # declare the alternative names of this module if {set modalt getLoadedAltname $modname 1 ne {}} { - add-path append __MODULES_LMALTNAME $modalt + append-path __MODULES_LMALTNAME $modalt } # declare the variant of this module if {set modvrspec getLoadedVariant $modname 1 ne {}} { - add-path append __MODULES_LMVARIANT $modvrspec + append-path __MODULES_LMVARIANT $modvrspec } # declare the tags of this module - if {set modtag getTagList $modnamevr 1 ne {}} { - add-path append __MODULES_LMTAG $modtag + if {set modtag getExportTagList $modnamevr 1 ne {}} { + append-path __MODULES_LMTAG $modtag + } + if {set modtag getExtraTagList $modnamevr 1 ne {}} { + append-path __MODULES_LMEXTRATAG $modtag } - - # record module title (name and variant) - registerModuleDesignation $msgrecid $modname getVariantList\ - $modname 1 # Load phase of dependent module reloading. These modules can adapt # now that mod is seen loaded. Except if switch action ongoing (DepRe @@ -1043,9 +1113,14 @@ if {getConf auto_handling && llength $deprelist > 0 && !info\ exists swprocessing} { reloadModuleListLoadPhase deprelist $depreisuasked $deprevr\ - getState force {Reload of dependent _MOD_ failed} depre + $depreextratag getState force {Reload of dependent _MOD_\ + failed} depre } + # record module title (name, variants and tags) + registerModuleDesignation $msgrecid $modname getVariantList\ + $modname 1 getExportTagList $modname + # consider evaluation hidden if hidden loaded module is auto loaded # and no specific messages are recorded for this evaluation if {$hidden && !$uasked && !isMsgRecorded} { @@ -1084,9 +1159,20 @@ expr {$hidden && !$uasked} } popMsgRecordId + + if {$errCode == 0} { + set loadok 1 + } } lpopState mode + # raise error if no module has been loaded or has produced an error during + # its load attempt in case of load-any sub-command + if {!$ret && !$loadok && $context eq {load} && currentState\ + any_modulefile} { + knerror "No module has been loaded" + } + return $ret } @@ -1111,23 +1197,23 @@ # unloading module is visible by default set hidden 0 set uasked 1 - # error if module not found or forbidden - set notfounderr expr {!currentState try_modulefile} # record evaluation attempt on specified module name registerModuleEvalAttempt $context $mod # resolve by also looking at matching loaded module and update mod # specification to fully match obtained loaded module - lassign getPathToModule $mod {} $notfounderr $match modfile modname\ + # enable report_issue flag to report empty module name issue + lassign getPathToModule $mod {} 1 $match modfile modname\ modnamevr errkind # set a unique id to record messages related to this evaluation. set msgrecid unload-$modnamevr-depthState modulename - # record module title (with the variant specified on unload call) prior - # module evaluation to get this title ready in case of eval error + # record module title (with the variant specified on unload call, and no + # tag list) prior module evaluation to get this title ready in case of + # eval error registerModuleDesignation $msgrecid $modname getVariantList $modnamevr\ - 1 0 1 + 1 0 1 {} # if a switch action is ongoing... if {info exists swprocessing} { @@ -1137,6 +1223,7 @@ upvar deprelist deprelist upvar depreisuasked depreisuasked upvar deprevr deprevr + upvar depreextratag depreextratag # transmit unloaded mod name for switch report summary uplevel 1 set old "{$modnamevr}" @@ -1154,7 +1241,8 @@ 2" } } else { - set ret $notfounderr + # return error code in case of empty module name + set ret 1 } # go to next module to unload continue @@ -1180,8 +1268,9 @@ registerModuleEvalAttempt $context $modnamevr registerModuleEvalAttempt $context $modfile - # record module title (name and variant) - registerModuleDesignation $msgrecid $modname getVariantList $modname 1 + # record module title (name, variants and tags) + registerModuleDesignation $msgrecid $modname getVariantList $modname\ + 1 getExportTagList $modname pushSettings if {set errCode catch { @@ -1268,7 +1357,7 @@ if {llength $deprelist > 0} { lassign reloadModuleListUnloadPhase deprelist getState\ force {Unload of dependent _MOD_ failed} depun\ - depreisuasked deprevr + depreisuasked deprevr depreextratag } # DepUn modules unload prior main mod unload @@ -1308,44 +1397,63 @@ # modulefile (entry at same position in _LMFILES_) # need the unfiltered loaded module list to get correct index set lmidx lsearch -exact getLoadedModuleList 0 $modname - unload-path LOADEDMODULES $modname - unload-path --index _LMFILES_ $lmidx + remove-path LOADEDMODULES $modname + remove-path --index _LMFILES_ $lmidx # update cache arrays unsetLoadedModule $modname $modfile # unregister declared source-sh if {set modsrcsh getLoadedSourceSh $modname 1 ne {}} { - unload-path __MODULES_LMSOURCESH $modsrcsh + remove-path __MODULES_LMSOURCESH $modsrcsh } unsetLoadedSourceSh $modname # unregister declared conflict if {set modcon getLoadedConflict $modname 1 ne {}} { - unload-path __MODULES_LMCONFLICT $modcon + remove-path __MODULES_LMCONFLICT $modcon } unsetLoadedConflict $modname # unset prereq declared for this module if {llength set modpre getLoadedPrereq $modname > 0} { - unload-path __MODULES_LMPREREQ getLoadedPrereq $modname 1 + remove-path __MODULES_LMPREREQ getLoadedPrereq $modname 1 } unsetLoadedPrereq $modname # unset alternative names declared for this module if {llength set modalt getLoadedAltname $modname >0} { - unload-path __MODULES_LMALTNAME getLoadedAltname $modname 1 + remove-path __MODULES_LMALTNAME getLoadedAltname $modname 1 } unsetLoadedAltname $modname # unset variant declared for this module if {llength set modvrspec getLoadedVariant $modname > 0} { - unload-path __MODULES_LMVARIANT getLoadedVariant $modname 1 + remove-path __MODULES_LMVARIANT getLoadedVariant $modname 1 } unsetLoadedVariant $modname # unset tags declared for this module - if {set modtag getTagList $modname 1 ne {}} { - unload-path __MODULES_LMTAG $modtag + if {set modtag getExportTagList $modname 1 ne {}} { + remove-path __MODULES_LMTAG $modtag + # also remove the auto-loaded and keep-loaded tags from + # in-memory knowledge not to re-apply them if module is reloaded + # in other conditions + unsetModuleTag $modname auto-loaded keep-loaded + if {$modnamevr ne {} && $modname ne $modnamevr} { + unsetModuleTag $modnamevr auto-loaded keep-loaded + } + } + if {set modtag getExtraTagList $modname 1 ne {}} { + remove-path __MODULES_LMEXTRATAG $modtag + # also remove extra tags from in-memory knowledge not re-apply + # them if module is reloaded in other conditions + set extratag_list getExtraTagList $modname + unsetModuleTag $modname {*}$extratag_list + unsetModuleExtraTag $modname {*}$extratag_list + if {$modnamevr ne {} && $modname ne $modnamevr} { + unsetModuleTag $modnamevr {*}$extratag_list + unsetModuleExtraTag $modnamevr {*}$extratag_list + } } if {getConf auto_handling && $auto} { @@ -1373,7 +1481,8 @@ # will occur after the new mod load if {llength $deprelist > 0 && !info exists swprocessing} { reloadModuleListLoadPhase deprelist $depreisuasked $deprevr\ - getState force {Reload of dependent _MOD_ failed} depre + $depreextratag getState force {Reload of dependent _MOD_\ + failed} depre } } @@ -1421,8 +1530,6 @@ } proc cmdModulePurge {} { - reportDebug called. - # create an eval id to track successful/failed module evaluations pushMsgRecordId purge-depthState modulename 0 @@ -1456,8 +1563,8 @@ pushSettings if {set errCode catch { # run unload then load-again phases - lassign reloadModuleListUnloadPhase lmlist isuasked vr - reloadModuleListLoadPhase lmlist $isuasked $vr + lassign reloadModuleListUnloadPhase lmlist isuasked vr extratag + reloadModuleListLoadPhase lmlist $isuasked $vr $extratag } errMsg == 1} { # rollback settings if some evaluation went wrong restoreSettings @@ -1581,93 +1688,97 @@ setState inhibit_errreport 0 } -proc cmdModuleUse {pos args} { - reportDebug $args - +proc runModuleUse {cmd mode pos args} { if {$args eq {}} { showModulePath } else { + if {$pos eq {remove}} { + # get current module path list + set modpathlist getModulePathList returnempty 0 0 + } + foreach path $args { - if {$path eq {}} { - reportError getEmptyNameMsg directory - } else { - # transform given path in an absolute path to avoid dependency to - # the current work directory. except if this path starts with a - # variable reference - if {string index $path 0 ne {$}} { - lappend pathlist getAbsolutePath $path - } else { + switch -glob -- $path { + --remove-on-unload - --append-on-unload - --prepend-on-unload -\ + --noop-on-unload { + if {$cmd ne {unuse}} { + knerror "Invalid option '$path'" + } else { + lappend pathlist $path + } + } + -* { + knerror "Invalid option '$path'" + } + {} { + reportError getEmptyNameMsg directory + } + $* { lappend pathlist $path } + default { + if {$pos eq {remove}} { + if {$path in $modpathlist} { + lappend pathlist $path + # transform given path in an absolute path which should have + # been registered in the MODULEPATH env var. however for + # compatibility with previous behavior where relative paths + # were registered in MODULEPATH given path is first checked + # against current path list + } elseif {set abspath getAbsolutePath $path in\ + $modpathlist} { + lappend pathlist $abspath + # even if not found, transmit this path to remove-path in + # case several path elements have been joined as one string + } else { + lappend pathlist $path + } + } else { + # transform given path in an absolute path to avoid + # dependency to the current work directory. except if this + # path starts with a variable reference + lappend pathlist getAbsolutePath $path + } + } } } # added directory may not exist at this time - # pass all paths specified at once to add-path + # pass all paths specified at once to append-path/prepend-path if {info exists pathlist} { set optlist list + # define path command to call + set pathcmd expr {$pos eq {remove} ? {unload-path} : {add-path}} + # by-pass any reference counter in case use is called from top level # not to increase reference counter if paths are already defined if {isTopEvaluation} { lappend optlist --ignore-refcount } - lappendState mode load - catch {add-path $pos {*}$optlist MODULEPATH {*}$pathlist} - lpopState mode - } - } -} - -proc cmdModuleUnuse {args} { - reportDebug $args - - if {$args eq {}} { - showModulePath - } else { - # get current module path list - set modpathlist getModulePathList returnempty 0 0 - - foreach path $args { - if {$path eq {}} { - reportError getEmptyNameMsg directory - } else { - if {$path in $modpathlist} { - lappend pathlist $path - # transform given path in an absolute path which should have been - # registered in the MODULEPATH env var. however for compatibility - # with previous behavior where relative paths were registered in - # MODULEPATH given path is first checked against current path list - } elseif {set abspath getAbsolutePath $path in $modpathlist} { - lappend pathlist $abspath - # even if not found, transmit this path to unload-path in case - # several path elements have been joined as one string - } else { - lappend pathlist $path - } + if {isTopEvaluation} { + lappendState mode load } - } - - # pass all paths specified at once to unload-path - if {info exists pathlist} { - set optlist list - # by-pass any reference counter in case unuse is called from top - # level to ensure specified paths are removed whatever their - # reference counter value + $pathcmd $pos-path $mode $pos {*}$optlist MODULEPATH {*}$pathlist if {isTopEvaluation} { - lappend optlist --ignore-refcount + lpopState mode } - - lappendState mode unload - catch {unload-path {*}$optlist MODULEPATH {*}$pathlist} - lpopState mode } } } -proc cmdModuleAutoinit {} { - reportDebug called. +proc cmdModuleUse {mode pos args} { + if {$mode eq {unload}} { + set pos remove + } + runModuleUse use $mode $pos {*}$args +} + +proc cmdModuleUnuse {mode args} { + runModuleUse unuse $mode remove {*}$args +} +proc cmdModuleAutoinit {} { # skip autoinit process if found already ongoing in current environment if {get-env __MODULES_AUTOINIT_INPROGRESS eq {1}} { return @@ -1721,7 +1832,7 @@ } } if {info exists pathlist} { - cmdModuleUse append {*}$pathlist + cmdModuleUse load append {*}$pathlist } } @@ -1771,8 +1882,6 @@ set notdone 1 set nomatch 1 - reportDebug $args - # Define startup files for each shell set files(csh) list .modules .cshrc .cshrc_variables .login set files(tcsh) list .modules .tcshrc .cshrc .cshrc_variables .login @@ -1889,8 +1998,6 @@ # provide access to modulefile specific commands from the command-line, making # them standing as a module sub-command (see module procedure) proc cmdModuleResurface {cmd args} { - reportDebug "cmd='$cmd', args='$args'" - lappendState mode load lappendState commandname $cmd @@ -1929,8 +2036,6 @@ } proc cmdModuleTest {args} { - reportDebug "testing $args" - lappendState mode test set first_report 1 foreach mod $args { @@ -1950,7 +2055,6 @@ } proc cmdModuleClear {doit doitset} { - reportDebug "($doit)" # fetch confirmation if no arg passed and force mode disabled if {!$doitset && !getState force} { # ask for it if stdin is attached to a terminal @@ -1967,7 +2071,7 @@ if {string equal -nocase -length 1 $doit y || getState force} { set vartoclear list LOADEDMODULES __MODULES_LMALTNAME\ __MODULES_LMCONFLICT __MODULES_LMPREREQ __MODULES_LMSOURCESH \ - __MODULES_LMTAG __MODULES_LMVARIANT _LMFILES_ + __MODULES_LMTAG __MODULES_LMEXTRATAG __MODULES_LMVARIANT _LMFILES_ # add any reference counter variable to the list to unset lappend vartoclear {*}array names ::env -glob __MODULES_SHARE_* @@ -1983,6 +2087,68 @@ } } +proc cmdModuleState {args} { + if {llength $args > 0} { + set name lindex $args 0 + } + + if {info exists name && $name ni concat array names ::g_state_defs\ + array names ::g_states} { + knerror "State '$name' does not exist" + } + + # report module version unless if called by cmdModuleConfig + if {lindex info level -1 0 ne {cmdModuleConfig}} { + reportVersion + reportSeparateNextContent + } + + displayTableHeader hi {State name} 24 {Value} 54 + + # fetch specified state or all states + if {info exists name} { + if {$name in array names ::g_state_defs} { + set stateval($name) getState $name <undef> 1 + } else { + set stateval($name) getState $name + } + } else { + # define each attribute/fetched state value pair + foreach state array names ::g_state_defs { + set stateval($state) getState $state <undef> 1 + } + # also get dynamic states (with no prior definition) + foreach state array names ::g_states { + if {!info exists stateval($state)} { + set stateval($state) getState $state + } + } + } + + foreach state lsort array names stateval { + append displist format {%-25s %s} $state $stateval($state) \n + } + report $displist 1 + reportSeparateNextContent + + # only report specified state if any + if {info exists name} { + return + } + + # report environment variable set related to Modules + displayTableHeader hi {Env. variable} 24 {Value} 54 + set envvar_list {} + foreach var list LOADEDMODULES _LMFILES_ MODULE* __MODULES_* *_module* { + lappend envvar_list {*}array names ::env -glob $var + } + unset displist + foreach var lsort -unique $envvar_list { + append displist format {%-25s %s} $var $::env($var) \n + } + report $displist 1 +} + proc cmdModuleConfig {dump_state args} { # parse arguments set nameunset 0 @@ -2113,37 +2279,7 @@ reportSeparateNextContent if {$dump_state} { - displayTableHeader hi {State name} 24 {Value} 54 - # define each attribute/fetched state value pair - foreach state array names ::g_state_defs { - set stateval($state) getState $state <undef> 1 - } - # also get dynamic states (with no prior definition) - foreach state array names ::g_states { - if {!info exists stateval($state)} { - set stateval($state) getState $state - } - } - - unset displist - foreach state lsort array names stateval { - append displist format {%-25s %s} $state $stateval($state) \n - } - report $displist 1 - reportSeparateNextContent - - # report environment variable set related to Modules - displayTableHeader hi {Env. variable} 24 {Value} 54 - set envvar_list {} - foreach var list LOADEDMODULES _LMFILES_ MODULE* __MODULES_*\ - *_module* { - lappend envvar_list {*}array names ::env -glob $var - } - unset displist - foreach var lsort -unique $envvar_list { - append displist format {%-25s %s} $var $::env($var) \n - } - report $displist 1 + cmdModuleState } } } @@ -2180,8 +2316,6 @@ } proc cmdModuleRefresh {} { - reportDebug {refreshing loaded modules} - lappendState mode refresh # create an eval id to track successful/failed module evaluations pushMsgRecordId refresh-depthState modulename 0 @@ -2198,6 +2332,7 @@ set lmvr $lm } set lmfile getModulefileFromLoadedModule $lm + set taglist getExportTagList $lm # refreshing module is visible by default set hidden 0 @@ -2209,9 +2344,9 @@ # register record message unique id (now we know mod will be evaluated) pushMsgRecordId $msgrecid - # record module title (with the variant specified on load call) prior - # module evaluation to get this title ready in case of eval error - registerModuleDesignation $msgrecid $lm $vrlist + # record module title (with the variants and tags of loaded module) + # prior module evaluation to get this title ready in case of eval error + registerModuleDesignation $msgrecid $lm $vrlist $taglist # run modulefile, restore settings prior evaluation if error and # continue to evaluate the remaining loaded modules @@ -2265,6 +2400,107 @@ } } +proc cmdModuleTag {unset_extra uasked tag_list args} { + reportDebug "tagging $args (unset_extra=$unset_extra, uasked=$uasked,\ + tag_list=$tag_list)" + + set ret 0 + foreach mod $args { + # find mod among loaded modules + lassign getPathToModule $mod {} 1 match modfile modname modnamevr\ + errkind + + if {$modfile eq {}} { + set ret 1 + # go to next module to unload + continue + } + + # record tags not already set and if asked unset extra tags not set + # anymore + lassign getDiffBetweenList $tag_list getTagList $modname diff_list + lassign getDiffBetweenList getExtraTagList $modname $tag_list \ + unset_list + if {llength $diff_list > 0 || ($unset_extra && llength $unset_list\ + > 0)} { + # set a unique id to record messages related to this evaluation. + set msgrecid tag-$modnamevr-depthState modulename + pushMsgRecordId $msgrecid + # record module title (with the variant but no tag list) prior + # evaluation to get this title ready in case of error + registerModuleDesignation $msgrecid $modname getVariantList\ + $modnamevr 1 {} + + lappendState mode unload + # first unset tags declared for this module on LM env var + if {set modtag getExportTagList $modname 1 ne {}} { + remove-path __MODULES_LMTAG $modtag + } + if {set modtag getExtraTagList $modname 1 ne {}} { + remove-path __MODULES_LMEXTRATAG $modtag + } + lpopState mode + + # remove extra tags currently set not part of tag list if asked + if {$unset_extra && llength $unset_list > 0} { + unsetModuleTag $modname {*}$unset_list + unsetModuleExtraTag $modname {*}$unset_list + if {$modnamevr ne {} && $modname ne $modnamevr} { + unsetModuleTag $modnamevr {*}$unset_list + unsetModuleExtraTag $modnamevr {*}$unset_list + } + } + + # ensure auto-loaded tag is not preserved if not part of target tags + if {$unset_extra && {auto-loaded} ni $tag_list} { + unsetModuleTag $modname auto-loaded + if {$modnamevr ne {} && $modname ne $modnamevr} { + unsetModuleTag $modnamevr auto-loaded + } + } + + # record new tags as extra tag excluding tags relative to the way + # module is loaded (auto, keep) + lassign getDiffBetweenList $diff_list list auto-loaded\ + keep-loaded extradiff_list + setModuleTag $modname {*}$diff_list + if {llength $extradiff_list > 0} { + setModuleExtraTag $modname {*}$extradiff_list + } + if {$modnamevr ne {} && $modname ne $modnamevr} { + setModuleTag $modnamevr {*}$diff_list + if {llength $extradiff_list > 0} { + setModuleExtraTag $modnamevr {*}$extradiff_list + } + } + + # set the new tag set for module on LM env var + lappendState mode load + if {set modtag getExportTagList $modnamevr 1 ne {}} { + append-path __MODULES_LMTAG $modtag + } + if {set modtag getExtraTagList $modnamevr 1 ne {}} { + append-path __MODULES_LMEXTRATAG $modtag + } + lpopState mode + + # update module designation now the additional tags are set + registerModuleDesignation $msgrecid $modname getVariantList\ + $modname 1 getExportTagList $modname + # report tagging evaluation unless hidden and auto-loaded + set hidden isModuleTagged $modnamevr hidden-loaded 1 + reportMsgRecord "Tagging getModuleDesignation $msgrecid {} 2"\ + expr {$hidden && !$uasked} + popMsgRecordId + + # indicates that new tags have been applied + set ret 2 + } + } + + return $ret +} + # ;;; Local Variables: *** # ;;; mode:tcl *** # ;;; End: ***
View file
_service:tar_scm:modules-5.0.1.tar.bz2/tcl/util.tcl -> _service:tar_scm:modules-5.1.1.tar.bz2/tcl/util.tcl
Changed
@@ -3,7 +3,7 @@ # UTIL.TCL, utility procedures # Copyright (C) 2002-2004 Mark Lakata # Copyright (C) 2004-2017 Kent Mein -# Copyright (C) 2016-2021 Xavier Delaruelle +# Copyright (C) 2016-2022 Xavier Delaruelle # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -76,7 +76,11 @@ } else { # register pwd at first call if {!isStateDefined cwd} { - setState cwd pwd + # raise a global known error if cwd cannot be retrieved (especially + # when this directory has been removed) + if {catch {setState cwd pwd} errorMsg} { + knerror $errorMsg + } } set curdir getState cwd }
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/bin/install_test_csh -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/bin/install_test_csh
Changed
@@ -116,7 +116,7 @@ set ret=($ret + $status) module load ./shtomod; set ret=($ret + $status) - echo "${FOOCB}:${FOOEM}:${FOOSP}:${FOOARG1}:${FOOARG2}:${FOOARG3}:${FOOARG4}"; + echo "${FOOCB}:${FOOEM}:${FOOSP}:${FOOWC}:${FOOARG1}:${FOOARG2}:${FOOARG3}:${FOOARG4}"; set ret=($ret + $status) alfoo; set ret=($ret + $status)
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/config/base-config.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/config/base-config.exp
Changed
@@ -1290,7 +1290,7 @@ saved_env_var\n" } -# restore test environment to its initial saved sate +# restore test environment to its initial saved state proc reset_test_env {} { global saved_var saved_array_var saved_env_var env skipped_var
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/example/sh-to-mod.csh -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/example/sh-to-mod.csh
Changed
@@ -9,6 +9,7 @@ setenv FOOEM "" setenv FOOSP "value " setenv FOOCB va\{ue + setenv FOOWC va\*ue set i=1 while ( $#argv > 0 ) setenv FOOARG$i "$1" @@ -23,6 +24,7 @@ setenv FOOPATHSP "/path/to/dir1 /path/to/dir2 /path/to/dir3" setenv FOOPATHSPEM "/path/to/dir1 /path/to/dir2 /path/to/dir3 " setenv FOOPATHCB /path/to/dir1:/path/to/d\{r2:/path/to/dir3 + setenv FOOPATHWC /path/to/dir1:/path/to/d\*r2:/path/to/dir3 endif if ( $?TESTSUITE_SHTOMOD_PATHDUP ) then @@ -52,6 +54,14 @@ # no function support on csh shell endif +if ( ! $?TESTSUITE_SHTOMOD_NOCOMP ) then + complete cmd 'n/-h/n/' 'n/--help/n/' \ + 'n/-V/n/' 'n/--version/n/' \ + "p/1/(-h -V --help --version)/" + complete mycmd 'n/help/`_module_avail`/' 'n/add/`_module_not_yet_loaded; echo "--auto --no-auto --force -f --icase -i --tag --tag="`/' + complete othercmd 'n/--help/n/' +endif + if ( ! $?TESTSUITE_SHTOMOD_NOCD ) then cd $TESTSUITEDIR/modulefiles.2 endif @@ -81,4 +91,18 @@ setenv TESTSUITE_SHTOMOD_EMPTYPREPEND :$TESTSUITE_SHTOMOD_EMPTYPREPEND endif +if ( $?TESTSUITE_SHTOMOD_MODULE ) then + eval `$TCLSH $MODULES_CMD csh autoinit` + module config collection_target bar + module load setenv/1.0 + unalias ml + unalias module + unsetenv MODULESHOME +endif + +if ( $?TESTSUITE_SHTOMOD_UNSETALFUNCCOMP ) then + unalias alfoo + uncomplete cmd +endif + # vim:set tabstop=3 shiftwidth=3 expandtab autoindent:
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/example/sh-to-mod.fish -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/example/sh-to-mod.fish
Changed
@@ -9,6 +9,7 @@ set -xg FOOEM "" set -xg FOOSP "value " set -xg FOOCB va\{ue + set -xg FOOWC va\*ue if test (count $argv) -gt 0 for i in (seq (count $argv)) set -xg FOOARG$i $argv$i @@ -22,6 +23,7 @@ set -xg FOOPATHSP "/path/to/dir1 /path/to/dir2 /path/to/dir3" set -xg FOOPATHSPEM "/path/to/dir1 /path/to/dir2 /path/to/dir3 " set -xg FOOPATHCB /path/to/dir1 /path/to/d\{r2 /path/to/dir3 + set -xg FOOPATHWC /path/to/dir1 /path/to/d\*r2 /path/to/dir3 end if set -q TESTSUITE_SHTOMOD_PATHDUP @@ -65,6 +67,29 @@ echo b\\\"r echo f\'o end + function funcwc + echo sou*sh + end + function func_nested + function func_in + echo foo + end + func_in + end +end + +if not set -q TESTSUITE_SHTOMOD_NOCOMP + complete -c cmd -s V -l version --description 'Command version' + complete --command cmd -s h -l help --description 'Command help' + complete --no-files --require-parameter -c mycmd -s h --description 'Command help' + # test complete definition without -c/--complete opt arg on fish>=3.2 + if test (string sub -s 1 -l 1 $version) -ge 3; and test (string sub -s 3 -l 1 $version) -ge 2 + complete -f othercmd -s h -l help --description 'Command help' + complete othercmd -s V -l version --description 'Command version' + else + complete -f --command othercmd -s h -l help --description 'Command help' + complete -c othercmd -s V -l version --description 'Command version' + end end if not set -q TESTSUITE_SHTOMOD_NOCD @@ -95,4 +120,18 @@ set -xg TESTSUITE_SHTOMOD_EMPTYPREPEND :$TESTSUITE_SHTOMOD_EMPTYPREPEND end +if set -q TESTSUITE_SHTOMOD_MODULE + eval $TCLSH $MODULES_CMD fish autoinit | source - + module config collection_target bar + module load setenv/1.0 + functions -e ml module _module_raw + set -e MODULESHOME +end + +if set -q TESTSUITE_SHTOMOD_UNSETALFUNCCOMP + functions -e alfoo + functions -e funcfoo + complete -e -c cmd +end + # vim:set tabstop=3 shiftwidth=3 expandtab autoindent:
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/example/sh-to-mod.sh -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/example/sh-to-mod.sh
Changed
@@ -9,6 +9,7 @@ export FOOEM="" export FOOSP="value " export FOOCB=va{ue + export FOOWC=va\*ue i=1 while $# -gt 0 ; do export FOOARG$i="$1" @@ -23,6 +24,7 @@ export FOOPATHSP="/path/to/dir1 /path/to/dir2 /path/to/dir3" export FOOPATHSPEM="/path/to/dir1 /path/to/dir2 /path/to/dir3 " export FOOPATHCB=/path/to/dir1:/path/to/d{r2:/path/to/dir3 + export FOOPATHWC=/path/to/dir1:/path/to/d\*r2:/path/to/dir3 fi if "${TESTSUITE_SHTOMOD_PATHDUP:+x}" = 'x' ; then @@ -65,6 +67,15 @@ echo b\\\"r echo f\'o } + funcwc() { + echo sou*sh + } +fi + +if "${TESTSUITE_SHTOMOD_NOCOMP:-x}" = 'x' ; then + complete -o default -F _cmd cmd + complete -j -P '"%' -S '"' mycmd + complete -u othercmd fi if "${TESTSUITE_SHTOMOD_NOCD:-x}" = 'x' ; then @@ -95,4 +106,18 @@ TESTSUITE_SHTOMOD_EMPTYPREPEND=:$TESTSUITE_SHTOMOD_EMPTYPREPEND fi +if "${TESTSUITE_SHTOMOD_MODULE:+x}" = 'x' ; then + eval $($TCLSH $MODULES_CMD sh autoinit) + module config collection_target bar + module load setenv/1.0 + unset -f ml module _module_raw + unset MODULESHOME +fi + +if "${TESTSUITE_SHTOMOD_UNSETALFUNCCOMP:+x}" = 'x' ; then + unalias alfoo + unset -f funcfoo + complete -r cmd +fi + # vim:set tabstop=3 shiftwidth=3 expandtab autoindent:
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/example/siteconfig.tcl-1 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/example/siteconfig.tcl-1
Changed
@@ -1,7 +1,7 @@ # enable siteconfig content only if following environment variable is set if {info exists env(TESTSUITE_ENABLE_SITECONFIG)} { -# force stderr terminal attachement state +# force stderr terminal attachment state proc initStateIsStderrTty {} { return 1 } @@ -176,6 +176,13 @@ } } +# test tcl ext lib procedures against a failed sysconf call +if {info exists env(TESTSUITE_ENABLE_SITECONFIG_TCLEXTLIBFAILEDSYSCONF)} { + if {catch {initStateUsergroups} errMsg} { + reportError $errMsg + } +} + # test tcl ext lib procedures against a failed time call if {info exists env(TESTSUITE_ENABLE_SITECONFIG_TCLEXTLIBFAILEDTIME)} { if {catch {initStateClockSeconds} errMsg} { @@ -206,19 +213,40 @@ # specific tests to improve modEq procs coverage if {info exists env(TESTSUITE_ENABLE_SITECONFIG_MODEQ)} { + # psuf tests + report modEqProc foo foo/bar eqstart 1 0 0 0 /* + report modEqProc bar foo/bar eqstart 1 0 0 0 /* + report modEqProc foo foo/bar match 1 0 0 0 /* + report modEqProc bar foo/bar match 1 0 0 0 /* + report modEqProc foo/ foo/bar match 1 0 0 0 /* + report modEqProcIcase Foo foo/bar eqstart 1 0 0 0 /* + report modEqProcIcase Bar foo/bar eqstart 1 0 0 0 /* + report modEqProcIcase Foo foo/bar match 1 0 0 0 /* + report modEqProcIcase Bar foo/bar match 1 0 0 0 /* + report modEqProcIcase Foo/ foo/bar match 1 0 0 0 /* + report modEqProcExtdfl foo foo/bar eqstart 1 0 0 0 /* + report modEqProcExtdfl bar foo/bar eqstart 1 0 0 0 /* + report modEqProcExtdfl foo foo/bar match 1 0 0 0 /* + report modEqProcExtdfl bar foo/bar match 1 0 0 0 /* + report modEqProcExtdfl foo/ foo/bar match 1 0 0 0 /* + report modEqProcIcaseExtdfl Foo foo/bar eqstart 1 0 0 0 /* + report modEqProcIcaseExtdfl Bar foo/bar eqstart 1 0 0 0 /* + report modEqProcIcaseExtdfl Foo foo/bar match 1 0 0 0 /* + report modEqProcIcaseExtdfl Bar foo/bar match 1 0 0 0 /* + report modEqProcIcaseExtdfl Foo/ foo/bar match 1 0 0 0 /* # matchin tests report modEqProc oo/bar foo/bar matchin 1 report modEqProc aa foo/bar matchin 1 - report modEqProc oo/* foo/bar matchin 1 + report modEqProc oo foo/bar matchin 1 0 0 0 /* report modEqProcIcase Oo/bar foo/bar matchin 1 report modEqProcIcase Aa foo/bar matchin 1 - report modEqProcIcase Oo/* foo/bar matchin 1 + report modEqProcIcase Oo foo/bar matchin 1 0 0 0 /* report modEqProcExtdfl oo/bar foo/bar matchin 1 report modEqProcExtdfl aa foo/bar matchin 1 - report modEqProcExtdfl oo/* foo/bar matchin 1 + report modEqProcExtdfl oo foo/bar matchin 1 0 0 0 /* report modEqProcIcaseExtdfl Oo/bar foo/bar matchin 1 report modEqProcIcaseExtdfl Aa foo/bar matchin 1 - report modEqProcIcaseExtdfl Oo/* foo/bar matchin 1 + report modEqProcIcaseExtdfl Oo foo/bar matchin 1 0 0 0 /* defineParseModuleSpecificationProc getConf advanced_version_spec parseModuleSpecification 0 foo@1.1:1.3 parseModuleSpecification 0 oo@1.1:1.3 @@ -353,4 +381,67 @@ report getModuleDesignation loaded variant/1.0 0 } +# unsetModuleTag/unsetModuleExtraTag coverage test +if {info exists env(TESTSUITE_ENABLE_SITECONFIG_UNSETMODULETAG)} { + unsetModuleTag unk foo + unsetModuleExtraTag unk foo +} + +# readCollectionContent coverage test +if {info exists env(TESTSUITE_ENABLE_SITECONFIG_READCOLLCONTENT)} { + readCollectionContent /path/to/unk unk +} + +# test removal of alias, function and completion from a source-sh bash script +if {info exists env(TESTSUITE_ENABLE_SITECONFIG_SOURCESHBASHUNSET)} { + # update the list of commands run by execShAndGetEnv procedure + # to predefine alias, function and completion prior source-sh evaluation + proc traceCommandVarOfSourceSh {name1 name2 op} { + set defalias {alias alfoo='echo foo'} + set deffunc {funcfoo() { echo foo; }} + set defcomp {complete -o default -F _cmd cmd} + uplevel 1 list set $name1 "$defalias; $deffunc; $defcomp; uplevel 1 set $name1" + } + # update start of execShAndGetEnv proc to set up trace on command variable + set tracevarcall "trace add variable command write traceCommandVarOfSourceSh" + proc execShAndGetEnv info args execShAndGetEnv "$tracevarcall ; info body execShAndGetEnv" +} + +# test removal of alias, function and completion from a source-sh tcsh script +if {info exists env(TESTSUITE_ENABLE_SITECONFIG_SOURCESHTCSHUNSET)} { + # update the list of commands run by execShAndGetEnv procedure + # to predefine alias, function and completion prior source-sh evaluation + proc traceCommandVarOfSourceSh {name1 name2 op} { + # no function definition: not supported on tcsh shell + set defalias {alias alfoo 'echo foo'} + set defcomp {complete cmd 'n/--help/n/'} + uplevel 1 list set $name1 "$defalias; $defcomp; uplevel 1 set $name1" + } + # update start of execShAndGetEnv proc to set up trace on command variable + set tracevarcall "trace add variable command write traceCommandVarOfSourceSh" + proc execShAndGetEnv info args execShAndGetEnv "$tracevarcall ; info body execShAndGetEnv" +} + +# test removal of alias, function and completion from a source-sh fish script +if {info exists env(TESTSUITE_ENABLE_SITECONFIG_SOURCESHFISHUNSET)} { + # update the list of commands run by execShAndGetEnv procedure + # to predefine alias, function and completion prior source-sh evaluation + proc traceCommandVarOfSourceSh {name1 name2 op} { + set defalias {alias alfoo='echo foo'} + set deffunc {function funcfoo; echo foo; end} + set defcomp {complete -c cmd -s V -l version --description 'Command version'} + uplevel 1 list set $name1 "$defalias; $deffunc; $defcomp; uplevel 1 set $name1" + } + # update start of execShAndGetEnv proc to set up trace on command variable + set tracevarcall "trace add variable command write traceCommandVarOfSourceSh" + proc execShAndGetEnv info args execShAndGetEnv "$tracevarcall ; info body execShAndGetEnv" +} + +# supersede pwd procedure to raise an error +if {info exists env(TESTSUITE_ENABLE_SITECONFIG_PWDERROR)} { + proc pwd {} { + error {Custom error message} + } +} + }
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/home/.module/coll48
Added
@@ -0,0 +1,6 @@ +#%Module99 +module use --append testsuite/modulefiles.3 +module load --unknown-opt --tag=foo:auto-loaded:keep-loaded:forbidden foo/1.0 +module load --tag=bar:foo tag/8.0 +module load bar/1.0 +
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/home/coll39
Added
@@ -0,0 +1,3 @@ +module use --append testsuite/modulefiles.3 +module load --tag=foo:bar tag/8.0 foo/1.0 +
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/home/coll40
Added
@@ -0,0 +1,5 @@ +#%Module5.1 +module use --append testsuite/modulefiles.3 +module load --tag= tag/8.0 +module load foo/1.0 +
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/home/coll41
Added
@@ -0,0 +1,5 @@ +#%Module5.1 +module use --append testsuite/modulefiles.3 +module load --tag=foo +module load --tag=bar foo/1.0 +
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/home/coll42
Added
@@ -0,0 +1,5 @@ +#%Module5.1 +module use --append testsuite/modulefiles.3 +module load --tag= +module load foo/1.0 +
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/home/coll43
Added
@@ -0,0 +1,5 @@ +#%Module5.1 +module use --append testsuite/modulefiles.3 +module load --tag tag/8.0 +module load foo/1.0 +
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/home/coll45
Added
@@ -0,0 +1,6 @@ +#%Module5.1 +module use --append testsuite/modulefiles.3 +module load --tag=foo:auto-loaded:keep-loaded:nearly-forbidden foo/1.0 +module load --tag=bar:foo tag/8.0 +module load bar/1.0 +
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/home/coll46
Added
@@ -0,0 +1,6 @@ +#%Module5.1 +module use --append testsuite/modulefiles.3 +module load --tag=foo:auto-loaded:keep-loaded:forbidden foo/1.0 +module load --tag=bar:foo tag/8.0 +module load bar/1.0 +
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/home/coll49
Added
@@ -0,0 +1,7 @@ +#%Module5.1 +module use --append testsuite/modulefiles.3 +module load variant/3.0 bar=val2 +module load --tag=foo:keep-loaded tag/8.0 -bar +foo +module load --tag=bar:auto-loaded:keep-loaded foo/1.0 +module load keep/1.0 +
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/home/coll49-tosource
Added
@@ -0,0 +1,5 @@ +#%Module5.1 +module load variant/3.0 bar=val2 +module load --tag=foo:keep-loaded tag/8.0 -bar +foo +module load --tag=bar:keep-loaded foo/1.0 +module load keep/1.0
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/install.00-init/005-init_ts.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/install.00-init/005-init_ts.exp
Changed
@@ -89,12 +89,13 @@ set prob_msgs "$messages:PROB:\0-9\+" set verb_msgs "$messages:VERB:\0-9\+" -# Used as a line seperator inside modules +# Used as a line separator inside modules set modlin "\-\+" # properties to test the different available shells set shell_list {} set shell_sh_family {} +set shell_redir_list {} array set shell_init {} array set shell_path {} array set shell_opts {} @@ -174,6 +175,11 @@ set shell_test($shell) "$env(TESTSUITEDIR)/bin/install_test_${shell}" } } + switch -- $shell { + sh - bash - ksh - zsh - fish { + lappend shell_redir_list $shell + } + } } else { send_user "\t'$shell' shell is not installed, relative tests will be skipped\n" } @@ -225,7 +231,7 @@ # locate siteconfig file set siteconfig_file "$install_etcdir/siteconfig.tcl" -# determine if siteconfig forces stderr terminal attachement state +# determine if siteconfig forces stderr terminal attachment state proc siteconfig_isStderrTty {} { interp create _siteconfig interp eval _siteconfig set ::siteconfig_file $::siteconfig_file
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/install.00-init/010-environ.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/install.00-init/010-environ.exp
Changed
@@ -37,17 +37,20 @@ catch {unset env(LOADEDMODULES)} catch {unset env(_LMFILES_)} -catch {unset env(____MODULES_LMCONFLICT)} -catch {unset env(____MODULES_LMPREREQ)} -catch {unset env(____MODULES_LMALTNAME)} -catch {unset env(____MODULES_LMTAG)} -catch {unset env(____MODULES_LMVARIANT)} +catch {unset env(__MODULES_LMCONFLICT)} +catch {unset env(__MODULES_LMPREREQ)} +catch {unset env(__MODULES_LMALTNAME)} +catch {unset env(__MODULES_LMTAG)} +catch {unset env(__MODULES_LMEXTRATAG)} +catch {unset env(__MODULES_LMVARIANT)} catch {unset env(MODULES_RUN_QUARANTINE)} foreach var array names env { if {string match __MODULES_SHARE_* $var \ + || string match __MODULES_PUSHENV_* $var \ || string match __MODULES_QUAR_* $var \ + || string match MODULES_FAMILY_* $var \ || string match MODULES_RUNENV_* $var} { catch {unset env($var)} } @@ -90,6 +93,9 @@ catch {unset env(PAGER)} catch {unset env(MODULES_PAGER)} +# clean any output redirection configuration +unsetenv_var MODULES_REDIRECT_OUTPUT + # ensure tests are run with a regular default verbosity level set env(MODULES_VERBOSITY) normal @@ -108,6 +114,9 @@ # clear specific tag name color setup setenv_var MODULES_TAG_COLOR_NAME {} +# ensure magic cookie is always checked by default +setenv_var MODULES_MCOOKIE_CHECK always + # enable magic cookie version check by default setenv_var MODULES_MCOOKIE_VERSION_CHECK 1
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/install.00-init/020-module.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/install.00-init/020-module.exp
Changed
@@ -119,7 +119,7 @@ } # ensure advanced_version_spec is efficient on all shells -set loadunloadout "Loading advvers6/1.3\n Loading requirement: advvers7/1.0\nUnloading advvers7/1.0\n Unloading dependent: advvers6/1.3" +set loadunloadout "Loading advvers6/1.3\n Loading requirement: advvers7/1.0\nUnloading advvers7/1.0 <aL>\n Unloading dependent: advvers6/1.3" if {!is_config_locked implicit_default} { foreach shell $shell_list { testall_cmd $shell "module use $testsuite_modpath.2\; module config implicit_default 1\; module config verbosity normal\; module config advanced_version_spec 1\; module load --auto advvers6@1.3\; module unload --auto advvers7@1.0" {} $loadunloadout 0 @@ -146,6 +146,32 @@ } + +# test complete command +setenv_var TESTSUITE_COMPLETE comp3 +foreach shell $shell_list { + if {$shell in {bash tcsh fish}} { + testall_cmd $shell "module use \"$testsuite_modpath.3\"\; module load complete/1.0\; cmd" cmd {} 0 + testall_cmd $shell "module use \"$testsuite_modpath.3\"\; module load complete/1.0 complete/1.1\; cmd" cmd {} 0 + } +} +unsetenv_var TESTSUITE_COMPLETE + + +# test noglob eval on sh-kind shells +foreach shell $shell_list { + if {$shell in {sh bash ksh zsh}} { + set tsout {foo} + if {$shell eq {sh} && $sh_strict} { + set tserr {.*eval: \\: not found.*} + } else { + set tserr {} + } + testouterr_cmd_re $shell "module use \"$testsuite_modpath.3\"\; module load noglobeval/1.0\; foo" $tsout $tserr + } +} + + # # Clean up variables used in this test case #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/install.00-init/024-ml.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/install.00-init/024-ml.exp
Changed
@@ -122,7 +122,7 @@ } # ensure advanced_version_spec is efficient on all shells -set loadunloadout "Loading advvers6/1.3\n Loading requirement: advvers7/1.0\nUnloading advvers7/1.0\n Unloading dependent: advvers6/1.3" +set loadunloadout "Loading advvers6/1.3\n Loading requirement: advvers7/1.0\nUnloading advvers7/1.0 <aL>\n Unloading dependent: advvers6/1.3" if {!is_config_locked implicit_default} { foreach shell $shell_list { testall_cmd $shell "ml use $testsuite_modpath.2\; ml config implicit_default 1\; ml config verbosity normal\; ml config advanced_version_spec 1\; ml --auto advvers6@1.3\; ml --auto -advvers7@1.0" {} $loadunloadout 0
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/install.00-init/070-stderrtty.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/install.00-init/070-stderrtty.exp
Changed
@@ -25,7 +25,7 @@ } set env(TESTSUITE_ENABLE_SITECONFIG) 1 -# check if stderr terminal attachement state is forced +# check if stderr terminal attachment state is forced set is_stderr_tty siteconfig_isStderrTty if { $verbose > 0 } { send_user "\tIs STDERR a TTY? = '$is_stderr_tty'\n" @@ -142,9 +142,60 @@ } elseif {$verbose > 0} { - send_user "\tSkip test as STDERR is not attached to a TTY\n" + send_user "\tSkip most tests as STDERR is not attached to a TTY\n" } + +# test output redirection when shell is found or not attached to tty +set tserr "Modules Release \\S+ (\\S+)" +if {$is_stderr_tty} { + set dflout $tserr + set dflerr {} +} else { + set dflout {} + set dflerr $tserr +} + +foreach shell $shell_redir_list { + testall_cmd_re $shell {module --version} $dflout $dflerr 0 + testall_cmd_re autoinit:$shell {module --version} $dflout $dflerr 0 + testall_cmd_re $shell {module --version --redirect} $tserr {} 0 + testall_cmd_re autoinit:$shell {module --version --redirect} $tserr {} 0 + testall_cmd_re $shell {module --version --no-redirect} {} $tserr 0 + testall_cmd_re autoinit:$shell {module --version --no-redirect} {} $tserr 0 + # if --no-redirect is part of arg list it wins even if --redirect is set after + testall_cmd_re $shell {module --version --redirect --no-redirect} {} $tserr 0 + testall_cmd_re $shell {module --version --no-redirect --redirect} {} $tserr 0 + + setenv_var MODULES_REDIRECT_OUTPUT 0 + testall_cmd_re $shell {module --version} {} $tserr 0 + testall_cmd_re $shell {module --version --redirect} $tserr {} 0 + testall_cmd_re $shell {module --version --no-redirect} {} $tserr 0 + testall_cmd_re $shell {module --version --redirect --no-redirect} {} $tserr 0 + testall_cmd_re $shell {module --version --no-redirect --redirect} {} $tserr 0 + + setenv_var MODULES_REDIRECT_OUTPUT 1 + testall_cmd_re $shell {module --version} $tserr {} 0 + testall_cmd_re $shell {module --version --redirect} $tserr {} 0 + testall_cmd_re $shell {module --version --no-redirect} {} $tserr 0 + testall_cmd_re $shell {module --version --redirect --no-redirect} {} $tserr 0 + testall_cmd_re $shell {module --version --no-redirect --redirect} {} $tserr 0 + + # bad value set on MODULES_REDIRECT_OUTPUT env var + # any value different than 0 or 1 is ignored + setenv_var MODULES_REDIRECT_OUTPUT foo + testall_cmd_re $shell {module --version} $dflout $dflerr 0 + testall_cmd_re $shell {module --version --redirect} $tserr {} 0 + testall_cmd_re $shell {module --version --no-redirect} {} $tserr 0 + setenv_var MODULES_REDIRECT_OUTPUT {} + testall_cmd_re $shell {module --version} $dflout $dflerr 0 + testall_cmd_re $shell {module --version --redirect} $tserr {} 0 + testall_cmd_re $shell {module --version --no-redirect} {} $tserr 0 + + unsetenv_var MODULES_REDIRECT_OUTPUT +} + + # # Clean up variables used in this test case #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/install.00-init/090-sh-to-mod.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/install.00-init/090-sh-to-mod.exp
Changed
@@ -43,34 +43,31 @@ } } -set testshenvcmds "echo \"\$FOOCB:\$FOOEM:\$FOOSP:\$FOOARG1:\$FOOARG2:\$FOOARG3:\$FOOARG4\"\;" +set testshenvcmds "echo \"\$FOOCB:\$FOOEM:\$FOOSP:\$FOOWC:\$FOOARG1:\$FOOARG2:\$FOOARG3:\$FOOARG4\"\;" append testshenvcmds "alfoo\; alcb\; alsp\;" -append testshenvcmds "funcnl\; funccb\; funcsp\;" +append testshenvcmds "funcnl\; funccb\; funcsp\; funcwc\;" -set testshenvcmds_dash "echo \"\$FOOCB:\$FOOEM:\$FOOSP:\$FOOARG1:\$FOOARG2:\$FOOARG3:\$FOOARG4\"\;" +set testshenvcmds_dash "echo \"\$FOOCB:\$FOOEM:\$FOOSP:\$FOOWC:\$FOOARG1:\$FOOARG2:\$FOOARG3:\$FOOARG4\"\;" append testshenvcmds_dash "alfoo\; alcb\; alsp\;" -set testshenvcmds_csh "echo \$\{FOOCB\}:\$\{FOOEM\}:\$\{FOOSP\}:\$\{FOOARG1\}:\$\{FOOARG2\}:\$\{FOOARG3\}:\$\{FOOARG4\}\;" -append testshenvcmds_csh "alfoo\; alcb\; alsp\;" +# also update testenvcmds in testsuite/bin/install_test_csh script +set testshenvcmds_csh "echo \$\{FOOCB\}:\$\{FOOEM\}:\$\{FOOSP\}:\$\{FOOWC\}:\$\{FOOARG1\}:\$\{FOOARG2\}:\$\{FOOARG3\}:\$\{FOOARG4\}\;" +set testshenvcmds_csh "alfoo\; alcb\; alsp\;" if {$verbose > 0} { send_user "\tChecking modulefiles generated by 'sh-to-mod' sub-command\n" } -set tsout "va{ue::value :v'l:val\"e:val\\\"e:\n" +set tsout "va{ue::value :va*ue:v'l:val\"e:val\\\"e:\n" append tsout "Release\nf{o\nf\"o\nb\\\"r\nf'o\n" -append tsout "foo\nbar\nf{o\nf\"o\nb\\\"r\nf'o" - -set tsout_nonl "va{ue::value :v'l:val\"e:val\\\"e:\n" -append tsout_nonl "Release\nf{o\nf\"o\nb\\\"r\nf'o\n" -append tsout_nonl "foo echo bar\nf{o\nf\"o echo b\\\"r echo f'o" +append tsout "foo\nbar\nf{o\nf\"o\nb\\\"r\nf'o\nsource-sh" # no argument passed to script nor function defined with dash -set tsout_dash "va{ue::value ::::\n" +set tsout_dash "va{ue::value :va*ue::::\n" append tsout_dash "Release\nf{o\nf\"o\nb\\\"r\nf'o" # no function defined with csh -set tsout_csh "va{ue::value :v'l:val\"e:val\\\"e:\n" +set tsout_csh "va{ue::value :va*ue:v'l:val\"e:val\\\"e:\n" append tsout_csh "Release\nf{o\nf\"o\nb\\\"r\nf'o" foreach sh $shtomod_avail_shells { @@ -95,11 +92,7 @@ } elseif {$sh eq {dash} || ($sh eq {sh} && $sh_kind eq {dash})} { testall_cmd $fsh "module sh-to-mod $sh $testscriptsh $testscriptshargs 2>shtomod\; module load ./shtomod\; $testshenvcmds_dash" $tsout_dash {} 0 } else { - # with quarantine mechanism disabled, no specific IFS is set when modulecmd.tcl output is evaluated - # with zsh and ksh shells, sh-to-mod does not output ';' character at end of each function line, thus - # when evaluated with default IFS the multiple lines are treated as a single command line - set out expr {$install_quarantinesupport eq {n} && lsearch -exact list ksh zsh ksh93 $sh != -1 ? $tsout_nonl : $tsout} - testall_cmd $fsh "module sh-to-mod $sh $testscriptsh $testscriptshargs 2>shtomod\; module load ./shtomod\; $testshenvcmds" $out {} 0 + testall_cmd $fsh "module sh-to-mod $sh $testscriptsh $testscriptshargs 2>shtomod\; module load ./shtomod\; $testshenvcmds" $tsout {} 0 } file delete shtomod }
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/install.00-init/091-source-sh.exp
Added
@@ -0,0 +1,127 @@ +############################################################################## +# Modules Revision 3.0 +# Providing a flexible user environment +# +# File: modules.00-init/%M% +# Revision: %I% +# First Edition: 2022/02/21 +# Last Mod.: %U%, %G% +# +# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr +# +# Description: Testuite testsequence +# Command: +# Sub-Command: +# +# Comment: %C{ +# Check source-sh modulefile command against external software +# }C% +# +############################################################################## + +# test source-sh against Spack setup-env scripts if found installed for test +if {file exists spack/share/spack/setup-env.sh} { + +if {{bash} in $shell_list} { + set tsout "function\nenvironment-modules" + testall_cmd bash "module use \"$testsuite_modpath.3\"\; module load source-sh/spack\; type -t _spack_pathadd && spack list environment-modules\; module unload source-sh\; test -n \"\$PATH\"" $tsout {} 0 +} + +if {{ksh} in $shell_list} { + set tserr "_spack_pathadd()\nenvironment-modules" + # need to manually specify SPACK_ROOT prior script evaluation for ksh + testall_cmd ksh "module use \"$testsuite_modpath.3\"\; export SPACK_ROOT=spack\; module load source-sh/spack\; typeset +f _spack_pathadd && spack list environment-modules\; module unload source-sh\; test -n \"\$PATH\"" $tserr {} 0 +} + +if {{zsh} in $shell_list} { + set tsout "_spack_pathadd\nenvironment-modules" + testall_cmd zsh "module use \"$testsuite_modpath.3\"\; module load source-sh/spack\; typeset +f _spack_pathadd && spack list environment-modules\; module unload source-sh\; test -n \"\$PATH\"" $tsout {} 0 +} + +if {{tcsh} in $shell_list} { + # not working on tcsh as variables used in spack alias are local variable, not environment variable + set tserr "_spack_share_dir: Undefined variable." + testall_cmd tcsh "module use \"$testsuite_modpath.3\"\; module load source-sh/spack\; spack list environment-modules\; module unload source-sh\; test -n \"\$PATH\"" {} $tserr 1 +} + +if {{fish} in $shell_list} { + set tsout "environment-modules" + # module command seems superseded by spack definition on fish: cannot test unload + testall_cmd fish "module use \"$testsuite_modpath.3\"\; module load source-sh/spack\; functions -q spack_pathadd\; and spack list environment-modules" $tsout {} 0 +} + +} else { + send_user "\tSkipping source-sh tests over Spack scripts\n" +} + +# test source-sh against Conda setup-env scripts if found installed for test +if {file exists miniconda3/etc/profile.d/conda.sh} { + +if {{bash} in $shell_list} { + set tsout "function\n# conda environments:\n#\nbase \\* \\S*/miniconda3\n" + testall_cmd_re bash "module use \"$testsuite_modpath.3\"\; module load source-sh/conda\; type -t __conda_activate && conda env list\; module unload source-sh\; test -n \"\$PATH\"" $tsout {} 0 +} + +if {{ksh} in $shell_list} { + # not working on ksh as 'local' command is used + set tsout "__conda_activate\\\(\\\)" + set tserr ".*local: .*" + testall_cmd_re ksh "module use \"$testsuite_modpath.3\"\; module load source-sh/conda\; typeset +f __conda_activate && conda env list\; module unload source-sh\; test -n \"\$PATH\"" $tsout $tserr 127 +} + +if {{zsh} in $shell_list} { + set tsout "__conda_activate\n# conda environments:\n#\nbase \\* \\S*/miniconda3\n" + testall_cmd_re zsh "module use \"$testsuite_modpath.3\"\; module load source-sh/conda\; typeset +f __conda_activate && conda env list\; module unload source-sh\; test -n \"\$PATH\"" $tsout {} 0 +} + +if {{tcsh} in $shell_list} { + set tsout "# conda environments:\n#\nbase \\* \\S*/miniconda3\n" + testall_cmd_re tcsh "module use \"$testsuite_modpath.3\"\; module load source-sh/conda\; conda env list\; module unload source-sh\; test -n \"\$PATH\"" $tsout {} 0 +} + +if {{fish} in $shell_list} { + set tsout "# conda environments:\n#\nbase \\* \\S*/miniconda3\n" + testall_cmd_re fish "module use \"$testsuite_modpath.3\"\; module load source-sh/conda\; functions -q __fish_conda_env_commands\; and conda env list\; module unload source-sh\; test -n \"\$PATH\"" $tsout {} 0 +} + +} else { + send_user "\tSkipping source-sh tests over Conda scripts\n" +} + + +# test source-sh against OpenFOAM setup-env scripts if found installed for test +if {file exists OpenFOAM-dev/etc/bashrc} { + +if {{bash} in $shell_list} { + set tsout function + set tserr OpenFOAM-dev + testall_cmd bash "module use \"$testsuite_modpath.3\"\; module load source-sh/openfoam\; type -t _foamDictionary_ && foamVersion\; module unload source-sh\; test -n \"\$PATH\"" $tsout $tserr 0 +} + +# sh script does not correctly detect installation path with ksh shell + +if {{zsh} in $shell_list} { + set tsout _foamParams + set tserr OpenFOAM-dev + testall_cmd zsh "module use \"$testsuite_modpath.3\"\; module load source-sh/openfoam\; typeset +f _foamParams && foamVersion\; module unload source-sh\; test -n \"\$PATH\"" $tsout $tserr 0 +} + +if {{tcsh} in $shell_list} { + set tsout OpenFOAM-dev + testall_cmd tcsh "module use \"$testsuite_modpath.3\"\; module load source-sh/openfoam\; foamVersion\; module unload source-sh\; test -n \"\$PATH\"" $tsout {} 0 +} + +# no setup-env script provided for fish shell + +} else { + send_user "\tSkipping source-sh tests over OpenFOAM scripts\n" +} + + +# +# Clean up variables used in this test case +# + +reset_test_env + +# vim:set tabstop=3 shiftwidth=3 expandtab autoindent:
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/is_module_defined
Added
@@ -0,0 +1,2 @@ +#!/bin/bash +type module >/dev/null 2>&1
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.2/modemptyarg/load-any
Added
@@ -0,0 +1,27 @@ +#%Module1.0 + +############################################################################## +# Modules Revision 3.0 +# Providing a flexible user environment +# +# File: modemptyarg/%M% +# Revision: %I% +# First Edition: 2021/12/20 +# Last Mod.: %U%, %G% +# +# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr +# +# Description: Testuite modulefile +# Command: +# +# Invocation: +# Result: %R{ +# }R% +# Comment: %C{ +# Test module commands called from modulefile with an empty string +# argument called +# }C% +# +############################################################################## + +module load-any {} ""
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.2/source-sh/7.0
Added
@@ -0,0 +1,3 @@ +#%Module +source-sh tcsh testsuite/example/sh-to-mod.csh +module-whatis module-info name
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.2/source-sh/7.1
Added
@@ -0,0 +1,3 @@ +#%Module +source-sh bash testsuite/example/sh-to-mod.sh +module-whatis module-info name
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.2/source-sh/7.2
Added
@@ -0,0 +1,3 @@ +#%Module +source-sh fish testsuite/example/sh-to-mod.fish +module-whatis module-info name
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.2/source-sh/8.0
Added
@@ -0,0 +1,1 @@ +#%Module
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/complete
Added
+(directory)
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/complete/.modulerc
Added
@@ -0,0 +1,13 @@ +#%Module + +if {info exists env(TESTSUITE_COMPLETE)} { + switch -- $env(TESTSUITE_COMPLETE) { + comprc1 { + complete bash cmd {-o default -F _cmd} + } + uncomprc1 { + uncomplete cmd + } + } +} +
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/complete/1.0
Added
@@ -0,0 +1,64 @@ +#%Module + +module-whatis module-info name + +if {info exists env(TESTSUITE_COMPLETE)} { + switch -- $env(TESTSUITE_COMPLETE) { + compbad1 { + complete + } + compbad2 { + complete bash + } + compbad3 { + complete bash cmd + } + compbad4 { + complete bash {} {-o default -F _cmd} + } + compbreak1 - compbreak2 { + complete bash cmd {-o default -F _cmd} + break + } + compcomb1 { + complete bash cmd {-o default -F _cmd} + } + comp1 { + complete bash cmd {-o default -F _cmd} + complete tcsh cmd {some arg list for tcsh} + complete fish cmd {some arg list for fish} + complete fish cmd {other arg list for fish} + complete zsh cmd {some arg list for zsh} + complete unksh cmd {some arg list for unksh} + } + comp2 { + complete module-info shell cmd {some arg list for shell} + complete module-info shell cmd {other arg list for shell} + } + comp3 { + switch -- module-info shell { + bash { +set-function _cmd {local cur="$2" prev="$3" cmds opts; + COMPREPLY=(); + case "$cur" in + -*) COMPREPLY=( $(compgen -W "-h -v --help --version" -- "$cur") );; + esac;} +set-function cmd {echo cmd} +complete bash cmd {-o default -F _cmd} + } + tcsh { +set-alias cmd {echo cmd} +complete tcsh cmd {'n/-h/n/' 'n/--help/n/' \ + 'n/-V/n/' 'n/--version/n/' \ + "p/1/(-h -V --help --version)/"} + } + fish { +set-function cmd {echo cmd} +complete fish cmd {-s V -l version --description 'Command version'} +complete fish cmd {-s h -l help --description 'Command help'} + } + } + } + } +} +
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/complete/1.1
Added
@@ -0,0 +1,30 @@ +#%Module + +module-whatis module-info name + +if {info exists env(TESTSUITE_COMPLETE)} { + switch -- $env(TESTSUITE_COMPLETE) { + uncompbad1 { + uncomplete + } + uncompbad2 { + uncomplete cmd cmd + } + uncompbad3 { + uncomplete {} + } + uncomp1 { + uncomplete cmd + uncomplete cmd + uncomplete othercmd + } + uncompbreak1 - uncompbreak2 { + uncomplete cmd + break + } + uncompcomb1 - comp3 { + uncomplete cmd + } + } +} +
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/complete/1.2
Added
@@ -0,0 +1,21 @@ +#%Module + +module-whatis module-info name + +if {info exists env(TESTSUITE_COMPLETE)} { + switch -- $env(TESTSUITE_COMPLETE) { + compbreak1 { + complete bash othercmd {-o default -F _othercmd} + } + compcomb1 { + uncomplete cmd + } + uncompbreak1 { + uncomplete othercmd + } + uncompcomb1 { + complete bash cmd {-o default -F _cmd} + } + } +} +
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/complete/2.0
Added
@@ -0,0 +1,1 @@ +#%Module
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/flatlcompat
Added
@@ -0,0 +1,15 @@ +#%Module + +module-whatis module-info name + +if {info exists env(TESTSUITE_LCOMPAT)} { + switch -- $env(TESTSUITE_LCOMPAT) { + family1 { + family fam + } + pushenv1 - pushenv7 { + pushenv FOO bar + } + } +} +
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles.3/foo/.modulerc -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/foo/.modulerc
Changed
@@ -9,3 +9,14 @@ module-version foo/0.2 sym module-tag tag foo/0.2 + +if {info exists env(TESTSUITE_TAG_OPT)} { + switch -- $env(TESTSUITE_TAG_OPT) { + coll49forb { + module-forbid foo/1.0 + } + coll49keep { + module-tag keep-loaded foo/1.0 + } + } +}
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles.3/foo/1.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/foo/1.0
Changed
@@ -1,2 +1,10 @@ #%Module module-whatis module-info name + +if {info exists env(TESTSUITE_TAG_OPT)} { + switch -- $env(TESTSUITE_TAG_OPT) { + prtag12 { + prereq --tag=keep-loaded:foo tag/8.0 + } + } +}
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/keep
Added
+(directory)
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/keep/1.0
Added
@@ -0,0 +1,20 @@ +#%Module + +module-whatis module-info name + +if {info exists env(TESTSUITE_KEEP_LOADED)} { + switch -- $env(TESTSUITE_KEEP_LOADED) { + load1 - coll49 - coll49forb - coll49keep { + module load --tag=keep-loaded foo/1.0 + } + prereq1 { + prereq --tag=keep-loaded foo/1.0 + } + switch1 { + module switch --tag=keep-loaded bar foo/1.0 + } + allo1 { + always-load --tag=keep-loaded foo/1.0 + } + } +}
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/keep/2.0
Added
@@ -0,0 +1,1 @@ +#%Module
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/lcompat
Added
+(directory)
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/lcompat/.modulerc
Added
@@ -0,0 +1,49 @@ +#%Module + +if {info exists env(TESTSUITE_LCOMPAT)} { + switch -- $env(TESTSUITE_LCOMPAT) { + addproprc1 { + add-property key value + } + remproprc1 { + remove-property key value + } + extrc1 { + extensions moda/1.0 modb/2.0 + } + pranyrc1 { + prereq-any foo/1.0 bar/1.0 + } + reqfull1 { + module-alias lcompat/al lcompat/1.4 + module-version lcompat/1.4 sym default + } + reqfull2 { + module-hide lcompat@1.5: + } + reqfull3 { + module-virtual lcompat/deep/1.4 ./1.4 + module-alias lcompat/aldeep lcompat/deep/1.4 + module-version lcompat/deep/1.4 deepsym default + } + reqfullrc1 { + require-fullname + } + deponrc1 { + depends-on foo/1.0 + } + prallrc1 { + prereq-all foo/1.0 + } + allorc1 { + always-load foo/1.0 + } + familyrc1 { + family fam + } + pushenvrc1 { + pushenv FOO val1 + } + } +} +
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/lcompat/.version
Added
@@ -0,0 +1,18 @@ +#%Module + +if {info exists env(TESTSUITE_LCOMPAT)} { + switch -- $env(TESTSUITE_LCOMPAT) { + modvers1 { + set ModuleVersion 1.0 + } + modvers2 { + set ModulesVersion 2.0 + set ModuleVersion 1.0 + } + modvers3 { + set ModuleVersion 2.0 + set ModulesVersion 1.0 + } + } +} +
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/lcompat/1.0
Added
@@ -0,0 +1,21 @@ +#%Module + +module-whatis module-info name + +if {info exists env(TESTSUITE_LCOMPAT)} { + switch -- $env(TESTSUITE_LCOMPAT) { + addprop1 { + add-property key value + } + addprop2 { + add-property key value val2 + } + addprop3 { + add-property key + } + addprop4 { + add-property + } + } +} +
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/lcompat/1.1
Added
@@ -0,0 +1,21 @@ +#%Module + +module-whatis module-info name + +if {info exists env(TESTSUITE_LCOMPAT)} { + switch -- $env(TESTSUITE_LCOMPAT) { + remprop1 { + remove-property key value + } + remprop2 { + remove-property key value val2 + } + remprop3 { + remove-property key + } + remprop4 { + remove-property + } + } +} +
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/lcompat/1.10
Added
@@ -0,0 +1,51 @@ +#%Module + +module-whatis module-info name + +if {info exists env(TESTSUITE_LCOMPAT)} { + switch -- $env(TESTSUITE_LCOMPAT) { + pushenv1 { + pushenv FOO val1 + } + pushenv2 { + pushenv FOO val val + } + pushenv3 { + pushenv FOO + } + pushenv4 { + pushenv + } + pushenv5 { + pushenv var v&l + pushenv foO &al + } + pushenv6 { + pushenv FOO {} + pushenv BAR val + } + pushenv7 { + pushenv FOO val1 + puts stderr getenv FOO-$env(FOO) + pushenv FOO {} + puts stderr getenv FOO-$env(FOO) + pushenv FOO val1 + puts stderr getenv FOO-$env(FOO) + pushenv FOO val2 + puts stderr getenv FOO-$env(FOO) + } + pushenv8 { + if {module-info mode load} { + pushenv FOO val1 + } + } + pushenv9 { + if {module-info mode unload} { + pushenv FOO val1 + } + } + pushenv10 - pushenv11 - pushenv12 - pushenv13 { + pushenv FOO bar + } + } +}
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/lcompat/1.11
Added
@@ -0,0 +1,23 @@ +#%Module + +module-whatis module-info name + +if {info exists env(TESTSUITE_LCOMPAT)} { + switch -- $env(TESTSUITE_LCOMPAT) { + pushenv1 { + pushenv FOO val1 + } + pushenv10 { + append-path FOO /path/to/val1 + } + pushenv11 { + setenv FOO foo + } + pushenv12 { + remove-path FOO /path/to/val1 + } + pushenv13 { + unsetenv FOO + } + } +}
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/lcompat/1.2
Added
@@ -0,0 +1,18 @@ +#%Module + +module-whatis module-info name + +if {info exists env(TESTSUITE_LCOMPAT)} { + switch -- $env(TESTSUITE_LCOMPAT) { + ext1 { + extensions moda/1.0 modb/2.0 + } + ext2 { + extensions moda/1.0 + } + ext3 { + extensions + } + } +} +
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/lcompat/1.3
Added
@@ -0,0 +1,18 @@ +#%Module + +module-whatis module-info name + +if {info exists env(TESTSUITE_LCOMPAT)} { + switch -- $env(TESTSUITE_LCOMPAT) { + prany1 { + prereq-any foo/1.0 bar/1.0 + } + prany2 { + prereq-any foo/1.0 + } + prany3 { + prereq-any + } + } +} +
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/lcompat/1.4
Added
@@ -0,0 +1,19 @@ +#%Module + +module-whatis module-info name + +if {info exists env(TESTSUITE_LCOMPAT)} { + switch -- $env(TESTSUITE_LCOMPAT) { + reqfull1 - reqfull2 { + require-fullname + } + reqfull3 { + variant --default val2 foo val1 val2 val3 + require-fullname + } + reqfull4 { + require-fullname string + } + } +} +
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/lcompat/1.5
Added
@@ -0,0 +1,27 @@ +#%Module + +module-whatis module-info name + +if {info exists env(TESTSUITE_LCOMPAT)} { + switch -- $env(TESTSUITE_LCOMPAT) { + depon1 { + depends-on foo/1.0 + } + depon2 { + depends-on foo/1.0 bar/1.0 + } + depon3 { + depends-on foo@1 bar@:1 + } + depon4 { + depends-on foo/0.err bar/1.0 + } + depon5 { + depends-on foo/1.0 unk/1.0 + } + depon6 { + depends-on + } + } +} +
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/lcompat/1.6
Added
@@ -0,0 +1,27 @@ +#%Module + +module-whatis module-info name + +if {info exists env(TESTSUITE_LCOMPAT)} { + switch -- $env(TESTSUITE_LCOMPAT) { + prall1 { + prereq-all foo/1.0 + } + prall2 { + prereq-all foo/1.0 bar/1.0 + } + prall3 { + prereq-all foo@1 bar@:1 + } + prall4 { + prereq-all foo/0.err bar/1.0 + } + prall5 { + prereq-all foo/1.0 unk/1.0 + } + prall6 { + prereq-all + } + } +} +
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/lcompat/1.7
Added
@@ -0,0 +1,30 @@ +#%Module + +module-whatis module-info name + +if {info exists env(TESTSUITE_LCOMPAT)} { + switch -- $env(TESTSUITE_LCOMPAT) { + allo1 { + always-load foo/1.0 + } + allo2 { + always-load foo/1.0 bar/1.0 + } + allo3 { + always-load foo@1 bar@:1 + } + allo4 { + always-load foo/0.err bar/1.0 + } + allo5 { + always-load foo/1.0 unk/1.0 + } + allo6 { + always-load + } + allo7 { + always-load foo bar + } + } +} +
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/lcompat/1.8
Added
@@ -0,0 +1,24 @@ +#%Module + +module-whatis module-info name + +if {info exists env(TESTSUITE_LCOMPAT)} { + switch -- $env(TESTSUITE_LCOMPAT) { + family1 { + family fam + } + family2 { + family {} + } + family3 { + family b+d + } + family4 { + family bad/name + } + family5 { + family + } + } +} +
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/lcompat/1.9
Added
+(directory)
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/lcompat/1.9/1.9
Added
@@ -0,0 +1,12 @@ +#%Module + +module-whatis module-info name + +if {info exists env(TESTSUITE_LCOMPAT)} { + switch -- $env(TESTSUITE_LCOMPAT) { + family1 { + family fam + } + } +} +
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/lcompat/1.9/2.0
Added
@@ -0,0 +1,1 @@ +#%Module
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/lcompat/2.0
Added
@@ -0,0 +1,1 @@ +#%Module
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/lcompatdep
Added
+(directory)
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/lcompatdep/1.4
Added
@@ -0,0 +1,21 @@ +#%Module + +module-whatis module-info name + +if {info exists env(TESTSUITE_LCOMPAT_DEP)} { + switch -- $env(TESTSUITE_LCOMPAT_DEP) { + reqfulldep1 { + prereq lcompat/1.4 + } + reqfulldep2 { + prereq lcompat/al + } + reqfulldep3 { + prereq lcompat + } + reqfulldep4 { + prereq lcompat/default + } + } +} +
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/lcompatdep/2.0
Added
@@ -0,0 +1,1 @@ +#%Module
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/list
Added
+(directory)
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/list/1.0
Added
@@ -0,0 +1,24 @@ +#%Module + +module-whatis module-info name + +if {info exists env(TESTSUITE_MODULE_LIST)} { + switch -- $env(TESTSUITE_MODULE_LIST) { + list1 { + module list + } + list2 { + module list foo + } + list3 { + module list foo@1 + } + list4 { + module list foo bar/1 + } + list5 { + module list alfoo bar/1 + } + } +} +
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/list/2.0
Added
@@ -0,0 +1,1 @@ +#%Module
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/loadany
Added
+(directory)
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/loadany/.modulerc
Added
@@ -0,0 +1,12 @@ +#%Module + +if {info exists env(TESTSUITE_LOADANY)} { + switch -- $env(TESTSUITE_LOADANY) { + hide1 { + module-hide --hard loadany/1.0 + } + forbid1 { + module-forbid loadany/1.0 + } + } +}
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/loadany/1.0
Added
@@ -0,0 +1,17 @@ +#%Module +if {info exists env(TESTSUITE_LOADANY)} { + switch -- $env(TESTSUITE_LOADANY) { + break1 - catch3 - multi2 { + break + } + bad1 - catch4 - multi3 { + unk + } + subload1 { + module load unk/1.0 + } + subload2 { + module load foo/1.0 + } + } +}
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/loadany/2.0
Added
@@ -0,0 +1,27 @@ +#%Module +if {info exists env(TESTSUITE_LOADANY)} { + switch -- $env(TESTSUITE_LOADANY) { + unk1 { + module load-any unk/1.0 + } + regular1 { + module add-any loadany/1.0 + } + hide1 - forbid1 - break1 - bad1 - subload1 - subload2 { + module load-any loadany/1.0 + } + catch1 { + catch {module add-any unk/1.0} + } + catch2 - catch3 - catch4 { + catch {module add-any loadany/1.0} + } + multi1 { + module load-any unk/1.0 loadany/1.0 + } + multi2 - multi3 - multi4 { + module load-any loadany/1.0 foo/1.0 + } + } +} +setenv TS1 ok
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/modbad/state
Added
@@ -0,0 +1,28 @@ +#%Module1.0 + +############################################################################## +# Modules Revision 3.0 +# Providing a flexible user environment +# +# File: modbad/%M% +# Revision: %I% +# First Edition: 2021/10/19 +# Last Mod.: %U%, %G% +# +# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr +# +# Description: Testuite modulefile +# Command: +# +# Invocation: +# Result: %R{ +# }R% +# Comment: %C{ +# test behavior against a modulefile using module sub-commands +# only reachable from command line +# }C% +# +############################################################################## + +module state +module help
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/noglobeval
Added
+(directory)
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/noglobeval/1.0
Added
@@ -0,0 +1,8 @@ +#%Module +set-function foo { + if "$FOO" == a-z* ; then + echo bad + else + echo foo + fi +}
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/notreq/loadany
Added
@@ -0,0 +1,2 @@ +#%Module +module load-any --not-req foo
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/notreq/loadanymul
Added
@@ -0,0 +1,2 @@ +#%Module +module load-any --not-req foo bar
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/notreq/tryload
Added
@@ -0,0 +1,2 @@ +#%Module +module try-load --not-req foo
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/notreq/tryloadmul
Added
@@ -0,0 +1,2 @@ +#%Module +module try-load --not-req foo bar
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/path-cmd-opt
Added
+(directory)
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/path-cmd-opt/1.0
Added
@@ -0,0 +1,63 @@ +#%Module + +module-whatis module-info name + +if {info exists env(TESTSUITE_PATH_CMD_OPT)} { + switch -- $env(TESTSUITE_PATH_CMD_OPT) { + append1 { + append-path FOO /tmp --remove-on-unload + } + append2 { + append-path --remove-on-unload FOO /tmp + } + prepend1 { + prepend-path --remove-on-unload FOO /tmp + } + prepend2 { + prepend-path --remove-on-unload FOO /tmp /dir1 + } + remove1 { + remove-path --remove-on-unload FOO /tmp + } + remove2 { + remove-path --remove-on-unload FOO /tmp /dir1 + } + use1 { + module use /tmp --remove-on-unload + } + use2 { + module use --remove-on-unload /tmp + } + unuse1 { + module unuse /tmp --remove-on-unload + } + unuse2 { + module unuse --remove-on-unload /tmp /dir1 + } + remove3 { + remove-path FOO /tmp /dir1 --remove-on-unload + } + remove4 { + remove-path --remove-on-unload --index FOO 3 + } + remove5 { + remove-path FOO --remove-on-unload + } + remove6 { + remove-path FOO /tmp --remove-on-unload /dir1 + } + remove7 { + remove-path --remove-on-unload FOO /tmp {} + } + unuse3 { + module unuse --remove-on-unload + } + unuse4 { + module unuse /tmp --remove-on-unload /dir1 + } + unuse5 { + module unuse --remove-on-unload /tmp {} + } + } +} +
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/path-cmd-opt/1.1
Added
@@ -0,0 +1,123 @@ +#%Module + +module-whatis module-info name + +if {info exists env(TESTSUITE_PATH_CMD_OPT)} { + switch -- $env(TESTSUITE_PATH_CMD_OPT) { + append1 { + append-path FOO /tmp --append-on-unload /dir1 + } + append2 { + append-path --append-on-unload FOO /tmp + } + prepend1 { + prepend-path --append-on-unload FOO /tmp + } + prepend2 { + prepend-path --append-on-unload FOO /tmp /dir1 + } + remove1 { + remove-path --append-on-unload FOO /tmp + } + remove2 { + remove-path --append-on-unload FOO /tmp /dir1 + } + use1 { + module use /tmp --append-on-unload /dir1 + } + use2 { + module use --append-on-unload /tmp + } + unuse1 { + module unuse /tmp --append-on-unload /dir1 + } + unuse2 { + module unuse --append-on-unload /tmp /dir1 + } + remove3 { + remove-path FOO --append-on-unload /tmp + } + remove4 { + remove-path FOO /tmp /dir1 --append-on-unload /dir1 /dir2 + } + remove5 { + remove-path FOO /tmp /dir1 --append-on-unload + } + remove6 { + remove-path FOO /tmp /dir1 --remove-on-unload --append-on-unload + } + remove7 { + remove-path --append-on-unload --remove-on-unload FOO /tmp /dir1 + } + remove8 { + remove-path --remove-on-unload --append-on-unload FOO /tmp /dir1 + } + remove9 { + remove-path --remove-on-unload FOO /tmp --append-on-unload /dir1 /dir2 + } + remove10 { + remove-path -d , FOO /tmp /dir1 --append-on-unload /dir1 /dir2 + } + remove11 { + remove-path --append-on-unload -d , FOO /tmp /dir1 + } + remove12 { + remove-path --append-on-unload --index FOO 3 + } + remove13 { + remove-path --index FOO 3 --append-on-unload /tmp + } + remove14 { + remove-path --append-on-unload --duplicates FOO /tmp /dir1 + } + remove15 { + remove-path --ignore-refcount --append-on-unload FOO /tmp /dir1 + } + unuse3 { + module unuse --append-on-unload /tmp + } + unuse4 { + module unuse /tmp /dir1 --append-on-unload /dir1 /dir2 + } + unuse5 { + module unuse /tmp /dir1 --append-on-unload + } + unuse6 { + module unuse /tmp /dir1 --remove-on-unload --append-on-unload + } + unuse7 { + module unuse --append-on-unload --remove-on-unload /tmp /dir1 + } + unuse8 { + module unuse --remove-on-unload --append-on-unload /tmp /dir1 + } + unuse9 { + module unuse --remove-on-unload /tmp --append-on-unload /dir1 /dir2 + } + remove16 { + remove-path FOO --append-on-unload + } + remove17 { + remove-path FOO --append-on-unload /tmp /dir1 --remove-on-unload /dir2 + } + remove18 { + remove-path FOO --append-on-unload --remove-on-unload /tmp /dir1 + } + remove19 { + remove-path FOO --append-on-unload {} /tmp + } + unuse10 { + module unuse --append-on-unload + } + unuse11 { + module unuse --append-on-unload /tmp /dir1 --remove-on-unload /dir2 + } + unuse12 { + module unuse --append-on-unload --remove-on-unload /tmp /dir1 + } + unuse13 { + module unuse --append-on-unload {} /tmp + } + } +} +
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/path-cmd-opt/1.2
Added
@@ -0,0 +1,123 @@ +#%Module + +module-whatis module-info name + +if {info exists env(TESTSUITE_PATH_CMD_OPT)} { + switch -- $env(TESTSUITE_PATH_CMD_OPT) { + append1 { + append-path FOO /tmp --prepend-on-unload /dir1 + } + append2 { + append-path --prepend-on-unload FOO /tmp + } + prepend1 { + prepend-path --prepend-on-unload FOO /tmp + } + prepend2 { + prepend-path --prepend-on-unload FOO /tmp /dir1 + } + remove1 { + remove-path --prepend-on-unload FOO /tmp + } + remove2 { + remove-path --prepend-on-unload FOO /tmp /dir1 + } + use1 { + module use /tmp --prepend-on-unload /dir1 + } + use2 { + module use --prepend-on-unload /tmp + } + unuse1 { + module unuse /tmp --prepend-on-unload /dir1 + } + unuse2 { + module unuse --prepend-on-unload /tmp /dir1 + } + remove3 { + remove-path FOO --prepend-on-unload /tmp + } + remove4 { + remove-path FOO /tmp /dir1 --prepend-on-unload /dir1 /dir2 + } + remove5 { + remove-path FOO /tmp /dir1 --prepend-on-unload + } + remove6 { + remove-path FOO /tmp /dir1 --remove-on-unload --prepend-on-unload + } + remove7 { + remove-path --prepend-on-unload --remove-on-unload FOO /tmp /dir1 + } + remove8 { + remove-path --remove-on-unload --prepend-on-unload FOO /tmp /dir1 + } + remove9 { + remove-path --append-on-unload FOO /tmp --prepend-on-unload /dir1 /dir2 + } + remove10 { + remove-path -d , FOO /tmp /dir1 --prepend-on-unload /dir1 /dir2 + } + remove11 { + remove-path --prepend-on-unload -d , FOO /tmp /dir1 + } + remove12 { + remove-path --prepend-on-unload --index FOO 3 + } + remove13 { + remove-path --index FOO 3 --prepend-on-unload /tmp + } + remove14 { + remove-path --prepend-on-unload --duplicates FOO /tmp /dir1 + } + remove15 { + remove-path --ignore-refcount --prepend-on-unload FOO /tmp /dir1 + } + unuse3 { + module unuse --prepend-on-unload /tmp + } + unuse4 { + module unuse /tmp /dir1 --prepend-on-unload /dir1 /dir2 + } + unuse5 { + module unuse /tmp /dir1 --prepend-on-unload + } + unuse6 { + module unuse /tmp /dir1 --remove-on-unload --prepend-on-unload + } + unuse7 { + module unuse --prepend-on-unload --remove-on-unload /tmp /dir1 + } + unuse8 { + module unuse --remove-on-unload --prepend-on-unload /tmp /dir1 + } + unuse9 { + module unuse --append-on-unload /tmp --prepend-on-unload /dir1 /dir2 + } + remove16 { + remove-path FOO --prepend-on-unload + } + remove17 { + remove-path FOO --prepend-on-unload /tmp /dir1 --append-on-unload /dir2 + } + remove18 { + remove-path FOO --prepend-on-unload --remove-on-unload /tmp /dir1 + } + remove19 { + remove-path FOO --prepend-on-unload {} /tmp + } + unuse10 { + module unuse --prepend-on-unload + } + unuse11 { + module unuse --prepend-on-unload /tmp /dir1 --append-on-unload /dir2 + } + unuse12 { + module unuse --prepend-on-unload --remove-on-unload /tmp /dir1 + } + unuse13 { + module unuse --prepend-on-unload {} /tmp + } + } +} +
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/path-cmd-opt/1.3
Added
@@ -0,0 +1,108 @@ +#%Module + +module-whatis module-info name + +if {info exists env(TESTSUITE_PATH_CMD_OPT)} { + switch -- $env(TESTSUITE_PATH_CMD_OPT) { + append1 { + append-path FOO /tmp --noop-on-unload /dir1 + } + append2 { + append-path --noop-on-unload FOO /tmp + } + prepend1 { + prepend-path --noop-on-unload FOO /tmp + } + prepend2 { + prepend-path --noop-on-unload FOO /tmp /dir1 + } + remove1 { + remove-path --noop-on-unload FOO /tmp + } + remove2 { + remove-path --noop-on-unload FOO /tmp /dir1 + } + use1 { + module use /tmp --noop-on-unload /dir1 + } + use2 { + module use --noop-on-unload /tmp + } + unuse1 { + module unuse /tmp --noop-on-unload /dir1 + } + unuse2 { + module unuse --noop-on-unload /tmp /dir1 + } + remove3 { + remove-path FOO --noop-on-unload /tmp + } + remove4 { + remove-path FOO /tmp /dir1 --noop-on-unload + } + remove5 { + remove-path FOO /tmp /dir1 --remove-on-unload --noop-on-unload + } + remove6 { + remove-path --remove-on-unload --noop-on-unload FOO /tmp /dir1 + } + remove7 { + remove-path --append-on-unload FOO /tmp --noop-on-unload /dir1 /dir2 + } + remove8 { + remove-path --noop-on-unload --index FOO 3 + } + remove9 { + remove-path --index FOO 3 --noop-on-unload /tmp + } + remove10 { + remove-path --noop-on-unload --duplicates FOO /tmp /dir1 + } + remove11 { + remove-path --ignore-refcount --noop-on-unload FOO /tmp /dir1 + } + unuse3 { + module unuse /tmp /dir1 --noop-on-unload + } + unuse4 { + module unuse /tmp /dir1 --remove-on-unload --noop-on-unload + } + unuse5 { + module unuse --remove-on-unload --noop-on-unload /tmp /dir1 + } + unuse6 { + module unuse --append-on-unload /tmp --noop-on-unload /dir1 /dir2 + } + remove12 { + remove-path FOO --noop-on-unload + } + remove13 { + remove-path FOO /tmp --append-on-unload /dir2 --noop-on-unload /dir3 + } + remove14 { + remove-path FOO --noop-on-unload --remove-on-unload /tmp /dir1 + } + unuse7 { + module unuse --noop-on-unload + } + unuse8 { + module unuse /tmp /dir1 --append-on-unload /dir2 --noop-on-unload /dir3 + } + unsetenv1 { + unsetenv FOO --noop-on-unload + } + unsetenv2 { + unsetenv --noop-on-unload FOO + } + unsetenv3 { + unsetenv --noop-on-unload FOO val + } + unsetenv4 { + unsetenv FOO --noop-on-unload val + } + unsetenv5 { + unsetenv FOO val --noop-on-unload + } + } +} +
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/path-cmd-opt/1.4
Added
@@ -0,0 +1,33 @@ +#%Module + +module-whatis module-info name + +if {info exists env(TESTSUITE_PATH_CMD_OPT)} { + switch -- $env(TESTSUITE_PATH_CMD_OPT) { + setenv1 { + setenv --unset-on-unload FOO val + } + unsetenv1 { + unsetenv FOO --unset-on-unload + } + unsetenv2 { + unsetenv --unset-on-unload FOO + } + unsetenv3 { + unsetenv --unset-on-unload FOO val + } + unsetenv4 { + unsetenv FOO --unset-on-unload val + } + unsetenv5 { + unsetenv FOO val --unset-on-unload + } + unsetenv6 { + unsetenv --noop-on-unload FOO val --unset-on-unload + } + unsetenv7 { + unsetenv --unset-on-unload FOO --noop-on-unload val + } + } +} +
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/path-cmd-opt/1.5
Added
@@ -0,0 +1,27 @@ +#%Module + +module-whatis module-info name + +if {info exists env(TESTSUITE_PATH_CMD_OPT)} { + switch -- $env(TESTSUITE_PATH_CMD_OPT) { + setenv1 { + setenv FOO --set-if-undef + } + setenv2 { + setenv --set-if-undef + } + setenv3 { + setenv --set-if-undef FOO + } + setenv4 { + setenv --set-if-undef FOO val + } + setenv5 { + setenv FOO --set-if-undef val + } + setenv6 { + setenv FOO val --set-if-undef + } + } +} +
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/path-cmd-opt/2.0
Added
@@ -0,0 +1,1 @@ +#%Module
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/puts
Added
+(directory)
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/puts/prestdout
Added
@@ -0,0 +1,20 @@ +#%Module +if {module-info mode in {load unload display} && info exists ::env(TESTSUITE_PUTS)} { + switch -- $::env(TESTSUITE_PUTS) { + prestdout1 { + puts prestdout textpreout1 + } + prestdout2 { + puts stdout textout1 + puts prestdout textpreout1 + puts -nonewline prestdout1 + puts prestdout2 + } + prestdout3 { + puts -nonewline prestdout textpreout1 + puts -nonewline prestdout textpreout2 + } + } +} + +setenv testsuite ok
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/source-sh
Added
+(directory)
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/source-sh/conda
Added
@@ -0,0 +1,18 @@ +#%Module +switch -- module-info shell { + bash { + source-sh bash miniconda3/etc/profile.d/conda.sh + } + ksh { + source-sh ksh miniconda3/etc/profile.d/conda.sh + } + zsh { + source-sh zsh miniconda3/etc/profile.d/conda.sh + } + tcsh { + source-sh tcsh miniconda3/etc/profile.d/conda.csh + } + fish { + source-sh fish miniconda3/etc/fish/conf.d/conda.fish + } +}
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/source-sh/openfoam
Added
@@ -0,0 +1,15 @@ +#%Module +switch -- module-info shell { + bash { + source-sh bash OpenFOAM-dev/etc/bashrc + } + ksh { + source-sh ksh OpenFOAM-dev/etc/bashrc + } + zsh { + source-sh zsh OpenFOAM-dev/etc/bashrc + } + tcsh { + source-sh tcsh OpenFOAM-dev/etc/cshrc + } +}
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/source-sh/spack
Added
@@ -0,0 +1,18 @@ +#%Module +switch -- module-info shell { + bash { + source-sh bash spack/share/spack/setup-env.sh + } + ksh { + source-sh ksh spack/share/spack/setup-env.sh + } + zsh { + source-sh zsh spack/share/spack/setup-env.sh + } + tcsh { + source-sh tcsh spack/share/spack/setup-env.csh + } + fish { + source-sh fish spack/share/spack/setup-env.fish + } +}
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles.3/tag/.modulerc -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/tag/.modulerc
Changed
@@ -123,3 +123,27 @@ if {info exists env(TESTSUITE_MODULE_TAG_SET14)} { module-hide --hidden-loaded tag/5.0 } +if {info exists env(TESTSUITE_TAG_OPT)} { + switch -- $env(TESTSUITE_TAG_OPT) { + duprc1 - infotags2 { + module-tag foo tag/8.0 + } + duprc2 { + module-tag foo tag/8.0 + module-tag bar tag/8.0 + } + loadtagdup2 { + module-tag bar foo/1.0 + } + loadtagdup3 { + module-hide --hidden-loaded foo/1.0 + } + colltag1 - colltag2 - colltag3 { + module-tag bar tag/8.0 + } + colltag4 { + set tomorrow clock format expr {clock seconds+86400} -format %Y-%m-%d + module-forbid --after $tomorrow tag/8.0 + } + } +}
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles.3/tag/8.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/tag/8.0
Changed
@@ -1,2 +1,150 @@ #%Module + module-whatis module-info name + +if {info exists env(TESTSUITE_TAG_OPT)} { + switch -- $env(TESTSUITE_TAG_OPT) { + vr1 { + variant foo val1 val2 + } + loadtag1 { + module load --tag=foo foo/1.0 + } + loadtag2 { + module load --tag hidden-loaded:foo foo/1.0 + } + loadtag3 { + module load --tag loaded:hidden foo/1.0 + } + loadtag4 { + module try-load variant@3.0 bar=val1 --tag foo + } + loadtagdup1 { + module load --tag=foo:bar:foo foo/1.0 + } + loadtagdup2 { + module load --tag=bar foo/1.0 + } + loadtagdup3 { + module load --tag=hidden-loaded:bar foo/1.0 + } + infotags1 - infotags2 { + setenv TS module-info tags + } + loadtagbad1 { + module load --tag + } + loadtagbad2 { + module load --tag foo + } + loadtagbad3 { + module load --tag= + } + loadtagbad4 { + module load --tag=foo + } + loadtagbad5 { + module load --tag= foo/1.0 + } + prtag1 { + prereq --tag=foo foo/1.0 + } + prtag2 { + prereq --tag hidden-loaded:foo foo/1.0 + } + prtag3 { + prereq --tag loaded:hidden foo/1.0 + } + prtag4 { + prereq-any --tag=foo foo/1.0 + } + prtag5 { + prereq-all --tag hidden-loaded:foo foo/1.0 + } + prtag6 { + depends-on --tag hidden:loaded foo/1.0 + } + prtagbad1 { + prereq foo/1.0 --tag foo + } + prtagbad2 { + prereq --tag + } + prtagbad3 { + prereq --tag foo + } + prtagbad4 { + prereq --tag= + } + prtagbad5 { + prereq --tag=foo + } + prtagbad6 { + prereq --tag= foo/1.0 + } + prtagbad7 { + prereq-all --tag + } + prtagbad8 { + prereq-any --tag foo + } + prtagbad9 { + prereq-all --tag= + } + prtagbad10 { + depends-on --tag=foo + } + prtagbad11 { + depends-on --tag= foo/1.0 + } + colltag1 { + module try-load variant@3.0 bar=val1 --tag foo + } + prtag7 { + always-load --tag hidden:loaded foo/1.0 + } + prtag8 - colltag3 - reloadtag1 { + always-load --tag foo foo/1.0 + } + prtagbad12 { + always-load --tag=foo + } + prtagbad13 { + always-load --tag= foo/1.0 + } + loadanytag1 { + module load-any variant@3.0 bar=val1 foo/1.0 --tag foo + } + prtag9 { + depends-on --tag=foo foo/1.0 + } + prtag10 { + prereq --tag hidden-loaded:foo foo/1.0 bar/1.0 + } + switchtag1 { + module switch --tag=foo bar/1.0 foo/1.0 + } + switchtag2 { + module switch --tag=foo:hidden-loaded bar/1.0 foo/1.0 + } + loadtag5 { + module load --tag=bar:foo:keep-loaded foo/1.0 bar/1.0 + } + loadtag6 { + module load --tag=bar:keep-loaded:auto-loaded foo/1.0 + } + prtag11 { + prereq --tag=auto-loaded:keep-loaded:foo foo/1.0 + } + prtag12 { + prereq --tag=keep-loaded:foo foo/1.0 + } + coll49 - coll49forb - coll49keep { + variant --boolean bar + variant --boolean foo + } + prtag13 { + prereq --tag=foo foo/1.0 bar/1.0 + } + } +}
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/tag/9.0
Added
@@ -0,0 +1,2 @@ +#%Module +module-whatis module-info name
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles.3/variant/1.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/variant/1.0
Changed
@@ -169,6 +169,12 @@ coll36 - shortcut3 { variant foo val1 val2 val3 } + free1 { + variant --default val1 foo + } + free2 { + variant --default on foo + } } if {!string match coll* $env(TESTSUITE_VARIANT)} { setenv TS0 lsort array names ModuleVariant
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/variant/5.1
Added
@@ -0,0 +1,34 @@ +#%Module + +if {!info exists env(TESTSUITE_GETVARIANT) || $env(TESTSUITE_GETVARIANT) ne {return1}} { + variant foo val1 val2 val3 +} + +if {info exists env(TESTSUITE_GETVARIANT)} { + switch -- $env(TESTSUITE_GETVARIANT) { + toomany1 { + setenv testsuite getvariant foo {} other + } + toomany2 { + setenv testsuite getvariant --return-value foo {} other + } + toofew1 { + setenv testsuite getvariant + } + toofew2 { + setenv testsuite getvariant --return-value + } + misplaced1 { + setenv testsuite getvariant foo --return-value + } + misplaced2 { + setenv testsuite getvariant foo bar --return-value + } + return1 { + setenv testsuite getvariant --return-value foo bar + } + return2 { + setenv testsuite getvariant --return-value foo + } + } +}
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles.3/variant/6.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/variant/6.0
Changed
@@ -137,5 +137,11 @@ coll35 { variant --boolean bar } + list2 { + variant foo val1 val2 + } + list1 { + variant --boolean foo + } } }
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles.3/vrreq1/1.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/vrreq1/1.0
Changed
@@ -130,5 +130,9 @@ variant foo val1 val2 val3 variant bar 1 2 3 } + free1 { + variant foo + prereq vrreq2/1.0 foo=getvariant foo + } } }
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles.3/vrreq2/1.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles.3/vrreq2/1.0
Changed
@@ -25,5 +25,8 @@ break } } + free1 { + variant foo + } } }
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/append/1.7 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/append/1.7
Changed
@@ -11,7 +11,7 @@ # # Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr # -# Description: Test appending multiple paths passed in multple strings +# Description: Test appending multiple paths passed in multiple strings # Command: # Sub-Command: append-path #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/append/2.4 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/append/2.4
Changed
@@ -11,7 +11,7 @@ # # Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr # -# Description: Test appending multiple paths passed in multple strings +# Description: Test appending multiple paths passed in multiple strings # Command: # Sub-Command: append-path #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/getenv/1.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/getenv/1.0
Changed
@@ -26,3 +26,32 @@ setenv testsuite "getenv TEST" setenv testsuite2 getenv TEST2 {} + +if {info exists env(TESTSUITE_GETENV)} { + switch -- $env(TESTSUITE_GETENV) { + toomany1 { + setenv testsuite3 getenv TEST {} other + } + toomany2 { + setenv testsuite3 getenv --return-value TEST {} other + } + toofew1 { + setenv testsuite3 getenv + } + toofew2 { + setenv testsuite3 getenv --return-value + } + misplaced1 { + setenv testsuite3 getenv TEST --return-value + } + misplaced2 { + setenv testsuite3 getenv TEST foo --return-value + } + return1 { + setenv testsuite3 getenv --return-value TEST + } + return2 { + setenv testsuite3 getenv --return-value TEST foo + } + } +}
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/help/2.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/help/2.0
Changed
@@ -58,7 +58,7 @@ ############################################################################## # -# Thats what's gonna be tested +# That's what's gonna be tested # proc ModulesHelp { } {
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/info/commandexp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/info/commandexp
Changed
@@ -46,6 +46,9 @@ if { module-info command try-load } { puts stderr "try-load" } + if { module-info command load-any } { + puts stderr "load-any" + } if { module-info command unload } { puts stderr "unload" }
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/info/mode3 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/info/mode3
Changed
@@ -74,7 +74,7 @@ if { !module-info mode whatis } { # - # module-info mode is called here explicitely in order to check if it works! + # module-info mode is called here explicitly in order to check if it works! # if { module-info mode load } {
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/info/mode4 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/info/mode4
Changed
@@ -74,7 +74,7 @@ if { !module-info mode whatis } { # - # module-info mode is called here explicitely in order to check if it works! + # module-info mode is called here explicitly in order to check if it works! # if { module-info mode load } {
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/info/userexp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/info/userexp
Changed
@@ -24,7 +24,7 @@ # Comment: %C{ # The 'module-info user' command issued with an argument # probes for the passed user level. The following -# arguemnts are allowed: +# arguments are allowed: # # novice # advanced
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_dv1/1.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_dv1/1.0
Changed
@@ -20,7 +20,7 @@ # }R% # Comment: %C{ # This is an empty module file used for checking the -# locating of a default module file if not explicit +# locating of a default module file if no explicit # version is specified. # This one will not be selected, because there is an- # other valid one with a higher version number in the
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_dv1/2.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_dv1/2.0
Changed
@@ -24,7 +24,7 @@ # }R% # Comment: %C{ # This is an empty module file used for checking the -# locating of a default module file if not explicit +# locating of a default module file if no explicit # version is specified. # This one is selected by version number (2.0 > 1.0). # }C%
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_dv1/3.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_dv1/3.0
Changed
@@ -20,10 +20,14 @@ # }R% # Comment: %C{ # This is an empty module file used for checking the -# locating of a default module file if not explicite +# locating of a default module file if no explicit # version is specified. # Because of the missing magic cookie, this one is not # identified as a valid module file. # }C% # ############################################################################## + +if {info exists env(TESTSUITE_MCOOKIE_CHECK)} { + module-whatis module-info name +}
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_dv2/1.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_dv2/1.0
Changed
@@ -24,7 +24,7 @@ # }R% # Comment: %C{ # This is an empty module file used for checking the -# locating of a default module file if not explicite +# locating of a default module file if no explicit # version is specified. # This one is selected by '.version' file. # }C%
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_dv2/2.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_dv2/2.0
Changed
@@ -20,7 +20,7 @@ # }R% # Comment: %C{ # This is an empty module file used for checking the -# locating of a default module file if not explicite +# locating of a default module file if no explicit # version is specified. # This one is not selected by the '.version' file, # though it provides the higher version number.
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_dv3/1.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_dv3/1.0
Changed
@@ -20,7 +20,7 @@ # }R% # Comment: %C{ # This is an empty module file used for checking the -# locating of a default module file if not explicite +# locating of a default module file if no explicit # version is specified. # Not selected by '.version'. # }C%
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_dv3/2.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_dv3/2.0
Changed
@@ -20,7 +20,7 @@ # }R% # Comment: %C{ # This is an empty module file used for checking the -# locating of a default module file if not explicite +# locating of a default module file if no explicit # version is specified. # Not selected by '.version'. # }C%
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_dv4/1.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_dv4/1.0
Changed
@@ -20,9 +20,13 @@ # }R% # Comment: %C{ # This is an empty module file used for checking the -# locating of a default module file if not explicite +# locating of a default module file if no explicit # version is specified. # Not selected by '.version'. # }C% # ############################################################################## + +if {info exists env(TESTSUITE_MCOOKIE_CHECK)} { + module-whatis module-info name +}
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_dv4/2.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_dv4/2.0
Changed
@@ -20,7 +20,7 @@ # }R% # Comment: %C{ # This is an empty module file used for checking the -# locating of a default module file if not explicite +# locating of a default module file if no explicit # version is specified. # Though this one is selected by the '.version' file # it will never be displayed, because it is not a @@ -28,3 +28,7 @@ # }C% # ############################################################################## + +if {info exists env(TESTSUITE_MCOOKIE_CHECK)} { + module-whatis module-info name +}
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_dv6/1.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_dv6/1.0
Changed
@@ -20,7 +20,7 @@ # }R% # Comment: %C{ # This is an empty module file used for checking the -# locating of a default module file if not explicite +# locating of a default module file if no explicit # version is specified. # This one is not selected, because there's a directory # with a higher version number than this file.
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_dv7/1.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_dv7/1.0
Changed
@@ -24,7 +24,7 @@ # }R% # Comment: %C{ # This is an empty module file used for checking the -# locating of a default module file if not explicite +# locating of a default module file if no explicit # version is specified. # Selection by version number. In this case a directory # is preferred to a file.
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_dv7/3.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_dv7/3.0
Changed
@@ -20,7 +20,7 @@ # }R% # Comment: %C{ # This is an empty module file used for checking the -# locating of a default module file if not explicite +# locating of a default module file if no explicit # version is specified. # Not selected by the '.version' file. # }C%
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_dv8/1.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_dv8/1.0
Changed
@@ -20,7 +20,7 @@ # }R% # Comment: %C{ # This is an empty module file used for checking the -# locating of a default module file if not explicite +# locating of a default module file if no explicit # version is specified. # Though this one is selected by the '.version' file # it will not be taken, because the '.version' file
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_dv8/2.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_dv8/2.0
Changed
@@ -24,7 +24,7 @@ # }R% # Comment: %C{ # This is an empty module file used for checking the -# locating of a default module file if not explicite +# locating of a default module file if no explicit # version is specified. # The '.version' file select 1.0, but is not valid. So # this is the default version.
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_dv9/.version -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_dv9/.version
Changed
@@ -20,7 +20,7 @@ # }R% # Comment: %C{ # Modulefile to test location of default modulefile -# if not explicitel version is specified and when +# if no explicit version is specified and when # default version is defined in .version file with a # module-version command # }C%
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_dv9/1.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_dv9/1.0
Changed
@@ -20,7 +20,7 @@ # }R% # Comment: %C{ # Modulefile to test location of default modulefile -# if not explicitel version is specified and when +# if no explicitl version is specified and when # default version is defined in .version file with a # module-version command # }C%
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_dv9/2.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_dv9/2.0
Changed
@@ -20,7 +20,7 @@ # }R% # Comment: %C{ # Modulefile to test location of default modulefile -# if not explicitel version is specified and when +# if no explicit version is specified and when # default version is defined in .version file with a # module-version command # }C%
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_dvv1/.common -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_dvv1/.common
Changed
@@ -20,7 +20,7 @@ # }R% # Comment: %C{ # Modulefile to test location of default modulefile -# in case of virtual modules if not explicit version +# in case of virtual modules if no explicit version # is specified and when default version is defined in # .version file with a module-version command # }C%
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_dvv1/.modulerc -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_dvv1/.modulerc
Changed
@@ -20,7 +20,7 @@ # }R% # Comment: %C{ # Modulefile to test location of default modulefile -# in case of virtual modules if not explicit version +# in case of virtual modules if no explicit version # is specified and when default version is defined in # .version file with a module-version command # }C%
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_dvv1/.version -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_dvv1/.version
Changed
@@ -20,7 +20,7 @@ # }R% # Comment: %C{ # Modulefile to test location of default modulefile -# in case of virtual modules if not explicit version +# in case of virtual modules if no explicit version # is specified and when default version is defined in # .version file with a module-version command # }C%
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_fq/1.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_fq/1.0
Changed
@@ -24,7 +24,7 @@ # }R% # Comment: %C{ # This is an empty module file used for checking the -# locating of a default module file if not explicite +# locating of a default module file if no explicit # version is specified. # Full qualified selection. # }C%
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_fq/2.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_fq/2.0
Changed
@@ -24,7 +24,7 @@ # }R% # Comment: %C{ # This is an empty module file used for checking the -# locating of a default module file if not explicite +# locating of a default module file if no explicit # version is specified. # Full qualified selection. # }C%
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_rc1/.modulerc -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_rc1/.modulerc
Changed
@@ -25,3 +25,15 @@ module-version loc_rc1/1.0 foo + +if {info exists env(TESTSUITE_MCOOKIE_CHECK)} { + switch -- $env(TESTSUITE_MCOOKIE_CHECK) { + eval { + module-version loc_rc1/3.0 bar + module-alias loc_rc1/4.0 ./5.0 + } + evalhide { + module-hide --hard loc_rc1/2.0 + } + } +}
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_rc5/1.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_rc5/1.0
Changed
@@ -21,7 +21,7 @@ # Comment: %C{ # Invalid '.modulerc' file selects this as the default # version. -# Therefor the default version is selected by the +# Therefore the default version is selected by the # higher version number in this case. # }C% #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_rc5/2.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_rc5/2.0
Changed
@@ -23,7 +23,7 @@ # }R% # Comment: %C{ # Selected as the default version by the higher version -# number. The '.modulerc' file is invaild. +# number. The '.modulerc' file is invalid. # }C% # Error: %E{ # ERROR:106: Magic cookie '#%Module' missing in '@P@/.modulerc'
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_sym/alias3 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_sym/alias3
Changed
@@ -23,7 +23,7 @@ # }R% # Comment: %C{ # Checks the 'module-alias' and the 'module-info alias' -# commands. The alias checked herein itsself links to +# commands. The alias checked herein itself links to # another alias. # }C% #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_sym/alias5 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_sym/alias5
Changed
@@ -23,7 +23,7 @@ # }R% # Comment: %C{ # Checks the 'module-alias' and the 'module-info alias' -# commands. Implicite declaration of the default +# commands. Implicit declaration of the default # version. # }C% #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_sym/alias8 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_sym/alias8
Changed
@@ -18,7 +18,7 @@ # Invocation: load @M@/@V@ # Comment: %C{ # Checks the 'module-alias' and the 'module-info alias' -# commands. The alias checked herein itsself links to +# commands. The alias checked herein itself links to # another alias. In a virtual modules context # }C% #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_sym/getvers10 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_sym/getvers10
Changed
@@ -21,7 +21,7 @@ # Checks the module version lookup for symbolic module # versions. # This test build a combination of module-aliases, -# module-versions and implicite default version decla- +# module-versions and implicit default version decla- # rations. # Working on virtual modules # }C%
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_sym/getvers5 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_sym/getvers5
Changed
@@ -24,7 +24,7 @@ # Comment: %C{ # Checks the module version lookup for module aliases. # This test build a combination of module-aliases, -# module-versions and implicite default version decla- +# module-versions and implicit default version decla- # rations. # }C% #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_sym/getvers6 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_sym/getvers6
Changed
@@ -25,7 +25,7 @@ # Checks the module version lookup for symbolic module # versions. # This test build a combination of module-aliases, -# module-versions and implicite default version decla- +# module-versions and implicit default version decla- # rations. # }C% #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_sym/getvers7 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_sym/getvers7
Changed
@@ -25,7 +25,7 @@ # Checks the module version lookup for symbolic module # versions. The short form is used herein. # This test build a combination of module-aliases, -# module-versions and implicite default version decla- +# module-versions and implicit default version decla- # rations. # }C% #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_sym/versinf3 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_sym/versinf3
Changed
@@ -23,7 +23,7 @@ # }R% # Comment: %C{ # Checks the module version lookup for symbolic module -# versions. Implicite default versions declaration +# versions. Implicit default versions declaration # used herein. # }C% #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_sym/versinf4 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_sym/versinf4
Changed
@@ -25,7 +25,7 @@ # Check looking up the default version for a module # category. This one checks the version lookup at # the moment, when no module, version or name record -# is existant. +# is existent. # }C% # ##############################################################################
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_sym/versinf5 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_sym/versinf5
Changed
@@ -23,7 +23,7 @@ # }R% # Comment: %C{ # Check looking up the default version for a module -# category. This one checks implicite default version +# category. This one checks implicit default version # declaration. # Module and version records are present, but not for # the default version.
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_sym/version11 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_sym/version11
Changed
@@ -24,8 +24,8 @@ # Comment: %C{ # Looks up symbolic version names for a given module # file. In this case the default version name is specified -# explicitely on lookup invocation. -# The default version is defined implicitely. +# explicitly on lookup invocation. +# The default version is defined implicitly. # }C% # ##############################################################################
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_sym/version12 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_sym/version12
Changed
@@ -24,8 +24,8 @@ # Comment: %C{ # Looks up symbolic version names for a given module # file. In this case the default version name is specified -# explicitely on lookup invocation. -# The default version is defined implicitely. +# explicitly on lookup invocation. +# The default version is defined implicitly. # }C% # ##############################################################################
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_sym/version13 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_sym/version13
Changed
@@ -24,7 +24,7 @@ # Comment: %C{ # Looks up symbolic version names for a given module # file. In this case the real version name is specified -# explicitely on lookup invocation. +# explicitly on lookup invocation. # }C% # Error: %E(novice){ # PROB:153: Duplicate version symbol 'foo' found
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_sym/version14 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_sym/version14
Changed
@@ -24,7 +24,7 @@ # Comment: %C{ # Looks up symbolic version names for a given module # file. In this case the real version name is specified -# explicitely on lookup invocation. +# explicitly on lookup invocation. # }C% # Error: %E{ # ERROR:154: Version symbol '1.0' loops
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_sym/version2 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_sym/version2
Changed
@@ -24,7 +24,7 @@ # Comment: %C{ # Looks up symbolic version names for a given module # file. In this case the real version name is specified -# explicitely on lookup invocation. +# explicitly on lookup invocation. # This tests setting up symbolic version names in # full qualifies and shorthand notation. # }C%
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_sym/version3 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_sym/version3
Changed
@@ -24,8 +24,8 @@ # Comment: %C{ # Looks up symbolic version names for a given module # file. In this case the default version name is specified -# explicitely on lookup invocation. -# The default version is defined implicitely via a +# explicitly on lookup invocation. +# The default version is defined implicitly via a # module-version command. # }C% #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_sym/version4 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_sym/version4
Changed
@@ -24,8 +24,8 @@ # Comment: %C{ # Looks up symbolic version names for a given module # file. In this case the default version name is specified -# explicitely on lookup invocation. -# The default version is defined implicitely via a +# explicitly on lookup invocation. +# The default version is defined implicitly via a # module-version command. # }C% #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_sym/version6 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_sym/version6
Changed
@@ -24,8 +24,8 @@ # Comment: %C{ # Looks up symbolic version names for a given module # file. In this case the default version name is specified -# explicitely on lookup invocation. -# The default version is defined implicitely via a +# explicitly on lookup invocation. +# The default version is defined implicitly via a # module-version command. # }C% #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_sym/version7 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_sym/version7
Changed
@@ -24,7 +24,7 @@ # Comment: %C{ # Looks up symbolic version names for a given module # file. In this case the real version name is specified -# explicitely on lookup invocation. +# explicitly on lookup invocation. # This tests defining symbolic version names for a # symbolic defined module version. # }C%
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_sym/version8 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_sym/version8
Changed
@@ -24,7 +24,7 @@ # Comment: %C{ # Looks up symbolic version names for a given module # file. In this case the real version name is specified -# explicitely on lookup invocation. +# explicitly on lookup invocation. # This checks the definition of a symbolic version name # for a modulefile defined via aliases and symbolic # versions.
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_sym/version9 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_sym/version9
Changed
@@ -24,7 +24,7 @@ # Comment: %C{ # Looks up symbolic version names for a given module # file. In this case the real version name is specified -# explicitely on lookup invocation. +# explicitly on lookup invocation. # This checks the definition of a symbolic version name # for a modulefile defined via aliases and symbolic # versions.
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/loc_virt2/.modulerc -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/loc_virt2/.modulerc
Changed
@@ -25,3 +25,7 @@ ############################################################################## module-virtual ./1.0 2.0 + +if {info exists env(TESTSUITE_MCOOKIE_CHECK)} { + module-virtual loc_virt2/3.0 ../loc_dv1/3.0 +}
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/mcookie/1 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/mcookie/1
Changed
@@ -1,1 +1,5 @@ #%Module99 + +if {info exists env(TESTSUITE_MCOOKIE_CHECK)} { + module-whatis module-info name +}
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/module/unk -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/module/unk
Changed
@@ -25,4 +25,4 @@ # ############################################################################## -module load NonExistant +module load NonExistent
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/spread/1.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/spread/1.0
Changed
@@ -27,7 +27,7 @@ ############################################################################## -# test if specific or overriden pre-existing variables have spread here +# test if specific or overridden pre-existing variables have spread here if {info exists spread} { puts stderr "variable spread exists" } @@ -47,7 +47,7 @@ puts stderr "variable auto_path contains $env(TESTSUITEDIR)" } -# test if specific or overriden interpreter alias command have spread here +# test if specific or overridden interpreter alias command have spread here set existing_proc lindex info procs 0 # test if first proc defined has been altered if {info procs $existing_proc ne $existing_proc} {
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/spread/2.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/spread/2.0
Changed
@@ -27,7 +27,7 @@ ############################################################################## -# test if specific or overriden pre-existing variables have spread here +# test if specific or overridden pre-existing variables have spread here if {info exists spread} { puts stderr "variable spread exists" } @@ -47,7 +47,7 @@ puts stderr "variable auto_path contains $env(TESTSUITEDIR)" } -# test if specific or overriden interpreter alias command have spread here +# test if specific or overridden interpreter alias command have spread here set existing_proc lindex info procs 0 # test if first proc defined has been altered if {info procs $existing_proc ne $existing_proc} {
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/spread/3.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/spread/3.0
Changed
@@ -27,7 +27,7 @@ ############################################################################## -# test if specific or overriden pre-existing variables have spread here +# test if specific or overridden pre-existing variables have spread here if {info exists spread} { puts stderr "variable spread exists" } @@ -47,13 +47,13 @@ puts stderr "variable auto_path contains $env(TESTSUITEDIR)" } -# test if specific or overriden interpreter alias command have spread here +# test if specific or overridden interpreter alias command have spread here set existing_proc lindex info procs 0 # test if first proc defined has been altered if {info procs $existing_proc ne $existing_proc} { puts stderr "procedure $existing_proc does not exist" # env variable spread across interpretation and even between interpreters -# overriden proc does not spread as interp is renewed when a command is overriden +# overridden proc does not spread as interp is renewed when a command is overridden } elseif {info exists env(spreadcmd) && $existing_proc eq "spreadcmd"} { puts stderr "procedure $existing_proc has been altered" }
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/spread/4.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/spread/4.0
Changed
@@ -27,7 +27,7 @@ ############################################################################## -# test if specific or overriden pre-existing variables have spread here +# test if specific or overridden pre-existing variables have spread here if {info exists spread} { puts stderr "variable spread exists" } @@ -47,13 +47,13 @@ puts stderr "variable auto_path contains $env(TESTSUITEDIR)" } -# test if specific or overriden interpreter alias command have spread here +# test if specific or overridden interpreter alias command have spread here set existing_proc lindex info procs 0 # test if first proc defined has been altered if {info procs $existing_proc ne $existing_proc} { puts stderr "procedure $existing_proc does not exist" # env variable spread across interpretation and even between interpreters -# overriden proc does not spread as interp is renewed when a command is overriden +# overridden proc does not spread as interp is renewed when a command is overridden } elseif {info exists env(spreadcmd) && $existing_proc eq "spreadcmd"} { puts stderr "procedure $existing_proc has been altered" }
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/spread/5.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/spread/5.0
Changed
@@ -28,7 +28,7 @@ ############################################################################## -# test if specific or overriden pre-existing variables have spread here +# test if specific or overridden pre-existing variables have spread here if {info exists spread} { puts stderr "variable spread exists" } @@ -48,7 +48,7 @@ puts stderr "variable auto_path contains $env(TESTSUITEDIR)" } -# test if specific or overriden interpreter alias command have spread here +# test if specific or overridden interpreter alias command have spread here set existing_proc lindex info procs 0 # test if first proc defined has been altered if {info procs $existing_proc ne $existing_proc} { @@ -108,7 +108,7 @@ module load spread/6.0 -# test if specific or overriden pre-existing variables are still there +# test if specific or overridden pre-existing variables are still there # after cascaded interpretation if {!info exists spread} { puts stderr "variable spread has been reset" @@ -123,7 +123,7 @@ puts stderr "variable tcl_platform(osVersion) has been reset" } -# test if specific or overriden interpreter alias command are still there +# test if specific or overridden interpreter alias command are still there # after cascaded interpretation # test if first proc defined has been altered if {info procs $existing_proc ne $existing_proc} {
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/spread/6.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/spread/6.0
Changed
@@ -28,7 +28,7 @@ ############################################################################## -# test if specific or overriden pre-existing variables have spread here +# test if specific or overridden pre-existing variables have spread here if {info exists spread} { puts stderr "variable spread exists" } @@ -48,13 +48,13 @@ puts stderr "variable auto_path contains $env(TESTSUITEDIR)" } -# test if specific or overriden interpreter alias command have spread here +# test if specific or overridden interpreter alias command have spread here set existing_proc lindex info procs 0 # test if first proc defined has been altered if {info procs $existing_proc ne $existing_proc} { puts stderr "procedure $existing_proc does not exist" # env variable spread across interpretation and even between interpreters -# overriden proc does not spread as cascaded interpretation occurs in a +# overridden proc does not spread as cascaded interpretation occurs in a # different interpreter } elseif {info exists env(spreadcasc) && $existing_proc eq "spreadcasc"\ && module-info mode ne "whatis"} {
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/spread/7.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/spread/7.0
Changed
@@ -28,7 +28,7 @@ ############################################################################## -# test if specific or overriden pre-existing variables have spread here +# test if specific or overridden pre-existing variables have spread here if {info exists spread} { puts stderr "variable spread exists" } @@ -48,13 +48,13 @@ puts stderr "variable auto_path contains $env(TESTSUITEDIR)" } -# test if specific or overriden interpreter alias command have spread here +# test if specific or overridden interpreter alias command have spread here set existing_proc lindex info procs 0 # test if first proc defined has been altered if {info procs $existing_proc ne $existing_proc} { puts stderr "procedure $existing_proc does not exist" # env variable spread across interpretation and even between interpreters -# overriden proc does not spread as interp is renewed when a command is overriden +# overridden proc does not spread as interp is renewed when a command is overridden } elseif {info exists env(spreadcasccmd) && $existing_proc eq "spreadcasccmd"} { puts stderr "procedure $existing_proc has been altered" } @@ -118,7 +118,7 @@ module load spread/8.0 -# test if specific or overriden pre-existing variables are still there +# test if specific or overridden pre-existing variables are still there # after cascaded interpretation if {!info exists spread} { puts stderr "variable spread has been reset" @@ -136,7 +136,7 @@ puts stderr "variable auto_path has been reset" } -# test if specific or overriden interpreter alias command are still there +# test if specific or overridden interpreter alias command are still there # after cascaded interpretation # test if first proc defined has been altered if {info procs $existing_proc ne $existing_proc} {
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/spread/8.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/spread/8.0
Changed
@@ -28,7 +28,7 @@ ############################################################################## -# test if specific or overriden pre-existing variables have spread here +# test if specific or overridden pre-existing variables have spread here if {info exists spread} { puts stderr "variable spread exists" } @@ -48,13 +48,13 @@ puts stderr "variable auto_path contains $env(TESTSUITEDIR)" } -# test if specific or overriden interpreter alias command have spread here +# test if specific or overridden interpreter alias command have spread here set existing_proc lindex info procs 0 # test if first proc defined has been altered if {info procs $existing_proc ne $existing_proc} { puts stderr "procedure $existing_proc does not exist" # env variable spread across interpretation and even between interpreters -# overriden proc does not spread as interp is renewed when a command is overriden +# overridden proc does not spread as interp is renewed when a command is overridden # moreover cascaded interpretation occurs in a different interpreter } elseif {info exists env(spreadcasccmd) && $existing_proc eq "spreadcasccmd"\ && module-info mode ne "whatis"} {
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/spreadrc/dir1/1.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/spreadrc/dir1/1.0
Changed
@@ -27,7 +27,7 @@ ############################################################################## -# test if specific or overriden pre-existing variables have spread here +# test if specific or overridden pre-existing variables have spread here # coming from modulerc or sibbling modulefiles if {info exists spreadrc} { puts stderr "variable spreadrc exists" @@ -54,7 +54,7 @@ puts stderr "variable auto_path contains $env(TESTSUITEDIR)" } -# test if specific or overriden interpreter alias command have spread here +# test if specific or overridden interpreter alias command have spread here # coming from modulerc or sibbling modulefiles set existing_proc lindex info procs 0 # test if first proc defined has been altered
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/spreadrc/dir2/1.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/spreadrc/dir2/1.0
Changed
@@ -27,7 +27,7 @@ ############################################################################## -# test if specific or overriden pre-existing variables have spread here +# test if specific or overridden pre-existing variables have spread here # coming from modulerc or sibbling modulefiles if {info exists spreadrc} { puts stderr "variable spreadrc exists" @@ -54,7 +54,7 @@ puts stderr "variable auto_path contains $env(TESTSUITEDIR)" } -# test if specific or overriden interpreter alias command have spread here +# test if specific or overridden interpreter alias command have spread here # coming from modulerc or sibbling modulefiles set existing_proc lindex info procs 0 # test if first proc defined has been altered
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/spreadrc/dir3/1.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/spreadrc/dir3/1.0
Changed
@@ -27,7 +27,7 @@ ############################################################################## -# test if specific or overriden pre-existing variables have spread here +# test if specific or overridden pre-existing variables have spread here # coming from modulerc or sibbling modulefiles if {info exists spreadrc} { puts stderr "variable spreadrc exists" @@ -54,7 +54,7 @@ puts stderr "variable auto_path contains $env(TESTSUITEDIR)" } -# test if specific or overriden interpreter alias command have spread here +# test if specific or overridden interpreter alias command have spread here # coming from modulerc or sibbling modulefiles set existing_proc lindex info procs 0 # test if first proc defined has been altered @@ -62,7 +62,7 @@ puts stderr "procedure $existing_proc does not exist" # env variable spread across interpretation and even between interpreters } else { - # overriden proc does not spread as interp is renewed when a command is overriden + # overridden proc does not spread as interp is renewed when a command is overridden if {info exists env(spreadmodcmd) && $existing_proc eq "spreadmodcmd"} { puts stderr "procedure $existing_proc has been altered" }
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/spreadrc/dir4/1.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/spreadrc/dir4/1.0
Changed
@@ -27,7 +27,7 @@ ############################################################################## -# test if specific or overriden pre-existing variables have spread here +# test if specific or overridden pre-existing variables have spread here # coming from modulerc or sibbling modulefiles if {info exists spreadrc} { puts stderr "variable spreadrc exists" @@ -54,7 +54,7 @@ puts stderr "variable auto_path contains $env(TESTSUITEDIR)" } -# test if specific or overriden interpreter alias command have spread here +# test if specific or overridden interpreter alias command have spread here # coming from modulerc or sibbling modulefiles set existing_proc lindex info procs 0 # test if first proc defined has been altered @@ -62,7 +62,7 @@ puts stderr "procedure $existing_proc does not exist" # env variable spread across interpretation and even between interpreters } else { - # overriden proc does not spread as interp is renewed when a command is overriden + # overridden proc does not spread as interp is renewed when a command is overridden if {info exists env(spreadmodcmd) && $existing_proc eq "spreadmodcmd"} { puts stderr "procedure $existing_proc has been altered" }
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/spreadrc/dir5/1.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/spreadrc/dir5/1.0
Changed
@@ -28,7 +28,7 @@ ############################################################################## -# test if specific or overriden pre-existing variables have spread here +# test if specific or overridden pre-existing variables have spread here # coming from modulerc or sibbling modulefiles if {info exists spreadrc} { puts stderr "variable spreadrc exists" @@ -55,7 +55,7 @@ puts stderr "variable auto_path contains $env(TESTSUITEDIR)" } -# test if specific or overriden interpreter alias command have spread here +# test if specific or overridden interpreter alias command have spread here # coming from modulerc or sibbling modulefiles set existing_proc lindex info procs 0 # test if first proc defined has been altered @@ -124,7 +124,7 @@ module load spreadrc/dir6/1.0 -# test if specific or overriden pre-existing variables are still there +# test if specific or overridden pre-existing variables are still there # after cascaded interpretation if {!info exists spreadmod} { puts stderr "variable spreadmod has been reset" @@ -142,7 +142,7 @@ puts stderr "variable auto_path has been reset" } -# test if specific or overriden interpreter alias command are still there +# test if specific or overridden interpreter alias command are still there # after cascaded interpretation # test if first proc defined has been altered if {info procs $existing_proc ne $existing_proc} {
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/spreadrc/dir6/1.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/spreadrc/dir6/1.0
Changed
@@ -28,7 +28,7 @@ ############################################################################## -# test if specific or overriden pre-existing variables have spread here +# test if specific or overridden pre-existing variables have spread here # coming from modulerc or sibbling modulefiles if {info exists spreadrc} { puts stderr "variable spreadrc exists" @@ -55,7 +55,7 @@ puts stderr "variable auto_path contains $env(TESTSUITEDIR)" } -# test if specific or overriden interpreter alias command have spread here +# test if specific or overridden interpreter alias command have spread here # coming from modulerc or sibbling modulefiles set existing_proc lindex info procs 0 # test if first proc defined has been altered
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/spreadrc/dir7/1.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/spreadrc/dir7/1.0
Changed
@@ -28,7 +28,7 @@ ############################################################################## -# test if specific or overriden pre-existing variables have spread here +# test if specific or overridden pre-existing variables have spread here # coming from modulerc or sibbling modulefiles if {info exists spreadrc} { puts stderr "variable spreadrc exists" @@ -55,7 +55,7 @@ puts stderr "variable auto_path contains $env(TESTSUITEDIR)" } -# test if specific or overriden interpreter alias command have spread here +# test if specific or overridden interpreter alias command have spread here # coming from modulerc or sibbling modulefiles set existing_proc lindex info procs 0 # test if first proc defined has been altered @@ -63,7 +63,7 @@ puts stderr "procedure $existing_proc does not exist" # env variable spread across interpretation and even between interpreters } else { - # overriden proc does not spread as interp is renewed when a command is overriden + # overridden proc does not spread as interp is renewed when a command is overridden if {info exists env(spreadmodcasccmd) && $existing_proc eq "spreadmodcasccmd"} { puts stderr "procedure $existing_proc has been altered" } @@ -135,7 +135,7 @@ module load spreadrc/dir8/1.0 -# test if specific or overriden pre-existing variables are still there +# test if specific or overridden pre-existing variables are still there # after cascaded interpretation if {!info exists spreadmod} { puts stderr "variable spreadmod has been reset" @@ -153,7 +153,7 @@ puts stderr "variable auto_path has been reset" } -# test if specific or overriden interpreter alias command are still there +# test if specific or overridden interpreter alias command are still there # after cascaded interpretation # test if first proc defined has been altered if {info procs $existing_proc ne $existing_proc} {
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modulefiles/spreadrc/dir8/1.0 -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modulefiles/spreadrc/dir8/1.0
Changed
@@ -28,7 +28,7 @@ ############################################################################## -# test if specific or overriden pre-existing variables have spread here +# test if specific or overridden pre-existing variables have spread here # coming from modulerc or sibbling modulefiles if {info exists spreadrc} { puts stderr "variable spreadrc exists" @@ -55,7 +55,7 @@ puts stderr "variable auto_path contains $env(TESTSUITEDIR)" } -# test if specific or overriden interpreter alias command have spread here +# test if specific or overridden interpreter alias command have spread here # coming from modulerc or sibbling modulefiles set existing_proc lindex info procs 0 # test if first proc defined has been altered @@ -63,7 +63,7 @@ puts stderr "procedure $existing_proc does not exist" # env variable spread across interpretation and even between interpreters } else { - # overriden proc does not spread as interp is renewed when a command is overriden + # overridden proc does not spread as interp is renewed when a command is overridden # moreover cascaded interpretation occurs in a different interpreter if {info exists env(spreadmodcasccmd) && $existing_proc eq "spreadmodcasccmd"\ && module-info mode ne "whatis"} {
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.00-init/005-init_ts.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.00-init/005-init_ts.exp
Changed
@@ -36,7 +36,7 @@ set moderr_msgs "Module $error_msgs" set info_msgs "INFO" -# Used as a line seperator inside modules +# Used as a line separator inside modules set modlin "\-\+" # List of supported shells @@ -49,7 +49,9 @@ # Common messages set vers_reportre {Modules Release 0-9a-zA-Z\.\+\-+ \(0-9\-{10}\)} set no_loaded {No Modulefiles Currently Loaded.} +set no_matchingloaded {No Matching Modulefiles Currently Loaded.} set cur_loaded {Currently Loaded Modulefiles:} +set cur_matchingloaded {Currently Loaded Matching Modulefiles:} set msg_invcmdname {invalid command name} set msg_patheqsep {cannot handle path equals to separator string} set msg_needenvvarname {should get an environment variable name} @@ -62,6 +64,10 @@ set msg_filenameempty {File name empty} set msg_collnameempty {Invalid empty collection name} set msg_nomodpath {No module path defined} +set msg_nomodloaded {No module has been loaded} +set datetimere {0-9/{10} 0-9:{8}} +set avail_long_headerre "- Package/Alias $modlin.- Versions $modlin.- Last mod. $modlin" +set list_long_headerre "- Package $modlin.- Versions $modlin.- Last mod. $modlin" # Common error responses set err_path "$error_msgs: Unable to locate a modulefile for " @@ -87,6 +93,8 @@ set err_stickyunload "$::error_msgs: Unload of sticky module skipped" set err_stickyunloadf "$::warn_msgs: Unload of sticky module forced" set err_superstickyunload "$::error_msgs: Unload of super-sticky module skipped" +set err_reqfull "$::error_msgs: Module version must be specified to load module" +set err_nomodloaded "$error_msgs: $msg_nomodloaded" proc err_conflict {args} { @@ -207,6 +215,25 @@ return "$::moderr_msgs: Modulefile requires at least Modules version $minver\n In '$modfile'\n$::err_contact" } +proc moderr_minverreqns {modfile minver} { + return "$::moderr_msgs: Modulefile requires at least Modules version $minver\nIn '$modfile'\n$::err_contactns" +} + +proc collerr_minverreqns {collfile minver} { + return "$::error_msgs: Collection $collfile requires at least Modules version $minver" +} + +proc moderr_missingmcookiens {modfile} { + return $::err_magicns'$modfile'\n$::err_contactns +} +proc moderr_missingmcookie {modfile} { + return $::err_magic'$modfile'\n$::err_contact +} + +proc err_permdenied {modfile} { + return "$::error_msgs: Permission denied on '$modfile'" +} + proc err_accessdenied {mod {extramsg {}}} { set msg "$::error_msgs: Access to module $mod is denied" if {$extramsg ne {}} { @@ -239,6 +266,10 @@ return "$::error_msgs: No value specified for variant '$vrname'\n${padding}Allowed values are: $vrvalues" } +proc err_nofreevarval {vrname} { + return "$::error_msgs: No value specified for variant '$vrname'" +} + proc err_varspec {vrspec} { return "$::error_msgs: Invalid variant specification '$vrspec'" } @@ -259,6 +290,10 @@ return "$::error_msgs: Unknown variant '$vrname' specified" } +proc err_invopt {opt} { + return "$::error_msgs: Invalid option '$opt'\n$::err_typehelp" +} + proc info_alreadyloaded {mod} { return "$::info_msgs: Module '$mod' is already loaded" } @@ -280,11 +315,19 @@ return "$::error_msgs: Variant $vrdesig is already loaded" } -proc msg_moderr {msg cmdline modfile linenum {pad {}} {procname {}} {contact {}} {custom {}}} { +proc err_tagmanset {tag} { + return "$::error_msgs: Tag '$tag' cannot be manually set" +} + +proc err_misoptval {opt} { + return "$::error_msgs: Missing value for '$opt' option" +} + +proc msg_moderr {msg cmdline modfile linenum {pad {}} {procname {}} {contact {}} {custom {}} {custom2 {while executing}}} { set linefile expr {$procname ne {} || $linenum eq {} ? {} : " line $linenum"} set errcontact expr {$contact eq {} ? $::err_contactns : "Please contact <$contact>"} set res "$::moderr_msgs: $msg -$pad while executing +$pad $custom2 $pad\"$cmdline\"" if {$procname ne {}} { append res " @@ -399,6 +442,12 @@ return $msg } +proc msg_tag {mod args} { + set msg "Tagging $mod" + append msg eval msg_block_content $args + return $msg +} + proc msg_top_load {mod unlist reqlolist deprelist args} { lassign mix_depre_depun_list $deprelist {} deprelist depunlist @@ -509,6 +558,21 @@ } unset nbcols +proc find_bin {name} { + set path {} + + if {info exists ::env(PATH)} { + foreach dir split $::env(PATH) ":" { + if {file executable "$dir/$name"} { + set path "$dir/$name" + break + } + } + } + + return $path +} + # check SIP is enabled or not on OS X if {$tcl_platform(os) eq "Darwin"} { catch { @@ -526,6 +590,7 @@ if {set fishbin lindex auto_execok fish 0 ne {}} { regexp {version (.+)$} exec $fishbin --version match fish_version set fish_version_ge31 expr {lindex lsort -dictionary list $fish_version 3.1.0 0 eq {3.1.0}} + set fish_version_ge32 expr {lindex lsort -dictionary list $fish_version 3.2.0 0 eq {3.2.0}} } # find ksh flavor @@ -537,7 +602,7 @@ set siteconfig_file "$install_etcdir/siteconfig.tcl" set siteconfig_filere regsub -all "\(\.+?\\)" $siteconfig_file {\\\1} -# determine if siteconfig forces stderr terminal attachement state +# determine if siteconfig forces stderr terminal attachment state proc siteconfig_isStderrTty {} { interp create _siteconfig interp eval _siteconfig set ::siteconfig_file $::siteconfig_file @@ -572,6 +637,7 @@ set getgrgidlib_file lib/libtestutil-getgrgid$install_shlib_suffix set timelib_file lib/libtestutil-time$install_shlib_suffix set mktimelib_file lib/libtestutil-mktime$install_shlib_suffix + set sysconflib_file lib/libtestutil-sysconf$install_shlib_suffix } # check file permission capabilities @@ -614,6 +680,9 @@ unset orig_perms unset new_perms +# check if module command is defined prior running tests +set is_modules_defined expr {!catch {exec $env(TESTSUITEDIR)/is_module_defined}} + # check if symbolic link registered in git repository have been effectively # created as symbolic link to determine if they are supported on filesystem set is_symlink_supported file isdirectory $env(TESTSUITEDIR)/modulefiles/symlink
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.00-init/010-environ.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.00-init/010-environ.exp
Changed
@@ -42,6 +42,7 @@ catch {unset env(__MODULES_LMPREREQ)} catch {unset env(__MODULES_LMALTNAME)} catch {unset env(__MODULES_LMTAG)} +catch {unset env(__MODULES_LMEXTRATAG)} catch {unset env(__MODULES_LMVARIANT)} catch {unset env(MODULECONTACT)} @@ -50,7 +51,9 @@ foreach var array names env { if {string match __MODULES_SHARE_* $var \ + || string match __MODULES_PUSHENV_* $var \ || string match __MODULES_QUAR_* $var \ + || string match MODULES_FAMILY_* $var \ || string match MODULES_RUNENV_* $var} { catch {unset env($var)} } @@ -91,6 +94,9 @@ catch {unset env(PAGER)} catch {unset env(MODULES_PAGER)} +# clean any output redirection configuration +unsetenv_var MODULES_REDIRECT_OUTPUT + # ensure tests are run with a regular default verbosity level setenv_var MODULES_VERBOSITY normal @@ -109,6 +115,9 @@ # clear specific tag name color setup setenv_var MODULES_TAG_COLOR_NAME {} +# ensure magic cookie is always checked by default +setenv_var MODULES_MCOOKIE_CHECK always + # enable magic cookie version check by default setenv_var MODULES_MCOOKIE_VERSION_CHECK 1 @@ -140,6 +149,7 @@ # clean any collection configuration catch {unset env(MODULES_COLLECTION_PIN_VERSION)} +catch {unset env(MODULES_COLLECTION_PIN_TAG)} catch {unset env(MODULES_COLLECTION_TARGET)} # clean any versioning configuration
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.00-init/071-args.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.00-init/071-args.exp
Changed
@@ -61,7 +61,6 @@ testouterr_cmd "sh" "path foo bar" "ERR" "${bad_arg1}path${bad_arg2}\n$err_typehelp" testouterr_cmd "sh" "paths" "ERR" "${bad_arg1}paths${bad_arg2}\n$err_typehelp" testouterr_cmd "sh" "paths foo bar" "ERR" "${bad_arg1}paths${bad_arg2}\n$err_typehelp" -testouterr_cmd "sh" "list foo" "ERR" "${bad_arg1}list${bad_arg2}\n$err_typehelp" testouterr_cmd "sh" "search foo bar" "ERR" "${bad_arg1}search${bad_arg2}\n$err_typehelp" testouterr_cmd "sh" "purge foo" "ERR" "${bad_arg1}purge${bad_arg2}\n$err_typehelp" testouterr_cmd "sh" "save foo bar" "ERR" "${bad_arg1}save${bad_arg2}\n$err_typehelp" @@ -91,6 +90,9 @@ testouterr_cmd "sh" "try-load" "ERR" "${bad_arg1}try-load${bad_arg2}\n$err_typehelp" testouterr_cmd "sh" "try-add" "ERR" "${bad_arg1}try-load${bad_arg2}\n$err_typehelp" testouterr_cmd "sh" "refresh foo" "ERR" "${bad_arg1}refresh${bad_arg2}\n$err_typehelp" +testouterr_cmd "sh" "state foo bar" "ERR" "${bad_arg1}state${bad_arg2}\n$err_typehelp" +testouterr_cmd "sh" "load-any" "ERR" "${bad_arg1}load-any${bad_arg2}\n$err_typehelp" +testouterr_cmd "sh" "add-any" "ERR" "${bad_arg1}load-any${bad_arg2}\n$err_typehelp" # options valid for some commands are understood as modulefile name elsewhere
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.00-init/090-switches.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.00-init/090-switches.exp
Changed
@@ -87,6 +87,17 @@ # switches so no error is raised when a bad value is passed to these switches testouterr_cmd_re "sh" "--userlvl=foobar display loc_fq/1.0" "OK" "$ign_prefix '--userlvl=foobar'\n$pos_display_ans" +# output redirect switches +testouterr_cmd_re sh {--redirect display loc_fq/1.0} OK $pos_display_ans +testouterr_cmd_re sh {--no-redirect display loc_fq/1.0} OK $pos_display_ans +testouterr_cmd_re sh {--no_redirect display loc_fq/1.0} OK $pos_display_ans +testouterr_cmd_re csh {--redirect display loc_fq/1.0} OK "$warn_msgs: Unsupported option '--redirect' on csh shell\n$pos_display_ans" +testouterr_cmd_re csh {--no-redirect display loc_fq/1.0} OK $pos_display_ans +testouterr_cmd_re csh {--no_redirect display loc_fq/1.0} OK $pos_display_ans + +# ignored options +testouterr_cmd_re sh {--initial_load display loc_fq/1.0} OK $pos_display_ans + # # Clean up variables used in this test case
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.00-init/100-pager.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.00-init/100-pager.exp
Changed
@@ -25,7 +25,7 @@ set pager_dfl_use 1 } -# check if stderr terminal attachement state is forced +# check if stderr terminal attachment state is forced set is_stderr_tty siteconfig_isStderrTty if { $verbose > 0 } { send_user "\tIs STDERR a TTY? = '$is_stderr_tty'\n" @@ -56,6 +56,7 @@ } lappend ans "DEBUG setConf: siteconfig set to '$siteconfig_filere'(\\nDEBUG sourceSiteConfig: Source site configuration \\($siteconfig_filere\\))?(\\nDEBUG setState: siteconfig_loaded set to '1')?" lappend ans "DEBUG setConf: locked_configs set to '$::install_lockedconfigs'" + lappend ans "DEBUG setState: supported_shells set to 'sh bash 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: shelltype set to 'sh'" lappend ans "DEBUG setState: subcmd set to ''" @@ -292,6 +293,7 @@ lappend anserr "DEBUG sourceSiteConfig: Source site configuration \\($siteconfig_filere\\)" lappend anserr "DEBUG setState: siteconfig_loaded set to '1'" lappend anserr "DEBUG setConf: locked_configs set to '$install_lockedconfigs'" +lappend anserr "DEBUG setState: supported_shells set to 'sh bash ksh zsh csh tcsh fish cmd tcl perl python ruby lisp cmake r'" lappend anserr "DEBUG setState: shell set to 'sh'" lappend anserr "DEBUG setState: shelltype set to 'sh'" lappend anserr "DEBUG setState: subcmd set to 'load'"
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.00-init/120-siteconfig.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.00-init/120-siteconfig.exp
Changed
@@ -50,7 +50,8 @@ } elseif {!$islocked} { lappend ans "DEBUG setConf: extra_siteconfig set to '$getextrasiteconfigre'" } - lappend ans "${siteconfigdbg}DEBUG setState: shell set to 'sh'" + lappend ans "${siteconfigdbg}DEBUG setState: supported_shells set to 'sh bash 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: shelltype set to 'sh'" lappend ans "DEBUG setState: subcmd set to ''" lappend ans "DEBUG setState: subcmd_args set to ''" @@ -89,6 +90,7 @@ lappend ans "DEBUG sourceSiteConfig: Source site configuration \\($siteconfig_filere\\)" lappend ans "DEBUG setState: siteconfig_loaded set to '1'" lappend ans "DEBUG setConf: locked_configs set to '$install_lockedconfigs'" +lappend ans "DEBUG setState: supported_shells set to 'sh bash 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: shelltype set to 'sh'" lappend ans "DEBUG setState: subcmd set to ''" @@ -131,12 +133,12 @@ lappend ans " invoked from within \"if {\info exists env(TESTSUITE_ENABLE_SITECONFIG)\} \{ - # force stderr terminal attachement state + # force stderr terminal attachment state proc initStateIsStderrTty {} { return 1 } - # enabl...\" + # enable...\" (file \"$siteconfig_file\" line 2)" if {info exists env(COVERAGE)} { lappend ans " invoked from within @@ -193,12 +195,12 @@ lappend ans " invoked from within \"if {\info exists env(TESTSUITE_ENABLE_SITECONFIG)\} \{ - # force stderr terminal attachement state + # force stderr terminal attachment state proc initStateIsStderrTty {} { return 1 } - # enabl...\" + # enable...\" (file \"$siteconfig_file\" line 2)" if {info exists env(COVERAGE)} { lappend ans " invoked from within @@ -402,12 +404,12 @@ lappend ans " invoked from within \"if {\info exists env(TESTSUITE_ENABLE_SITECONFIG)\} \{ - # force stderr terminal attachement state + # force stderr terminal attachment state proc initStateIsStderrTty {} { return 1 } - # enabl...\" + # enable...\" (file \"$siteconfig_file\" line 2)" if {info exists env(COVERAGE)} { lappend ans " invoked from within @@ -445,7 +447,7 @@ } # test tcl ext lib procedures against a failed closedir call -if {info exists closedirlib_file} { +if {info exists closedirlib_file && file exists $closedirlib_file} { setenv_var TESTSUITE_ENABLE_SITECONFIG_TCLEXTLIBFAILEDCLOSEDIR 1 setenv_var LD_PRELOAD $closedirlib_file set ans list @@ -456,11 +458,11 @@ unsetenv_var TESTSUITE_ENABLE_SITECONFIG_TCLEXTLIBFAILEDCLOSEDIR unsetenv_var LD_PRELOAD } elseif {$verbose > 0} { - send_user "\tSkip tcl ext lib erroneous procedure calls as ext lib is not available\n" + send_user "\tSkip tcl ext lib erroneous procedure calls as closedir test lib is not available\n" } # test tcl ext lib procedures against a failed getpwuid call -if {info exists getpwuidlib_file} { +if {info exists getpwuidlib_file && file exists $getpwuidlib_file} { setenv_var TESTSUITE_ENABLE_SITECONFIG_TCLEXTLIBFAILEDGETPWUID 1 setenv_var LD_PRELOAD $getpwuidlib_file set ans list @@ -471,11 +473,11 @@ unsetenv_var TESTSUITE_ENABLE_SITECONFIG_TCLEXTLIBFAILEDGETPWUID unsetenv_var LD_PRELOAD } elseif {$verbose > 0} { - send_user "\tSkip tcl ext lib erroneous procedure calls as ext lib is not available\n" + send_user "\tSkip tcl ext lib erroneous procedure calls as getpwuid test lib is not available\n" } # test tcl ext lib procedures against a failed getgroups call -if {info exists getgroupslib_file} { +if {info exists getgroupslib_file && file exists $getgroupslib_file} { setenv_var TESTSUITE_ENABLE_SITECONFIG_TCLEXTLIBFAILEDGETGROUPS 1 setenv_var LD_PRELOAD $getgroupslib_file set ans list @@ -486,11 +488,11 @@ unsetenv_var TESTSUITE_ENABLE_SITECONFIG_TCLEXTLIBFAILEDGETGROUPS unsetenv_var LD_PRELOAD } elseif {$verbose > 0} { - send_user "\tSkip tcl ext lib erroneous procedure calls as ext lib is not available\n" + send_user "\tSkip tcl ext lib erroneous procedure calls as getgroups test lib is not available\n" } # test tcl ext lib procedures against a zero result getgroups call -if {info exists 0getgroupslib_file} { +if {info exists 0getgroupslib_file && file exists $0getgroupslib_file} { setenv_var TESTSUITE_ENABLE_SITECONFIG_TCLEXTLIB0GETGROUPS 1 setenv_var LD_PRELOAD $0getgroupslib_file set ans list @@ -501,11 +503,11 @@ unsetenv_var TESTSUITE_ENABLE_SITECONFIG_TCLEXTLIB0GETGROUPS unsetenv_var LD_PRELOAD } elseif {$verbose > 0} { - send_user "\tSkip tcl ext lib erroneous procedure calls as ext lib is not available\n" + send_user "\tSkip tcl ext lib erroneous procedure calls as 0getgroups test lib is not available\n" } # test tcl ext lib procedures against a duplicate entries in result getgroups call -if {info exists dupgetgroupslib_file} { +if {info exists dupgetgroupslib_file && file exists $dupgetgroupslib_file} { setenv_var TESTSUITE_ENABLE_SITECONFIG_TCLEXTLIBDUPGETGROUPS 1 setenv_var LD_PRELOAD $dupgetgroupslib_file set ans list @@ -516,11 +518,11 @@ unsetenv_var TESTSUITE_ENABLE_SITECONFIG_TCLEXTLIBDUPGETGROUPS unsetenv_var LD_PRELOAD } elseif {$verbose > 0} { - send_user "\tSkip tcl ext lib erroneous procedure calls as ext lib is not available\n" + send_user "\tSkip tcl ext lib erroneous procedure calls as dupgetgroups test lib is not available\n" } # test tcl ext lib procedures against a failed getgrgid call -if {info exists getgrgidlib_file} { +if {info exists getgrgidlib_file && file exists $getgrgidlib_file} { setenv_var TESTSUITE_ENABLE_SITECONFIG_TCLEXTLIBFAILEDGETGRGID 1 setenv_var LD_PRELOAD $getgrgidlib_file set ans list @@ -531,11 +533,26 @@ unsetenv_var TESTSUITE_ENABLE_SITECONFIG_TCLEXTLIBFAILEDGETGRGID unsetenv_var LD_PRELOAD } elseif {$verbose > 0} { - send_user "\tSkip tcl ext lib erroneous procedure calls as ext lib is not available\n" + send_user "\tSkip tcl ext lib erroneous procedure calls as getgrgid test lib is not available\n" +} + +# test tcl ext lib procedures against a failed sysconf call +if {info exists sysconflib_file && file exists $sysconflib_file} { + setenv_var TESTSUITE_ENABLE_SITECONFIG_TCLEXTLIBFAILEDSYSCONF 1 + setenv_var LD_PRELOAD $sysconflib_file + set ans list + lappend ans "$error_msgs: couldn't get NGROUPS_MAX variable: .*" + lappend ans $vers_reportre + testouterr_cmd_re sh -V OK join $ans \n + + unsetenv_var TESTSUITE_ENABLE_SITECONFIG_TCLEXTLIBFAILEDSYSCONF + unsetenv_var LD_PRELOAD +} elseif {$verbose > 0} { + send_user "\tSkip tcl ext lib erroneous procedure calls as sysconf test lib is not available\n" } # test tcl ext lib procedures against a failed time call -if {info exists timelib_file} { +if {info exists timelib_file && file exists $timelib_file} { setenv_var TESTSUITE_ENABLE_SITECONFIG_TCLEXTLIBFAILEDTIME 1 setenv_var LD_PRELOAD $timelib_file set ans list @@ -546,7 +563,7 @@ unsetenv_var TESTSUITE_ENABLE_SITECONFIG_TCLEXTLIBFAILEDTIME unsetenv_var LD_PRELOAD } elseif {$verbose > 0} { - send_user "\tSkip tcl ext lib erroneous procedure calls as ext lib is not available\n" + send_user "\tSkip tcl ext lib erroneous procedure calls as time test lib is not available\n" } # test tcl ext lib procedures called without argument @@ -558,7 +575,7 @@ unsetenv_var TESTSUITE_ENABLE_SITECONFIG_PARSEDATETIMEARG_NOARG # test tcl ext lib procedures against a failed mktime call -if {info exists mktimelib_file} { +if {info exists mktimelib_file && file exists $mktimelib_file} { setenv_var TESTSUITE_ENABLE_SITECONFIG_TCLEXTLIBFAILEDMKTIME 1 setenv_var LD_PRELOAD $mktimelib_file set ans list @@ -569,7 +586,7 @@ unsetenv_var TESTSUITE_ENABLE_SITECONFIG_TCLEXTLIBFAILEDMKTIME unsetenv_var LD_PRELOAD } elseif {$verbose > 0} { - send_user "\tSkip tcl ext lib erroneous procedure calls as ext lib is not available\n" + send_user "\tSkip tcl ext lib erroneous procedure calls as mktime test lib is not available\n" } # test tcl ext lib procedures called with badly formatted date @@ -584,6 +601,7 @@ setenv_var TESTSUITE_ENABLE_SITECONFIG_MODEQ 1 setenv_var MODULES_ADVANCED_VERSION_SPEC 1 set ans list +lappend ans 0 0 1 0 1 0 0 1 0 1 0 0 1 0 1 0 0 1 0 1 lappend ans 1 0 1 1 0 1 1 0 1 1 0 1 lappend ans 1 0 0 1 0 0 1 0 0 1 0 0 lappend ans 1 0 1 1 0 1 1 0 1 1 0 1 @@ -620,7 +638,7 @@ set ans msg_moderr {invalid command name "foo"} {foo} $modpath/setenv/1.0 30 {} {} {} { (procedure "getModshareVarName" line 2) invoked from within "getModshareVarName $var" - (procedure "setenv" line 5) + (procedure "setenv" line 6) invoked from within "setenv testsuite "yes""} testouterr_cmd sh {load setenv/1.0} ERR msg_load setenv/1.0 $ans @@ -641,6 +659,19 @@ unsetenv_var MODULES_ADVANCED_VERSION_SPEC unsetenv_var TESTSUITE_ENABLE_SITECONFIG_GETMODULEDESIGNATION +# unsetModuleTag/unsetModuleExtraTag coverage test +setenv_var TESTSUITE_ENABLE_SITECONFIG_UNSETMODULETAG 1 +set ans list +lappend ans $vers_reportre +testouterr_cmd_re sh -V OK join $ans \n +unsetenv_var TESTSUITE_ENABLE_SITECONFIG_UNSETMODULETAG + +# readCollectionContent coverage test +setenv_var TESTSUITE_ENABLE_SITECONFIG_READCOLLCONTENT 1 +set tserr "$error_msgs: Collection unk cannot be read.\n couldn't open \"/path/to/unk\": no such file or directory" +testouterr_cmd_re sh -V ERR $tserr +unsetenv_var TESTSUITE_ENABLE_SITECONFIG_READCOLLCONTENT + } elseif {$verbose > 0} { send_user "\tSkip tests relying on an excepted siteconfig file installed\n" }
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.00-init/130-auto_handling.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.00-init/130-auto_handling.exp
Changed
@@ -25,7 +25,7 @@ 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" +set err_trace msg_load "$module_tron <aL>" "$warn_msgs: 'module-trace' command not implemented" append err_trace \n\nmsg_top_load $module {} $module_tron {} set ans list @@ -49,7 +49,7 @@ testouterr_cmd "sh" "load $module" "ERR" $err_pre } -# overriden configuration with command-line option +# 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 @@ -60,7 +60,7 @@ setenv_var MODULES_AUTO_HANDLING 0 testouterr_cmd "sh" "load $module" "ERR" $err_pre -# overriden configuration with command-line option +# 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 @@ -69,7 +69,7 @@ setenv_var MODULES_AUTO_HANDLING 1 testouterr_cmd_re "sh" "load $module" $ans $err_trace -# overriden configuration with command-line option +# 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 @@ -82,7 +82,7 @@ testouterr_cmd "sh" "load $module" "ERR" $err_pre } -# overriden configuration with command-line option +# 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
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.00-init/140-color.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.00-init/140-color.exp
Changed
@@ -33,7 +33,7 @@ # ensure avail tests have implicit default enabled setenv_var MODULES_IMPLICIT_DEFAULT 1 -# check if stderr terminal attachement state is forced +# check if stderr terminal attachment state is forced set is_stderr_tty siteconfig_isStderrTty if { $verbose > 0 } { send_user "\tIs STDERR a TTY? = '$is_stderr_tty'\n" @@ -344,12 +344,12 @@ lappend tserr " invoked from within \"if {\\\info exists env\\(TESTSUITE_ENABLE_SITECONFIG\\)\\\} \{ - # force stderr terminal attachement state + # force stderr terminal attachment state proc initStateIsStderrTty {} { return 1 } - # enabl...\" + # enable...\" \\(file \"$siteconfig_file\" line 2\\)" if {info exists env(COVERAGE)} { lappend tserr " invoked from within @@ -460,6 +460,15 @@ colorset_test_case {list -l} list se : sy new sy cur sy stable de loc_rc6/1.2 ".*loc_tr/1.0\\s+cur:stable\\s+.*loc_rc6/1.2\\s+new\\s+.*" 1 colorset_test_case {list -l} list hi Package hi Versions hi {Last mod.} ".*- Package -.*- Versions -.*- Last mod. -.*" colorset_test_case {list -t} list ".*loc_tr/1.0\nloc_rc6/1.2" 0 + +# highlighted element (hi) on list +setenv_var __MODULES_LMALTNAME loc_tr/1.0&loc_tr/cur:loc_rc6/1.2&al|loc_rc6/1&al|loc_rc6/bar +colorset_test_case {list loc} list hi loc se : se \\( se \\) sy new sy cur sy stable ".*loc_tr/1.0\\(cur\\).*loc_rc6/1.2.*" 1 +colorset_test_case {list -C tr} list hi tr se : se \\( se \\) sy new sy cur sy stable ".*loc_tr/1.0\\(cur\\).*" 1 +colorset_test_case {list loc loc_rc} list hi loc se : se \\( se \\) sy new sy cur sy stable ".*loc_tr/1.0\\(cur\\).*loc_rc6/1.2.*" 1 +#FIXME: only first pattern is highlighted +colorset_test_case {list -C rc tr} list hi rc se : se \\( se \\) sy new sy cur sy stable ".*loc_tr/1.0\\(cur\\).*loc_rc6/1.2.*" 1 + unsetenv_loaded_module unsetenv_var __MODULES_LMALTNAME @@ -480,7 +489,7 @@ set test_cols 61 if {!info exists term_cols} { - # skip tests if current terminal witdh is unknown + # skip tests if current terminal width is unknown send_user "\tskipping terminal width-specific tests\n" # set a specific terminal width } elseif {catch {exec stty cols $test_cols} || getTtyCols ne $test_cols} {
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.00-init/150-access-init.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.00-init/150-access-init.exp
Changed
@@ -44,6 +44,7 @@ lappend ans "DEBUG setConf: tcl_ext_lib set to '$tclextlib_file'" lappend ans "DEBUG setConf: siteconfig set to '$siteconfig_filere'(\\nDEBUG sourceSiteConfig: Source site configuration \\($siteconfig_filere\\))?(\\nDEBUG setState: siteconfig_loaded set to '1')?" lappend ans "DEBUG setConf: locked_configs set to '$install_lockedconfigs'" + lappend ans "DEBUG setState: supported_shells set to 'sh bash 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: shelltype set to 'sh'" lappend ans "DEBUG setState: subcmd set to ''"
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.00-init/170-cwd.exp
Added
@@ -0,0 +1,66 @@ +############################################################################## +# Modules Revision 3.0 +# Providing a flexible user environment +# +# File: modules.00-init/%M% +# Revision: %I% +# First Edition: 2022/05/20 +# Last Mod.: %U%, %G% +# +# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr +# +# Description: Testuite testsequence +# Command: +# Sub-Command: +# +# Comment: %C{ +# Check current working directory retrieval error +# }C% +# +############################################################################## + +skip_if_quick_mode + +# test execution of modulecmd from a removed current working directory +# skip this test in the following situation: +# - when coverage is enabled, as the cwd error will be caught by coverage tool +# rather than getAbsolutePath procedure. The next test (pwd supersede) enable +# coverage check of getAbsolutePath +# - when running on Cygwin/MinGW/MSYS which are unaffected by cwd removal +# - when running on Tcl 8.5 where test outputs are saved in files located in +# current working directory +if {!info exists env(COVERAGE) && !regexp {^(CYGWIN|MINGW|MSYS_NT).*}\ + $tcl_platform(os) && cmpversion $tclsh_version 8.6 > -1} { + + # change MODULECMD for the test to make it an absolute path name + set MODULECMD $env(TESTSUITEDIR)/../$MODULECMD + + # create a temporary current working directory and remove it after changing to it + set ORIG_CWD pwd + file mkdir cwdtest + cd cwdtest + file delete ../cwdtest + + set tserr "$error_msgs: error getting working directory name: no such file or directory" + testouterr_cmd sh {load ./unk} ERR $tserr + + # move back to testsuite working directory + cd $ORIG_CWD + unset MODULECMD +} + +# test pwd error catch in getAbsolutePath for coverage mode by superseding +# the pwd procedure +if {siteconfig_isStderrTty} { + setenv_var TESTSUITE_ENABLE_SITECONFIG_PWDERROR 1 + set tserr "$error_msgs: Custom error message" + testouterr_cmd sh {load ./unk} ERR $tserr + unsetenv_var TESTSUITE_ENABLE_SITECONFIG_PWDERROR +} + + +# +# Clean up variables used in this test case +# + +reset_test_env
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.10-use/030-use.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.10-use/030-use.exp
Changed
@@ -124,9 +124,9 @@ setenv_path_var MODULEPATH $var_path # tests when variable are defined or not -# Currenlty if variable is not defined, directory level is omitted. Should +# Currently if variable is not defined, directory level is omitted. Should # preferably skip path element if one variable referred is undefined (to be -# fixed in next major release v5.0) +# fixed in a future major release) testouterr_cmd "sh" "$use" "OK" "$path_list_header\n /apps" set ::env(MODULES_OS) $os testouterr_cmd "sh" "$use" "OK" "$path_list_header\n /apps/$os/$os" @@ -137,7 +137,6 @@ setenv_path_var MODULEPATH {$TESTSUITEDIR/modulefiles} testouterr_cmd sh $use OK "$path_list_header\n $env(TESTSUITEDIR)/modulefiles" - setenv_path_var MODULEPATH $modpath # @@ -186,6 +185,40 @@ unsetenv_var __MODULES_SHARE_MODULEPATH + +# +# Test usage of variable reference +# + +set ans list +lappend ans list set MODULEPATH \$TESTSUITEDIR/modulefiles.2:$modpath +testouterr_cmd "sh" "$use \$TESTSUITEDIR/modulefiles.2" $ans {} + +setenv_path_var MODULEPATH \$TESTSUITEDIR/modulefiles.2 $modpath +testouterr_cmd "sh" "$use \$TESTSUITEDIR/modulefiles.2" $ans {} + +set ans list +lappend ans list set MODULEPATH $env(TESTSUITEDIR)/modulefiles.2:\$TESTSUITEDIR/modulefiles.2:$modpath +testouterr_cmd "sh" "$use $env(TESTSUITEDIR)/modulefiles.2" $ans {} + +setenv_path_var MODULEPATH $env(TESTSUITEDIR)/modulefiles.2 $modpath +set ans list +lappend ans list set MODULEPATH \$TESTSUITEDIR/modulefiles.2:$env(TESTSUITEDIR)/modulefiles.2:$modpath +testouterr_cmd "sh" "$use \$TESTSUITEDIR/modulefiles.2" $ans {} + +setenv_path_var MODULEPATH $modpath + + +# +# test path command arguments +# + +testouterr_cmd sh "use /tmp --remove-on-unload" ERR err_invopt --remove-on-unload +testouterr_cmd sh "use /tmp --append-on-unload /tmp" ERR err_invopt --append-on-unload +testouterr_cmd sh "use /tmp --prepend-on-unload /tmp" ERR err_invopt --prepend-on-unload +testouterr_cmd sh "use /tmp --noop-on-unload /tmp" ERR err_invopt --noop-on-unload + + # # # Cleanup
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.10-use/031-append.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.10-use/031-append.exp
Changed
@@ -68,6 +68,30 @@ lappend ans list set MODULEPATH $loaded_path test_cmd "ALL" "$use $loaded_path" $ans + +# +# Test usage of variable reference +# + +set ans list +lappend ans list set MODULEPATH $modpath:\$TESTSUITEDIR/modulefiles.2 +testouterr_cmd "sh" "$use \$TESTSUITEDIR/modulefiles.2" $ans {} + +setenv_path_var MODULEPATH $modpath \$TESTSUITEDIR/modulefiles.2 +testouterr_cmd "sh" "$use \$TESTSUITEDIR/modulefiles.2" $ans {} + +set ans list +lappend ans list set MODULEPATH $modpath:\$TESTSUITEDIR/modulefiles.2:$env(TESTSUITEDIR)/modulefiles.2 +testouterr_cmd "sh" "$use $env(TESTSUITEDIR)/modulefiles.2" $ans {} + +setenv_path_var MODULEPATH $env(TESTSUITEDIR)/modulefiles.2 $modpath +set ans list +lappend ans list set MODULEPATH $env(TESTSUITEDIR)/modulefiles.2:$modpath:\$TESTSUITEDIR/modulefiles.2 +testouterr_cmd "sh" "$use \$TESTSUITEDIR/modulefiles.2" $ans {} + +setenv_path_var MODULEPATH $modpath + + # # Cleanup #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.10-use/032-prepend.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.10-use/032-prepend.exp
Changed
@@ -68,6 +68,30 @@ lappend ans list set MODULEPATH $loaded_path test_cmd "ALL" "$use $loaded_path" $ans + +# +# Test usage of variable reference +# + +set ans list +lappend ans list set MODULEPATH \$TESTSUITEDIR/modulefiles.2:$modpath +testouterr_cmd "sh" "$use \$TESTSUITEDIR/modulefiles.2" $ans {} + +setenv_path_var MODULEPATH \$TESTSUITEDIR/modulefiles.2 $modpath +testouterr_cmd "sh" "$use \$TESTSUITEDIR/modulefiles.2" $ans {} + +set ans list +lappend ans list set MODULEPATH $env(TESTSUITEDIR)/modulefiles.2:\$TESTSUITEDIR/modulefiles.2:$modpath +testouterr_cmd "sh" "$use $env(TESTSUITEDIR)/modulefiles.2" $ans {} + +setenv_path_var MODULEPATH $env(TESTSUITEDIR)/modulefiles.2 $modpath +set ans list +lappend ans list set MODULEPATH \$TESTSUITEDIR/modulefiles.2:$env(TESTSUITEDIR)/modulefiles.2:$modpath +testouterr_cmd "sh" "$use \$TESTSUITEDIR/modulefiles.2" $ans {} + +setenv_path_var MODULEPATH $modpath + + # # Cleanup #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.10-use/070-unuse.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.10-use/070-unuse.exp
Changed
@@ -162,6 +162,43 @@ # +# Test usage of variable reference +# + +setenv_path_var MODULEPATH $modpath + +set ans list +lappend ans list set MODULEPATH $modpath +testouterr_cmd "sh" "$use \$TESTSUITEDIR/modulefiles.2" $ans {} + +setenv_path_var MODULEPATH $modpath \$TESTSUITEDIR/modulefiles.2 + +testouterr_cmd "sh" "$use \$TESTSUITEDIR/modulefiles.2" $ans {} + +set ans list +lappend ans list set MODULEPATH $modpath:\$TESTSUITEDIR/modulefiles.2 +testouterr_cmd "sh" "$use $env(TESTSUITEDIR)/modulefiles.2" $ans {} + +setenv_path_var MODULEPATH $env(TESTSUITEDIR)/modulefiles.2 $modpath + +set ans list +lappend ans list set MODULEPATH $env(TESTSUITEDIR)/modulefiles.2:$modpath +testouterr_cmd "sh" "$use \$TESTSUITEDIR/modulefiles.2" $ans {} + +setenv_path_var MODULEPATH $modpath + + +# +# test path command arguments +# + +testouterr_cmd sh {unuse /tmp --remove-on-unload} ERR err_invopt --remove-on-unload +testouterr_cmd sh {unuse /tmp --append-on-unload /tmp} ERR err_invopt --append-on-unload +testouterr_cmd sh {unuse /tmp --prepend-on-unload /tmp} ERR err_invopt --prepend-on-unload +testouterr_cmd sh {unuse /tmp --noop-on-unload /tmp} ERR err_invopt --noop-on-unload + + +# # Cleanup #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.20-locate/030-defvers.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.20-locate/030-defvers.exp
Changed
@@ -23,7 +23,7 @@ # dv2 Select version 1.0 by using # '.version' file # dv3 '.version' file pointing to a non -# existant modulefile +# existent modulefile # dv4 '.version' file pointing to a illegal # modulefile # dv5 empty directory @@ -38,7 +38,7 @@ # dvv1 Select version 1.0 by using # '.version' file using module-version cmd # working with virtual modules -# dv_xx non existant directory +# dv_xx non existent directory # # }C% #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.20-locate/031-defvers2.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.20-locate/031-defvers2.exp
Changed
@@ -70,7 +70,7 @@ # existing module without default symbol set set modsym_5 "loc_dv1/default" -# non existant module +# non existent module set modsym_6 "loc_xx/default" # modsym_5 will automatically get a default if advanced_vers_spec and implicit_default enabled
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.20-locate/038-defcontext.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.20-locate/038-defcontext.exp
Changed
@@ -47,7 +47,7 @@ lappend ans_paths_1 list text list $modulefile_1_loa $modulefile_1_def set nodefault_1 "$err_nodefault'loc_dv1'" -# module explicitely set default version +# module explicitly set default version set modname_2 "loc_dv2" set module_2_loa "loc_dv2/2.0" set module_2_def "loc_dv2/1.0"
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.20-locate/065-rcerrs.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.20-locate/065-rcerrs.exp
Changed
@@ -35,7 +35,7 @@ # set env(MODULERCFILE) "$env(TESTSUITEDIR)/etc/bad" -# Tcl-version does not currently locate precisely where the error occured +# Tcl-version does not currently locate precisely where the error occurred #testouterr_cmd "csh" "load loc_sym/foobar" "" "$prob_name$err_exec\n$warn_src$err_loc" testouterr_cmd "csh" "load loc_sym/foobar" "ERR" "$prob_name$err_loc"
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.20-locate/069-cross.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.20-locate/069-cross.exp
Changed
@@ -584,7 +584,7 @@ } -# test default symbol targetting a modulefile version with a whitespace in the name, +# test default symbol targeting a modulefile version with a whitespace in the name, # multiple versions of the module found in several modulepaths setenv_var MODULES_AVAIL_INDEPTH 1 testouterr_cmd sh {avail -t loc_dv10} OK "$modpath1:\nloc_dv10/1.1\n\n$modpath2:\nloc_dv10/1.2"
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.20-locate/090-memcache.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.20-locate/090-memcache.exp
Changed
@@ -84,15 +84,12 @@ set tserr "(.*)+ DEBUG \\\#1:load:look/1\\\ findModules: finding 'foo1\\*' in $mpre .* -(.*)+ DEBUG \\\#1:load:look/1\\\ findModules: found foo1\\S* foo1\\S* DEBUG \\\#1:load:look/1\\\ findModules: create cache entry .* (.*)+ foo1/1 foo1/2 (.*)+ DEBUG \\\#1:load:look/1\\\ findModules: finding 'foo\\*' in $mpre .* -DEBUG \\\#1:load:look/1\\\ checkValidModule: .* -(.*)+ DEBUG \\\#1:load:look/1\\\ findModules: found foo\\S* foo\\S* foo\\S* foo\\S* DEBUG \\\#1:load:look/1\\\ findModules: create cache entry .* (.*)+ @@ -102,7 +99,6 @@ set tserr "(.*)+ DEBUG \\\#1:load:look/2\\\ findModules: finding 'foo\\*' in $mpre .* -(.*)+ DEBUG \\\#1:load:look/2\\\ findModules: found foo\\S* foo\\S* foo\\S* foo\\S* DEBUG \\\#1:load:look/2\\\ findModules: create cache entry .* (.*)+ @@ -133,14 +129,12 @@ set tserr "(.*)+ DEBUG \\\#1:load:look/4\\\ findModules: finding 'f\\*' in $mpre .* -(.*)+ DEBUG \\\#1:load:look/4\\\ findModules: found foo\\S* foo\\S* foo\\S* foo\\S* DEBUG \\\#1:load:look/4\\\ findModules: create cache entry .* (.*)+ foo/1 foo/2 foo1/1 foo1/2 (.*)+ DEBUG \\\#1:load:look/4\\\ findModules: finding '\\*' in $mpre .* -DEBUG \\\#1:load:look/4\\\ checkValidModule: .* (.*)+ DEBUG \\\#1:load:look/4\\\ findModules: create cache entry .* (.*)+" @@ -148,13 +142,10 @@ set tserr "(.*)+ DEBUG \\\#1:load:look/5\\\ findModules: finding 'foo1' in $mpre .* -(.*)+ DEBUG \\\#1:load:look/5\\\ findModules: found foo1\\S* foo1\\S* DEBUG \\\#1:load:look/5\\\ findModules: create cache entry .* (.*)+ DEBUG \\\#1:load:look/5\\\ findModules: finding 'foo' in $mpre .* -DEBUG \\\#1:load:look/5\\\ checkValidModule: .* -(.*)+ DEBUG \\\#1:load:look/5\\\ findModules: found foo\\S* foo\\S* DEBUG \\\#1:load:look/5\\\ findModules: create cache entry .* (.*)+" @@ -162,13 +153,10 @@ set tserr "(.*)+ DEBUG \\\#1:load:look/6\\\ findModules: finding 'foo' in $mpre .* -(.*)+ DEBUG \\\#1:load:look/6\\\ findModules: found foo\\S* foo\\S* DEBUG \\\#1:load:look/6\\\ findModules: create cache entry .* (.*)+ DEBUG \\\#1:load:look/6\\\ findModules: finding 'foo1' in $mpre .* -DEBUG \\\#1:load:look/6\\\ checkValidModule: .* -(.*)+ DEBUG \\\#1:load:look/6\\\ findModules: found foo1\\S* foo1\\S* DEBUG \\\#1:load:look/6\\\ findModules: create cache entry .* (.*)+" @@ -192,11 +180,11 @@ (.*)+ DEBUG \\\#1:load:look/8\\\ findModules: create cache entry .* (.*)+ -sp cial/1 +'sp cial/1' (.*)+ DEBUG \\\#1:load:look/8\\\ getModules: use cache entry .* (.*)+ -sp cial/1 +'sp cial/1' (.*)+ Get modules: {{sp cial/1}} matching '{sp cial}' in.* (.*)+"
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.20-locate/100-wspace.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.20-locate/100-wspace.exp
Changed
@@ -51,7 +51,7 @@ testouterr_cmd sh {display un\ k} ERR "$err_path'{un k}'" # regular module (wspace in module directory name) -testouterr_cmd sh {avail -t space\ ya/1} OK "$mp:\nspace ya/1(ns)" +testouterr_cmd sh {avail -t space\ ya/1} OK "$mp:\n'space ya/1'(ns)" testouterr_cmd_re sh {whatis space\ ya/1} OK "$modlin $mpre $modlin\n\\s+space ya/1: space ya/1" set ans list lappend ans list set __MODULES_LMALTNAME "space ya/1&space ya/ns" @@ -62,7 +62,7 @@ testouterr_cmd_re sh {display space\ ya/1} OK "$modlin\n$mpre/space ya/1:\n\nmodule-whatis\t{space ya/1}\n$modlin" setenv_loaded_module list "space ya/1" list "$mp/space ya/1" setenv_var __MODULES_LMALTNAME "space ya/1&space ya/ns" -testouterr_cmd sh {list} OK "$cur_loaded\n 1) space ya/1(ns) $key_sym" +testouterr_cmd sh {list} OK "$cur_loaded\n 1) 'space ya/1'(ns) $key_sym" set ans list lappend ans list unset __MODULES_LMALTNAME lappend ans list unset _LMFILES_ @@ -74,7 +74,7 @@ skip_if_quick_mode # regular module (wspace in module version) -testouterr_cmd sh {avail -t spacen/2\ s} OK "$mp:\nspacen/2 s" +testouterr_cmd sh {avail -t spacen/2\ s} OK "$mp:\n'spacen/2 s'" testouterr_cmd_re sh {whatis spacen/2\ s} OK "$modlin $mpre $modlin\n\\s+spacen/2 s: spacen/2 s" set ans list lappend ans list set _LMFILES_ "$mp/spacen/2 s" @@ -83,7 +83,7 @@ testouterr_cmd sh {path spacen/2\ s} list list text "{$mp/spacen/2 s}" {} testouterr_cmd_re sh {display spacen/2\ s} OK "$modlin\n$mpre/spacen/2 s:\n\nmodule-whatis\t{spacen/2 s}\n$modlin" setenv_loaded_module list "spacen/2 s" list "$mp/spacen/2 s" -testouterr_cmd sh {list} OK "$cur_loaded\n 1) spacen/2 s " +testouterr_cmd sh {list} OK "$cur_loaded\n 1) 'spacen/2 s' " set ans list lappend ans list unset _LMFILES_ lappend ans list unset LOADEDMODULES @@ -91,7 +91,7 @@ unsetenv_loaded_module # alias module (wspace in alias name) -testouterr_cmd sh {avail -t space\ ya/al} OK "$mp:\nspace ya/al(@)" +testouterr_cmd sh {avail -t space\ ya/al} OK "$mp:\n'space ya/al'(@)" testouterr_cmd_re sh {whatis space\ ya/al} OK "$modlin $mpre $modlin\n\\s+spacen/1: spacen/1" set ans list lappend ans list set __MODULES_LMALTNAME "spacen/1&spacen/w s&al|space ya/al" @@ -123,7 +123,7 @@ testouterr_cmd_re sh {display spacen/al} OK "$modlin\n$mpre/space ya/1:\n\nmodule-whatis\t{space ya/1}\n$modlin" setenv_loaded_module list "space ya/1" list "$mp/space ya/1" setenv_var __MODULES_LMALTNAME "space ya/1&space ya/ns&al|spacen/al" -testouterr_cmd sh {list} OK "$cur_loaded\n 1) space ya/1(ns) $key_sym" +testouterr_cmd sh {list} OK "$cur_loaded\n 1) 'space ya/1'(ns) $key_sym" set ans list lappend ans list unset __MODULES_LMALTNAME lappend ans list unset _LMFILES_ @@ -154,7 +154,7 @@ unsetenv_var __MODULES_LMALTNAME # symbolic version module (wspace in symbol target) -testouterr_cmd sh {avail -t space\ ya/ns} OK "$mp:\nspace ya/1(ns)" +testouterr_cmd sh {avail -t space\ ya/ns} OK "$mp:\n'space ya/1'(ns)" testouterr_cmd_re sh {whatis space\ ya/ns} OK "$modlin $mpre $modlin\n\\s+space ya/1: space ya/1" set ans list lappend ans list set __MODULES_LMALTNAME "space ya/1&space ya/ns" @@ -165,7 +165,7 @@ testouterr_cmd_re sh {display space\ ya/ns} OK "$modlin\n$mpre/space ya/1:\n\nmodule-whatis\t{space ya/1}\n$modlin" setenv_loaded_module list "space ya/1" list "$mp/space ya/1" setenv_var __MODULES_LMALTNAME "space ya/1&space ya/ns" -testouterr_cmd sh {list} OK "$cur_loaded\n 1) space ya/1(ns) $key_sym" +testouterr_cmd sh {list} OK "$cur_loaded\n 1) 'space ya/1'(ns) $key_sym" set ans list lappend ans list unset __MODULES_LMALTNAME lappend ans list unset _LMFILES_ @@ -175,7 +175,7 @@ unsetenv_var __MODULES_LMALTNAME # default version -testouterr_cmd sh {avail -t space\ ya/default} OK "$mp:\nspace ya/2(default)" +testouterr_cmd sh {avail -t space\ ya/default} OK "$mp:\n'space ya/2'(default)" testouterr_cmd_re sh {whatis space\ ya/default} OK "$modlin $mpre $modlin\n\\s+space ya/2: space ya/2" set ans list lappend ans list set __MODULES_LMALTNAME "space ya/2&space ya/default&space ya" @@ -186,7 +186,7 @@ testouterr_cmd_re sh {display space\ ya} OK "$modlin\n$mpre/space ya/2:\n\nmodule-whatis\t{space ya/2}\n$modlin" setenv_loaded_module list "space ya/2" list "$mp/space ya/2" setenv_var __MODULES_LMALTNAME "space ya/2&space ya/default&space ya" -testouterr_cmd sh {list} OK "$cur_loaded\n 1) space ya/2(default) $key_sym" +testouterr_cmd sh {list} OK "$cur_loaded\n 1) 'space ya/2'(default) $key_sym" set ans list lappend ans list unset __MODULES_LMALTNAME lappend ans list unset _LMFILES_ @@ -196,7 +196,7 @@ unsetenv_var __MODULES_LMALTNAME # virtual module (wspace in virtual module name) -testouterr_cmd sh {avail -t spacen/vw\ s} OK "$mp:\nspacen/vw s" +testouterr_cmd sh {avail -t spacen/vw\ s} OK "$mp:\n'spacen/vw s'" testouterr_cmd_re sh {whatis spacen/vw\ s} OK "$modlin $mpre $modlin\n\\s+spacen/vw s: spacen/vw s" set ans list lappend ans list set _LMFILES_ "$mp/spacen/1" @@ -205,7 +205,7 @@ testouterr_cmd sh {path spacen/vw\ s} list list text "{$mp/spacen/1}" {} testouterr_cmd_re sh {display spacen/vw\ s} OK "$modlin\n$mpre/spacen/1:\n\nmodule-whatis\t{spacen/vw s}\n$modlin" setenv_loaded_module list "spacen/vw s" list "$mp/spacen/1" -testouterr_cmd sh {list} OK "$cur_loaded\n 1) spacen/vw s " +testouterr_cmd sh {list} OK "$cur_loaded\n 1) 'spacen/vw s' " set ans list lappend ans list unset _LMFILES_ lappend ans list unset LOADEDMODULES @@ -251,7 +251,7 @@ unsetenv_var __MODULES_LMALTNAME # directory with symbol (wspace in directory name) -testouterr_cmd sh {avail -t space\ yb/dns} OK "$mp:\nspace yb/(dns)\nspace yb/1" +testouterr_cmd sh {avail -t space\ yb/dns} OK "$mp:\n'space yb'/(dns)\n'space yb/1'" testouterr_cmd_re sh {whatis space\ yb/dns} OK "$modlin $mpre $modlin\n\\s+space yb/1: space yb/1" set ans list lappend ans list set __MODULES_LMALTNAME "space yb/1&space yb/dns" @@ -262,7 +262,7 @@ testouterr_cmd_re sh {display space\ yb/dns} OK "$modlin\n$mpre/space yb/1:\n\nmodule-whatis\t{space yb/1}\n$modlin" setenv_loaded_module list "space yb/1" list "$mp/space yb/1" setenv_var __MODULES_LMALTNAME "space yb/1&space yb/dns" -testouterr_cmd sh {list} OK "$cur_loaded\n 1) space yb/1(dns) $key_sym" +testouterr_cmd sh {list} OK "$cur_loaded\n 1) 'space yb/1'(dns) $key_sym" set ans list lappend ans list unset __MODULES_LMALTNAME lappend ans list unset _LMFILES_ @@ -290,7 +290,7 @@ lappend ans list unset _LMFILES_ lappend ans list unset LOADEDMODULES lappend ans list unset __MODULES_LMTAG -testouterr_cmd_re sh {unload --auto space\ yc/3} $ans msg_top_unload {'space yc/3'} {{'space yc/2'} {spacenc/2}} {} {} +testouterr_cmd_re sh {unload --auto space\ yc/3} $ans msg_top_unload {'space yc/3' <aL>} {{'space yc/2'} {spacenc/2}} {} {} # test UReqUn mechanism testouterr_cmd_re sh {unload --auto space\ yc/2} $ans msg_top_unload {'space yc/2'} {} {{spacenc/2} {'space yc/3'}} {} @@ -393,7 +393,7 @@ testouterr_cmd sh {display un\ k} ERR "$err_path'{un k}'" # regular module (wspace in module directory name) -testouterr_cmd sh {avail -t space\ ya/1} OK "$mp:\nspace ya/1(ns)" +testouterr_cmd sh {avail -t space\ ya/1} OK "$mp:\n'space ya/1'(ns)" testouterr_cmd_re sh {whatis space\ ya/1} OK "$modlin $mpre $modlin\n\\s+space ya/1: space ya/1" set ans list lappend ans list set __MODULES_LMALTNAME "space ya/1&space ya/ns" @@ -404,7 +404,7 @@ testouterr_cmd_re sh {display space\ ya/1} OK "$modlin\n$mpre/space ya/1:\n\nmodule-whatis\t{space ya/1}\n$modlin" setenv_loaded_module list "space\ ya/1" list "$mp/space ya/1" setenv_var __MODULES_LMALTNAME "space ya/1&space ya/ns" -testouterr_cmd sh {list} OK "$cur_loaded\n 1) space ya/1(ns) $key_sym" +testouterr_cmd sh {list} OK "$cur_loaded\n 1) 'space ya/1'(ns) $key_sym" set ans list lappend ans list unset __MODULES_LMALTNAME lappend ans list unset _LMFILES_ @@ -414,7 +414,7 @@ unsetenv_var __MODULES_LMALTNAME # regular module (wspace in module version) -testouterr_cmd sh {avail -t spacen/2\ s} OK "$mp:\nspacen/2 s" +testouterr_cmd sh {avail -t spacen/2\ s} OK "$mp:\n'spacen/2 s'" testouterr_cmd_re sh {whatis spacen/2\ s} OK "$modlin $mpre $modlin\n\\s+spacen/2 s: spacen/2 s" set ans list lappend ans list set _LMFILES_ "$mp/spacen/2 s" @@ -423,7 +423,7 @@ testouterr_cmd sh {path spacen/2\ s} list list text "{$mp/spacen/2 s}" {} testouterr_cmd_re sh {display spacen/2\ s} OK "$modlin\n$mpre/spacen/2 s:\n\nmodule-whatis\t{spacen/2 s}\n$modlin" setenv_loaded_module list "spacen/2 s" list "$mp/spacen/2 s" -testouterr_cmd sh {list} OK "$cur_loaded\n 1) spacen/2 s " +testouterr_cmd sh {list} OK "$cur_loaded\n 1) 'spacen/2 s' " set ans list lappend ans list unset _LMFILES_ lappend ans list unset LOADEDMODULES @@ -431,7 +431,7 @@ unsetenv_loaded_module # alias module (wspace in alias name) -testouterr_cmd sh {avail -t space\ ya/al} OK "$mp:\nspace ya/al(@)" +testouterr_cmd sh {avail -t space\ ya/al} OK "$mp:\n'space ya/al'(@)" testouterr_cmd_re sh {whatis space\ ya/al} OK "$modlin $mpre $modlin\n\\s+spacen/1: spacen/1" set ans list lappend ans list set __MODULES_LMALTNAME "spacen/1&spacen/w s&al|space ya/al" @@ -463,7 +463,7 @@ testouterr_cmd_re sh {display spacen/al} OK "$modlin\n$mpre/space ya/1:\n\nmodule-whatis\t{space ya/1}\n$modlin" setenv_loaded_module list "space ya/1" list "$mp/space ya/1" setenv_var __MODULES_LMALTNAME "space ya/1&space ya/ns&al|spacen/al" -testouterr_cmd sh {list} OK "$cur_loaded\n 1) space ya/1(ns) $key_sym" +testouterr_cmd sh {list} OK "$cur_loaded\n 1) 'space ya/1'(ns) $key_sym" set ans list lappend ans list unset __MODULES_LMALTNAME lappend ans list unset _LMFILES_ @@ -494,7 +494,7 @@ unsetenv_var __MODULES_LMALTNAME # symbolic version module (wspace in symbol target) -testouterr_cmd sh {avail -t space\ ya/ns} OK "$mp:\nspace ya/1(ns)" +testouterr_cmd sh {avail -t space\ ya/ns} OK "$mp:\n'space ya/1'(ns)" testouterr_cmd_re sh {whatis space\ ya/ns} OK "$modlin $mpre $modlin\n\\s+space ya/1: space ya/1" set ans list lappend ans list set __MODULES_LMALTNAME "space ya/1&space ya/ns" @@ -505,7 +505,7 @@ testouterr_cmd_re sh {display space\ ya/ns} OK "$modlin\n$mpre/space ya/1:\n\nmodule-whatis\t{space ya/1}\n$modlin" setenv_loaded_module list "space ya/1" list "$mp/space ya/1" setenv_var __MODULES_LMALTNAME "space ya/1&space ya/ns" -testouterr_cmd sh {list} OK "$cur_loaded\n 1) space ya/1(ns) $key_sym" +testouterr_cmd sh {list} OK "$cur_loaded\n 1) 'space ya/1'(ns) $key_sym" set ans list lappend ans list unset __MODULES_LMALTNAME lappend ans list unset _LMFILES_ @@ -515,7 +515,7 @@ unsetenv_var __MODULES_LMALTNAME # default version -testouterr_cmd sh {avail -t space\ ya/default} OK "$mp:\nspace ya/2(default)" +testouterr_cmd sh {avail -t space\ ya/default} OK "$mp:\n'space ya/2'(default)" testouterr_cmd_re sh {whatis space\ ya/default} OK "$modlin $mpre $modlin\n\\s+space ya/2: space ya/2" set ans list lappend ans list set __MODULES_LMALTNAME "space ya/2&space ya/default&space ya" @@ -526,7 +526,7 @@ testouterr_cmd_re sh {display space\ ya} OK "$modlin\n$mpre/space ya/2:\n\nmodule-whatis\t{space ya/2}\n$modlin" setenv_loaded_module list "space ya/2" list "$mp/space ya/2" setenv_var __MODULES_LMALTNAME "space ya/2&space ya/default&space ya" -testouterr_cmd sh {list} OK "$cur_loaded\n 1) space ya/2(default) $key_sym" +testouterr_cmd sh {list} OK "$cur_loaded\n 1) 'space ya/2'(default) $key_sym" set ans list lappend ans list unset __MODULES_LMALTNAME lappend ans list unset _LMFILES_ @@ -536,7 +536,7 @@ unsetenv_var __MODULES_LMALTNAME # virtual module (wspace in virtual module name) -testouterr_cmd sh {avail -t spacen/vw\ s} OK "$mp:\nspacen/vw s" +testouterr_cmd sh {avail -t spacen/vw\ s} OK "$mp:\n'spacen/vw s'" testouterr_cmd_re sh {whatis spacen/vw\ s} OK "$modlin $mpre $modlin\n\\s+spacen/vw s: spacen/vw s" set ans list lappend ans list set _LMFILES_ "$mp/spacen/1" @@ -545,7 +545,7 @@ testouterr_cmd sh {path spacen/vw\ s} list list text "{$mp/spacen/1}" {} testouterr_cmd_re sh {display spacen/vw\ s} OK "$modlin\n$mpre/spacen/1:\n\nmodule-whatis\t{spacen/vw s}\n$modlin" setenv_loaded_module list "spacen/vw s" list "$mp/spacen/1" -testouterr_cmd sh {list} OK "$cur_loaded\n 1) spacen/vw s " +testouterr_cmd sh {list} OK "$cur_loaded\n 1) 'spacen/vw s' " set ans list lappend ans list unset _LMFILES_ lappend ans list unset LOADEDMODULES @@ -591,7 +591,7 @@ unsetenv_var __MODULES_LMALTNAME # directory with symbol (wspace in directory name) -testouterr_cmd sh {avail -t space\ yb/dns} OK "$mp:\nspace yb/(dns)\nspace yb/1" +testouterr_cmd sh {avail -t space\ yb/dns} OK "$mp:\n'space yb'/(dns)\n'space yb/1'" testouterr_cmd_re sh {whatis space\ yb/dns} OK "$modlin $mpre $modlin\n\\s+space yb/1: space yb/1" set ans list lappend ans list set __MODULES_LMALTNAME "space yb/1&space yb/dns" @@ -602,7 +602,7 @@ testouterr_cmd_re sh {display space\ yb/dns} OK "$modlin\n$mpre/space yb/1:\n\nmodule-whatis\t{space yb/1}\n$modlin" setenv_loaded_module list "space yb/1" list "$mp/space yb/1" setenv_var __MODULES_LMALTNAME "space yb/1&space yb/dns" -testouterr_cmd sh {list} OK "$cur_loaded\n 1) space yb/1(dns) $key_sym" +testouterr_cmd sh {list} OK "$cur_loaded\n 1) 'space yb/1'(dns) $key_sym" set ans list lappend ans list unset __MODULES_LMALTNAME lappend ans list unset _LMFILES_ @@ -644,7 +644,7 @@ testouterr_cmd sh "unuse $modpath\\ wspac\\ " $ans {} # module whose name and target finish with space character -testouterr_cmd sh {avail -t space\ y\ /1\ } OK "$mp:\nspace y /1 (n )" +testouterr_cmd sh {avail -t space\ y\ /1\ } OK "$mp:\n'space y /1 '(n )" testouterr_cmd_re sh {whatis space\ y\ /1\ } OK "$modlin $mpre $modlin\n\\s+space y /1 : space y /1 " set ans list lappend ans list set __MODULES_LMALTNAME "space y /1 &space y /n &al|space y /a " @@ -655,7 +655,7 @@ testouterr_cmd_re sh {display space\ y\ /1\ } OK "$modlin\n$mpre/space y /1 :\n\nmodule-whatis\t{space y /1 }\n$modlin" setenv_loaded_module list "space\ y\ /1 " list "$mp/space y /1 " setenv_var __MODULES_LMALTNAME "space y /1 &space y /n &al|space y /a " -testouterr_cmd sh {list} OK "$cur_loaded\n 1) space y /1 (n ) $key_sym" +testouterr_cmd sh {list} OK "$cur_loaded\n 1) 'space y /1 '(n ) $key_sym" set ans list lappend ans list unset __MODULES_LMALTNAME lappend ans list unset _LMFILES_ @@ -671,7 +671,7 @@ unsetenv_var __MODULES_LMALTNAME # alias whose name and target finish with space character -testouterr_cmd sh {avail -t space\ y\ /a\ } OK "$mp:\nspace y /a (@)" +testouterr_cmd sh {avail -t space\ y\ /a\ } OK "$mp:\n'space y /a '(@)" testouterr_cmd_re sh {whatis space\ y\ /a\ } OK "$modlin $mpre $modlin\n\\s+space y /1 : space y /1 " set ans list lappend ans list set __MODULES_LMALTNAME "space y /1 &space y /n &al|space y /a " @@ -682,7 +682,7 @@ testouterr_cmd_re sh {display space\ y\ /a\ } OK "$modlin\n$mpre/space y /1 :\n\nmodule-whatis\t{space y /1 }\n$modlin" setenv_loaded_module list "space y /1 " list "$mp/space y /1 " setenv_var __MODULES_LMALTNAME "space y /1 &space y /n &al|space y /a " -testouterr_cmd sh {list} OK "$cur_loaded\n 1) space y /1 (n ) $key_sym" +testouterr_cmd sh {list} OK "$cur_loaded\n 1) 'space y /1 '(n ) $key_sym" set ans list lappend ans list unset __MODULES_LMALTNAME lappend ans list unset _LMFILES_ @@ -692,7 +692,7 @@ unsetenv_var __MODULES_LMALTNAME # symbolic version whose name and target finish with space character -testouterr_cmd sh {avail -t space\ y\ /n\ } OK "$mp:\nspace y /1 (n )" +testouterr_cmd sh {avail -t space\ y\ /n\ } OK "$mp:\n'space y /1 '(n )" testouterr_cmd_re sh {whatis space\ y\ /n\ } OK "$modlin $mpre $modlin\n\\s+space y /1 : space y /1 " set ans list lappend ans list set __MODULES_LMALTNAME "space y /1 &space y /n &al|space y /a " @@ -703,7 +703,7 @@ testouterr_cmd_re sh {display space\ y\ /n\ } OK "$modlin\n$mpre/space y /1 :\n\nmodule-whatis\t{space y /1 }\n$modlin" setenv_loaded_module list "space y /1 " list "$mp/space y /1 " setenv_var __MODULES_LMALTNAME "space y /1 &space y /n &al|space y /a " -testouterr_cmd sh {list} OK "$cur_loaded\n 1) space y /1 (n ) $key_sym" +testouterr_cmd sh {list} OK "$cur_loaded\n 1) 'space y /1 '(n ) $key_sym" set ans list lappend ans list unset __MODULES_LMALTNAME lappend ans list unset _LMFILES_ @@ -713,7 +713,7 @@ unsetenv_var __MODULES_LMALTNAME # default version -testouterr_cmd sh {avail -t space\ y\ /default} OK "$mp:\nspace y /2.2(default)" +testouterr_cmd sh {avail -t space\ y\ /default} OK "$mp:\n'space y /2.2'(default)" testouterr_cmd_re sh {whatis space\ y\ /default} OK "$modlin $mpre $modlin\n\\s+space y /2.2: space y /2.2" set ans list lappend ans list set __MODULES_LMALTNAME "space y /2.2&space y /default&space y " @@ -724,7 +724,7 @@ testouterr_cmd_re sh {display space\ y\ } OK "$modlin\n$mpre/space y /2.2:\n\nmodule-whatis\t{space y /2.2}\n$modlin" setenv_loaded_module list "space y /2.2" list "$mp/space y /2.2" setenv_var __MODULES_LMALTNAME "space y /2.2&space y /default&space y " -testouterr_cmd sh {list} OK "$cur_loaded\n 1) space y /2.2(default) $key_sym" +testouterr_cmd sh {list} OK "$cur_loaded\n 1) 'space y /2.2'(default) $key_sym" set ans list lappend ans list unset __MODULES_LMALTNAME lappend ans list unset _LMFILES_ @@ -734,7 +734,7 @@ unsetenv_var __MODULES_LMALTNAME # virtual module whose name and target finish with space character -testouterr_cmd sh {avail -t space\ y\ /v\ } OK "$mp:\nspace y /v " +testouterr_cmd sh {avail -t space\ y\ /v\ } OK "$mp:\n'space y /v '" testouterr_cmd_re sh {whatis space\ y\ /v\ } OK "$modlin $mpre $modlin\n\\s+space y /v : space y /v " set ans list lappend ans list set _LMFILES_ "$mp/space y /1 " @@ -743,7 +743,7 @@ testouterr_cmd sh {path space\ y\ /v\ } list list text "{$mp/space y /1 }" {} testouterr_cmd_re sh {display space\ y\ /v\ } OK "$modlin\n$mpre/space y /1 :\n\nmodule-whatis\t{space y /v }\n$modlin" setenv_loaded_module list "space y /v " list "$mp/space y /1 " -testouterr_cmd sh {list} OK "$cur_loaded\n 1) space y /v " +testouterr_cmd sh {list} OK "$cur_loaded\n 1) 'space y /v ' " set ans list lappend ans list unset _LMFILES_ lappend ans list unset LOADEDMODULES
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.20-locate/110-hide.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.20-locate/110-hide.exp
Changed
@@ -163,9 +163,9 @@ lappend ans list set LOADEDMODULES hide1/3.1 testouterr_cmd sh {load hide1/3.1} $ans {} testouterr_cmd sh {load hide1@default} $ans {} -# load hide1/3.1, as it is set default and specifically mentionned in query +# load hide1/3.1, as it is set default and specifically mentioned in query testouterr_cmd sh {load hide1@3.1,4.0} $ans {} -# load hide1/3.1, as it is set default and specifically mentionned in query (in this context hide1 = hide1/default) +# load hide1/3.1, as it is set default and specifically mentioned in query (in this context hide1 = hide1/default) testouterr_cmd sh {load hide1} $ans {} testouterr_cmd sh {load hide1/} $ans {} testouterr_cmd sh {load hide1//} $ans {} @@ -1375,7 +1375,7 @@ lappend ans list set _LMFILES_ $mp/hide2/1.0 lappend ans list set LOADEDMODULES hide2/1.0 testouterr_cmd sh {reload} $ans {} -# below reload is loosing hide2/1.2 hidden symbol as hide2/1.0 is reloaded by this hide2/1.0 name and not hide2/1.2 +# below reload is losing hide2/1.2 hidden symbol as hide2/1.0 is reloaded by this hide2/1.0 name and not hide2/1.2 setenv_var __MODULES_LMALTNAME hide2/1.0&hide2/1.4&hide2/1.2&al|hide2/1.3&al|hide2/1.1 testouterr_cmd sh {reload} $ans {} unsetenv_var TESTSUITE_HIDE2_SET3
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.20-locate/111-hide-hard.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.20-locate/111-hide-hard.exp
Changed
@@ -53,7 +53,7 @@ set ans list lappend ans list set _LMFILES_ $mp/hide1/4.0 lappend ans list set LOADEDMODULES hide1/4.0 -# hide1/3.1 is skipped even if default and specifically mentionned in query +# hide1/3.1 is skipped even if default and specifically mentioned in query testouterr_cmd sh {load hide1@3.1,4.0} $ans {} testouterr_cmd sh {load hide1} ERR err_unablelocate hide1/3.1 testouterr_cmd sh {load hide1/} ERR err_unablelocate hide1/3.1 @@ -841,7 +841,7 @@ lappend ans list set _LMFILES_ $mp/hide2/1.0 lappend ans list set LOADEDMODULES hide2/1.0 testouterr_cmd sh {reload} $ans {} -# below reload is loosing hide2/1.2 forbidden symbol as hide2/1.0 is reloaded by this hide2/1.0 name and not hide2/1.2 +# below reload is losing hide2/1.2 forbidden symbol as hide2/1.0 is reloaded by this hide2/1.0 name and not hide2/1.2 setenv_var __MODULES_LMALTNAME hide2/1.0&hide2/1.4&hide2/1.2&al|hide2/1.3&al|hide2/1.1 testouterr_cmd sh {reload} $ans {} unsetenv_var TESTSUITE_HIDE2_HARD_SET3
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.20-locate/115-forbid.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.20-locate/115-forbid.exp
Changed
@@ -161,9 +161,9 @@ lappend ans list set LOADEDMODULES hide1/3.1 testouterr_cmd sh {load hide1/3.1} ERR err_accessdenied hide1/3.1 testouterr_cmd sh {load hide1@default} ERR err_accessdenied hide1/3.1 -# select hide1/3.1, as it is set default and specifically mentionned in query +# select hide1/3.1, as it is set default and specifically mentioned in query testouterr_cmd sh {load hide1@3.1,4.0} ERR err_accessdenied hide1/3.1 -# select hide1/3.1, as it is set default and specifically mentionned in query (in this context hide1 = hide1/default) +# select hide1/3.1, as it is set default and specifically mentioned in query (in this context hide1 = hide1/default) testouterr_cmd sh {load hide1} ERR err_accessdenied hide1/3.1 testouterr_cmd sh {load hide1/} ERR err_accessdenied hide1/3.1 testouterr_cmd sh {load hide1//} ERR err_accessdenied hide1/3.1 @@ -735,10 +735,10 @@ lappend ans2 list unset LOADEDMODULES set tomorrow clock format expr {clock seconds+86400} -format %Y-%m-%d if {$install_nearlyforbiddendays >= 1} { - testouterr_cmd sh {load hide1/5.0} $ans msg_load hide1/5.0 err_accessnearlydenied $tomorrow + testouterr_cmd sh {load hide1/5.0} $ans msg_load {hide1/5.0 <nF>} err_accessnearlydenied $tomorrow } setenv_var MODULES_NEARLY_FORBIDDEN_DAYS 1 -testouterr_cmd sh {load hide1/5.0} $ans msg_load hide1/5.0 err_accessnearlydenied $tomorrow +testouterr_cmd sh {load hide1/5.0} $ans msg_load {hide1/5.0 <nF>} err_accessnearlydenied $tomorrow testouterr_cmd_re sh {display hide1/5.0} OK "$modlin\n$mpre/hide1/5.0:\n\nerr_accessnearlydenied $tomorrow\nmodule-whatis\thide1/5.0\n$modlin" testouterr_cmd_re sh {whatis hide1/5.0} OK "$modlin $mpre $modlin\n\\s+hide1/5.0: hide1/5.0" testouterr_cmd sh {avail -t hide1/5.0} OK "$mp:\nhide1/5.0 <nF>" @@ -767,32 +767,32 @@ lappend ans list set _LMFILES_ $mp/hide1/5.0 lappend ans list set LOADEDMODULES hide1/5.0 lappend ans list set __MODULES_LMTAG hide1/5.0&nearly-forbidden -testouterr_cmd sh {load hide1/5.0} $ans msg_load hide1/5.0 err_accessnearlydenied $tomorrow +testouterr_cmd sh {load hide1/5.0} $ans msg_load {hide1/5.0 <nF>} err_accessnearlydenied $tomorrow unsetenv_var TESTSUITE_FORBID1_NEARLY_SET2 setenv_var TESTSUITE_FORBID1_NEARLY_SET3 1 set tomorrow clock format expr {clock seconds+86400} -format %Y-%m-%d -testouterr_cmd sh {load hide1/5.0} $ans msg_load hide1/5.0 err_accessnearlydenied $tomorrow "Lorem ipsum dolor sit amet, consectetur adipiscing elit.\nSed non risus. Suspendisse lectus tortor, dignissim sit amet,\nadipiscing nec, ultricies sed, dolor.\n Cras elementum ultrices diam. Maecenas ligula massa, varius a, semper congue, euismod non, mi." +testouterr_cmd sh {load hide1/5.0} $ans msg_load {hide1/5.0 <nF>} err_accessnearlydenied $tomorrow "Lorem ipsum dolor sit amet, consectetur adipiscing elit.\nSed non risus. Suspendisse lectus tortor, dignissim sit amet,\nadipiscing nec, ultricies sed, dolor.\n Cras elementum ultrices diam. Maecenas ligula massa, varius a, semper congue, euismod non, mi." unsetenv_var TESTSUITE_FORBID1_NEARLY_SET3 setenv_var TESTSUITE_FORBID1_NEARLY_SET4 1 set tomorrow clock format expr {clock seconds+86400} -format %Y-%m-%d -testouterr_cmd sh {load hide1/5.0} $ans msg_load hide1/5.0 err_accessnearlydenied $tomorrow {Lorem ipsum dolor sit amet, consectetur adipiscing elit.} +testouterr_cmd sh {load hide1/5.0} $ans msg_load {hide1/5.0 <nF>} err_accessnearlydenied $tomorrow {Lorem ipsum dolor sit amet, consectetur adipiscing elit.} unsetenv_var TESTSUITE_FORBID1_NEARLY_SET4 setenv_var TESTSUITE_FORBID1_NEARLY_SET5 1 set tomorrow clock format expr {clock seconds+86400} -format %Y-%m-%d -testouterr_cmd sh {load hide1/5.0} $ans msg_load hide1/5.0 err_accessnearlydenied $tomorrow +testouterr_cmd sh {load hide1/5.0} $ans msg_load {hide1/5.0 <nF>} err_accessnearlydenied $tomorrow unsetenv_var TESTSUITE_FORBID1_NEARLY_SET5 setenv_var TESTSUITE_FORBID1_NEARLY_SET6 1 set tomorrow clock format expr {clock seconds+86400} -format %Y-%m-%d -testouterr_cmd sh {load hide1/5.0} $ans msg_load hide1/5.0 err_accessnearlydenied $tomorrow +testouterr_cmd sh {load hide1/5.0} $ans msg_load {hide1/5.0 <nF>} err_accessnearlydenied $tomorrow unsetenv_var TESTSUITE_FORBID1_NEARLY_SET6 setenv_var TESTSUITE_FORBID1_NEARLY_SET7 1 set tomorrow clock format expr {clock seconds+86400} -format %Y-%m-%d -testouterr_cmd sh {load hide1/5.0} $ans msg_load hide1/5.0 err_accessnearlydenied $tomorrow {Lorem ipsum dolor sit amet, consectetur adipiscing elit.} +testouterr_cmd sh {load hide1/5.0} $ans msg_load {hide1/5.0 <nF>} err_accessnearlydenied $tomorrow {Lorem ipsum dolor sit amet, consectetur adipiscing elit.} unsetenv_var TESTSUITE_FORBID1_NEARLY_SET7 # --nearly-message specification error @@ -823,7 +823,7 @@ setenv_var TESTSUITE_FORBID1_NEARLY_SET4 1 if {$install_nearlyforbiddendays >= 1} { set tomorrow clock format expr {clock seconds+86400} -format %Y-%m-%d - set tserr msg_load hide1/5.0 err_accessnearlydenied $tomorrow {Lorem ipsum dolor sit amet, consectetur adipiscing elit.} + set tserr msg_load {hide1/5.0 <nF>} err_accessnearlydenied $tomorrow {Lorem ipsum dolor sit amet, consectetur adipiscing elit.} } else { set tserr {} }
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.20-locate/118-hidden-loaded.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.20-locate/118-hidden-loaded.exp
Changed
@@ -15,7 +15,7 @@ # Sub-Command: # # Comment: %C{ -# Hidding loaded modules with 'module-hide --hidden-loaded' +# Hiding loaded modules with 'module-hide --hidden-loaded' # command # }C% # @@ -77,7 +77,7 @@ setenv_loaded_module list hide3/1.0 list $mp/hide3/1.0 setenv_var __MODULES_LMALTNAME hide3/1.0&as|hide3/default&as|hide3/latest setenv_var __MODULES_LMTAG hide3/1.0&hidden-loaded -# append new hidden module to loaded environnement +# append new hidden module to loaded environment testouterr_cmd_re sh {load hide3/sub1/3.0} $ans {} # try to load again an hidden module testouterr_cmd sh {load hide3/1.0} OK {} @@ -178,26 +178,26 @@ # ensure hidden state is recovered and hidden mod load is not reported if automatically triggered # on collection restore -testouterr_cmd_re sh {restore testsuite/home/coll-hide-once-loaded} $ans "Loading hide3/1.0\n$no_loaded\nLoading hidereq/4.1" +testouterr_cmd_re sh {restore testsuite/home/coll-hide-once-loaded} $ans "Loading hide3/1.0 <H>\n$no_loaded\nLoading hidereq/4.1" # unless verbose2 level activated -testouterr_cmd_re sh {restore -v -v testsuite/home/coll-hide-once-loaded} $ans "Loading hide3/1.0\n$no_loaded\nLoading hidereq/4.1" +testouterr_cmd_re sh {restore -v -v testsuite/home/coll-hide-once-loaded} $ans "Loading hide3/1.0 <H>\n$no_loaded\nLoading hidereq/4.1" set ans list lappend ans list set __MODULES_LMALTNAME hide3/1.0&as|hide3/default&as|hide3/latest lappend ans list set _LMFILES_ $mp/hide3/1.0:$mp/hidereq/4.1 lappend ans list set LOADEDMODULES hide3/1.0:hidereq/4.1 -lappend ans list set __MODULES_LMTAG hide3/1.0&hidden-loaded&auto-loaded +lappend ans list set __MODULES_LMTAG hide3/1.0&auto-loaded&hidden-loaded testouterr_cmd_re sh {restore testsuite/home/coll-hide-once-loaded-nuasked} $ans "$no_loaded\nLoading hidereq/4.1" setenv_var MODULES_VERBOSITY verbose testouterr_cmd_re sh {restore testsuite/home/coll-hide-once-loaded-nuasked} $ans "$no_loaded\nLoading hidereq/4.1" -testouterr_cmd_re sh {restore -v -v testsuite/home/coll-hide-once-loaded-nuasked} $ans "Loading hide3/1.0\n$no_loaded\nLoading hidereq/4.1" +testouterr_cmd_re sh {restore -v -v testsuite/home/coll-hide-once-loaded-nuasked} $ans "Loading hide3/1.0 <aL:H>\n$no_loaded\nLoading hidereq/4.1" setenv_var MODULES_VERBOSITY verbose2 testouterr_cmd_re sh {restore -v testsuite/home/coll-hide-once-loaded-nuasked} $ans "$no_loaded\nLoading hidereq/4.1" -testouterr_cmd_re sh {restore testsuite/home/coll-hide-once-loaded-nuasked} $ans "Loading hide3/1.0\n$no_loaded\nLoading hidereq/4.1" -testouterr_cmd_re sh {restore -v -v testsuite/home/coll-hide-once-loaded-nuasked} $ans "Loading hide3/1.0\n$no_loaded\nLoading hidereq/4.1" +testouterr_cmd_re sh {restore testsuite/home/coll-hide-once-loaded-nuasked} $ans "Loading hide3/1.0 <aL:H>\n$no_loaded\nLoading hidereq/4.1" +testouterr_cmd_re sh {restore -v -v testsuite/home/coll-hide-once-loaded-nuasked} $ans "Loading hide3/1.0 <aL:H>\n$no_loaded\nLoading hidereq/4.1" setenv_var MODULES_VERBOSITY normal -testouterr_cmd_re sh {restore -v -v testsuite/home/coll-hide-once-loaded-nuasked} $ans "Loading hide3/1.0\n$no_loaded\nLoading hidereq/4.1" -testouterr_cmd_re sh {restore -vv testsuite/home/coll-hide-once-loaded-nuasked} $ans "Loading hide3/1.0\n$no_loaded\nLoading hidereq/4.1" -testouterr_cmd_re sh {--verbose restore --verbose testsuite/home/coll-hide-once-loaded-nuasked} $ans "Loading hide3/1.0\n$no_loaded\nLoading hidereq/4.1" +testouterr_cmd_re sh {restore -v -v testsuite/home/coll-hide-once-loaded-nuasked} $ans "Loading hide3/1.0 <aL:H>\n$no_loaded\nLoading hidereq/4.1" +testouterr_cmd_re sh {restore -vv testsuite/home/coll-hide-once-loaded-nuasked} $ans "Loading hide3/1.0 <aL:H>\n$no_loaded\nLoading hidereq/4.1" +testouterr_cmd_re sh {--verbose restore --verbose testsuite/home/coll-hide-once-loaded-nuasked} $ans "Loading hide3/1.0 <aL:H>\n$no_loaded\nLoading hidereq/4.1" # on scriptfile source # work on scriptfile located in current dir to cope with the relative path definition set in it @@ -208,8 +208,8 @@ lappend ans list set LOADEDMODULES hide3/1.0:hidereq/4.1 lappend ans list set __MODULES_LMTAG hide3/1.0&hidden-loaded lappend ans list set MODULEPATH $mp -testouterr_cmd_re sh {source coll-hide-once-loaded} $ans "Loading hide3/1.0\n$no_loaded\nLoading hidereq/4.1" -testouterr_cmd_re sh {source -vv coll-hide-once-loaded} $ans "Loading hide3/1.0\n$no_loaded\nLoading hidereq/4.1" +testouterr_cmd_re sh {source coll-hide-once-loaded} $ans "Loading hide3/1.0 <H>\n$no_loaded\nLoading hidereq/4.1" +testouterr_cmd_re sh {source -vv coll-hide-once-loaded} $ans "Loading hide3/1.0 <H>\n$no_loaded\nLoading hidereq/4.1" file delete coll-hide-once-loaded set ans list lappend ans list set __MODULES_LMALTNAME hide3/1.0&as|hide3/default&as|hide3/latest @@ -221,10 +221,10 @@ setenv_var MODULES_VERBOSITY verbose testouterr_cmd_re sh {source testsuite/modulefiles.2/hidereq/4.3} $ans "Loading hidereq/4.2" setenv_var MODULES_VERBOSITY verbose2 -testouterr_cmd_re sh {source testsuite/modulefiles.2/hidereq/4.3} $ans msg_load hide3/1.0\n\nmsg_top_load hidereq/4.2 {} hide3/1.0 {} +testouterr_cmd_re sh {source testsuite/modulefiles.2/hidereq/4.3} $ans msg_load {hide3/1.0 <aL:H>} \n\nmsg_top_load hidereq/4.2 {} hide3/1.0 {} setenv_var MODULES_VERBOSITY normal -testouterr_cmd_re sh {source -vv testsuite/modulefiles.2/hidereq/4.3} $ans msg_load hide3/1.0\n\nmsg_top_load hidereq/4.2 {} hide3/1.0 {} -testouterr_cmd_re sh {source -v -v testsuite/modulefiles.2/hidereq/4.3} $ans msg_load hide3/1.0\n\nmsg_top_load hidereq/4.2 {} hide3/1.0 {} +testouterr_cmd_re sh {source -vv testsuite/modulefiles.2/hidereq/4.3} $ans msg_load {hide3/1.0 <aL:H>}\n\nmsg_top_load hidereq/4.2 {} hide3/1.0 {} +testouterr_cmd_re sh {source -v -v testsuite/modulefiles.2/hidereq/4.3} $ans msg_load {hide3/1.0 <aL:H>}\n\nmsg_top_load hidereq/4.2 {} hide3/1.0 {} #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.20-locate/119-hide-cascading.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.20-locate/119-hide-cascading.exp
Changed
@@ -92,7 +92,7 @@ unsetenv_var TESTSUITE_HIDE1_CASC_SET8 -# dot named module targetted by module-hide statement +# dot named module targeted by module-hide statement # dot hiding wins over module-hide statements (module should always be precisely specified) setenv_var TESTSUITE_HIDE4_CASC_SET1 1 testouterr_cmd sh {avail hide4} OK {} @@ -279,7 +279,7 @@ lappend ans2 list set _LMFILES_ $mp/hide1/5.0 lappend ans2 list set LOADEDMODULES hide1/5.0 lappend ans2 list set __MODULES_LMTAG hide1/5.0&nearly-forbidden -testouterr_cmd sh {load hide1@5.0} $ans2 msg_load hide1/5.0 err_accessnearlydenied clock format expr {clock seconds+86400} -format %Y-%m-%d +testouterr_cmd sh {load hide1@5.0} $ans2 msg_load {hide1/5.0 <nF>} err_accessnearlydenied clock format expr {clock seconds+86400} -format %Y-%m-%d testouterr_cmd sh {avail -t hide1@5.0} OK "$mp:\nhide1/5.0 <nF>" unsetenv_var TESTSUITE_HIDE1_CASC6_SET3 @@ -294,7 +294,7 @@ unsetenv_var TESTSUITE_HIDE1_CASC6_SET5 -# dot named module targetted by module-forbid statement +# dot named module targeted by module-forbid statement # module-forbid wins over dot hiding setenv_var TESTSUITE_HIDE4_CASC2_SET1 1 testouterr_cmd sh {avail hide4} OK {} @@ -369,7 +369,7 @@ testouterr_cmd sh {avail -t hide1@5.0} OK {} unsetenv_var TESTSUITE_HIDE1_CASC7_SET10 -# dot named module targetted by module-hide --hard statement +# dot named module targeted by module-hide --hard statement # module-hide --hard wins over dot hiding setenv_var TESTSUITE_HIDE4_CASC3_SET1 1 testouterr_cmd sh {avail hide4} OK {}
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.20-locate/120-moduleversion.exp
Added
@@ -0,0 +1,73 @@ +############################################################################## +# Modules Revision 3.0 +# Providing a flexible user environment +# +# File: modules.50-cmds/%M% +# Revision: %I% +# First Edition: 2021/11/27 +# Last Mod.: %U%, %G% +# +# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr +# +# Description: Testuite testsequence +# Command: load, unload, display, help, test, whatis, refresh, avail +# Modulefiles: lcompat +# Sub-Command: +# +# Comment: %C{ +# Test ModuleVersion modulefile variable +# }C% +# +############################################################################## + +skip_if_quick_mode + +set mp $modpath.3 +set mpre $modpathre.3 +setenv_path_var MODULEPATH $mp + +set mod lcompat/1.0 +set modfile $mp/$mod +set modfilere $mpre/$mod + + +setenv_var TESTSUITE_LCOMPAT modvers1 + +set tserr "$mp:\n$mod\(default\)" +testouterr_cmd sh "avail -t $mod" OK $tserr + +set ans list +lappend ans list set __MODULES_LMALTNAME $mod&lcompat/default&lcompat +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load lcompat" $ans {} + + +setenv_var TESTSUITE_LCOMPAT modvers2 +set tserr "$mp:\n$mod\(default\)" +testouterr_cmd sh "avail -t $mod" OK $tserr + +set ans list +lappend ans list set __MODULES_LMALTNAME $mod&lcompat/default&lcompat +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load lcompat" $ans {} + + +setenv_var TESTSUITE_LCOMPAT modvers3 + +set tserr "$mp:\n$mod\(default\)" +testouterr_cmd sh "avail -t $mod" OK $tserr + +set ans list +lappend ans list set __MODULES_LMALTNAME $mod&lcompat/default&lcompat +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load lcompat" $ans {} + + +# +# Cleanup +# + +reset_test_env
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.20-locate/130-mcookie_check_eval.exp
Added
@@ -0,0 +1,690 @@ +############################################################################## +# Modules Revision 3.0 +# Providing a flexible user environment +# +# File: modules.50-cmds/%M% +# Revision: %I% +# First Edition: 2021/12/28 +# Last Mod.: %U%, %G% +# +# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr +# +# Description: Testuite testsequence +# Command: load, display, help, test, +# unload, reload, purge, refresh, list, +# avail, whatis, search +# Modulefiles: loc_dv1, loc_dv3, loc_dv4, loc_rc1, loc_virt1, +# loc_virt2, loc_dv8, loc_rc5, mcookie +# Sub-Command: +# +# Comment: %C{ +# Test mcookie_check option set to 'eval' +# }C% +# +############################################################################## + +skip_if_quick_mode + +set mp $modpath +set mpre $modpathre + +# ensure avail tests are made using in depth mode +setenv_var MODULES_AVAIL_INDEPTH 1 + +# ensure avail tests have implicit default enabled +setenv_var MODULES_IMPLICIT_DEFAULT 1 + +# ensure advanced version specifiers is enabled +setenv_var MODULES_ADVANCED_VERSION_SPEC 1 + +# test magic cookie check only when evaluate file +setenv_var MODULES_MCOOKIE_CHECK eval +setenv_var TESTSUITE_MCOOKIE_CHECK eval + + +# +# modulefile without magic cookie +# + +set modname loc_dv1 +set mod $modname/3.0 +set modfile $mp/$mod +set modfilere $mpre/$mod + +# full module name specification +set tserr msg_load $mod moderr_missingmcookiens $modfile +testouterr_cmd sh "load $mod" ERR $tserr +set tserr $modlin\n$modfilere:\n\nescre moderr_missingmcookie $modfile\n$modlin +testouterr_cmd_re sh "display $mod" ERR $tserr +set tserr $modlin\nModule\ Specific\ Help\ for\ $modfilere:\n\nescre moderr_missingmcookie $modfile\n$modlin +testouterr_cmd_re sh "help $mod" ERR $tserr +set tserr $modlin\nModule\ Specific\ Test\ for\ $modfilere:\n\nescre moderr_missingmcookie $modfile\n$modlin +testouterr_cmd_re sh "test $mod" ERR $tserr + +# full path name specification +#FIXME: full path module are misunderstood if path has a directory containing character used for variant specification +if {!string match *+* $modfile} { +set tserr msg_load $modfile moderr_missingmcookiens $modfile +testouterr_cmd sh "load $modfile" ERR $tserr +} +set tserr $modlin\n$modfilere:\n\nescre moderr_missingmcookie $modfile\n$modlin +testouterr_cmd_re sh "display $modfile" ERR $tserr +set tserr $modlin\nModule\ Specific\ Help\ for\ $modfilere:\n\nescre moderr_missingmcookie $modfile\n$modlin +testouterr_cmd_re sh "help $modfile" ERR $tserr +set tserr $modlin\nModule\ Specific\ Test\ for\ $modfilere:\n\nescre moderr_missingmcookie $modfile\n$modlin +testouterr_cmd_re sh "test $modfile" ERR $tserr + +# implicit default name specification +set tserr msg_load $mod moderr_missingmcookiens $modfile +testouterr_cmd sh "load $modname" ERR $tserr +set tserr $modlin\n$modfilere:\n\nescre moderr_missingmcookie $modfile\n$modlin +testouterr_cmd_re sh "display $modname" ERR $tserr +set tserr $modlin\nModule\ Specific\ Help\ for\ $modfilere:\n\nescre moderr_missingmcookie $modfile\n$modlin +testouterr_cmd_re sh "help $modname" ERR $tserr +set tserr $modlin\nModule\ Specific\ Test\ for\ $modfilere:\n\nescre moderr_missingmcookie $modfile\n$modlin +testouterr_cmd_re sh "test $modname" ERR $tserr + +# module has been loaded +setenv_loaded_module list $mod list $modfile +set tserr msg_unload $mod moderr_missingmcookiens $modfile +testouterr_cmd sh "unload $mod" ERR $tserr +testouterr_cmd sh reload ERR $tserr +testouterr_cmd sh purge ERR $tserr +set tserr msg_refresh $mod moderr_missingmcookiens $modfile +testouterr_cmd sh refresh ERR $tserr +set tserr $cur_loaded\n$mod +testouterr_cmd sh {list -t} OK $tserr +set tserr $list_long_headerre\n$cur_loaded\n$mod\\s*$datetimere +testouterr_cmd_re sh {list -l} OK $tserr +unsetenv_loaded_module + +# global search commands +set tserr "$mp:\n$modname/1.0\n$modname/2.0\n$mod" +testouterr_cmd sh "avail -t $modname" OK $tserr +set tserr $avail_long_headerre\n$mpre:\n$modname/1.0\\s*$datetimere\n$modname/2.0\\s*$datetimere\n$mod\\s*$datetimere +testouterr_cmd_re sh "avail -l $modname" OK $tserr +set tserr "$mp:\n$mod" +testouterr_cmd sh "avail -t $mod" OK $tserr +set tserr "$modlin $mpre $modlin\n\\s*$modname/1.0: $modname/1.0\n\\s*$modname/2.0: $modname/2.0" +testouterr_cmd_re sh "whatis $modname" OK $tserr +testouterr_cmd_re sh "search $modname" ERR $tserr + + +# +# modulefile with uncompatible magic cookie +# + +set modname mcookie +set mod $modname/1 +set modfile $mp/$mod +set modfilere $mpre/$mod + +# full module name specification +set tserr msg_load $mod moderr_minverreqns $modfile 99 +testouterr_cmd sh "load $mod" ERR $tserr +set tserr $modlin\n$modfilere:\n\nescre moderr_minverreq $modfile 99\n$modlin +testouterr_cmd_re sh "display $mod" ERR $tserr +set tserr $modlin\nModule\ Specific\ Help\ for\ $modfilere:\n\nescre moderr_minverreq $modfile 99\n$modlin +testouterr_cmd_re sh "help $mod" ERR $tserr +set tserr $modlin\nModule\ Specific\ Test\ for\ $modfilere:\n\nescre moderr_minverreq $modfile 99\n$modlin +testouterr_cmd_re sh "test $mod" ERR $tserr + +# full path name specification +#FIXME: full path module are misunderstood if path has a directory containing character used for variant specification +if {!string match *+* $modfile} { +set tserr msg_load $modfile moderr_minverreqns $modfile 99 +testouterr_cmd sh "load $modfile" ERR $tserr +} +set tserr $modlin\n$modfilere:\n\nescre moderr_minverreq $modfile 99\n$modlin +testouterr_cmd_re sh "display $modfile" ERR $tserr +set tserr $modlin\nModule\ Specific\ Help\ for\ $modfilere:\n\nescre moderr_minverreq $modfile 99\n$modlin +testouterr_cmd_re sh "help $modfile" ERR $tserr +set tserr $modlin\nModule\ Specific\ Test\ for\ $modfilere:\n\nescre moderr_minverreq $modfile 99\n$modlin +testouterr_cmd_re sh "test $modfile" ERR $tserr + +# implicit default name specification +set tserr msg_load $mod moderr_minverreqns $modfile 99 +testouterr_cmd sh "load $modname" ERR $tserr +set tserr $modlin\n$modfilere:\n\nescre moderr_minverreq $modfile 99\n$modlin +testouterr_cmd_re sh "display $modname" ERR $tserr +set tserr $modlin\nModule\ Specific\ Help\ for\ $modfilere:\n\nescre moderr_minverreq $modfile 99\n$modlin +testouterr_cmd_re sh "help $modname" ERR $tserr +set tserr $modlin\nModule\ Specific\ Test\ for\ $modfilere:\n\nescre moderr_minverreq $modfile 99\n$modlin +testouterr_cmd_re sh "test $modname" ERR $tserr + +# module has been loaded +setenv_loaded_module list $mod list $modfile +set tserr msg_unload $mod moderr_minverreqns $modfile 99 +testouterr_cmd sh "unload $mod" ERR $tserr +testouterr_cmd sh reload ERR $tserr +testouterr_cmd sh purge ERR $tserr +set tserr msg_refresh $mod moderr_minverreqns $modfile 99 +testouterr_cmd sh refresh ERR $tserr +set tserr $cur_loaded\n$mod +testouterr_cmd sh {list -t} OK $tserr +set tserr $list_long_headerre\n$cur_loaded\n$mod\\s*$datetimere +testouterr_cmd_re sh {list -l} OK $tserr +unsetenv_loaded_module + +# global search commands +set tserr "$mp:\n$mod\n${modname}rc/1" +testouterr_cmd sh "avail -t $modname" OK $tserr +set tserr $avail_long_headerre\n$mpre:\n$mod\\s*$datetimere\n${modname}rc/1\\s*$datetimere +testouterr_cmd_re sh "avail -l $modname" OK $tserr +set tserr "$mp:\n$mod" +testouterr_cmd sh "avail -t $mod" OK $tserr +testouterr_cmd_re sh "whatis $modname" OK {} +testouterr_cmd_re sh "search $modname" ERR {} + + +# cannot test access if cannot change file permission +if {!$is_file_perms_editable} { + send_user "\tskipping access tests as file permissions cannot be changed\n" +# cannot test access if superuser privileges are in use +} elseif {$tcl_platform(user) eq "root"} { + send_user "\tskipping access tests as tests are run by superuser\n" +# cannot test access if restricted file permissions have no effect +} elseif {$is_locked_dir_file_readable && $is_locked_file_readable} { + send_user "\tskipping access tests as locked files or directories are still readable\n" +} else { + +# +# read-protected modulefile +# + +set modname loc_dv1 +set mod $modname/3.0 +set modfile $mp/$mod +set modfilere $mpre/$mod + +set hide_perms "ugo-rx" +change_file_perms $modfile $hide_perms + +# full module name specification +set tserr msg_load $mod err_permdenied $modfile +testouterr_cmd sh "load $mod" ERR $tserr +set tserr $modlin\n$modfilere:\n\nescre err_permdenied $modfile\n$modlin +testouterr_cmd_re sh "display $mod" ERR $tserr +set tserr $modlin\nModule\ Specific\ Help\ for\ $modfilere:\n\nescre err_permdenied $modfile\n$modlin +testouterr_cmd_re sh "help $mod" ERR $tserr +set tserr $modlin\nModule\ Specific\ Test\ for\ $modfilere:\n\nescre err_permdenied $modfile\n$modlin +testouterr_cmd_re sh "test $mod" ERR $tserr + +# full path name specification +#FIXME: full path module are misunderstood if path has a directory containing character used for variant specification +if {!string match *+* $modfile} { +set tserr msg_load $modfile err_permdenied $modfile +testouterr_cmd sh "load $modfile" ERR $tserr +} +set tserr $modlin\n$modfilere:\n\nescre err_permdenied $modfile\n$modlin +testouterr_cmd_re sh "display $modfile" ERR $tserr +set tserr $modlin\nModule\ Specific\ Help\ for\ $modfilere:\n\nescre err_permdenied $modfile\n$modlin +testouterr_cmd_re sh "help $modfile" ERR $tserr +set tserr $modlin\nModule\ Specific\ Test\ for\ $modfilere:\n\nescre err_permdenied $modfile\n$modlin +testouterr_cmd_re sh "test $modfile" ERR $tserr + +# implicit default name specification +set tserr msg_load $mod err_permdenied $modfile +testouterr_cmd sh "load $modname" ERR $tserr +set tserr $modlin\n$modfilere:\n\nescre err_permdenied $modfile\n$modlin +testouterr_cmd_re sh "display $modname" ERR $tserr +set tserr $modlin\nModule\ Specific\ Help\ for\ $modfilere:\n\nescre err_permdenied $modfile\n$modlin +testouterr_cmd_re sh "help $modname" ERR $tserr +set tserr $modlin\nModule\ Specific\ Test\ for\ $modfilere:\n\nescre err_permdenied $modfile\n$modlin +testouterr_cmd_re sh "test $modname" ERR $tserr + +# module has been loaded +setenv_loaded_module list $mod list $modfile +set tserr msg_unload $mod err_permdenied $modfile +testouterr_cmd sh "unload $mod" ERR $tserr +testouterr_cmd sh reload ERR $tserr +testouterr_cmd sh purge ERR $tserr +set tserr msg_refresh $mod err_permdenied $modfile +testouterr_cmd sh refresh ERR $tserr +set tserr $cur_loaded\n$mod +testouterr_cmd sh {list -t} OK $tserr +set tserr $list_long_headerre\n$cur_loaded\n$mod\\s*$datetimere +testouterr_cmd_re sh {list -l} OK $tserr +unsetenv_loaded_module + +# global search commands +set tserr "$mp:\n$modname/1.0\n$modname/2.0\n$mod" +testouterr_cmd sh "avail -t $modname" OK $tserr +set tserr $avail_long_headerre\n$mpre:\n$modname/1.0\\s*$datetimere\n$modname/2.0\\s*$datetimere\n$mod\\s*$datetimere +testouterr_cmd_re sh "avail -l $modname" OK $tserr +set tserr "$mp:\n$mod" +testouterr_cmd sh "avail -t $mod" OK $tserr +set tserr "$modlin $mpre $modlin\n\\s*$modname/1.0: $modname/1.0\n\\s*$modname/2.0: $modname/2.0" +testouterr_cmd_re sh "whatis $modname" OK $tserr +testouterr_cmd_re sh "search $modname" ERR $tserr + +restore_file_perms $modfile + + +# +# read-protected directory +# + +change_file_perms $mp/$modname $hide_perms + +# full module name specification +set tserr $err_path'$mod' +testouterr_cmd sh "load $mod" ERR $tserr +testouterr_cmd_re sh "display $mod" ERR $tserr +testouterr_cmd_re sh "help $mod" ERR $tserr +testouterr_cmd_re sh "test $mod" ERR $tserr + +# full path name specification +#FIXME: full path module are misunderstood if path has a directory containing character used for variant specification +if {!string match *+* $modfile} { +set tserr msg_load $modfile err_permdenied $modfile +testouterr_cmd sh "load $modfile" ERR $tserr +} +set tserr $modlin\n$modfilere:\n\nescre err_permdenied $modfile\n$modlin +testouterr_cmd_re sh "display $modfile" ERR $tserr +set tserr $modlin\nModule\ Specific\ Help\ for\ $modfilere:\n\nescre err_permdenied $modfile\n$modlin +testouterr_cmd_re sh "help $modfile" ERR $tserr +set tserr $modlin\nModule\ Specific\ Test\ for\ $modfilere:\n\nescre err_permdenied $modfile\n$modlin +testouterr_cmd_re sh "test $modfile" ERR $tserr + +# implicit default name specification +set tserr err_permdenied $mp/$modname +testouterr_cmd sh "load $modname" ERR $tserr +testouterr_cmd sh "display $modname" ERR $tserr +testouterr_cmd sh "help $modname" ERR $tserr +testouterr_cmd sh "test $modname" ERR $tserr + +# module has been loaded +setenv_loaded_module list $mod list $modfile +set tserr msg_unload $mod err_permdenied $modfile +testouterr_cmd sh "unload $mod" ERR $tserr +testouterr_cmd sh reload ERR $tserr +testouterr_cmd sh purge ERR $tserr +set tserr msg_refresh $mod err_permdenied $modfile +testouterr_cmd sh refresh ERR $tserr +set tserr $cur_loaded\n$mod +testouterr_cmd sh {list -t} OK $tserr +set tserr $list_long_headerre\n$cur_loaded\n$mod\\s* +testouterr_cmd_re sh {list -l} OK $tserr +unsetenv_loaded_module + +# global search commands +testouterr_cmd sh "avail -t $modname" OK {} +testouterr_cmd sh "avail -l $modname" OK {} +testouterr_cmd sh "avail -t $mod" OK {} +set tserr err_permdenied $mp/$modname +testouterr_cmd sh "whatis $modname" ERR $tserr +testouterr_cmd sh "search $modname" ERR {} + +restore_file_perms $mp/$modname + + +# +# read-protected modulefile covered by module-hide directive +# + +set modname loc_rc1 +set mod $modname/2.0 +set modfile $mp/$mod +set modfilere $mpre/$mod + +set hide_perms "ugo-rx" +change_file_perms $modfile $hide_perms +setenv_var TESTSUITE_MCOOKIE_CHECK evalhide + +# full module name specification +set tserr $err_path'$mod' +testouterr_cmd sh "load $mod" ERR $tserr +testouterr_cmd_re sh "display $mod" ERR $tserr +testouterr_cmd_re sh "help $mod" ERR $tserr +testouterr_cmd_re sh "test $mod" ERR $tserr + +# full path name specification +#FIXME: full path module are misunderstood if path has a directory containing character used for variant specification +if {!string match *+* $modfile} { +set tserr msg_load $modfile err_permdenied $modfile +testouterr_cmd sh "load $modfile" ERR $tserr +} +set tserr $modlin\n$modfilere:\n\nescre err_permdenied $modfile\n$modlin +testouterr_cmd_re sh "display $modfile" ERR $tserr +set tserr $modlin\nModule\ Specific\ Help\ for\ $modfilere:\n\nescre err_permdenied $modfile\n$modlin +testouterr_cmd_re sh "help $modfile" ERR $tserr +set tserr $modlin\nModule\ Specific\ Test\ for\ $modfilere:\n\nescre err_permdenied $modfile\n$modlin +testouterr_cmd_re sh "test $modfile" ERR $tserr + +# implicit default name specification +set ans list +lappend ans list set __MODULES_LMALTNAME $modname/1.0&$modname/foo&as|$modname/default\&as|$modname/latest +lappend ans list set _LMFILES_ $mp/$modname/1.0 +lappend ans list set LOADEDMODULES $modname/1.0 +lappend ans list set testsuite yes +testouterr_cmd sh "load $modname" $ans {} +set tserr "$modlin\n$mpre/$modname/1.0:\n\nmodule-whatis\t$modname/1.0\nsetenv\t\ttestsuite yes\n$modlin" +testouterr_cmd_re sh "display $modname" OK $tserr +set tserr "$modlin\nModule\ Specific\ Help\ for\ $mpre/$modname/1.0:\n\n$warn_msgs: Unable to find ModulesHelp in $mpre/$modname/1.0.\n$modlin" +testouterr_cmd_re sh "help $modname" OK $tserr +set tserr "$modlin\nModule\ Specific\ Test\ for\ $mpre/$modname/1.0:\n\n$warn_msgs: Unable to find ModulesTest in $mpre/$modname/1.0.\n$modlin" +testouterr_cmd_re sh "test $modname" OK $tserr + +# module has been loaded +setenv_loaded_module list $mod list $modfile +set tserr msg_unload $mod err_permdenied $modfile +testouterr_cmd sh "unload $mod" ERR $tserr +testouterr_cmd sh reload ERR $tserr +testouterr_cmd sh purge ERR $tserr +set tserr msg_refresh $mod err_permdenied $modfile +testouterr_cmd sh refresh ERR $tserr +set tserr $cur_loaded\n$mod +testouterr_cmd sh {list -t} OK $tserr +set tserr $list_long_headerre\n$cur_loaded\n$mod\\s*$datetimere +testouterr_cmd_re sh {list -l} OK $tserr +unsetenv_loaded_module + +# global search commands +set tserr "$mp:\n$modname/1.0(foo)" +testouterr_cmd sh "avail -t $modname" OK $tserr +set tserr $avail_long_headerre\n$mpre:\n$modname/1.0\\s*foo\\s*$datetimere +testouterr_cmd_re sh "avail -l $modname" OK $tserr +set tserr {} +testouterr_cmd sh "avail -t $mod" OK $tserr +set tserr "$modlin $mpre $modlin\n\\s*$modname/1.0: $modname/1.0" +testouterr_cmd_re sh "whatis $modname" OK $tserr +testouterr_cmd_re sh "search $modname" ERR $tserr + +restore_file_perms $modfile +setenv_var TESTSUITE_MCOOKIE_CHECK eval + +} + + +# +# modulefile without magic cookie pointed as default version +# + +set modname loc_dv4 +set mod $modname/2.0 +set modfile $mp/$mod +set modfilere $mpre/$mod + +# explicit default name specification +set tserr msg_load $mod moderr_missingmcookiens $modfile +testouterr_cmd sh "load $modname" ERR $tserr +set tserr $modlin\n$modfilere:\n\nescre moderr_missingmcookie $modfile\n$modlin +testouterr_cmd_re sh "display $modname" ERR $tserr +set tserr $modlin\nModule\ Specific\ Help\ for\ $modfilere:\n\nescre moderr_missingmcookie $modfile\n$modlin +testouterr_cmd_re sh "help $modname" ERR $tserr +set tserr $modlin\nModule\ Specific\ Test\ for\ $modfilere:\n\nescre moderr_missingmcookie $modfile\n$modlin +testouterr_cmd_re sh "test $modname" ERR $tserr + +# module has been loaded +setenv_loaded_module list $mod list $modfile +set tserr msg_unload $mod moderr_missingmcookiens $modfile +testouterr_cmd sh "unload $mod" ERR $tserr +testouterr_cmd sh reload ERR $tserr +testouterr_cmd sh purge ERR $tserr +set tserr msg_refresh $mod moderr_missingmcookiens $modfile +testouterr_cmd sh refresh ERR $tserr +set tserr $cur_loaded\n$mod +testouterr_cmd sh {list -t} OK $tserr +set tserr $list_long_headerre\n$cur_loaded\n$mod\\s*$datetimere +testouterr_cmd_re sh {list -l} OK $tserr +unsetenv_loaded_module + +# global search commands +set tserr "$mp:\n$modname/1.0\n${mod}(default)" +testouterr_cmd sh "avail -t $modname" OK $tserr +set tserr $avail_long_headerre\n$mpre:\n$modname/1.0\\s*$datetimere\n$mod\\s*default\\s*$datetimere +testouterr_cmd_re sh "avail -l $modname" OK $tserr +set tserr "$mp:\n${mod}(default)" +testouterr_cmd sh "avail -t $mod" OK $tserr +set tserr "$modlin $mpre $modlin\n\\s*$modname/1.0: $modname/1.0" +testouterr_cmd_re sh "whatis $modname" OK $tserr +testouterr_cmd_re sh "search $modname" ERR $tserr + + +# +# modulefile without magic cookie targeted by module-virtual +# + +set modname loc_virt2 +set mod $modname/3.0 +set modfile $mp/loc_dv1/3.0 +set modfilere $mpre/loc_dv1/3.0 + +# full module name specification +set tserr msg_load $mod moderr_missingmcookiens $modfile +testouterr_cmd sh "load $mod" ERR $tserr +set tserr $modlin\n$modfilere:\n\nescre moderr_missingmcookie $modfile\n$modlin +testouterr_cmd_re sh "display $mod" ERR $tserr +set tserr $modlin\nModule\ Specific\ Help\ for\ $modfilere:\n\nescre moderr_missingmcookie $modfile\n$modlin +testouterr_cmd_re sh "help $mod" ERR $tserr +set tserr $modlin\nModule\ Specific\ Test\ for\ $modfilere:\n\nescre moderr_missingmcookie $modfile\n$modlin +testouterr_cmd_re sh "test $mod" ERR $tserr + +# full path name specification +#FIXME: full path module are misunderstood if path has a directory containing character used for variant specification +if {!string match *+* $modfile} { +set tserr msg_load $modfile moderr_missingmcookiens $modfile +testouterr_cmd sh "load $modfile" ERR $tserr +} +set tserr $modlin\n$modfilere:\n\nescre moderr_missingmcookie $modfile\n$modlin +testouterr_cmd_re sh "display $modfile" ERR $tserr +set tserr $modlin\nModule\ Specific\ Help\ for\ $modfilere:\n\nescre moderr_missingmcookie $modfile\n$modlin +testouterr_cmd_re sh "help $modfile" ERR $tserr +set tserr $modlin\nModule\ Specific\ Test\ for\ $modfilere:\n\nescre moderr_missingmcookie $modfile\n$modlin +testouterr_cmd_re sh "test $modfile" ERR $tserr + +# implicit default name specification +set tserr msg_load $mod moderr_missingmcookiens $modfile +testouterr_cmd sh "load $modname" ERR $tserr +set tserr $modlin\n$modfilere:\n\nescre moderr_missingmcookie $modfile\n$modlin +testouterr_cmd_re sh "display $modname" ERR $tserr +set tserr $modlin\nModule\ Specific\ Help\ for\ $modfilere:\n\nescre moderr_missingmcookie $modfile\n$modlin +testouterr_cmd_re sh "help $modname" ERR $tserr +set tserr $modlin\nModule\ Specific\ Test\ for\ $modfilere:\n\nescre moderr_missingmcookie $modfile\n$modlin +testouterr_cmd_re sh "test $modname" ERR $tserr + +# module has been loaded +setenv_loaded_module list $mod list $modfile +set tserr msg_unload $mod moderr_missingmcookiens $modfile +testouterr_cmd sh "unload $mod" ERR $tserr +testouterr_cmd sh reload ERR $tserr +testouterr_cmd sh purge ERR $tserr +set tserr msg_refresh $mod moderr_missingmcookiens $modfile +testouterr_cmd sh refresh ERR $tserr +set tserr $cur_loaded\n$mod +testouterr_cmd sh {list -t} OK $tserr +set tserr $list_long_headerre\n$cur_loaded\n$mod\\s*$datetimere +testouterr_cmd_re sh {list -l} OK $tserr +unsetenv_loaded_module + +# global search commands +set tserr "$mp:\n$modname/1.0\n$modname/2.0\n$mod" +testouterr_cmd sh "avail -t $modname" OK $tserr +set tserr $avail_long_headerre\n$mpre:\n$modname/1.0\\s*$datetimere\n$modname/2.0\\s*$datetimere\n$mod\\s*$datetimere +testouterr_cmd_re sh "avail -l $modname" OK $tserr +set tserr "$mp:\n$mod" +testouterr_cmd sh "avail -t $mod" OK $tserr +set tserr "$modlin $mpre $modlin\n\\s*$modname/1.0: $modname/1.0\n\\s*$modname/2.0: $modname/2.0" +testouterr_cmd_re sh "whatis $modname" OK $tserr +testouterr_cmd_re sh "search $modname" ERR $tserr + + +# +# .version file without magic cookie +# + +set modname loc_dv8 +set mod $modname/2.0 +set modfile $mp/$mod +set modfilere $mpre/$mod + +# implicit default name specification +set ans list +lappend ans list set __MODULES_LMALTNAME $mod&as|$modname/default\&as|$modname/latest +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list ERR +set tserr moderr_missingmcookie $mp/$modname/.version +testouterr_cmd sh "load $modname" $ans $tserr +set tserr moderr_missingmcookie $mpre/$modname/.version\n$modlin\n$modfilere:\n\n$modlin +testouterr_cmd_re sh "display $modname" ERR $tserr +set tserr "moderr_missingmcookie $mpre/$modname/.version\n$modlin\nModule\ Specific\ Help\ for\ $modfilere:\n\n$warn_msgs: Unable to find ModulesHelp in $modfilere.\n$modlin" +testouterr_cmd_re sh "help $modname" ERR $tserr +set tserr "moderr_missingmcookie $mpre/$modname/.version\n$modlin\nModule\ Specific\ Test\ for\ $modfilere:\n\n$warn_msgs: Unable to find ModulesTest in $modfilere.\n$modlin" +testouterr_cmd_re sh "test $modname" ERR $tserr + +# global search commands +set tserr "$mp:\n$modname/1.0\n$modname/2.0" +testouterr_cmd sh "avail -t $modname" OK $tserr +set tserr $avail_long_headerre\n$mpre:\n$modname/1.0\\s*$datetimere\n$modname/2.0\\s*$datetimere +testouterr_cmd_re sh "avail -l $modname" OK $tserr +set tserr "$mp:\n$mod" +testouterr_cmd sh "avail -t $mod" OK $tserr + + +# +# .modulerc file without magic cookie +# + +set modname loc_rc5 +set mod $modname/2.0 +set modfile $mp/$mod +set modfilere $mpre/$mod + +# implicit default name specification +set ans list +lappend ans list set __MODULES_LMALTNAME $mod&as|$modname/default\&as|$modname/latest +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set testsuite yes +lappend ans list ERR +set tserr moderr_missingmcookie $mp/$modname/.modulerc +testouterr_cmd sh "load $modname" $ans $tserr +set tserr moderr_missingmcookie $mpre/$modname/.modulerc\n$modlin\n$modfilere:\n\nmodule-whatis\t$mod\nsetenv\t\ttestsuite\ yes\n$modlin +testouterr_cmd_re sh "display $modname" ERR $tserr +set tserr "moderr_missingmcookie $mpre/$modname/.modulerc\n$modlin\nModule\ Specific\ Help\ for\ $modfilere:\n\n$warn_msgs: Unable to find ModulesHelp in $modfilere.\n$modlin" +testouterr_cmd_re sh "help $modname" ERR $tserr +set tserr "moderr_missingmcookie $mpre/$modname/.modulerc\n$modlin\nModule\ Specific\ Test\ for\ $modfilere:\n\n$warn_msgs: Unable to find ModulesTest in $modfilere.\n$modlin" +testouterr_cmd_re sh "test $modname" ERR $tserr + +# global search commands +set tserr "$mp:\n$modname/1.0\n$modname/2.0" +testouterr_cmd sh "avail -t $modname" OK $tserr +set tserr $avail_long_headerre\n$mpre:\n$modname/1.0\\s*$datetimere\n$modname/2.0\\s*$datetimere +testouterr_cmd_re sh "avail -l $modname" OK $tserr +set tserr "$mp:\n$mod" +testouterr_cmd sh "avail -t $mod" OK $tserr + + +# +# unexistent file pointed by default version +# + +set modname loc_dv3 +set mod $modname/3.0 +set modfile $mp/$mod +set modfilere $mpre/$mod + +# full path name specification +#FIXME: full path module are misunderstood if path has a directory containing character used for variant specification +if {!string match *+* $modfile} { +set tserr msg_load $modfile $err_file'$modfile' +testouterr_cmd sh "load $modfile" ERR $tserr +} +set tserr $modlin\n$modfilere:\n\nescre $err_file'$modfile'\n$modlin +testouterr_cmd_re sh "display $modfile" ERR $tserr +set tserr $modlin\nModule\ Specific\ Help\ for\ $modfilere:\n\nescre $err_file'$modfile'\n$modlin +testouterr_cmd_re sh "help $modfile" ERR $tserr +set tserr $modlin\nModule\ Specific\ Test\ for\ $modfilere:\n\nescre $err_file'$modfile'\n$modlin +testouterr_cmd_re sh "test $modfile" ERR $tserr + +# implicit default name specification +set tserr $err_path'$mod' +testouterr_cmd sh "load $modname" ERR $tserr +testouterr_cmd_re sh "display $modname" ERR $tserr +testouterr_cmd_re sh "help $modname" ERR $tserr +testouterr_cmd_re sh "test $modname" ERR $tserr + +# global search commands +set tserr "$mp:\n$modname/1.0\n$modname/2.0" +testouterr_cmd sh "avail -t $modname" OK $tserr +set tserr $avail_long_headerre\n$mpre:\n$modname/1.0\\s*$datetimere\n$modname/2.0\\s*$datetimere +testouterr_cmd_re sh "avail -l $modname" OK $tserr +testouterr_cmd sh "avail -t $mod" OK {} + + +# +# unexistent file pointed by symbol +# + +set modname loc_rc1 +set mod $modname/bar +set modfile $mp/$mod +set modfilere $mpre/$mod + +# full module name specification +set tserr $err_path'$modname/3.0' +testouterr_cmd sh "load $mod" ERR $tserr +testouterr_cmd_re sh "display $mod" ERR $tserr +testouterr_cmd_re sh "help $mod" ERR $tserr +testouterr_cmd_re sh "test $mod" ERR $tserr + +# global search commands +set tserr "$mp:\n$modname/1.0(foo)\n$modname/2.0\n$modname/4.0(@)" +testouterr_cmd sh "avail -t $modname" OK $tserr +set tserr "$avail_long_headerre\n$mpre:\n$modname/1.0\\s*foo\\s*$datetimere\n$modname/2.0\\s*$datetimere\n$modname/4.0 -> $modname/5.0\\s*" +testouterr_cmd_re sh "avail -l $modname" OK $tserr +testouterr_cmd sh "avail -t $mod" OK {} + + +# +# unexistent file pointed by alias +# + +set modname loc_rc1 +set mod $modname/4.0 +set modfile $mp/$mod +set modfilere $mpre/$mod + +# full module name specification +set tserr $err_path'$modname/5.0' +testouterr_cmd sh "load $mod" ERR $tserr +testouterr_cmd_re sh "display $mod" ERR $tserr +testouterr_cmd_re sh "help $mod" ERR $tserr +testouterr_cmd_re sh "test $mod" ERR $tserr + +# global search commands +set tserr "$mp:\n$modname/4.0(@)" +testouterr_cmd sh "avail -t $mod" OK $tserr + + +# +# unexistent file pointed by module-virtual +# + +set modname loc_virt1 +set mod $modname/6.0 +set modfile $mp/$modname/notexist +set modfilere $mpre/$modname/notexist + +# full module name specification +set tserr msg_load $mod $err_file'$modfile' +testouterr_cmd sh "load $mod" ERR $tserr +set tserr $modlin\n$modfilere:\n\nescre $err_file'$modfile'\n$modlin +testouterr_cmd_re sh "display $mod" ERR $tserr +set tserr $modlin\nModule\ Specific\ Help\ for\ $modfilere:\n\nescre $err_file'$modfile'\n$modlin +testouterr_cmd_re sh "help $mod" ERR $tserr +set tserr $modlin\nModule\ Specific\ Test\ for\ $modfilere:\n\nescre $err_file'$modfile'\n$modlin +testouterr_cmd_re sh "test $mod" ERR $tserr + +# global search commands +set tserr "$mp:\n$modname/6.0" +testouterr_cmd sh "avail -t $mod" OK $tserr + + +# +# Cleanup +# + +reset_test_env
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/030-unsetenv.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/030-unsetenv.exp
Changed
@@ -69,7 +69,7 @@ unsetenv_var TS1 set ln expr {cmpversion $tclsh_version 8.5 < 1 ? {2} : {5}} -set tserr escre msg_load unsetenv/2.0 msg_moderr {wrong # args: should be "unsetenv var ?val?"} {unsetenv TS1 foo bar<EXM>} $mp/unsetenv/2.0 $ln +set tserr escre msg_load unsetenv/2.0 msg_moderr {wrong # args: should be "unsetenv ?--noop-on-unload? ?--unset-on-unload? var ?val?"} {unsetenv TS1 foo bar<EXM>} $mp/unsetenv/2.0 $ln testouterr_cmd_re sh {load unsetenv/2.0} ERR $tserr setenv_var TS1 foo
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/035-unsetenv-undo.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/035-unsetenv-undo.exp
Changed
@@ -30,7 +30,7 @@ # set up before. # # - We cannot determine, what the former value of -# he varibale was. +# he variable was. # # Should there be a 'default value' in the module # file? This would let us do the following: @@ -91,7 +91,7 @@ unsetenv_var TS1 set ln expr {cmpversion $tclsh_version 8.5 < 1 ? {2} : {5}} -set tserr escre msg_unload unsetenv/2.0 msg_moderr {wrong # args: should be "unsetenv var ?val?"} {unsetenv TS1 foo bar<EXM>} $mp/unsetenv/2.0 $ln +set tserr escre msg_unload unsetenv/2.0 msg_moderr {wrong # args: should be "unsetenv ?--noop-on-unload? ?--unset-on-unload? var ?val?"} {unsetenv TS1 foo bar<EXM>} $mp/unsetenv/2.0 $ln testouterr_cmd_re sh {unload unsetenv/2.0} ERR $tserr setenv_var TS1 foo
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/040-append.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/040-append.exp
Changed
@@ -88,7 +88,7 @@ # different behavior than C-version: on Tcl-version adding a bare colon # to a path produces an error since this colon cannot be distinguished # from the colon used for path separator -set ts_err msg_moderr "add-path $msg_patheqsep" "append-path\tPATH\t\t:" $modulefile 24 +set ts_err msg_moderr "append-path $msg_patheqsep" "append-path\tPATH\t\t:" $modulefile 24 # # The tests @@ -102,7 +102,7 @@ set module "append/0.3" set modulefile "$modpath/$module" -set ts_err msg_moderr "add-path $msg_needenvvarname" {append-path } $modulefile 24 +set ts_err msg_moderr "append-path $msg_needenvvarname" {append-path } $modulefile 24 testouterr_cmd "sh" "load $module" "ERR" msg_load $module $ts_err # @@ -111,7 +111,7 @@ set module "append/0.4" set modulefile "$modpath/$module" -set ts_err msg_moderr "add-path $msg_needenvvarval PATH" {append-path PATH } $modulefile 24 +set ts_err msg_moderr "append-path $msg_needenvvarval PATH" {append-path PATH } $modulefile 24 testouterr_cmd "sh" "load $module" "ERR" msg_load $module $ts_err # @@ -120,7 +120,7 @@ set module "append/0.5" set modulefile "$modpath/$module" -set ts_err msg_moderr "add-path $msg_validenvvarname" {append-path {} /path/to } $modulefile 24 +set ts_err msg_moderr "append-path $msg_validenvvarname" {append-path {} /path/to } $modulefile 24 testouterr_cmd "sh" "load $module" "ERR" msg_load $module $ts_err # @@ -257,12 +257,12 @@ lappend ans list set _LMFILES_ $modulefile lappend ans list set LOADEDMODULES $module -testouterr_cmd "sh" "load $module" $ans msg_load $module "$warn_msgs: --index option has no effect on add-path" +testouterr_cmd "sh" "load $module" $ans msg_load $module "$warn_msgs: --index option has no effect on append-path" # test setting a large value in variable. For csh shell family, Modules # truncates value to avoid going over csh limit (this should be changed in -# next major release, v5.0, to let shell barfs rather trying to handle it at +# a future major release, to let shell barfs rather trying to handle it at # the Modules level) for {set i 0} {$i < 150} {incr i} { lappend bigval "/the/path/to/the/directory/$i" @@ -318,7 +318,7 @@ lappend ans list set _LMFILES_ $modulefile lappend ans list set LOADEDMODULES $module -# reference counter is automatically ajusted +# reference counter is automatically adjusted testouterr_cmd "sh" "load $module" $ans {} # test incoherent state on unload mode @@ -345,7 +345,7 @@ lappend ans list set _LMFILES_ $modulefile lappend ans list set LOADEDMODULES $module -# reference counter is automatically ajusted +# reference counter is automatically adjusted testouterr_cmd "sh" "load $module" $ans {} # test incoherent state on unload mode @@ -399,7 +399,7 @@ lappend ans list set _LMFILES_ $modulefile lappend ans list set LOADEDMODULES $module -# reference counter is automatically ajusted +# reference counter is automatically adjusted testouterr_cmd "sh" "load $module" $ans {} # test incoherent state on unload mode
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/042-append-delim.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/042-append-delim.exp
Changed
@@ -59,7 +59,7 @@ set module "append/1.3" set modulefile "$modpath/$module" -set ts_err msg_moderr "add-path $msg_needenvvarname" {append-path -d : } $modulefile 24 +set ts_err msg_moderr "append-path $msg_needenvvarname" {append-path -d : } $modulefile 24 testouterr_cmd "sh" "load $module" "ERR" msg_load $module $ts_err # @@ -68,7 +68,7 @@ set module "append/1.4" set modulefile "$modpath/$module" -set ts_err msg_moderr "add-path $msg_needenvvarval PATH" {append-path -d : PATH} $modulefile 24 +set ts_err msg_moderr "append-path $msg_needenvvarval PATH" {append-path -d : PATH} $modulefile 24 testouterr_cmd "sh" "load $module" "ERR" msg_load $module $ts_err # @@ -77,7 +77,7 @@ set module "append/1.5" set modulefile "$modpath/$module" -set ts_err msg_moderr "add-path $msg_validenvvarname" {append-path -d : {} /path/to} $modulefile 24 +set ts_err msg_moderr "append-path $msg_validenvvarname" {append-path -d : {} /path/to} $modulefile 24 testouterr_cmd "sh" "load $module" "ERR" msg_load $module $ts_err # @@ -118,7 +118,7 @@ set module append/8.0 set modulefile $modpath/$module -set ts_err msg_moderr {invalid option '-delim=,' for add-path} {append-path -delim=, FOO bar} $modulefile 2 +set ts_err msg_moderr {invalid option '-delim=,' for append-path} {append-path -delim=, FOO bar} $modulefile 2 testouterr_cmd sh "load $module" ERR msg_load $module $ts_err
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/045-append-undo.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/045-append-undo.exp
Changed
@@ -100,7 +100,7 @@ # different behavior than C-version: on Tcl-version removing a bare colon # to a path produces an error since this colon cannot be distinguished # from the colon used for path separator -set ts_err msg_moderr "unload-path $msg_patheqsep" "append-path\tPATH\t\t:" $modulefile 24 +set ts_err msg_moderr "append-path $msg_patheqsep" "append-path\tPATH\t\t:" $modulefile 24 set ts_path ":" set new_path "$old_path:$ts_path" @@ -128,7 +128,7 @@ set module "append/0.3" set modulefile "$modpath/$module" setenv_loaded_module $module $modulefile -set ts_err msg_moderr "unload-path $msg_needenvvarname" {append-path } $modulefile 24 +set ts_err msg_moderr "append-path $msg_needenvvarname" {append-path } $modulefile 24 testouterr_cmd "sh" "unload $module" "ERR" msg_unload $module $ts_err # @@ -138,7 +138,7 @@ set module "append/0.4" set modulefile "$modpath/$module" setenv_loaded_module $module $modulefile -set ts_err msg_moderr "unload-path $msg_needenvvarval PATH" {append-path PATH } $modulefile 24 +set ts_err msg_moderr "append-path $msg_needenvvarval PATH" {append-path PATH } $modulefile 24 testouterr_cmd "sh" "unload $module" "ERR" msg_unload $module $ts_err # @@ -148,7 +148,7 @@ set module "append/0.5" set modulefile "$modpath/$module" setenv_loaded_module $module $modulefile -set ts_err msg_moderr "unload-path $msg_validenvvarname" {append-path {} /path/to } $modulefile 24 +set ts_err msg_moderr "append-path $msg_validenvvarname" {append-path {} /path/to } $modulefile 24 testouterr_cmd "sh" "unload $module" "ERR" msg_unload $module $ts_err #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/047-app-del-undo.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/047-app-del-undo.exp
Changed
@@ -64,7 +64,7 @@ set module "append/1.3" set modulefile "$modpath/$module" setenv_loaded_module $module $modulefile -set ts_err msg_moderr "unload-path $msg_needenvvarname" {append-path -d : } $modulefile 24 +set ts_err msg_moderr "append-path $msg_needenvvarname" {append-path -d : } $modulefile 24 testouterr_cmd "sh" "unload $module" "ERR" msg_unload $module $ts_err # @@ -74,7 +74,7 @@ set module "append/1.4" set modulefile "$modpath/$module" setenv_loaded_module $module $modulefile -set ts_err msg_moderr "unload-path $msg_needenvvarval PATH" {append-path -d : PATH} $modulefile 24 +set ts_err msg_moderr "append-path $msg_needenvvarval PATH" {append-path -d : PATH} $modulefile 24 testouterr_cmd "sh" "unload $module" "ERR" msg_unload $module $ts_err # @@ -84,7 +84,7 @@ set module "append/1.5" set modulefile "$modpath/$module" setenv_loaded_module $module $modulefile -set ts_err msg_moderr "unload-path $msg_validenvvarname" {append-path -d : {} /path/to} $modulefile 24 +set ts_err msg_moderr "append-path $msg_validenvvarname" {append-path -d : {} /path/to} $modulefile 24 testouterr_cmd "sh" "unload $module" "ERR" msg_unload $module $ts_err # @@ -124,7 +124,7 @@ set module append/8.0 set modulefile $modpath/$module setenv_loaded_module $module $modulefile -set ts_err msg_moderr {invalid option '-delim=,' for unload-path} {append-path -delim=, FOO bar} $modulefile 2 +set ts_err msg_moderr {invalid option '-delim=,' for append-path} {append-path -delim=, FOO bar} $modulefile 2 testouterr_cmd sh "unload $module" ERR msg_unload $module $ts_err #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/050-prepend.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/050-prepend.exp
Changed
@@ -86,7 +86,7 @@ # different behavior than C-version: on Tcl-version adding a bare colon # to a path produces an error since this colon cannot be distinguished # from the colon used for path separator -set ts_err msg_moderr "add-path $msg_patheqsep" "prepend-path\tPATH\t\t:" $modulefile 25 +set ts_err msg_moderr "prepend-path $msg_patheqsep" "prepend-path\tPATH\t\t:" $modulefile 25 # # The tests @@ -128,7 +128,7 @@ set module "prepend/0.3" set modulefile "$modpath/$module" -set ts_err msg_moderr "add-path $msg_needenvvarname" {prepend-path } $modulefile 24 +set ts_err msg_moderr "prepend-path $msg_needenvvarname" {prepend-path } $modulefile 24 testouterr_cmd "sh" "load $module" "ERR" msg_load $module $ts_err # @@ -137,7 +137,7 @@ set module "prepend/0.4" set modulefile "$modpath/$module" -set ts_err msg_moderr "add-path $msg_needenvvarval PATH" {prepend-path PATH} $modulefile 24 +set ts_err msg_moderr "prepend-path $msg_needenvvarval PATH" {prepend-path PATH} $modulefile 24 testouterr_cmd "sh" "load $module" "ERR" msg_load $module $ts_err # @@ -146,7 +146,7 @@ set module "prepend/0.5" set modulefile "$modpath/$module" -set ts_err msg_moderr "add-path $msg_validenvvarname" {prepend-path {}} $modulefile 24 +set ts_err msg_moderr "prepend-path $msg_validenvvarname" {prepend-path {}} $modulefile 24 testouterr_cmd "sh" "load $module" "ERR" msg_load $module $ts_err #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/052-prepend-delim.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/052-prepend-delim.exp
Changed
@@ -75,7 +75,7 @@ set module "prepend/1.3" set modulefile "$modpath/$module" -set ts_err msg_moderr "add-path $msg_needenvvarname" {prepend-path -d : } $modulefile 24 +set ts_err msg_moderr "prepend-path $msg_needenvvarname" {prepend-path -d : } $modulefile 24 testouterr_cmd "sh" "load $module" "ERR" msg_load $module $ts_err # @@ -84,7 +84,7 @@ set module "prepend/1.4" set modulefile "$modpath/$module" -set ts_err msg_moderr "add-path $msg_needenvvarval PATH" {prepend-path -d : PATH} $modulefile 24 +set ts_err msg_moderr "prepend-path $msg_needenvvarval PATH" {prepend-path -d : PATH} $modulefile 24 testouterr_cmd "sh" "load $module" "ERR" msg_load $module $ts_err # @@ -93,7 +93,7 @@ set module "prepend/1.5" set modulefile "$modpath/$module" -set ts_err msg_moderr "add-path $msg_validenvvarname" {prepend-path -d : {}} $modulefile 24 +set ts_err msg_moderr "prepend-path $msg_validenvvarname" {prepend-path -d : {}} $modulefile 24 testouterr_cmd "sh" "load $module" "ERR" msg_load $module $ts_err # @@ -102,7 +102,7 @@ set module "prepend/1.6" set modulefile "$modpath/$module" -set ts_err msg_moderr "add-path $msg_nonemptydelim" {prepend-path --delim= PATH /path/to} $modulefile 24 +set ts_err msg_moderr "prepend-path $msg_nonemptydelim" {prepend-path --delim= PATH /path/to} $modulefile 24 testouterr_cmd "sh" "load $module" "ERR" msg_load $module $ts_err # @@ -145,7 +145,7 @@ set module prepend/8.0 set modulefile $modpath/$module -set ts_err msg_moderr {invalid option '-delim=,' for add-path} {prepend-path -delim=, FOO bar} $modulefile 2 +set ts_err msg_moderr {invalid option '-delim=,' for prepend-path} {prepend-path -delim=, FOO bar} $modulefile 2 testouterr_cmd sh "load $module" ERR msg_load $module $ts_err #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/055-prepend-undo.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/055-prepend-undo.exp
Changed
@@ -101,7 +101,7 @@ # different behavior than C-version: on Tcl-version removing a bare colon # to a path produces an error since this colon cannot be distinguished # from the colon used for path separator -set ts_err msg_moderr "unload-path $msg_patheqsep" "prepend-path\tPATH\t\t:" $modulefile 25 +set ts_err msg_moderr "prepend-path $msg_patheqsep" "prepend-path\tPATH\t\t:" $modulefile 25 set ts_path ":" set new_path "$ts_path:$old_path" @@ -156,7 +156,7 @@ set module "prepend/0.3" set modulefile "$modpath/$module" setenv_loaded_module $module $modulefile -set ts_err msg_moderr "unload-path $msg_needenvvarname" {prepend-path } $modulefile 24 +set ts_err msg_moderr "prepend-path $msg_needenvvarname" {prepend-path } $modulefile 24 testouterr_cmd "sh" "unload $module" "ERR" msg_unload $module $ts_err # @@ -166,7 +166,7 @@ set module "prepend/0.4" set modulefile "$modpath/$module" setenv_loaded_module $module $modulefile -set ts_err msg_moderr "unload-path $msg_needenvvarval PATH" {prepend-path PATH} $modulefile 24 +set ts_err msg_moderr "prepend-path $msg_needenvvarval PATH" {prepend-path PATH} $modulefile 24 testouterr_cmd "sh" "unload $module" "ERR" msg_unload $module $ts_err # @@ -176,7 +176,7 @@ set module "prepend/0.5" set modulefile "$modpath/$module" setenv_loaded_module $module $modulefile -set ts_err msg_moderr "unload-path $msg_validenvvarname" {prepend-path {}} $modulefile 24 +set ts_err msg_moderr "prepend-path $msg_validenvvarname" {prepend-path {}} $modulefile 24 testouterr_cmd "sh" "unload $module" "ERR" msg_unload $module $ts_err #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/057-pre-del-undo.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/057-pre-del-undo.exp
Changed
@@ -66,7 +66,7 @@ set module "prepend/1.3" set modulefile "$modpath/$module" setenv_loaded_module $module $modulefile -set ts_err msg_moderr "unload-path $msg_needenvvarname" {prepend-path -d : } $modulefile 24 +set ts_err msg_moderr "prepend-path $msg_needenvvarname" {prepend-path -d : } $modulefile 24 testouterr_cmd "sh" "unload $module" "ERR" msg_unload $module $ts_err # @@ -76,7 +76,7 @@ set module "prepend/1.4" set modulefile "$modpath/$module" setenv_loaded_module $module $modulefile -set ts_err msg_moderr "unload-path $msg_needenvvarval PATH" {prepend-path -d : PATH} $modulefile 24 +set ts_err msg_moderr "prepend-path $msg_needenvvarval PATH" {prepend-path -d : PATH} $modulefile 24 testouterr_cmd "sh" "unload $module" "ERR" msg_unload $module $ts_err # @@ -86,7 +86,7 @@ set module "prepend/1.5" set modulefile "$modpath/$module" setenv_loaded_module $module $modulefile -set ts_err msg_moderr "unload-path $msg_validenvvarname" {prepend-path -d : {}} $modulefile 24 +set ts_err msg_moderr "prepend-path $msg_validenvvarname" {prepend-path -d : {}} $modulefile 24 testouterr_cmd "sh" "unload $module" "ERR" msg_unload $module $ts_err # @@ -96,7 +96,7 @@ set module "prepend/1.6" set modulefile "$modpath/$module" setenv_loaded_module $module $modulefile -set ts_err msg_moderr "unload-path $msg_nonemptydelim" {prepend-path --delim= PATH /path/to} $modulefile 24 +set ts_err msg_moderr "prepend-path $msg_nonemptydelim" {prepend-path --delim= PATH /path/to} $modulefile 24 testouterr_cmd "sh" "unload $module" "ERR" msg_unload $module $ts_err # @@ -133,7 +133,7 @@ set module prepend/8.0 set modulefile $modpath/$module setenv_loaded_module $module $modulefile -set ts_err msg_moderr {invalid option '-delim=,' for unload-path} {prepend-path -delim=, FOO bar} $modulefile 2 +set ts_err msg_moderr {invalid option '-delim=,' for prepend-path} {prepend-path -delim=, FOO bar} $modulefile 2 testouterr_cmd sh "unload $module" ERR msg_unload $module $ts_err #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/060-remove.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/060-remove.exp
Changed
@@ -62,7 +62,7 @@ set module "remove/0.3" set modulefile "$modpath/$module" -set ts_err msg_moderr "unload-path $msg_needenvvarname" {remove-path } $modulefile 24 +set ts_err msg_moderr "remove-path $msg_needenvvarname" {remove-path } $modulefile 24 testouterr_cmd "sh" "load $module" "ERR" msg_load $module $ts_err # @@ -71,7 +71,7 @@ set module "remove/0.4" set modulefile "$modpath/$module" -set ts_err msg_moderr "unload-path $msg_needenvvarval PATH" {remove-path PATH} $modulefile 24 +set ts_err msg_moderr "remove-path $msg_needenvvarval PATH" {remove-path PATH} $modulefile 24 testouterr_cmd "sh" "load $module" "ERR" msg_load $module $ts_err # @@ -80,7 +80,7 @@ set module "remove/0.5" set modulefile "$modpath/$module" -set ts_err msg_moderr "unload-path $msg_validenvvarname" {remove-path {}} $modulefile 24 +set ts_err msg_moderr "remove-path $msg_validenvvarname" {remove-path {}} $modulefile 24 testouterr_cmd "sh" "load $module" "ERR" msg_load $module $ts_err # @@ -211,7 +211,7 @@ lappend ans list set _LMFILES_ $modulefile lappend ans list set LOADEDMODULES $module -testouterr_cmd "sh" "load $module" $ans msg_load $module "$warn_msgs: --duplicates option has no effect on unload-path" +testouterr_cmd "sh" "load $module" $ans msg_load $module "$warn_msgs: --duplicates option has no effect on remove-path" # test unload mode on remove-path --duplicates setenv_loaded_module list $module list $modulefile @@ -220,7 +220,7 @@ set ans list lappend ans list unset _LMFILES_ lappend ans list unset LOADEDMODULES -testouterr_cmd sh "unload $module" $ans msg_unload $module "$warn_msgs: --duplicates option has no effect on unload-path" +testouterr_cmd sh "unload $module" $ans msg_unload $module "$warn_msgs: --duplicates option has no effect on remove-path" unsetenv_loaded_module @@ -231,7 +231,7 @@ set module "remove/4.0" set modulefile "$modpath/$module" -set ts_err msg_moderr "unload-path $msg_valididxvalue" {remove-path --index FOO /path/to/dir1} $modulefile 24 +set ts_err msg_moderr "remove-path $msg_valididxvalue" {remove-path --index FOO /path/to/dir1} $modulefile 24 # not a number testouterr_cmd "sh" "load $module" "ERR" msg_load $module $ts_err
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/062-remove-delim.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/062-remove-delim.exp
Changed
@@ -59,7 +59,7 @@ set module "remove/1.3" set modulefile "$modpath/$module" -set ts_err msg_moderr "unload-path $msg_needenvvarname" {remove-path -d : } $modulefile 24 +set ts_err msg_moderr "remove-path $msg_needenvvarname" {remove-path -d : } $modulefile 24 testouterr_cmd "sh" "load $module" "ERR" msg_load $module $ts_err # @@ -68,7 +68,7 @@ set module "remove/1.4" set modulefile "$modpath/$module" -set ts_err msg_moderr "unload-path $msg_needenvvarval PATH" {remove-path -d : PATH } $modulefile 24 +set ts_err msg_moderr "remove-path $msg_needenvvarval PATH" {remove-path -d : PATH } $modulefile 24 testouterr_cmd "sh" "load $module" "ERR" msg_load $module $ts_err # @@ -77,7 +77,7 @@ set module "remove/1.5" set modulefile "$modpath/$module" -set ts_err msg_moderr "unload-path $msg_validenvvarname" {remove-path -d : {} /path/to } $modulefile 24 +set ts_err msg_moderr "remove-path $msg_validenvvarname" {remove-path -d : {} /path/to } $modulefile 24 testouterr_cmd "sh" "load $module" "ERR" msg_load $module $ts_err # @@ -119,7 +119,7 @@ set module remove/8.0 set modulefile $modpath/$module -set ts_err msg_moderr {invalid option '-delim=,' for unload-path} {remove-path -delim=, FOO bar} $modulefile 2 +set ts_err msg_moderr {invalid option '-delim=,' for remove-path} {remove-path -delim=, FOO bar} $modulefile 2 testouterr_cmd sh "load $module" ERR msg_load $module $ts_err
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/065-remove-undo.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/065-remove-undo.exp
Changed
@@ -73,7 +73,7 @@ set module "remove/0.3" set modulefile "$modpath/$module" setenv_loaded_module $module $modulefile -set ts_err msg_moderr "unload-path $msg_needenvvarname" {remove-path } $modulefile 24 +set ts_err msg_moderr "remove-path $msg_needenvvarname" {remove-path } $modulefile 24 testouterr_cmd "sh" "unload $module" "ERR" msg_unload $module $ts_err # @@ -83,7 +83,7 @@ set module "remove/0.4" set modulefile "$modpath/$module" setenv_loaded_module $module $modulefile -set ts_err msg_moderr "unload-path $msg_needenvvarval PATH" {remove-path PATH} $modulefile 24 +set ts_err msg_moderr "remove-path $msg_needenvvarval PATH" {remove-path PATH} $modulefile 24 testouterr_cmd "sh" "unload $module" "ERR" msg_unload $module $ts_err # @@ -93,7 +93,7 @@ set module "remove/0.5" set modulefile "$modpath/$module" setenv_loaded_module $module $modulefile -set ts_err msg_moderr "unload-path $msg_validenvvarname" {remove-path {}} $modulefile 24 +set ts_err msg_moderr "remove-path $msg_validenvvarname" {remove-path {}} $modulefile 24 testouterr_cmd "sh" "unload $module" "ERR" msg_unload $module $ts_err # @@ -147,7 +147,7 @@ set module remove/8.0 set modulefile $modpath/$module setenv_loaded_module $module $modulefile -set ts_err msg_moderr {invalid option '-delim=,' for unload-path} {remove-path -delim=, FOO bar} $modulefile 2 +set ts_err msg_moderr {invalid option '-delim=,' for remove-path} {remove-path -delim=, FOO bar} $modulefile 2 testouterr_cmd sh "unload $module" ERR msg_unload $module $ts_err #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/076-alias-sub.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/076-alias-sub.exp
Changed
@@ -15,7 +15,7 @@ # Sub-Command: # # Comment: %C{ -# Tests the 'set-alias' substition of $1 and $* and special chars +# Tests the 'set-alias' substitution of $1 and $* and special chars # }C% # ##############################################################################
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/078-refresh.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/078-refresh.exp
Changed
@@ -149,7 +149,7 @@ testouterr_cmd sh {refresh} $ans {} # verbose output mode -set tserr2 msg_refresh refresh/1.0\nmsg_refresh refresh/2.0{+foo} +set tserr2 msg_refresh refresh/1.0\nmsg_refresh {refresh/2.0{+foo} <bar>} testouterr_cmd sh {refresh -v} $ans $tserr2 # verbose output and hidden-loaded module @@ -168,6 +168,7 @@ lappend ans list funcfoo "() {" "echo foo2; };" lappend ans list out {echo refresh/1.0} lappend ans list out {echo refresh/2.0} +set tserr2 msg_refresh refresh/1.0\nmsg_refresh {refresh/2.0{+foo} <bar:H>} testouterr_cmd sh {refresh -v} $ans $tserr2 # verbose output and hidden-loaded module @@ -186,9 +187,11 @@ lappend ans list out {echo refresh/1.0} lappend ans list out {echo refresh/2.0} testouterr_cmd sh {refresh -v} $ans $tserr1 +set tserr2 msg_refresh refresh/1.0\nmsg_refresh {refresh/2.0{+foo} <aL:bar:H>} testouterr_cmd sh {refresh -vv} $ans $tserr2 setenv_var __MODULES_LMTAG refresh/1.0&hidden-loaded&auto-loaded:refresh/2.0&bar&hidden-loaded&auto-loaded testouterr_cmd sh {refresh -v} $ans {} +set tserr2 msg_refresh {refresh/1.0 <aL:H>}\nmsg_refresh {refresh/2.0{+foo} <aL:bar:H>} testouterr_cmd sh {refresh -vv} $ans $tserr2 unsetenv_var __MODULES_LMTAG @@ -202,6 +205,7 @@ lappend ans list alias alem {} lappend ans list funcfoo "() { echo foo; };" lappend ans list funccb "() { echo f\{o; };" +lappend ans list funcwc "() { echo sou*sh; };" lappend ans list funcnl "() { echo foo; echo bar; };" lappend ans list funcsp "() { echo f\\\"o; @@ -229,10 +233,10 @@ testouterr_cmd sh {refresh} $ans1 msg_refresh refresh/1.0 $err_evalabort # verbose output -testouterr_cmd sh {refresh -v} $ans1 msg_refresh refresh/1.0 $err_evalabort\n\nmsg_refresh refresh/2.0{+foo} +testouterr_cmd sh {refresh -v} $ans1 msg_refresh refresh/1.0 $err_evalabort\n\nmsg_refresh {refresh/2.0{+foo} <bar>} # hidden-loaded/auto-loaded setenv_var __MODULES_LMTAG refresh/1.0&bar&hidden-loaded&auto-loaded:refresh/2.0&bar -set tserr msg_refresh refresh/1.0 $err_evalabort +set tserr msg_refresh {refresh/1.0 <aL:bar:H>} $err_evalabort testouterr_cmd sh {refresh} $ans1 $tserr setenv_var __MODULES_LMTAG refresh/2.0&bar @@ -251,12 +255,12 @@ lappend ans2 list funcfoo "() {" "echo foo1; };" lappend ans2 list out {echo refresh/1.0} lappend ans2 list ERR -set tserr msg_refresh refresh/2.0{+foo} $err_evalabort +set tserr msg_refresh {refresh/2.0{+foo} <bar>} $err_evalabort testouterr_cmd sh {refresh} $ans2 $tserr # break in both loaded modules setenv_var TESTSUITE_REFRESH break0 -testouterr_cmd sh {refresh} ERR msg_refresh refresh/1.0 $err_evalabort\n\nmsg_refresh refresh/2.0{+foo} $err_evalabort +testouterr_cmd sh {refresh} ERR msg_refresh refresh/1.0 $err_evalabort\n\nmsg_refresh {refresh/2.0{+foo} <bar>} $err_evalabort # unknown command setenv_var TESTSUITE_REFRESH badcmd1 @@ -289,7 +293,7 @@ set custom {} set linenum 19 } -set tserr msg_refresh refresh/2.0{+foo} msg_moderr {invalid command name "unk"} {unk} $mp/refresh/2.0 $linenum {} {} {} $custom +set tserr msg_refresh {refresh/2.0{+foo} <bar>} msg_moderr {invalid command name "unk"} {unk} $mp/refresh/2.0 $linenum {} {} {} $custom testouterr_cmd sh {refresh} $ans2 $tserr # continue command @@ -322,7 +326,7 @@ testouterr_cmd sh {refresh} $ans {} # verbose output -set tserr msg_refresh refresh/1.0\nmsg_refresh refresh/2.0{+foo} +set tserr msg_refresh refresh/1.0\nmsg_refresh {refresh/2.0{+foo} <bar>} testouterr_cmd sh {refresh -v} $ans $tserr # exit command @@ -330,7 +334,7 @@ set tserr msg_refresh refresh/1.0 $err_evalabort testouterr_cmd sh {refresh} ERR $tserr setenv_var TESTSUITE_REFRESH exit2 -set tserr msg_refresh refresh/2.0{+foo} $err_evalabort +set tserr msg_refresh {refresh/2.0{+foo} <bar>} $err_evalabort testouterr_cmd sh {refresh} $ans2 $tserr
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/084-info-mode-exp.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/084-info-mode-exp.exp
Changed
@@ -76,7 +76,7 @@ set ansout list "display" shell_ok sh 1 testouterr_cmd_re "sh" "display $module" join $ansout "\n" "$modlin\n$modulefilere:\n\n$modlin" -# Set up the environment for test that require the moduel to be loaded +# Set up the environment for test that require the module to be loaded setenv_loaded_module $module $modulefile # test unloading
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/085-info-flags.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/085-info-flags.exp
Changed
@@ -73,7 +73,7 @@ set ansout list "0" shell_ok sh 1 testouterr_cmd_re "sh" "display $module" join $ansout "\n" "$modlin\n$modulefilere:\n\n$modlin" -# Set up the environment for test that require the moduel to be loaded +# Set up the environment for test that require the module to be loaded setenv_loaded_module $module $modulefile # test unloading
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/100-loglevel.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/100-loglevel.exp
Changed
@@ -18,7 +18,7 @@ # Comment: %C{ # Tests the 'log-facility' module command. # At the moment this only checks the execution of the -# log-facility command. This is not a check wheter the +# log-facility command. This is not a check whether the # log output really goes to the configured target. # }C% #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/120-prereq-full.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/120-prereq-full.exp
Changed
@@ -50,8 +50,9 @@ set err_pre msg_load $module err_prereq "trace/all_on" set err_trace "$warn_msgs: 'module-trace' command not implemented" -set msg_load_tron msg_load $module_tron $err_trace -set msg_unload_tron msg_unload $module_tron $err_trace +set msg_load_tron msg_load "$module_tron <aL>" $err_trace +set msg_load_tron_noal msg_load $module_tron $err_trace +set msg_unload_tron msg_unload "$module_tron <aL>" $err_trace set msg_top_load_module msg_top_load $module {} $module_tron {} set msg_top_unload_module msg_top_unload $module {} $module_tron {} set msg_top_switch_module msg_top_switch $module $module {} {} {} $module_tron {} @@ -96,7 +97,7 @@ lappend ans list set testsuite yes lappend ans list set _LMFILES_ "$modulefile_tron:$modulefile" lappend ans list set LOADEDMODULES "$module_tron:$module" -testouterr_cmd_re "ALL" "load $module_tron $module" $ans $msg_load_tron +testouterr_cmd_re "ALL" "load $module_tron $module" $ans $msg_load_tron_noal # test situations where auto_handling is disabled and some constraints are unsatisfied @@ -156,11 +157,11 @@ set ans list lappend ans list set _LMFILES_ "$modulefile:$modulefile_tron" lappend ans list set LOADEDMODULES "$module:$module_tron" -testouterr_cmd_re "sh" "load --no-auto $module_tron" $ans $msg_load_tron +testouterr_cmd_re "sh" "load --no-auto $module_tron" $ans $msg_load_tron_noal # switch sub-command should obtain same result here -testouterr_cmd_re "sh" "switch --no-auto $module_tron" $ans $msg_load_tron -testouterr_cmd_re "sh" "switch --no-auto --force $module_tron" $ans $msg_load_tron +testouterr_cmd_re "sh" "switch --no-auto $module_tron" $ans $msg_load_tron_noal +testouterr_cmd_re "sh" "switch --no-auto --force $module_tron" $ans $msg_load_tron_noal # in auto mode, requiring module is reloaded set ans list
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/121-prereq-module.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/121-prereq-module.exp
Changed
@@ -50,7 +50,8 @@ set err_pre msg_load $module err_prereq trace set err_trace "$warn_msgs: 'module-trace' command not implemented" -set err_trace_lo msg_load $module_tron $err_trace +set err_trace_lo msg_load "$module_tron <aL>" $err_trace +set err_trace_lo_noal msg_load $module_tron $err_trace # # The tests @@ -86,7 +87,7 @@ lappend ans list set testsuite yes lappend ans list set _LMFILES_ "$modulefile_tron:$modulefile" lappend ans list set LOADEDMODULES "$module_tron:$module" -testouterr_cmd_re "ALL" "load $module_tron $module" $ans $err_trace_lo +testouterr_cmd_re "ALL" "load $module_tron $module" $ans $err_trace_lo_noal # # Tests playing with OR prereq list @@ -117,7 +118,7 @@ lappend ans list set testsuite yes lappend ans list set _LMFILES_ "$modulefile_tron:$modulefile" lappend ans list set LOADEDMODULES "$module_tron:$module" -testouterr_cmd_re "ALL" "load $module_tron $module" $ans $err_trace_lo +testouterr_cmd_re "ALL" "load $module_tron $module" $ans $err_trace_lo_noal # set situation where a module has been loaded with its prerequirement setenv_loaded_module list $module_set $module_troff $module list $modulefile_set $modulefile_troff $modulefile
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/122-prereq-fullpath.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/122-prereq-fullpath.exp
Changed
@@ -70,7 +70,7 @@ lappend ans list set LOADEDMODULES "$modulefile_set1:$module1:$module_tron:$module2:$module3" lappend ans list set testsuite yes lappend ans list set __MODULES_LMTAG $modulefile_set1&auto-loaded:$module_tron&auto-loaded - set tserr regsub -all {(.+?())} msg_top_load $module1 {} $modulefile_set1 {}\n\nmsg_load $module_tron $err_trace\n\nmsg_top_load $module2 {} $module_tron {} {\\\1} + set tserr regsub -all {(.+?())} msg_top_load $module1 {} $modulefile_set1 {}\n\nmsg_load "$module_tron <aL>" $err_trace\n\nmsg_top_load $module2 {} $module_tron {} {\\\1} } else { set ans list lappend ans list set testsuite yes @@ -90,7 +90,7 @@ lappend ans list set LOADEDMODULES "$modulefile_set1:$modulefile1:$module_tron:$modulefile2:$modulefile3" lappend ans list set testsuite yes lappend ans list set __MODULES_LMTAG $modulefile_set1&auto-loaded:$module_tron&auto-loaded - set tserr regsub -all {(.+?())} msg_top_load $modulefile1 {} $modulefile_set1 {}\n\nmsg_load $module_tron $err_trace\n\nmsg_top_load $modulefile2 {} $module_tron {} {\\\1} + set tserr regsub -all {(.+?())} msg_top_load $modulefile1 {} $modulefile_set1 {}\n\nmsg_load "$module_tron <aL>" $err_trace\n\nmsg_top_load $modulefile2 {} $module_tron {} {\\\1} } else { set ans list lappend ans list set testsuite yes
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/150-module.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/150-module.exp
Changed
@@ -61,18 +61,18 @@ set submodfile_5 "$modpath/$submod_5" set submod_6 "bad2/body" set submodfile_6 "$modpath/$submod_6" -set submod_7 "NonExistant" +set submod_7 "NonExistent" set submodfile_7 "$modpath/$submod_7" set submod_11 $submod_5 set submodfile_11 $submodfile_5 -set moderr_5 msg_load $submod_5 msg_moderr "add-path $msg_patheqsep" "append-path\tPATH\t\t:" $submodfile_5 24\n\nmsg_load $module_5 err_reqlo $submod_5 -set moderr_5s msg_load $submod_5 msg_moderr "add-path $msg_patheqsep" "append-path\tPATH\t\t:" $submodfile_5 24\n\nmsg_load $module_5 err_reqmis $submod_5 +set moderr_5 msg_load $submod_5 msg_moderr "append-path $msg_patheqsep" "append-path\tPATH\t\t:" $submodfile_5 24\n\nmsg_load $module_5 err_reqlo $submod_5 +set moderr_5s msg_load $submod_5 msg_moderr "append-path $msg_patheqsep" "append-path\tPATH\t\t:" $submodfile_5 24\n\nmsg_load $module_5 err_reqmis $submod_5 set moderr_6 msg_load $submod_6 msg_moderr "$msg_invcmdname \"bad-command\"" {bad-command} $submodfile_6 29\n\nmsg_load $module_6 err_reqlo $submod_6 set moderr_6s msg_load $submod_6 msg_moderr "$msg_invcmdname \"bad-command\"" {bad-command} $submodfile_6 29\n\nmsg_load $module_6 err_reqmis $submod_6 set moderr_7 msg_load $module_7 "$err_path'$submod_7'" err_reqlo $submod_7 set moderr_7s msg_load $module_7 "$err_path'$submod_7'" err_reqmis $submod_7 -set moderr_11 msg_load $submodfile_11 msg_moderr "add-path $msg_patheqsep" "append-path\tPATH\t\t:" $submodfile_11 24\n\nmsg_load $module_11 err_reqlo ../$submod_11 +set moderr_11 msg_load $submodfile_11 msg_moderr "append-path $msg_patheqsep" "append-path\tPATH\t\t:" $submodfile_11 24\n\nmsg_load $module_11 err_reqlo ../$submod_11 set msgtopun_5 \n\nmsg_top_unload $module_5 {} {} {} err_urequn $submod_5 set msgtopun_6 \n\nmsg_top_unload $module_6 {} {} {} err_urequn $submod_6 @@ -82,13 +82,13 @@ set msgtopun_10 \n\nmsg_top_unload $module_10 {} list $module_7 {} err_urequn $submod_7 set msgtopun_11 \n\nmsg_top_unload $module_11 {} {} {} err_urequn $submod_11 -set moderrun_5 msg_unload $submod_5 msg_moderr "unload-path $msg_patheqsep" "append-path\tPATH\t\t:" $submodfile_5 24$msgtopun_5 -set moderrun_6 msg_unload $submod_6 msg_moderr "$msg_invcmdname \"bad-command\"" {bad-command} $submodfile_6 29$msgtopun_6 -set moderrun_7 msg_unload $submod_7 "$err_file'$submodfile_7'"$msgtopun_7 -set moderrun_8 msg_unload $submod_5 msg_moderr "unload-path $msg_patheqsep" "append-path\tPATH\t\t:" $submodfile_5 24$msgtopun_8 -set moderrun_9 msg_unload $submod_6 msg_moderr "$msg_invcmdname \"bad-command\"" {bad-command} $submodfile_6 29$msgtopun_9 -set moderrun_10 msg_unload $submod_7 "$err_file'$submodfile_7'"$msgtopun_10 -set moderrun_11 msg_unload $submod_11 msg_moderr "unload-path $msg_patheqsep" "append-path\tPATH\t\t:" $submodfile_11 24$msgtopun_11 +set moderrun_5 msg_unload "$submod_5 <aL>" msg_moderr "append-path $msg_patheqsep" "append-path\tPATH\t\t:" $submodfile_5 24$msgtopun_5 +set moderrun_6 msg_unload "$submod_6 <aL>" msg_moderr "$msg_invcmdname \"bad-command\"" {bad-command} $submodfile_6 29$msgtopun_6 +set moderrun_7 msg_unload "$submod_7 <aL>" "$err_file'$submodfile_7'"$msgtopun_7 +set moderrun_8 msg_unload "$submod_5 <aL>" msg_moderr "append-path $msg_patheqsep" "append-path\tPATH\t\t:" $submodfile_5 24$msgtopun_8 +set moderrun_9 msg_unload "$submod_6 <aL>" msg_moderr "$msg_invcmdname \"bad-command\"" {bad-command} $submodfile_6 29$msgtopun_9 +set moderrun_10 msg_unload "$submod_7 <aL>" "$err_file'$submodfile_7'"$msgtopun_10 +set moderrun_11 msg_unload "$submod_11 <aL>" msg_moderr "append-path $msg_patheqsep" "append-path\tPATH\t\t:" $submodfile_11 24$msgtopun_11 # # The tests
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/151-module-onlytop.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/151-module-onlytop.exp
Changed
@@ -25,9 +25,9 @@ setenv_path_var MODULEPATH $modpath $modpath.3 -foreach subcmd list append-path prepend-path remove-path autoinit help is-loaded is-saved is-used is-avail path paths info-loaded clear config sh-to-mod edit refresh { +foreach subcmd list append-path prepend-path remove-path autoinit help is-loaded is-saved is-used is-avail path paths info-loaded clear config sh-to-mod edit refresh state { set module "modbad/$subcmd" - if {$subcmd in {refresh source}} { + if {$subcmd in {refresh source state}} { set modulefile "$modpath.3/$module" set modulefilere "$modpathre.3/$module" } else {
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/152-module-emptyarg.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/152-module-emptyarg.exp
Changed
@@ -43,7 +43,7 @@ # # wrong arg number if command does not accept any argument -foreach cmd list list purge reload aliases savelist { +foreach cmd list purge reload aliases savelist { testouterr_cmd "sh" "load $module/$cmd" "ERR" msg_load $module/$cmd msg_moderr "Unexpected number of args for '$cmd' command" "module $cmd {}" $modulepath/$module/$cmd 27 } @@ -56,6 +56,8 @@ } testouterr_cmd "sh" "load $module/unload" "ERR" msg_load $module/unload $err_emptymodname $err_emptymodname +testouterr_cmd "sh" "load $module/load-any" "ERR" msg_load $module/load-any err_reqlo {} {} + set ans list lappend ans list set _LMFILES_ "$modulepath/$module/try-load" lappend ans list set LOADEDMODULES "$module/try-load" @@ -109,6 +111,10 @@ lappend ans list set _LMFILES_ "$modulepath/$module/avail" lappend ans list set LOADEDMODULES "$module/avail" testouterr_cmd_re "sh" "load $module/avail" $ans ".+" +set ans list +lappend ans list set _LMFILES_ $modulepath/$module/list +lappend ans list set LOADEDMODULES $module/list +testouterr_cmd sh "load $module/list" $ans $no_loaded # @@ -116,13 +122,13 @@ # # wrong arg number if command does not accept any argument -foreach cmd list list purge reload aliases savelist { +foreach cmd list purge reload aliases savelist { setenv_loaded_module "$module/$cmd" "$modulepath/$module/$cmd" testouterr_cmd "sh" "unload $module/$cmd" "ERR" msg_unload $module/$cmd msg_moderr "Unexpected number of args for '$cmd' command" "module $cmd {}" $modulepath/$module/$cmd 27 } # on most module commands, empty arg leads to error -foreach cmd list load try-load unload { +foreach cmd list load load-any try-load unload { setenv_loaded_module "$module/$cmd" "$modulepath/$module/$cmd" set ans list lappend ans list unset _LMFILES_ @@ -176,6 +182,11 @@ lappend ans list unset _LMFILES_ lappend ans list unset LOADEDMODULES testouterr_cmd_re "sh" "unload $module/avail" $ans ".+" +setenv_loaded_module $module/list $modulepath/$module/list +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $module/list" $ans "$cur_matchingloaded\n 1) $module/list " # restore environment unsetenv_loaded_module @@ -195,7 +206,7 @@ # on all module commands, command line with empty arg is printed -foreach cmd list load try-load unload { +foreach cmd list load load-any try-load unload { # test both empty names {} and "" on same module command testouterr_cmd_re "sh" "display $module/$cmd" "OK" display_stderr_content "$modulepathre/$module/$cmd" "module\t\t$cmd {} {}" } @@ -223,7 +234,7 @@ } # on all module commands, command line is ignored -foreach cmd list load try-load unload use unuse list purge reload aliases savelist display test swap swap2 save restore saveshow saverm whatis apropos avail { +foreach cmd list load load-any try-load unload use unuse list purge reload aliases savelist display test swap swap2 save restore saveshow saverm whatis apropos avail { testouterr_cmd_re "sh" "help $module/$cmd" "OK" help_stderr_content "$modulepathre/$module/$cmd" "" 1 } @@ -245,7 +256,7 @@ } # on all module commands, command line is ignored -foreach cmd list load try-load unload use unuse list purge reload aliases savelist display test swap swap2 save restore saveshow saverm whatis apropos avail { +foreach cmd list load load-any try-load unload use unuse list purge reload aliases savelist display test swap swap2 save restore saveshow saverm whatis apropos avail { testouterr_cmd_re "sh" "test $module/$cmd" "OK" test_stderr_content "$modulepathre/$module/$cmd" "" 1 }
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/170-swap.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/170-swap.exp
Changed
@@ -50,7 +50,7 @@ set mod100p "$modpath/$mod100" set mod101 "bad2/body" set mod101p "$modpath/$mod101" -set mod102 "NonExistant" +set mod102 "NonExistent" set mod102p "$modpath/$mod102" set mod103 "module/err" set mod103p "$modpath/$mod103" @@ -65,10 +65,10 @@ set mod108 "module/lunk" set mod108p "$modpath/$mod108" -set mod100err msg_moderr "add-path $msg_patheqsep" "append-path\tPATH\t\t:" $mod100p 24 +set mod100err msg_moderr "append-path $msg_patheqsep" "append-path\tPATH\t\t:" $mod100p 24 set mod101err msg_moderr "$msg_invcmdname \"bad-command\"" {bad-command} $mod101p 29 set mod102err "$err_path'$mod102'" -set mod100errun msg_moderr "unload-path $msg_patheqsep" "append-path\tPATH\t\t:" $mod100p 24 +set mod100errun msg_moderr "append-path $msg_patheqsep" "append-path\tPATH\t\t:" $mod100p 24 set mod101errun $mod101err set mod102errun "$err_file'$mod102p'" @@ -272,7 +272,7 @@ lappend ans list set LOADEDMODULES $mod100:$mod11 } lappend ans list ERR -testouterr_cmd_re "sh" "swap $mod103 $mod11" $ans regsub -all {(.+?())} msg_unload $mod100 $mod100errun$msgtopsw_103 {\\\1} +testouterr_cmd_re "sh" "swap $mod103 $mod11" $ans regsub -all {(.+?())} msg_unload "$mod100 <aL>" $mod100errun$msgtopsw_103 {\\\1} setenv_loaded_module list $mod101 $mod104 list $mod101p $mod104p list $mod101 setenv_var __MODULES_LMPREREQ $mod104&$mod101 @@ -287,7 +287,7 @@ lappend ans list set LOADEDMODULES $mod101:$mod11 } lappend ans list ERR -testouterr_cmd_re "sh" "swap $mod104 $mod11" $ans regsub -all {(.+?())} msg_unload $mod101 $mod101errun$msgtopsw_104 {\\\1} +testouterr_cmd_re "sh" "swap $mod104 $mod11" $ans regsub -all {(.+?())} msg_unload "$mod101 <aL>" $mod101errun$msgtopsw_104 {\\\1} setenv_loaded_module list $mod102 $mod105 list $mod102p $mod105p list $mod102 setenv_var __MODULES_LMPREREQ $mod105&$mod102 @@ -302,7 +302,7 @@ lappend ans list set LOADEDMODULES $mod102:$mod11 } lappend ans list ERR -testouterr_cmd_re "sh" "swap $mod105 $mod11" $ans regsub -all {(.+?())} msg_unload $mod102 $mod102errun$msgtopsw_105 {\\\1} +testouterr_cmd_re "sh" "swap $mod105 $mod11" $ans regsub -all {(.+?())} msg_unload "$mod102 <aL>" $mod102errun$msgtopsw_105 {\\\1} setenv_loaded_module list $mod100 $mod103 $mod106 list $mod100p $mod103p $mod106p list $mod100 $mod103 setenv_var __MODULES_LMPREREQ $mod103&$mod100:$mod106&$mod103 @@ -318,7 +318,7 @@ } lappend ans list set __MODULES_LMTAG $mod100&auto-loaded lappend ans list ERR -testouterr_cmd_re "sh" "swap $mod106 $mod11" $ans regsub -all {(.+?())} msg_unload $mod100 $mod100errun$msgtopsw_106 {\\\1} +testouterr_cmd_re "sh" "swap $mod106 $mod11" $ans regsub -all {(.+?())} msg_unload "$mod100 <aL>" $mod100errun$msgtopsw_106 {\\\1} setenv_loaded_module list $mod101 $mod104 $mod107 list $mod101p $mod104p $mod107p list $mod101 $mod104 setenv_var __MODULES_LMPREREQ $mod104&$mod101:$mod107&$mod104 @@ -334,7 +334,7 @@ } lappend ans list set __MODULES_LMTAG $mod101&auto-loaded lappend ans list ERR -testouterr_cmd_re "sh" "swap $mod107 $mod11" $ans regsub -all {(.+?())} msg_unload $mod101 $mod101errun$msgtopsw_107 {\\\1} +testouterr_cmd_re "sh" "swap $mod107 $mod11" $ans regsub -all {(.+?())} msg_unload "$mod101 <aL>" $mod101errun$msgtopsw_107 {\\\1} setenv_loaded_module list $mod102 $mod105 $mod108 list $mod102p $mod105p $mod108p list $mod102 $mod105 setenv_var __MODULES_LMPREREQ $mod105&$mod102:$mod108&$mod105 @@ -350,7 +350,7 @@ } lappend ans list set __MODULES_LMTAG $mod102&auto-loaded lappend ans list ERR -testouterr_cmd_re "sh" "swap $mod108 $mod11" $ans regsub -all {(.+?())} msg_unload $mod102 $mod102errun$msgtopsw_108 {\\\1} +testouterr_cmd_re "sh" "swap $mod108 $mod11" $ans regsub -all {(.+?())} msg_unload "$mod102 <aL>" $mod102errun$msgtopsw_108 {\\\1} # # Test to swap-on module with issue, nothing loads @@ -396,7 +396,7 @@ testouterr_cmd "sh" "swap $mod11p $mod12p" "OK" "" -# inexistant modulefile to unload does not lead to error +# inexistent modulefile to unload does not lead to error testouterr_cmd "sh" "swap $modpath/unknown $mod100p" "ERR" msg_load $mod100p $mod100err\n\nmsg_switch $modpath/unknown $mod100p err_swon $mod100p testouterr_cmd "sh" "swap $mod11p $mod100p" "ERR" msg_load $mod100p $mod100err\n\nmsg_switch $mod11p $mod100p err_swon $mod100p
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/180-unload.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/180-unload.exp
Changed
@@ -44,9 +44,9 @@ # The tests # -# unload unkown module +# unload unknown module # no modulefile existence check, just look if loaded, no error if not -testouterr_cmd "sh" "unload NonExistant" OK {} +testouterr_cmd "sh" "unload NonExistent" OK {} # try with full path name forms # no modulefile existence check, just look if loaded, no error if not
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/190-load.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/190-load.exp
Changed
@@ -138,7 +138,7 @@ # # load already loaded module -# no environement modification, exit 0 +# no environment modification, exit 0 # test_cmd "ALL" "load $mod11" "OK" @@ -201,23 +201,23 @@ # # error when loading non existent module # -set unknonw "XYZ" +set unknown "XYZ" -testouterr_cmd "ALL" "load $unknonw" "ERR" "$err_path\'$unknonw\'" +testouterr_cmd "ALL" "load $unknown" "ERR" "$err_path\'$unknown\'" # # error when loading non existent module given as full path # -set unknonw "$env(TESTSUITEDIR)/XYZ" +set unknown "$env(TESTSUITEDIR)/XYZ" -testouterr_cmd "ALL" "load $unknonw" "ERR" "$err_file'$unknonw'" +testouterr_cmd "ALL" "load $unknown" "ERR" "$err_file'$unknown'" # try with other full path name forms (./ and ../) -set unknonw "$reldmodpath/XYZ" +set unknown "$reldmodpath/XYZ" set out_interr "$err_file'$modpath/XYZ'" -testouterr_cmd "sh" "load $unknonw" "ERR" $out_interr -set unknonw "$relddmodpath/XYZ" -testouterr_cmd "sh" "load $unknonw" "ERR" $out_interr +testouterr_cmd "sh" "load $unknown" "ERR" $out_interr +set unknown "$relddmodpath/XYZ" +testouterr_cmd "sh" "load $unknown" "ERR" $out_interr # # test with erroneous modulefile
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/260-getenv.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/260-getenv.exp
Changed
@@ -70,6 +70,120 @@ # test displaying testouterr_cmd_re "sh" "display $module" "OK" "$modlin\n$modulefilere:\n\nsetenv\t\ttestsuite \\\$TEST\nsetenv\t\ttestsuite2 \\\$TEST2\n$modlin" + +# +# test bad arguments +# + +setenv_var TESTSUITE_GETENV toomany1 +set ln expr {cmpversion $tclsh_version 8.5 < 1 ? {30} : {33}} +set tserr escre msg_load $module msg_moderr {wrong # args: should be "getenv ?--return-value? variable ?valifundef?"} {getenv TEST {} other<EXM>} $modulefile $ln +testouterr_cmd_re sh "load $module" ERR $tserr + +set tserr "$modlin +$modulefilere: + +setenv\\s*testsuite\\s*\\\$TEST +setenv\\s*testsuite2\\s*\\\$TEST2 +escre msg_moderr {wrong # args: should be "getenv ?--return-value? variable ?valifundef?"} {getenv TEST {} other<EXM>} $modulefile $ln { } +$modlin" +testouterr_cmd_re sh "display $module" ERR $tserr + +setenv_var TESTSUITE_GETENV toomany2 +set ln expr {cmpversion $tclsh_version 8.5 < 1 ? {30} : {36}} +set tserr escre msg_load $module msg_moderr {wrong # args: should be "getenv ?--return-value? variable ?valifundef?"} {getenv --return-value TEST {} other<EXM>} $modulefile $ln +testouterr_cmd_re sh "load $module" ERR $tserr + +setenv_var TESTSUITE_GETENV toofew1 +set ln expr {cmpversion $tclsh_version 8.5 < 1 ? {30} : {39}} +set tserr escre msg_load $module msg_moderr {wrong # args: should be "getenv ?--return-value? variable ?valifundef?"} {getenv<EXM>} $modulefile $ln +testouterr_cmd_re sh "load $module" ERR $tserr + +setenv_var TESTSUITE_GETENV toofew2 +set ans list +lappend ans list set testsuite2 yes +lappend ans list set testsuite3 {} +lappend ans list set _LMFILES_ $modulefile +lappend ans list set LOADEDMODULES $module +lappend ans list set testsuite yes +testouterr_cmd sh "load $module" $ans {} + +setenv_var TESTSUITE_GETENV misplaced1 +unsetenv_var TEST +set ans list +lappend ans list set testsuite2 yes +lappend ans list set testsuite3 --return-value +lappend ans list set _LMFILES_ $modulefile +lappend ans list set LOADEDMODULES $module +lappend ans list set testsuite {} +testouterr_cmd sh "load $module" $ans {} + +setenv_var TESTSUITE_GETENV misplaced2 +set ln expr {cmpversion $tclsh_version 8.5 < 1 ? {30} : {48}} +set tserr escre msg_load $module msg_moderr {wrong # args: should be "getenv ?--return-value? variable ?valifundef?"} {getenv TEST foo --return-value<EXM>} $modulefile $ln +testouterr_cmd_re sh "load $module" ERR $tserr + +setenv_var TESTSUITE_GETENV return1 +set ans list +lappend ans list set testsuite2 yes +lappend ans list set testsuite3 {} +lappend ans list set _LMFILES_ $modulefile +lappend ans list set LOADEDMODULES $module +lappend ans list set testsuite {} +testouterr_cmd sh "load $module" $ans {} + +set tserr "$modlin +$modulefilere: + +setenv\\s*testsuite\\s*\\\$TEST +setenv\\s*testsuite2\\s*\\\$TEST2 +setenv\\s*testsuite3\\s*{} +$modlin" +testouterr_cmd_re sh "display $module" OK $tserr + +setenv_var TEST bar + +set ans list +lappend ans list set testsuite2 yes +lappend ans list set testsuite3 bar +lappend ans list set _LMFILES_ $modulefile +lappend ans list set LOADEDMODULES $module +lappend ans list set testsuite bar +testouterr_cmd sh "load $module" $ans {} + +set tserr "$modlin +$modulefilere: + +setenv\\s*testsuite\\s*\\\$TEST +setenv\\s*testsuite2\\s*\\\$TEST2 +setenv\\s*testsuite3\\s*bar +$modlin" +testouterr_cmd_re sh "display $module" OK $tserr + +setenv_var TESTSUITE_GETENV return2 +testouterr_cmd sh "load $module" $ans {} +testouterr_cmd_re sh "display $module" OK $tserr + +unsetenv_var TEST + +set ans list +lappend ans list set testsuite2 yes +lappend ans list set testsuite3 foo +lappend ans list set _LMFILES_ $modulefile +lappend ans list set LOADEDMODULES $module +lappend ans list set testsuite {} +testouterr_cmd sh "load $module" $ans {} + +set tserr "$modlin +$modulefilere: + +setenv\\s*testsuite\\s*\\\$TEST +setenv\\s*testsuite2\\s*\\\$TEST2 +setenv\\s*testsuite3\\s*foo +$modlin" +testouterr_cmd_re sh "display $module" OK $tserr + + # # Cleanup #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/282-info-command.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/282-info-command.exp
Changed
@@ -57,6 +57,9 @@ # test try-loading testouterr_cmd sh "try-load $module" $ans try-load +# test load-any +testouterr_cmd sh "load-any $module" $ans load-any + # test displaying testouterr_cmd_re "sh" "display $module" "OK" "$modlin\n$modulefilere:\n\ndisplay\n$modlin"
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/283-info-command-exp.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/283-info-command-exp.exp
Changed
@@ -57,6 +57,9 @@ # test try-loading testouterr_cmd sh "try-load $module" $ans try-load +# test load-any +testouterr_cmd sh "load-any $module" $ans load-any + # test displaying testouterr_cmd_re "sh" "display $module" "OK" "$modlin\n$modulefilere:\n\ndisplay\n$modlin"
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/288-info-tags.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/288-info-tags.exp
Changed
@@ -61,7 +61,7 @@ lappend ans list set TS3 0 lappend ans list set __MODULES_LMTAG info/tags&nearly-forbidden lappend ans list set TS4 0 -set tserr msg_load info/tags err_accessnearlydenied $tomorrow +set tserr msg_load {info/tags <nF>} err_accessnearlydenied $tomorrow testouterr_cmd sh {load info/tags} $ans $tserr skip_if_quick_mode
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/310-puts.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/310-puts.exp
Changed
@@ -242,9 +242,9 @@ lappend ans list out "textout1textout2\ntextout3" set tserr "(.*)+ -DEBUG \\\#2:load:puts/8\\\ putsModfileCmd: .* textout1 \\(itrp=__modfile_load_2\\) -DEBUG \\\#2:load:puts/8\\\ putsModfileCmd: .* textout2 \\(itrp=__modfile_load_2\\) -DEBUG \\\#2:load:puts/8\\\ putsModfileCmd: .* textout3 \\(itrp=__modfile_load_2\\) +DEBUG \\\#2:load:puts/8\\\ execute-modulefile: puts -nonewline \\w* textout1 +DEBUG \\\#2:load:puts/8\\\ execute-modulefile: puts \\w* textout2 +DEBUG \\\#2:load:puts/8\\\ execute-modulefile: puts -nonewline \\w* textout3 (.*)+" testouterr_cmd_re sh {load -D puts/9} $ans $tserr
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/311-puts-prestdout.exp
Added
@@ -0,0 +1,134 @@ +############################################################################## +# Modules Revision 3.0 +# Providing a flexible user environment +# +# File: modules.50-cmds/%M% +# Revision: %I% +# First Edition: 2022/01/09 +# Last Mod.: %U%, %G% +# +# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr +# +# Description: Testuite testsequence +# Command: load +# Modulefiles: puts +# Sub-Command: +# +# Comment: %C{ +# Test puts modulefile command on prestdout channel +# }C% +# +############################################################################## + +set mp $modpath.3 +set mpre $modpathre.3 +setenv_path_var MODULEPATH $mp + +set mod puts/prestdout +set modfile $mp/$mod +set modfilere $mpre/$mod + + +setenv_var TESTSUITE_PUTS prestdout1 + +# test loading +set ans list +lappend ans list out textpreout1 +if {$install_advversspec eq {y}} { + lappend ans list set __MODULES_LMALTNAME $mod&as|puts/default&as|puts/latest +} +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set testsuite ok +testouterr_cmd sh "load $mod" $ans {} + +# test displaying +set ans list +lappend ans list out textpreout1 +set tserr "$modlin\n$modfilere:\n\nsetenv\t\ttestsuite ok\n$modlin" +testouterr_cmd_re sh "display $mod" $ans $tserr + +# test unloading +setenv_loaded_module list $mod list $modfile +set ans list +lappend ans list out textpreout1 +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list unset testsuite +testouterr_cmd sh "unload $mod" $ans {} +unsetenv_loaded_module + +skip_if_quick_mode + + +setenv_var TESTSUITE_PUTS prestdout2 + +# test loading +set ans list +lappend ans list out textpreout1 +if {$install_advversspec eq {y}} { + lappend ans list set __MODULES_LMALTNAME $mod&as|puts/default&as|puts/latest +} +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set testsuite ok +lappend ans list out textout1 +lappend ans list out prestdout1prestdout2 +testouterr_cmd sh "load $mod" $ans {} + +# test displaying +set ans list +lappend ans list out textpreout1 +lappend ans list out textout1 +lappend ans list out prestdout1prestdout2 +set tserr "$modlin\n$modfilere:\n\nsetenv\t\ttestsuite ok\n$modlin" +testouterr_cmd_re sh "display $mod" $ans $tserr + +# test unloading +setenv_loaded_module list $mod list $modfile +set ans list +lappend ans list out textpreout1 +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list unset testsuite +lappend ans list out textout1 +lappend ans list out prestdout1prestdout2 +testouterr_cmd sh "unload $mod" $ans {} +unsetenv_loaded_module + + +setenv_var TESTSUITE_PUTS prestdout3 + +# test loading +set ans list +lappend ans list out textpreout1textpreout2 +if {$install_advversspec eq {y}} { + lappend ans list set __MODULES_LMALTNAME $mod&as|puts/default&as|puts/latest +} +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set testsuite ok +testouterr_cmd sh "load $mod" $ans {} + +# test displaying +set ans list +lappend ans list out textpreout1textpreout2 +set tserr "$modlin\n$modfilere:\n\nsetenv\t\ttestsuite ok\n$modlin" +testouterr_cmd_re sh "display $mod" $ans $tserr + +# test unloading +setenv_loaded_module list $mod list $modfile +set ans list +lappend ans list out textpreout1textpreout2 +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list unset testsuite +testouterr_cmd sh "unload $mod" $ans {} +unsetenv_loaded_module + + +# +# Cleanup +# + +reset_test_env
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/350-allin.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/350-allin.exp
Changed
@@ -219,7 +219,7 @@ $collpathre/default: module use --append $modulepathre -module load --notuasked $moduleif_implicitdefault {} /5 +module load --tag=auto-loaded $moduleif_implicitdefault {} /5 module load $module/1 $modlin
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/370-deps-bis.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/370-deps-bis.exp
Changed
@@ -51,9 +51,9 @@ lappend ans list unset _LMFILES_ lappend ans list unset LOADEDMODULES lappend ans list unset __MODULES_LMTAG -testouterr_cmd "sh" "unload mc" $ans msg_top_unload mc mb {} {} +testouterr_cmd "sh" "unload mc" $ans msg_top_unload {mc <aL>} mb {} {} } else { -testouterr_cmd "sh" "unload mc" ERR msg_unload mc err_prerequn mb +testouterr_cmd "sh" "unload mc" ERR msg_unload {mc <aL>} err_prerequn mb } unsetenv_var __MODULES_LMCONFLICT @@ -71,15 +71,15 @@ testouterr_cmd "sh" "load md" "ERR" msg_load mc err_conloi md\n\nmsg_load md err_reqlo mc -testouterr_cmd "sh" "load me" "ERR" msg_unload mc err_deplo mb\n\nmsg_load mf err_conlo mc\n\nmsg_load me err_conun mc err_reqlo mf +testouterr_cmd "sh" "load me" "ERR" msg_unload {mc <aL>} err_deplo mb\n\nmsg_load mf err_conlo mc\n\nmsg_load me err_conun mc err_reqlo mf testouterr_cmd "sh" "load mg" "ERR" msg_load mb err_conlo ma\n\nmsg_load mg err_reqlo mb -testouterr_cmd "sh" "load mh" "ERR" msg_unload mb err_deplo mh\n\nmsg_load ma err_conlo mb\n\nmsg_load mh err_conun mb err_reqlo ma +testouterr_cmd "sh" "load mh" "ERR" msg_unload {mb <aL>} err_deplo mh\n\nmsg_load ma err_conlo mb\n\nmsg_load mh err_conun mb err_reqlo ma -testouterr_cmd "sh" "load mi" "ERR" msg_unload mb err_deplo mi\n\nmsg_load ma err_conlo mb\n\nmsg_load mi err_conun mb err_reqlo ma +testouterr_cmd "sh" "load mi" "ERR" msg_unload {mb <aL>} err_deplo mi\n\nmsg_load ma err_conlo mb\n\nmsg_load mi err_conun mb err_reqlo ma -testouterr_cmd "sh" "load mk" "ERR" msg_unload mc err_deplo mk\n\nmsg_load mk err_conun mc +testouterr_cmd "sh" "load mk" "ERR" msg_unload {mc <aL>} err_deplo mk\n\nmsg_load mk err_conun mc testouterr_cmd "sh" "load ml" "ERR" msg_load mc err_conlo mf\n\nmsg_load mb err_reqmis mc\n\nmsg_load ml err_reqlo mc err_reqlo mb @@ -91,7 +91,7 @@ testouterr_cmd "sh" "load mp" "ERR" msg_load ma err_conloi mp\n\nmsg_load mp err_reqlo ma -testouterr_cmd "sh" "load mq" "ERR" msg_unload mb err_deplo mi\n\nmsg_load ma err_conlo mb\n\nmsg_load mi err_reqmis ma\n\nmsg_load mq err_conun mb err_reqlo ma err_reqlo mi +testouterr_cmd "sh" "load mq" "ERR" msg_unload {mb <aL>} err_deplo mi\n\nmsg_load ma err_conlo mb\n\nmsg_load mi err_reqmis ma\n\nmsg_load mq err_conun mb err_reqlo ma err_reqlo mi set ans list lappend ans list set __MODULES_LMCONFLICT "mc&mc"
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/370-deps.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/370-deps.exp
Changed
@@ -44,7 +44,7 @@ lappend ans list unset _LMFILES_ lappend ans list unset LOADEDMODULES lappend ans list unset __MODULES_LMTAG -testouterr_cmd "sh" "unload c" $ans msg_top_unload c b {} {} +testouterr_cmd "sh" "unload c" $ans msg_top_unload {c <aL>} b {} {} unsetenv_var __MODULES_LMCONFLICT unsetenv_var __MODULES_LMPREREQ
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/371-deps2.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/371-deps2.exp
Changed
@@ -154,7 +154,7 @@ testouterr_cmd_re "sh" "unload bj bk" $ans msg_top_unload bk {} list ac aa {} -# unload tests where some deps have been loaded explicitely +# unload tests where some deps have been loaded explicitly setenv_loaded_module list ac ad ae list "$mp/ac" "$mp/ad" "$mp/ae" list ac setenv_var __MODULES_LMPREREQ "ad&ac:ae&ad"
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/372-deps3.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/372-deps3.exp
Changed
@@ -55,7 +55,7 @@ # prereq consistency check # no test possible with equal results between --auto and --no-auto modes -# due to DepUn mecahnism +# due to DepUn mechanism # restore environment unsetenv_var __MODULES_LMCONFLICT @@ -65,9 +65,9 @@ # check warning raised when using --auto/--no-auto from modulefile # confusing error messages obtained due to load then unload of same modulefile (which is thus defined as a conflict and a prereq) if {$install_autohandling eq {y}} { - set tserr msg_unload ms err_deplo mu\n\nmsg_load mu "$warn_msgs: Unsupported option '--auto'" "$warn_msgs: Unsupported option '--auto'" "$warn_msgs: Unsupported option '--no-auto'" err_conun ms + set tserr msg_unload {ms <aL>} err_deplo mu\n\nmsg_load mu "$warn_msgs: Unsupported option '--auto'" "$warn_msgs: Unsupported option '--auto'" "$warn_msgs: Unsupported option '--no-auto'" err_conun ms } else { - set tserr msg_unload ms err_deplo mu\n\nmsg_load mu "$warn_msgs: Unsupported option '--auto'" "$warn_msgs: Unsupported option '--auto'" err_swoff ms "$warn_msgs: Unsupported option '--no-auto'" err_conlo ms + set tserr msg_unload {ms <aL>} err_deplo mu\n\nmsg_load mu "$warn_msgs: Unsupported option '--auto'" "$warn_msgs: Unsupported option '--auto'" err_swoff ms "$warn_msgs: Unsupported option '--no-auto'" err_conlo ms } testouterr_cmd "sh" "load mu" ERR $tserr
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/373-deps4.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/373-deps4.exp
Changed
@@ -119,7 +119,7 @@ lappend ans list set _LMFILES_ "$mp/cb:$mp/cc:$mp/cd:$mp/ce:$mp/cf:$mp/cg" lappend ans list set LOADEDMODULES "cb:cc:cd:ce:cf:cg" lappend ans list set __MODULES_LMTAG cc&auto-loaded:cd&auto-loaded:cf&auto-loaded -set tserr list "unload cg" "unload cf" "unload ce" "unload cd" "unload cc" "unload ca" "load cc" "load cd" "load ce" "load cf" "load cg" \nmsg_top_unload ca {} {} list cc cd ce cf cg +set tserr list "unload cg" "unload cf" "unload ce" "unload cd" "unload cc" "unload ca" "load cc" "load cd" "load ce" "load cf" "load cg" \nmsg_top_unload {ca <aL>} {} {} list cc cd ce cf cg testouterr_cmd_re "sh" "unload ca" $ans join $tserr "\n" # unload optional second-in-list prereq module @@ -462,7 +462,7 @@ lappend ans list unset _LMFILES_ lappend ans list unset LOADEDMODULES lappend ans list unset __MODULES_LMTAG -set tserr list "unload h51" "unload h50" \nmsg_top_unload h50 h51 {} {} +set tserr list "unload h51" "unload h50" \nmsg_top_unload {h50 <aL>} h51 {} {} testouterr_cmd_re "sh" "unload h50" $ans join $tserr "\n" setenv_loaded_module list h50 h51 h53 h54 list "$mp/h50" "$mp/h51" "$mp/h53" "$mp/h54" list h50 @@ -472,7 +472,7 @@ lappend ans list unset _LMFILES_ lappend ans list unset LOADEDMODULES lappend ans list unset __MODULES_LMTAG -set tserr list "unload h54" "unload h53" "unload h51" "unload h50" \nmsg_top_unload h50 list h54 h53 h51 {} {} +set tserr list "unload h54" "unload h53" "unload h51" "unload h50" \nmsg_top_unload {h50 <aL>} list h54 h53 h51 {} {} testouterr_cmd_re "sh" "unload h50" $ans join $tserr "\n" setenv_loaded_module list h50 h51 h52 list "$mp/h50" "$mp/h51" "$mp/h52" @@ -535,11 +535,12 @@ lappend ans list unset _LMFILES_ lappend ans list unset LOADEDMODULES lappend ans list unset __MODULES_LMTAG -set tserr list "unload h62" "unload h60" "unload h61" \nmsg_top_unload h60 h62 h61 {} +set tserr list "unload h62" "unload h60" "unload h61" \nmsg_top_unload {h60 <aL>} h62 h61 {} testouterr_cmd_re "sh" "unload h60" $ans join $tserr "\n" setenv_loaded_module list h60 h61 h62 list "$mp/h60" "$mp/h61" "$mp/h62" list h61 setenv_var __MODULES_LMPREREQ "h62&h60&h61" +set tserr list "unload h62" "unload h60" "unload h61" \nmsg_top_unload h60 h62 h61 {} testouterr_cmd_re "sh" "unload h60" $ans join $tserr "\n" # try DepUn UReqUn impact with main module in prereq violation (h60) @@ -550,7 +551,7 @@ setenv_loaded_module list h60 h61 h62 h63 list "$mp/h60" "$mp/h61" "$mp/h62" "$mp/h63" list h60 h61 setenv_var __MODULES_LMPREREQ "h62&h60&h61:h63&h61&h62" -set tserr list "unload h63" "unload h62" "unload h60" "unload h61" \nmsg_top_unload h60 list h63 h62 h61 {} +set tserr list "unload h63" "unload h62" "unload h60" "unload h61" \nmsg_top_unload {h60 <aL>} list h63 h62 h61 {} testouterr_cmd_re "sh" "unload h60" $ans join $tserr "\n" setenv_loaded_module list h60 h61 h62 h63 list "$mp/h60" "$mp/h61" "$mp/h62" "$mp/h63" list h60 @@ -560,7 +561,7 @@ lappend ans list set _LMFILES_ "$mp/h61" lappend ans list set LOADEDMODULES "h61" lappend ans list unset __MODULES_LMTAG -set tserr list "unload h63" "unload h62" "unload h60" \nmsg_top_unload h60 list h63 h62 {} {} +set tserr list "unload h63" "unload h62" "unload h60" \nmsg_top_unload {h60 <aL>} list h63 h62 {} {} testouterr_cmd_re "sh" "unload h60" $ans join $tserr "\n" setenv_loaded_module list h60 h61 h62 h63 h64 list "$mp/h60" "$mp/h61" "$mp/h62" "$mp/h63" "$mp/h64" list h60 h61 @@ -570,7 +571,7 @@ lappend ans list set _LMFILES_ "$mp/h61:$mp/h64" lappend ans list set LOADEDMODULES "h61:h64" lappend ans list set __MODULES_LMTAG h61&auto-loaded -set tserr list "unload h63" "unload h62" "unload h60" \nmsg_top_unload h60 list h63 h62 {} {} +set tserr list "unload h63" "unload h62" "unload h60" \nmsg_top_unload {h60 <aL>} list h63 h62 {} {} testouterr_cmd_re "sh" "unload h60" $ans join $tserr "\n" @@ -584,7 +585,7 @@ lappend ans list set _LMFILES_ "$mp/h60:$mp/h65" lappend ans list set LOADEDMODULES "h60:h65" lappend ans list set __MODULES_LMTAG h60&auto-loaded -set tserr list "unload h65" "unload h62" "unload h61" "load h65" \nmsg_top_unload h61 h62 {} h65 +set tserr list "unload h65" "unload h62" "unload h61" "load h65" \nmsg_top_unload {h61 <aL>} h62 {} h65 testouterr_cmd_re "sh" "unload h61" $ans join $tserr "\n" # same test, but a prereq violation exists for both h62 and h65 @@ -594,7 +595,7 @@ lappend ans list set _LMFILES_ "$mp/h65" lappend ans list set LOADEDMODULES "h65" lappend ans list unset __MODULES_LMTAG -set tserr list "unload h62" "unload h61" \nmsg_top_unload h61 h62 {} {} +set tserr list "unload h62" "unload h61" \nmsg_top_unload {h61 <aL>} h62 {} {} testouterr_cmd_re "sh" "unload h61" $ans join $tserr "\n" setenv_loaded_module list h60 h61 h62 h66 list "$mp/h60" "$mp/h61" "$mp/h62" "$mp/h66" list h60 h61 @@ -605,7 +606,7 @@ lappend ans list set _LMFILES_ "$mp/h60:$mp/h66" lappend ans list set LOADEDMODULES "h60:h66" lappend ans list set __MODULES_LMTAG h60&auto-loaded -set tserr list "unload h66" "unload h62" "unload h61" "load h66" \nmsg_top_unload h61 h62 {} h66 +set tserr list "unload h66" "unload h62" "unload h61" "load h66" \nmsg_top_unload {h61 <aL>} h62 {} h66 testouterr_cmd_re "sh" "unload h61" $ans join $tserr "\n" setenv_loaded_module list h60 h61 h62 h65 h66 list "$mp/h60" "$mp/h61" "$mp/h62" "$mp/h65" "$mp/h66" list h60 h61 @@ -617,7 +618,7 @@ lappend ans list set _LMFILES_ "$mp/h60:$mp/h65:$mp/h66" lappend ans list set LOADEDMODULES "h60:h65:h66" lappend ans list set __MODULES_LMTAG h60&auto-loaded -set tserr list "unload h66" "unload h65" "unload h62" "unload h61" "load h65" "load h66" \nmsg_top_unload h61 h62 {} list h65 h66 +set tserr list "unload h66" "unload h65" "unload h62" "unload h61" "load h65" "load h66" \nmsg_top_unload {h61 <aL>} h62 {} list h65 h66 testouterr_cmd_re "sh" "unload h61" $ans join $tserr "\n" setenv_loaded_module list h60 h61 h62 h65 h68 h67 list "$mp/h60" "$mp/h61" "$mp/h62" "$mp/h65" "$mp/h68" "$mp/h67" list h60 h61 h68 @@ -628,7 +629,7 @@ lappend ans list set _LMFILES_ "$mp/h60:$mp/h68:$mp/h65:$mp/h67" lappend ans list set LOADEDMODULES "h60:h68:h65:h67" lappend ans list set __MODULES_LMTAG h60&auto-loaded:h68&auto-loaded -set tserr list "unload h67" "unload h65" "unload h62" "unload h61" "load h65" "load h67" \nmsg_top_unload h61 h62 {} list h65 h67 +set tserr list "unload h67" "unload h65" "unload h62" "unload h61" "load h65" "load h67" \nmsg_top_unload {h61 <aL>} h62 {} list h65 h67 testouterr_cmd_re "sh" "unload h61" $ans join $tserr "\n" setenv_loaded_module list h60 h61 h62 h65 h68 h67 h70 h69 list "$mp/h60" "$mp/h61" "$mp/h62" "$mp/h65" "$mp/h68" "$mp/h67" "$mp/h70" "$mp/h69" list h60 h61 h68 h70 @@ -639,7 +640,7 @@ lappend ans list set _LMFILES_ "$mp/h60:$mp/h68:$mp/h65:$mp/h67" lappend ans list set LOADEDMODULES "h60:h68:h65:h67" lappend ans list set __MODULES_LMTAG h60&auto-loaded:h68&auto-loaded -set tserr list "unload h67" "unload h65" "unload h69" "unload h62" "unload h61" "unload h70" "load h65" "load h67" \nmsg_top_unload h61 list h69 h62 h70 list h65 h67 +set tserr list "unload h67" "unload h65" "unload h69" "unload h62" "unload h61" "unload h70" "load h65" "load h67" \nmsg_top_unload {h61 <aL>} list h69 h62 h70 list h65 h67 testouterr_cmd_re "sh" "unload h61" $ans join $tserr "\n" @@ -653,7 +654,7 @@ lappend ans list set _LMFILES_ "$mp/h72" lappend ans list set LOADEDMODULES "h72" lappend ans list unset __MODULES_LMTAG -set tserr list "unload h72" "unload h71" "unload h62" "unload h61" "unload h60" "load h72" \nmsg_top_unload h61 list h71 h62 h60 h72 +set tserr list "unload h72" "unload h71" "unload h62" "unload h61" "unload h60" "load h72" \nmsg_top_unload {h61 <aL>} list h71 h62 h60 h72 testouterr_cmd_re "sh" "unload h61" $ans join $tserr "\n" setenv_loaded_module list h60 h61 h62 h63 h72 list "$mp/h60" "$mp/h61" "$mp/h62" "$mp/h63" "$mp/h72" list h60 h61 @@ -665,7 +666,7 @@ lappend ans list set _LMFILES_ "$mp/h72" lappend ans list set LOADEDMODULES "h72" lappend ans list unset __MODULES_LMTAG -set tserr list "unload h72" "unload h63" "unload h62" "unload h61" "unload h60" "load h72" \nmsg_top_unload h61 list h63 h62 h60 h72 +set tserr list "unload h72" "unload h63" "unload h62" "unload h61" "unload h60" "load h72" \nmsg_top_unload {h61 <aL>} list h63 h62 h60 h72 testouterr_cmd_re "sh" "unload h61" $ans join $tserr "\n" # multiple DepUn modules triggering DepRe @@ -677,7 +678,7 @@ lappend ans list set _LMFILES_ "$mp/h73:$mp/h74" lappend ans list set LOADEDMODULES "h73:h74" lappend ans list unset __MODULES_LMTAG -set tserr list "unload h74" "unload h71" "unload h62" "unload h61" "unload h60" "load h74" \nmsg_top_unload h61 list h71 h62 h60 h74 +set tserr list "unload h74" "unload h71" "unload h62" "unload h61" "unload h60" "load h74" \nmsg_top_unload {h61 <aL>} list h71 h62 h60 h74 testouterr_cmd_re "sh" "unload h61" $ans join $tserr "\n" setenv_loaded_module list h60 h61 h62 h63 h73 h74 list "$mp/h60" "$mp/h61" "$mp/h62" "$mp/h63" "$mp/h73" "$mp/h74" list h60 h61 @@ -688,7 +689,7 @@ lappend ans list set _LMFILES_ "$mp/h73:$mp/h74" lappend ans list set LOADEDMODULES "h73:h74" lappend ans list unset __MODULES_LMTAG -set tserr list "unload h74" "unload h63" "unload h62" "unload h61" "unload h60" "load h74" \nmsg_top_unload h61 list h63 h62 h60 h74 +set tserr list "unload h74" "unload h63" "unload h62" "unload h61" "unload h60" "load h74" \nmsg_top_unload {h61 <aL>} list h63 h62 h60 h74 testouterr_cmd_re "sh" "unload h61" $ans join $tserr "\n" @@ -701,7 +702,7 @@ lappend ans list unset _LMFILES_ lappend ans list unset LOADEDMODULES lappend ans list unset __MODULES_LMTAG -set tserr list {unload id} {unload ic} {unload ib} {unload ia} \nmsg_top_unload ia list id ic ib {} {} +set tserr list {unload id} {unload ic} {unload ib} {unload ia} \nmsg_top_unload {ia <aL>} list id ic ib {} {} testouterr_cmd_re sh {unload ia} $ans join $tserr \n
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/374-deps5.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/374-deps5.exp
Changed
@@ -43,7 +43,7 @@ lappend ans list set LOADEDMODULES "de:df:dg" lappend ans list set __MODULES_LMTAG df&auto-loaded set tserr list "unload dg" "unload df" "unload dd" "load de" "load df" "load dg" -testouterr_cmd_re "sh" "switch dd de" $ans join $tserr "\n"\n\nmsg_top_switch dd de {} {} {} {} list df dg +testouterr_cmd_re "sh" "switch dd de" $ans join $tserr "\n"\n\nmsg_top_switch {dd <aL>} de {} {} {} {} list df dg # dependency chain loaded with second-operational-in-list prereq module loaded @@ -59,7 +59,7 @@ lappend ans list set LOADEDMODULES "dd:df:dg" lappend ans list set __MODULES_LMTAG df&auto-loaded set tserr list "unload dg" "unload df" "unload de" "load dd" "load df" "load dg" -testouterr_cmd_re "sh" "switch de dd" $ans join $tserr "\n"\n\nmsg_top_switch de dd {} {} {} {} list df dg +testouterr_cmd_re "sh" "switch de dd" $ans join $tserr "\n"\n\nmsg_top_switch {de <aL>} dd {} {} {} {} list df dg skip_if_quick_mode @@ -72,7 +72,7 @@ lappend ans list unset __MODULES_LMTAG lappend ans list ERR set tserr list "unload dg" "unload df" "unload de" "load da" "load df" -testouterr_cmd_re "sh" "switch de da" $ans join $tserr "\n"\n\nmsg_load df err_conlo da\n\nmsg_load dg err_reqmis df\n\nmsg_top_switch de da {} {} {} {} list list dg df list err_depref df err_depref dg +testouterr_cmd_re "sh" "switch de da" $ans join $tserr "\n"\n\nmsg_load df err_conlo da\n\nmsg_load dg err_reqmis df\n\nmsg_top_switch {de <aL>} da {} {} {} {} list list dg df list err_depref df err_depref dg set ans list lappend ans list unset __MODULES_LMCONFLICT @@ -82,7 +82,7 @@ lappend ans list set __MODULES_LMTAG df&auto-loaded lappend ans list ERR set tserr list "unload dg" "unload df" "unload de" "load db" "load df" -testouterr_cmd_re "sh" "switch de db" $ans join $tserr "\n"\n\nmsg_load dg err_conlo db\n\nmsg_top_switch de db {} {} {} {} list list dg df list df err_depref dg +testouterr_cmd_re "sh" "switch de db" $ans join $tserr "\n"\n\nmsg_load dg err_conlo db\n\nmsg_top_switch {de <aL>} db {} {} {} {} list list dg df list df err_depref dg set ans list lappend ans list unset __MODULES_LMCONFLICT @@ -92,7 +92,7 @@ lappend ans list unset __MODULES_LMTAG lappend ans list ERR set tserr list "unload dg" "unload df" "unload de" "load dc" -testouterr_cmd_re "sh" "switch de dc" $ans join $tserr "\n"\n\nmsg_load dc $err_evalabort\n\nmsg_load df err_reqmis da db dc dd de\n\nmsg_load dg err_reqmis df\n\nmsg_top_switch de dc {} {} {} {} list list dg df list err_swon dc err_depref df err_depref dg +testouterr_cmd_re "sh" "switch de dc" $ans join $tserr "\n"\n\nmsg_load dc $err_evalabort\n\nmsg_load df err_reqmis da db dc dd de\n\nmsg_load dg err_reqmis df\n\nmsg_top_switch {de <aL>} dc {} {} {} {} list list dg df list err_swon dc err_depref df err_depref dg # dependency chain loaded with second-operational-in-list prereq module loaded and an individual module loaded @@ -108,7 +108,7 @@ lappend ans list unset __MODULES_LMTAG lappend ans list ERR set tserr list "unload dg" "unload df" "unload de" "load ea" -testouterr_cmd_re "sh" "switch df ea" $ans join $tserr "\n"\n\nmsg_load ea $err_evalabort\n\nmsg_load dg err_reqmis df\n\nmsg_top_switch df ea {} de {} {} list list dg list err_swon ea err_depref dg +testouterr_cmd_re "sh" "switch df ea" $ans join $tserr "\n"\n\nmsg_load ea $err_evalabort\n\nmsg_load dg err_reqmis df\n\nmsg_top_switch {df <aL>} ea {} de {} {} list list dg list err_swon ea err_depref dg set ans list lappend ans list set __MODULES_LMCONFLICT "eb&dg" @@ -119,7 +119,7 @@ lappend ans list ERR set tserr list "unload dg" "unload df" "unload de" "load eb" # as load is attempted to see if conflict solves, returned error for dg is about missing prereq -testouterr_cmd_re "sh" "switch df eb" $ans join $tserr "\n"\n\nmsg_load dg err_reqmis df\n\nmsg_top_switch df eb {} de {} {} list list dg list err_depref dg +testouterr_cmd_re "sh" "switch df eb" $ans join $tserr "\n"\n\nmsg_load dg err_reqmis df\n\nmsg_top_switch {df <aL>} eb {} de {} {} list list dg list err_depref dg set ans list lappend ans list unset __MODULES_LMCONFLICT @@ -129,7 +129,7 @@ lappend ans list unset __MODULES_LMTAG lappend ans list ERR set tserr list "unload dg" "unload df" "unload de" "load ea" -testouterr_cmd_re "sh" "switch df ec" $ans join $tserr "\n"\n\nmsg_load ea $err_evalabort\n\nmsg_load ec err_reqmis ea\n\nmsg_load dg err_reqmis df\n\nmsg_top_switch df ec {} de {} {} list list dg list err_reqlo ea err_swon ec err_depref dg +testouterr_cmd_re "sh" "switch df ec" $ans join $tserr "\n"\n\nmsg_load ea $err_evalabort\n\nmsg_load ec err_reqmis ea\n\nmsg_load dg err_reqmis df\n\nmsg_top_switch {df <aL>} ec {} de {} {} list list dg list err_reqlo ea err_swon ec err_depref dg set ans list lappend ans list set __MODULES_LMCONFLICT "eb&dg" @@ -140,7 +140,7 @@ lappend ans list ERR set tserr list "unload dg" "unload df" "unload de" "load eb" "load ed" # as load is attempted to see if conflict solves, returned error for dg is about missing prereq -testouterr_cmd_re "sh" "switch df ed" $ans join $tserr "\n"\n\nmsg_load dg err_reqmis df\n\nmsg_top_switch df ed {} de {} eb list list dg list err_depref dg +testouterr_cmd_re "sh" "switch df ed" $ans join $tserr "\n"\n\nmsg_load dg err_reqmis df\n\nmsg_top_switch {df <aL>} ed {} de {} eb list list dg list err_depref dg set ans list lappend ans list set __MODULES_LMCONFLICT "ee&de" @@ -150,7 +150,7 @@ lappend ans list unset __MODULES_LMTAG lappend ans list ERR set tserr list "unload dg" "unload df" "unload de" "load ee" -testouterr_cmd_re "sh" "switch df ee" $ans join $tserr "\n"\n\nmsg_load dg err_reqmis df\n\nmsg_top_switch df ee {} de {} {} list list dg list err_depref dg +testouterr_cmd_re "sh" "switch df ee" $ans join $tserr "\n"\n\nmsg_load dg err_reqmis df\n\nmsg_top_switch {df <aL>} ee {} de {} {} list list dg list err_depref dg set ans list lappend ans list set __MODULES_LMCONFLICT "ee&de" @@ -160,7 +160,7 @@ lappend ans list set __MODULES_LMTAG ee&auto-loaded lappend ans list ERR set tserr list "unload dg" "unload df" "unload de" "load ee" "load ef" -testouterr_cmd_re "sh" "switch df ef" $ans join $tserr "\n"\n\nmsg_load dg err_reqmis df\n\nmsg_top_switch df ef {} de {} ee list list dg list err_depref dg +testouterr_cmd_re "sh" "switch df ef" $ans join $tserr "\n"\n\nmsg_load dg err_reqmis df\n\nmsg_top_switch {df <aL>} ef {} de {} ee list list dg list err_depref dg set ans list lappend ans list unset __MODULES_LMCONFLICT @@ -170,7 +170,7 @@ lappend ans list unset __MODULES_LMTAG lappend ans list ERR set tserr list "unload dg" "unload df" "unload de" -testouterr_cmd_re "sh" "switch df eg" $ans join $tserr "\n"\n\nmsg_load eg err_conflict dh\n\nmsg_load dg err_reqmis df\n\nmsg_top_switch df eg {} de {} {} list list dg list err_swon eg err_depref dg +testouterr_cmd_re "sh" "switch df eg" $ans join $tserr "\n"\n\nmsg_load eg err_conflict dh\n\nmsg_load dg err_reqmis df\n\nmsg_top_switch {df <aL>} eg {} de {} {} list list dg list err_swon eg err_depref dg set ans list lappend ans list unset __MODULES_LMCONFLICT @@ -383,7 +383,7 @@ lappend ans list set __MODULES_LMTAG h61&auto-loaded lappend ans list ERR set tserr list "unload h62" "unload h60" "load h68" -testouterr_cmd_re "sh" "switch h60 h68" $ans join $tserr "\n"\n\nmsg_load h62 err_reqmis h60\n\nmsg_top_switch h60 h68 {} {} {} {} list list h62 list err_depref h62 +testouterr_cmd_re "sh" "switch h60 h68" $ans join $tserr "\n"\n\nmsg_load h62 err_reqmis h60\n\nmsg_top_switch {h60 <aL>} h68 {} {} {} {} list list h62 list err_depref h62 # test situation where UReqUn modules impact DepRe list (conflict solving reload) setenv_loaded_module list h30 h31 h32 h38 list "$mp/h30" "$mp/h31" "$mp/h32" "$mp/h38" list h30 h31 @@ -409,7 +409,7 @@ lappend ans list set __MODULES_LMTAG h60&auto-loaded set tserr list "unload h74" "unload h71" "unload h62" "unload h61" "load h68" \nmsg_load h62 err_reqmis h61 \nmsg_load h71 err_reqmis h62 "\nload h74" lappend ans list ERR -testouterr_cmd_re "sh" "switch h61 h68" $ans join $tserr "\n"\n\nmsg_top_switch h61 h68 {} {} {} {} list list h74 h71 h62 list h74 err_depref h62 err_depref h71 +testouterr_cmd_re "sh" "switch h61 h68" $ans join $tserr "\n"\n\nmsg_top_switch {h61 <aL>} h68 {} {} {} {} list list h74 h71 h62 list h74 err_depref h62 err_depref h71 #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/375-deps6.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/375-deps6.exp
Changed
@@ -78,7 +78,7 @@ lappend ans list set _LMFILES_ "$mp/f5" lappend ans list set LOADEDMODULES "f5" lappend ans list unset __MODULES_LMTAG -set tserr list "unload f5" "unload f7" "unload f6" "unload f3" "unload f1" "load f5" \nmsg_top_unload f3 list f7 f6 f1 f5 +set tserr list "unload f5" "unload f7" "unload f6" "unload f3" "unload f1" "load f5" \nmsg_top_unload {f3 <aL>} list f7 f6 f1 f5 testouterr_cmd_re "sh" "unload f3" $ans join $tserr "\n" testouterr_cmd_re "sh" "unload -f f3" $ans join $tserr "\n" @@ -88,7 +88,7 @@ lappend ans list set _LMFILES_ "$mp/f1:$mp/f6:$mp/f7:$mp/f5" lappend ans list set LOADEDMODULES "f1:f6:f7:f5" lappend ans list set __MODULES_LMTAG f1&auto-loaded:f6&auto-loaded -set tserr list "unload f3" \nmsg_unload f3 err_deplof f6 +set tserr list "unload f3" \nmsg_unload {f3 <aL>} err_deplof f6 testouterr_cmd_re "sh" "unload -f --no-auto f3" $ans join $tserr "\n" set ans list @@ -121,7 +121,7 @@ lappend ans list set _LMFILES_ "$mp/f6:$mp/f7:$mp/f5:$mp/f4:$mp/f2" lappend ans list set LOADEDMODULES "f6:f7:f5:f4:f2" lappend ans list set __MODULES_LMTAG f6&auto-loaded -set tserr list "unload f3" "unload f1" \nmsg_top_unload f3 {} f1 {} +set tserr list "unload f3" "unload f1" \nmsg_top_unload {f3 <aL>} {} f1 {} testouterr_cmd_re "sh" "unload f3" $ans join $tserr "\n" testouterr_cmd_re "sh" "unload -f f3" $ans join $tserr "\n" @@ -160,7 +160,7 @@ lappend ans list set _LMFILES_ "$mp/f5:$mp/f1:$mp/f3:$mp/f6:$mp/f7" lappend ans list set LOADEDMODULES "f5:f1:f3:f6:f7" lappend ans list set __MODULES_LMTAG f1&auto-loaded:f3&auto-loaded:f6&auto-loaded -set tserr list "load f5" "load f1" "load f3" "load f6" \nmsg_load f6 err_conlof f5 "\nload f7" \nmsg_top_load f7 {} list f1 f3 f6 {} +set tserr list "load f5" "load f1" "load f3" "load f6" \nmsg_load {f6 <aL>} err_conlof f5 "\nload f7" \nmsg_top_load f7 {} list f1 f3 f6 {} testouterr_cmd_re "sh" "load --force f5 f7" $ans join $tserr "\n" # define this situation as loaded @@ -196,7 +196,7 @@ lappend ans list set _LMFILES_ "$mp/f5" lappend ans list set LOADEDMODULES "f5" lappend ans list unset __MODULES_LMTAG -set tserr list "unload f5" "unload f7" "unload f6" "unload f3" "unload f1" "load f5" \nmsg_top_unload f3 list f7 f6 f1 f5 +set tserr list "unload f5" "unload f7" "unload f6" "unload f3" "unload f1" "load f5" \nmsg_top_unload {f3 <aL>} list f7 f6 f1 f5 testouterr_cmd_re "sh" "unload f3" $ans join $tserr "\n" testouterr_cmd_re "sh" "unload -f f3" $ans join $tserr "\n" @@ -206,7 +206,7 @@ lappend ans list set _LMFILES_ "$mp/f5:$mp/f1:$mp/f6:$mp/f7" lappend ans list set LOADEDMODULES "f5:f1:f6:f7" lappend ans list set __MODULES_LMTAG f1&auto-loaded:f6&auto-loaded -set tserr list "unload f3" \nmsg_unload f3 err_deplof f6 +set tserr list "unload f3" \nmsg_unload {f3 <aL>} err_deplof f6 testouterr_cmd_re "sh" "unload -f --no-auto f3" $ans join $tserr "\n" set ans list @@ -239,7 +239,7 @@ lappend ans list set _LMFILES_ "$mp/f5:$mp/f6:$mp/f7:$mp/f4:$mp/f2" lappend ans list set LOADEDMODULES "f5:f6:f7:f4:f2" lappend ans list set __MODULES_LMTAG f6&auto-loaded -set tserr list "unload f3" "unload f1" \nmsg_top_unload f3 {} f1 {} +set tserr list "unload f3" "unload f1" \nmsg_top_unload {f3 <aL>} {} f1 {} testouterr_cmd_re "sh" "unload f3" $ans join $tserr "\n" testouterr_cmd_re "sh" "unload -f f3" $ans join $tserr "\n" @@ -526,7 +526,7 @@ lappend ans list set _LMFILES_ "$mp/f11:$mp/f15:$mp/f12:$mp/f13:$mp/f16:$mp/f17" lappend ans list set LOADEDMODULES "f11:f15:f12:f13:f16:f17" lappend ans list set __MODULES_LMTAG f11&auto-loaded:f13&auto-loaded:f16&auto-loaded -set tserr list "unload f17" "unload f16" "unload f13" "unload f12" "unload f14" "load f15" "load f12" "load f13" "load f16" "load f17" \nmsg_top_switch f14 f15 {} {} {} {} list f12 f13 f16 f17 +set tserr list "unload f17" "unload f16" "unload f13" "unload f12" "unload f14" "load f15" "load f12" "load f13" "load f16" "load f17" \nmsg_top_switch {f14 <aL>} f15 {} {} {} {} list f12 f13 f16 f17 testouterr_cmd_re "sh" "switch f14 f15" $ans join $tserr "\n" # define situation loaded where one dependency chain is in conflict with the other and both chains have optional modules loaded afterward @@ -541,7 +541,7 @@ lappend ans list set _LMFILES_ "$mp/f11:$mp/f15:$mp/f12:$mp/f13:$mp/f16:$mp/f17" lappend ans list set LOADEDMODULES "f11:f15:f12:f13:f16:f17" lappend ans list set __MODULES_LMTAG f11&auto-loaded:f13&auto-loaded:f16&auto-loaded -set tserr list "unload f17" "unload f16" "unload f13" "unload f12" "unload f14" "load f12" "load f13" "load f16" "load f17" \nmsg_top_unload f14 {} {} list f12 f13 f16 f17 +set tserr list "unload f17" "unload f16" "unload f13" "unload f12" "unload f14" "load f12" "load f13" "load f16" "load f17" \nmsg_top_unload {f14 <aL>} {} {} list f12 f13 f16 f17 testouterr_cmd_re "sh" "unload f14" $ans join $tserr "\n" # unload the other side of the conflict @@ -738,7 +738,7 @@ setenv_var __MODULES_LMPREREQ "f26&f24|f23:f27&f25|f23:f28&f26&f27" unsetenv_var __MODULES_LMCONFLICT -# dependent modules are unloaded prior "dc" load but as f23 cannot be loaded due to conflit everything is restored +# dependent modules are unloaded prior "dc" load but as f23 cannot be loaded due to conflict everything is restored set tserr list "unload f28" "unload f27" "unload f26" \nmsg_load f23 err_conflict f29 testouterr_cmd_re "sh" "load f23" "ERR" join $tserr "\n" @@ -795,7 +795,7 @@ lappend ans list unset _LMFILES_ lappend ans list unset LOADEDMODULES lappend ans list unset __MODULES_LMTAG -set tserr list "unload f26" "unload f23" \nmsg_top_unload f23 f26 {} {} +set tserr list "unload f26" "unload f23" \nmsg_top_unload {f23 <aL>} f26 {} {} # forced or not, DepUn mechanism does the job testouterr_cmd_re "sh" "unload f23" $ans join $tserr "\n" testouterr_cmd_re "sh" "unload --force f23" $ans join $tserr "\n" @@ -807,7 +807,7 @@ unsetenv_loaded_module # confusing error messages obtained due to load then unload of same modulefile (which is thus defined as a conflict and a prereq) -testouterr_cmd "sh" "load mv" ERR msg_unload ms err_deplo mv\n\nmsg_load mv "$warn_msgs: Unsupported option '--force'" "$warn_msgs: Unsupported option '--force'" "$warn_msgs: Unsupported option '--force'" err_conun ms +testouterr_cmd "sh" "load mv" ERR msg_unload {ms <aL>} err_deplo mv\n\nmsg_load mv "$warn_msgs: Unsupported option '--force'" "$warn_msgs: Unsupported option '--force'" "$warn_msgs: Unsupported option '--force'" err_conun ms # check ensure warning message is printed only once when force loading a reflexive conflict @@ -841,7 +841,7 @@ lappend ans list set _LMFILES_ $mp/ms:$mp/mt lappend ans list set LOADEDMODULES ms:mt lappend ans list set __MODULES_LMTAG ms&auto-loaded -testouterr_cmd_re sh {load --force mt} $ans msg_load ms err_conloif mt\n\nmsg_top_load mt {} ms {} err_conlof ms +testouterr_cmd_re sh {load --force mt} $ans msg_load {ms <aL>} err_conloif mt\n\nmsg_top_load mt {} ms {} err_conlof ms # force an is-loading conflict check with fully qualified modulefile set ans list @@ -851,7 +851,7 @@ lappend ans list set LOADEDMODULES $mp/msf:mtf lappend ans list set __MODULES_LMTAG $mp/msf&auto-loaded #FIXME: top load messages for mtf should contain a warning to the forced conflict with $mp/msf -testouterr_cmd_re sh {load --force mtf} $ans escre msg_load $mp/msf err_conloif $mp/mtf\n\nmsg_load mtf "Loading requirement: $mp/msf" +testouterr_cmd_re sh {load --force mtf} $ans escre msg_load "$mp/msf <aL>" err_conloif $mp/mtf\n\nmsg_load mtf "Loading requirement: $mp/msf" #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/375-order.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/375-order.exp
Changed
@@ -153,9 +153,9 @@ lappend ans list set _LMFILES_ $mp/ib lappend ans list set LOADEDMODULES ib lappend ans list unset __MODULES_LMTAG -set tserr list msg_unload ia err_prerequn ic +set tserr list msg_unload {ia <aL>} err_prerequn ic testouterr_cmd_re sh {unload --no-auto ia} ERR join $tserr \n -set tserr list {unload ic} {unload ia} \nmsg_top_unload ia ic {} {} +set tserr list {unload ic} {unload ia} \nmsg_top_unload {ia <aL>} ic {} {} testouterr_cmd_re sh {unload --auto ia} $ans join $tserr \n @@ -270,7 +270,7 @@ testouterr_cmd_re sh {unload --auto ih/1} $ans join $tserr \n # ih/1 and ii should go DepRe -set tserr list msg_unload ih/2 err_prerequn ii +set tserr list msg_unload {ih/2 <aL>} err_prerequn ii testouterr_cmd_re sh {unload --no-auto ih/2} ERR join $tserr \n set ans list lappend ans list set __MODULES_LMCONFLICT ih/1&ih @@ -278,7 +278,7 @@ lappend ans list set _LMFILES_ $mp/ih/1:$mp/ii lappend ans list set LOADEDMODULES ih/1:ii lappend ans list unset __MODULES_LMTAG -set tserr list {unload ii} {unload ih/1} {unload ih/2} {load ih/1} {load ii} \nmsg_top_unload ih/2 {} {} list ih/1 ii +set tserr list {unload ii} {unload ih/1} {unload ih/2} {load ih/1} {load ii} \nmsg_top_unload {ih/2 <aL>} {} {} list ih/1 ii testouterr_cmd_re sh {unload --auto ih/2} $ans join $tserr \n # ih/2 should go UReqUn and ih/1 DepRe (auto mode) @@ -371,7 +371,7 @@ testouterr_cmd_re sh {unload --auto ig} $ans join $tserr \n # ig, ii and ih/1 should go DepRe (auto mode) -set tserr list msg_unload ih/2 err_prerequn ii +set tserr list msg_unload {ih/2 <aL>} err_prerequn ii testouterr_cmd_re sh {unload --no-auto ih/2} ERR join $tserr \n set ans list lappend ans list set __MODULES_LMCONFLICT ig&ih/2:ih/1&ih @@ -379,7 +379,7 @@ lappend ans list set _LMFILES_ $mp/ig:$mp/ih/1:$mp/ii lappend ans list set LOADEDMODULES ig:ih/1:ii lappend ans list unset __MODULES_LMTAG -set tserr list {unload ii} {unload ih/1} {unload ig} {unload ih/2} {load ig} {load ih/1} {load ii} \nmsg_top_unload ih/2 {} {} list ig ih/1 ii +set tserr list {unload ii} {unload ih/1} {unload ig} {unload ih/2} {load ig} {load ih/1} {load ii} \nmsg_top_unload {ih/2 <aL>} {} {} list ig ih/1 ii testouterr_cmd_re sh {unload --auto ih/2} $ans join $tserr \n # ih/2 and ii should go DepRe as conflict with ih/1 is solved
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/376-deps7.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/376-deps7.exp
Changed
@@ -84,7 +84,7 @@ testouterr_cmd_re sh {unload --no-auto m2} $ans join $tserr \n # unload test where 'module load' target is loaded, user asked and required by another loaded module -# target is not unloaded as it is still required and it has been explicitely asked +# target is not unloaded as it is still required and it has been explicitly asked setenv_loaded_module list m1 m2 m3 list $mp/m1 $mp/m2 $mp/m3 setenv_var __MODULES_LMPREREQ m2&m1:m3&m1 set ans list @@ -133,10 +133,10 @@ lappend ans list unset _LMFILES_ lappend ans list unset LOADEDMODULES lappend ans list unset __MODULES_LMTAG -set tserr list {unload m3} {unload m2} {unload m1} \nmsg_top_unload m1 list m3 m2 {} {} +set tserr list {unload m3} {unload m2} {unload m1} \nmsg_top_unload {m1 <aL>} list m3 m2 {} {} testouterr_cmd_re sh {unload --auto m1} $ans join $tserr \n # raise an error to keep consistency and no unload if auto_handling is disabled -set tserr list msg_unload m1 err_prerequn m2 m3 +set tserr list msg_unload {m1 <aL>} err_prerequn m2 m3 testouterr_cmd_re sh {unload --no-auto m1} ERR join $tserr \n # unload test where 'module load' targets are loaded and are inter-connected @@ -180,7 +180,7 @@ lappend ans list set _LMFILES_ $mp/m5:$mp/m1:$mp/m2 lappend ans list set LOADEDMODULES m5:m1:m2 lappend ans list set __MODULES_LMTAG m1&auto-loaded -set tserr list {load m1} \nmsg_load m1 err_conlof m5 "\nload m2" \nmsg_top_load m2 {} m1 {} +set tserr list {load m1} \nmsg_load {m1 <aL>} err_conlof m5 "\nload m2" \nmsg_top_load m2 {} m1 {} testouterr_cmd_re sh {load --force --auto m2} $ans join $tserr \n testouterr_cmd_re sh {load --force --no-auto m2} $ans join $tserr \n @@ -273,7 +273,7 @@ set tserr list msg_unload m1 err_prerequn m2 "\nload m5" \nmsg_load m5 err_conun m1 testouterr_cmd_re sh {load --auto m5} ERR join $tserr \n testouterr_cmd_re sh {load --no-auto m5} ERR join $tserr \n -# force mode will by-pass unload/conflict to garanty m2&m1 prereq +# force mode will by-pass unload/conflict to guarantee m2&m1 prereq set ans list lappend ans list set __MODULES_LMCONFLICT m5&m1 lappend ans list set _LMFILES_ $mp/m1:$mp/m2:$mp/m5 @@ -286,16 +286,16 @@ # load test in case 'module unload' target is loaded, not user asked, and required by another loaded module setenv_loaded_module list m1 m2 list $mp/m1 $mp/m2 list m1 # evaluation is attempted prior conflict violation check -set tserr list msg_unload m1 err_prerequn m2 "\nload m5" \nmsg_load m5 err_conun m1 +set tserr list msg_unload {m1 <aL>} err_prerequn m2 "\nload m5" \nmsg_load m5 err_conun m1 testouterr_cmd_re sh {load --auto m5} ERR join $tserr \n testouterr_cmd_re sh {load --no-auto m5} ERR join $tserr \n -# force mode will by-pass unload/conflict to garanty m2&m1 prereq +# force mode will by-pass unload/conflict to guarantee m2&m1 prereq set ans list lappend ans list set __MODULES_LMCONFLICT m5&m1 lappend ans list set _LMFILES_ $mp/m1:$mp/m2:$mp/m5 lappend ans list set LOADEDMODULES m1:m2:m5 lappend ans list ERR -set tserr list msg_unload m1 err_prerequn m2 "\nload m5" \nmsg_load m5 err_conunf m1 +set tserr list msg_unload {m1 <aL>} err_prerequn m2 "\nload m5" \nmsg_load m5 err_conunf m1 testouterr_cmd_re sh {load --auto --force m5} $ans join $tserr \n testouterr_cmd_re sh {load --no-auto --force m5} $ans join $tserr \n @@ -395,10 +395,10 @@ lappend ans list set _LMFILES_ $mp/m5 lappend ans list set LOADEDMODULES m5 lappend ans list unset __MODULES_LMTAG -set tserr list {unload m5} {unload m2} {unload m1} {load m5} \nmsg_top_unload m1 m2 {} m5 +set tserr list {unload m5} {unload m2} {unload m1} {load m5} \nmsg_top_unload {m1 <aL>} m2 {} m5 testouterr_cmd_re sh {unload --auto m1} $ans join $tserr \n # raise an error to keep consistency and no unload if auto_handling is disabled -set tserr list msg_unload m1 err_prerequn m2 +set tserr list msg_unload {m1 <aL>} err_prerequn m2 testouterr_cmd_re sh {unload --no-auto m1} ERR join $tserr \n
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/376-switch.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/376-switch.exp
Changed
@@ -101,7 +101,7 @@ lappend ans list set _LMFILES_ $mp/swd:$mp/swb:$mp/swc lappend ans list set LOADEDMODULES swd:swb:swc lappend ans list set __MODULES_LMTAG swb&auto-loaded -set tserr list {load swc} {load swb} \nmsg_load swb err_conlof swd \nmsg_top_load swc {} swb {} +set tserr list {load swc} {load swb} \nmsg_load {swb <aL>} err_conlof swd \nmsg_top_load swc {} swb {} testouterr_cmd_re sh {load --force --auto swc} $ans join $tserr \n testouterr_cmd_re sh {load --force --no-auto swc} $ans join $tserr \n @@ -158,7 +158,7 @@ lappend ans list set _LMFILES_ $mp/swd:$mp/swb:$mp/swe:$mp/swc lappend ans list set LOADEDMODULES swd:swb:swe:swc lappend ans list set __MODULES_LMTAG swb&auto-loaded -set tserr list {load swc} {unload swe} {unload swa} {load swb} \nmsg_load swb err_conlof swd\n {load swe} \nmsg_load swe err_reqmisf swa \nmsg_top_load swc swa swb swe +set tserr list {load swc} {unload swe} {unload swa} {load swb} \nmsg_load {swb <aL>} err_conlof swd\n {load swe} \nmsg_load swe err_reqmisf swa \nmsg_top_load swc swa swb swe testouterr_cmd_re sh {load --force --auto swc} $ans join $tserr \n set ans list lappend ans list set __MODULES_LMCONFLICT swd&swb:swc&swa @@ -166,7 +166,7 @@ lappend ans list set _LMFILES_ $mp/swd:$mp/swe:$mp/swb:$mp/swc lappend ans list set LOADEDMODULES swd:swe:swb:swc lappend ans list set __MODULES_LMTAG swb&auto-loaded -set tserr list {load swc} {unload swa} \nmsg_unload swa err_deplof swe\n {load swb} \nmsg_load swb err_conlof swd \nmsg_top_load swc swa swb {} +set tserr list {load swc} {unload swa} \nmsg_unload swa err_deplof swe\n {load swb} \nmsg_load {swb <aL>} err_conlof swd \nmsg_top_load swc swa swb {} testouterr_cmd_re sh {load --force --no-auto swc} $ans join $tserr \n @@ -220,9 +220,9 @@ lappend ans list unset _LMFILES_ lappend ans list unset LOADEDMODULES lappend ans list unset __MODULES_LMTAG -set tserr list {unload swc} {unload swb} \nmsg_top_unload swb swc {} {} +set tserr list {unload swc} {unload swb} \nmsg_top_unload {swb <aL>} swc {} {} testouterr_cmd_re sh {unload --auto swb} $ans join $tserr \n -set tserr list msg_unload swb err_prerequn swc +set tserr list msg_unload {swb <aL>} err_prerequn swc testouterr_cmd_re sh {unload --no-auto swb} ERR join $tserr \n @@ -310,7 +310,7 @@ lappend ans list set _LMFILES_ $mp/swd lappend ans list set LOADEDMODULES swd lappend ans list unset __MODULES_LMTAG -set tserr list {unload swd} {unload swc} {unload swb} {load swd} \nmsg_top_unload swb swc {} swd +set tserr list {unload swd} {unload swc} {unload swb} {load swd} \nmsg_top_unload {swb <aL>} swc {} swd testouterr_cmd_re sh {unload --auto swb} $ans join $tserr \n @@ -521,9 +521,9 @@ lappend ans list set __MODULES_LMTAG swg/2&auto-loaded # reload of the modulefile using 'module switch' disturb natural result: swg/1 swh # as reload of swh during DepRe triggers the unload of swg/1 then the load of swg/2 -set tserr list {unload swh} {unload swg/1} {unload swg/2} {load swg/1} {load swh} {unload swg/1} {load swg/2} \nmsg_unload swg/2 {Unloading dependent: swh swg/1} {Reloading dependent: swg/1 swh} {Unloading conflict: swg/1} {Loading requirement: swg/2} +set tserr list {unload swh} {unload swg/1} {unload swg/2} {load swg/1} {load swh} {unload swg/1} {load swg/2} \nmsg_unload {swg/2 <aL>} {Unloading dependent: swh swg/1} {Reloading dependent: swg/1 swh} {Unloading conflict: swg/1} {Loading requirement: swg/2} testouterr_cmd_re sh {unload --auto swg/2} $ans join $tserr \n -set tserr list msg_unload swg/2 err_prerequn swh +set tserr list msg_unload {swg/2 <aL>} err_prerequn swh testouterr_cmd_re sh {unload --no-auto swg/2} ERR join $tserr \n # switched-off module loaded instead of switched-on @@ -561,7 +561,7 @@ lappend ans list set __MODULES_LMTAG swg/2&auto-loaded set tserr list {unload swh} {unload swg/0} \nmsg_top_unload swh {} swg/0 {} } -# closest or farest requirement to unloading module is selected for unload (depending on unload_match_order setting) +# closest or farthest requirement to unloading module is selected for unload (depending on unload_match_order setting) testouterr_cmd_re sh {unload --auto swh} $ans join $tserr \n testouterr_cmd_re sh {unload --no-auto swh} $ans join $tserr \n @@ -616,7 +616,7 @@ lappend ans list set _LMFILES_ $mp/ra lappend ans list unset __MODULES_LMPREREQ lappend ans list ERR -set tserr list {unload swj} {unload ra} \nmsg_unload ra $err_evalabort \nmsg_top_unload swj {} {} {} err_urequn ra +set tserr list {unload swj} {unload ra} \nmsg_unload {ra <aL>} $err_evalabort \nmsg_top_unload swj {} {} {} err_urequn ra testouterr_cmd_re sh {unload --auto swj} $ans join $tserr \n set ans list lappend ans list unset __MODULES_LMCONFLICT @@ -662,7 +662,7 @@ lappend ans list set _LMFILES_ $mp/swn lappend ans list unset __MODULES_LMPREREQ lappend ans list ERR -set tserr escre list {unload swm} {unload swn} \nmsg_unload swn msg_moderr "$msg_invcmdname \"bad\"" {bad} $mp/swn 3 \nmsg_top_unload swm {} {} {} err_urequn swn +set tserr escre list {unload swm} {unload swn} \nmsg_unload {swn <aL>} msg_moderr "$msg_invcmdname \"bad\"" {bad} $mp/swn 3 \nmsg_top_unload swm {} {} {} err_urequn swn testouterr_cmd_re sh {unload --auto swm} $ans join $tserr \n set ans list lappend ans list unset __MODULES_LMCONFLICT
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/377-cyclic.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/377-cyclic.exp
Changed
@@ -140,7 +140,7 @@ set tserr "unload gb\nunload gc\n\nmsg_top_unload gb {} gc {}" testouterr_cmd_re sh {unload gb} $ans $tserr testouterr_cmd_re sh {unload --force gb} $ans $tserr -set tserr "unload gb\nunload gc\n\nmsg_top_unload gc gb {} {}" +set tserr "unload gb\nunload gc\n\nmsg_top_unload {gc <aL>} gb {} {}" testouterr_cmd_re sh {unload gc} $ans $tserr testouterr_cmd_re sh {unload --force gc} $ans $tserr set tserr "unload gb\nunload gc" @@ -149,7 +149,7 @@ setenv_loaded_module list gb gc list $mp/gb $mp/gc list gb setenv_var __MODULES_LMPREREQ gb&gc:gc&gb -set tserr "unload gc\nunload gb\n\nmsg_top_unload gb gc {} {}" +set tserr "unload gc\nunload gb\n\nmsg_top_unload {gb <aL>} gc {} {}" testouterr_cmd_re sh {unload gb} $ans $tserr testouterr_cmd_re sh {unload --force gb} $ans $tserr set tserr "unload gc\nunload gb\n\nmsg_top_unload gc {} gb {}" @@ -228,7 +228,7 @@ set tserr "unload gy\nunload gb\nunload gc\n\nmsg_top_unload gb gy gc {}" testouterr_cmd_re sh {unload gb} $ans $tserr testouterr_cmd_re sh {unload --force gb} $ans $tserr -set tserr "unload gy\nunload gb\nunload gc\n\nmsg_top_unload gc list gy gb {} {}" +set tserr "unload gy\nunload gb\nunload gc\n\nmsg_top_unload {gc <aL>} list gy gb {} {}" testouterr_cmd_re sh {unload gc} $ans $tserr @@ -339,10 +339,10 @@ set tserr "unload gd\nunload ge\nunload gf\n\nmsg_top_unload gd {} list ge gf {}" testouterr_cmd_re sh {unload gd} $ans $tserr testouterr_cmd_re sh {unload --force gd} $ans $tserr -set tserr "unload gd\nunload ge\nunload gf\n\nmsg_top_unload gf list gd ge {} {}" +set tserr "unload gd\nunload ge\nunload gf\n\nmsg_top_unload {gf <aL>} list gd ge {} {}" testouterr_cmd_re sh {unload gf} $ans $tserr testouterr_cmd_re sh {unload --force gf} $ans $tserr -set tserr "unload gd\nunload ge\nunload gf\n\nmsg_top_unload ge gd gf {}" +set tserr "unload gd\nunload ge\nunload gf\n\nmsg_top_unload {ge <aL>} gd gf {}" testouterr_cmd_re sh {unload ge} $ans $tserr testouterr_cmd_re sh {unload --force ge} $ans $tserr set tserr "unload gd\nunload ge\nunload gf" @@ -351,10 +351,10 @@ setenv_loaded_module list gd gf ge list $mp/gd $mp/gf $mp/ge list gd gf setenv_var __MODULES_LMPREREQ gd&ge:gf&gd:ge&gf -set tserr "unload ge\nunload gf\nunload gd\n\nmsg_top_unload gd list ge gf {} {}" +set tserr "unload ge\nunload gf\nunload gd\n\nmsg_top_unload {gd <aL>} list ge gf {} {}" testouterr_cmd_re sh {unload gd} $ans $tserr testouterr_cmd_re sh {unload --force gd} $ans $tserr -set tserr "unload ge\nunload gf\nunload gd\n\nmsg_top_unload gf ge gd {}" +set tserr "unload ge\nunload gf\nunload gd\n\nmsg_top_unload {gf <aL>} ge gd {}" testouterr_cmd_re sh {unload gf} $ans $tserr testouterr_cmd_re sh {unload --force gf} $ans $tserr set tserr "unload ge\nunload gf\nunload gd\n\nmsg_top_unload ge {} list gf gd {}" @@ -440,9 +440,9 @@ set tserr "unload gw\nunload gd\nunload ge\nunload gf\n\nmsg_top_unload gd gw list ge gf {}" testouterr_cmd_re sh {unload gd} $ans $tserr testouterr_cmd_re sh {unload --force gd} $ans $tserr -set tserr "unload gw\nunload gd\nunload ge\nunload gf\n\nmsg_top_unload gf list gw gd ge {} {}" +set tserr "unload gw\nunload gd\nunload ge\nunload gf\n\nmsg_top_unload {gf <aL>} list gw gd ge {} {}" testouterr_cmd_re sh {unload gf} $ans $tserr -set tserr "unload gw\nunload gd\nunload ge\nunload gf\n\nmsg_top_unload ge list gw gd gf {}" +set tserr "unload gw\nunload gd\nunload ge\nunload gf\n\nmsg_top_unload {ge <aL>} list gw gd gf {}" testouterr_cmd_re sh {unload ge} $ans $tserr @@ -495,9 +495,9 @@ lappend ans list unset _LMFILES_ lappend ans list unset LOADEDMODULES lappend ans list unset __MODULES_LMTAG -set tserr "unload gg\nunload gh\nunload gj\n\nmsg_top_unload gj list gg gh {} {}" +set tserr "unload gg\nunload gh\nunload gj\n\nmsg_top_unload {gj <aL>} list gg gh {} {}" testouterr_cmd_re sh {unload gj} $ans $tserr -set tserr "unload gg\nunload gh\nunload gj\n\nmsg_top_unload gh gg gj {}" +set tserr "unload gg\nunload gh\nunload gj\n\nmsg_top_unload {gh <aL>} gg gj {}" testouterr_cmd_re sh {unload gh} $ans $tserr set tserr "unload gg\nunload gh\nunload gj\n\nmsg_top_unload gg {} list gh gj {}" testouterr_cmd_re sh {unload gg} $ans $tserr @@ -513,7 +513,7 @@ lappend ans list set _LMFILES_ $mp/gj lappend ans list set LOADEDMODULES gj lappend ans list unset __MODULES_LMTAG -set tserr "unload gg\nunload gh\n\nmsg_top_unload gh gg {} {}" +set tserr "unload gg\nunload gh\n\nmsg_top_unload {gh <aL>} gg {} {}" testouterr_cmd_re sh {unload gh} $ans $tserr set tserr "unload gg\nunload gh\n\nmsg_top_unload gg {} gh {}" testouterr_cmd_re sh {unload gg} $ans $tserr @@ -570,7 +570,7 @@ lappend ans list set _LMFILES_ $mp/gn:$mp/gm lappend ans list set LOADEDMODULES gn:gm lappend ans list unset __MODULES_LMTAG -set tserr "unload gk\nunload gl\n\nmsg_top_unload gl gk {} {}" +set tserr "unload gk\nunload gl\n\nmsg_top_unload {gl <aL>} gk {} {}" testouterr_cmd_re sh {unload gl} $ans $tserr set tserr "unload gk\nunload gl\n\nmsg_top_unload gk {} gl {}" testouterr_cmd_re sh {unload gk} $ans $tserr
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/377-deps8.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/377-deps8.exp
Changed
@@ -964,7 +964,7 @@ # # test case challenging the computation of dependencies between modules when unloading -# with multiple unmet deps targetting same entry +# with multiple unmet deps targeting same entry # setenv_loaded_module list fi fia list $mp/fi $mp/fia
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/377-error.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/377-error.exp
Changed
@@ -62,7 +62,8 @@ lappend ans list set __MODULES_LMPREREQ rd&ra|rb:rc&rb lappend ans list set _LMFILES_ $mp/rb:$mp/rd:$mp/rc lappend ans list set LOADEDMODULES rb:rd:rc -lappend ans list set __MODULES_LMTAG rb&auto-loaded:rd&auto-loaded +#FIXME duplicate tag entry for rd +lappend ans list set __MODULES_LMTAG rd&auto-loaded:rb&auto-loaded:rd&auto-loaded lappend ans list ERR set tserr list {unload rd} {load ra} \nmsg_load ra $err_evalabort\n {load rc} {unload rd} {load rb} {load rd} \nmsg_top_load rc {} rb rd testouterr_cmd_re sh {load ra rc} $ans join $tserr \n @@ -252,7 +253,7 @@ lappend ans list set LOADEDMODULES rag:rah lappend ans list set __MODULES_LMTAG rag&auto-loaded lappend ans list ERR -set tserr list {load rah} {load rag} {load raf} {load rae} \nmsg_load raf $err_evalabort \nmsg_load rag err_reqmisf raf \nmsg_top_load rah {} rag {} err_reqlof raf +set tserr list {load rah} {load rag} {load raf} {load rae} \nmsg_load raf $err_evalabort \nmsg_load {rag <aL>} err_reqmisf raf \nmsg_top_load rah {} rag {} err_reqlof raf testouterr_cmd_re sh {load --force rah} $ans join $tserr \n @@ -355,7 +356,7 @@ lappend ans list set __MODULES_LMPREREQ rfd&rfa|rfb&rfc:rfk&rfj:rfb&rfk:rfc&rfa|rfb:rfe&rfa|rfb&rfd:rff&rfa|rfb:rfh&rfa|rfb&rfg lappend ans list set __MODULES_LMTAG rfk&auto-loaded lappend ans list ERR -set tserr list {unload rfh} {unload rfg} {unload rff} {unload rfe} {unload rfd} \nmsg_unload rfd $err_evalabort\n {unload rfc} {load rfb} {load rfk} {load rfj} {load rfi} \nmsg_load rfj $err_evalabort \nmsg_load rfk err_reqmisf rfj\n {load rfc} {load rfe} {load rff} {load rfg} \nmsg_load rfg $err_evalabort\n {load rfh} \nmsg_load rfh err_reqmisf rfg \nmsg_top_load rfb {} rfk list list rfh rfg rff rfe rfc list rfc rfe rff rfh err_depreunf rfd err_reqlof rfj err_depref rfg +set tserr list {unload rfh} {unload rfg} {unload rff} {unload rfe} {unload rfd} \nmsg_unload rfd $err_evalabort\n {unload rfc} {load rfb} {load rfk} {load rfj} {load rfi} \nmsg_load rfj $err_evalabort \nmsg_load {rfk <aL>} err_reqmisf rfj\n {load rfc} {load rfe} {load rff} {load rfg} \nmsg_load rfg $err_evalabort\n {load rfh} \nmsg_load rfh err_reqmisf rfg \nmsg_top_load rfb {} rfk list list rfh rfg rff rfe rfc list rfc rfe rff rfh err_depreunf rfd err_reqlof rfj err_depref rfg testouterr_cmd_re sh {load --force rfb} $ans join $tserr \n # crash in every mechanism (ReqLo, DepRe unload, DepRe load) (requirement expressed with 'module load', linked modules, middle one crashed) @@ -371,7 +372,7 @@ lappend ans list set __MODULES_LMPREREQ rgd&rga|rgb&rgc:rgk&rgj:rgb&rgk:rgc&rga|rgb:rge&rga|rgb&rgd:rgf&rga|rgb:rgh&rga|rgb&rgg lappend ans list set __MODULES_LMTAG rgk&auto-loaded lappend ans list ERR -set tserr list {unload rgh} {unload rgg} {unload rgf} {unload rge} {unload rgd} \nmsg_unload rgd $err_evalabort\n {unload rgc} {load rgb} {load rgk} {load rgj} {load rgi} \nmsg_load rgj $err_evalabort \nmsg_load rgk err_reqmisf rgj\n {load rgc} {load rge} {load rgf} {load rgg} \nmsg_load rgg $err_evalabort\n {load rgh} \nmsg_load rgh err_reqmisf rgg \nmsg_top_load rgb {} rgk list list rgh rgg rgf rge rgc list rgc rge rgf rgh err_depreunf rgd err_reqlof rgj err_depref rgg +set tserr list {unload rgh} {unload rgg} {unload rgf} {unload rge} {unload rgd} \nmsg_unload rgd $err_evalabort\n {unload rgc} {load rgb} {load rgk} {load rgj} {load rgi} \nmsg_load rgj $err_evalabort \nmsg_load {rgk <aL>} err_reqmisf rgj\n {load rgc} {load rge} {load rgf} {load rgg} \nmsg_load rgg $err_evalabort\n {load rgh} \nmsg_load rgh err_reqmisf rgg \nmsg_top_load rgb {} rgk list list rgh rgg rgf rge rgc list rgc rge rgf rgh err_depreunf rgd err_reqlof rgj err_depref rgg testouterr_cmd_re sh {load --force rgb} $ans join $tserr \n @@ -390,7 +391,7 @@ lappend ans list unset __MODULES_LMPREREQ lappend ans list set __MODULES_LMTAG rab&auto-loaded lappend ans list ERR -set tserr list {unload rad} {unload rac} {unload rab} \nmsg_unload rab $err_evalabort\n {unload raa} \nmsg_top_unload rad {} list rac raa {} err_urequn rab +set tserr list {unload rad} {unload rac} {unload rab} \nmsg_unload {rab <aL>} $err_evalabort\n {unload raa} \nmsg_top_unload rad {} list rac raa {} err_urequn rab testouterr_cmd_re sh {unload rad} $ans join $tserr \n testouterr_cmd_re sh {unload --force rad} $ans join $tserr \n @@ -405,7 +406,7 @@ lappend ans list set __MODULES_LMPREREQ raf&rae lappend ans list set __MODULES_LMTAG rae&auto-loaded:raf&auto-loaded lappend ans list ERR -set tserr list {unload rah} {unload rag} {unload raf} \nmsg_unload raf $err_evalabort \nmsg_top_unload rah {} list rag {} err_urequn raf +set tserr list {unload rah} {unload rag} {unload raf} \nmsg_unload {raf <aL>} $err_evalabort \nmsg_top_unload rah {} list rag {} err_urequn raf testouterr_cmd_re sh {unload rah} $ans join $tserr \n testouterr_cmd_re sh {unload --force rah} $ans join $tserr \n @@ -421,7 +422,7 @@ lappend ans list unset __MODULES_LMPREREQ lappend ans list set __MODULES_LMTAG rabm&auto-loaded lappend ans list ERR -set tserr list {unload radm} {unload racm} {unload rabm} \nmsg_unload rabm $err_evalabort\n {unload raam} \nmsg_top_unload radm {} list racm raam {} err_urequn rabm +set tserr list {unload radm} {unload racm} {unload rabm} \nmsg_unload {rabm <aL>} $err_evalabort\n {unload raam} \nmsg_top_unload radm {} list racm raam {} err_urequn rabm testouterr_cmd_re sh {unload radm} $ans join $tserr \n testouterr_cmd_re sh {unload --force radm} $ans join $tserr \n set ans list @@ -431,7 +432,7 @@ lappend ans list set __MODULES_LMTAG rabm&auto-loaded lappend ans list ERR # different UreqUn unload order, as it follows requirement definition in modulefile instead of reverse effective loaded order -set tserr list {unload radm} {unload raam} {unload rabm} \nmsg_unload rabm $err_evalabort\n {unload racm} \nmsg_top_unload radm {} list raam racm {} err_urequn rabm +set tserr list {unload radm} {unload raam} {unload rabm} \nmsg_unload {rabm <aL>} $err_evalabort\n {unload racm} \nmsg_top_unload radm {} list raam racm {} err_urequn rabm testouterr_cmd_re sh {unload --no-auto radm} $ans join $tserr \n testouterr_cmd_re sh {unload --no-auto --force radm} $ans join $tserr \n @@ -446,7 +447,7 @@ lappend ans list set __MODULES_LMPREREQ rafm&raem lappend ans list set __MODULES_LMTAG raem&auto-loaded:rafm&auto-loaded lappend ans list ERR -set tserr list {unload rahm} {unload ragm} {unload rafm} \nmsg_unload rafm $err_evalabort \nmsg_top_unload rahm {} list ragm {} err_urequn rafm +set tserr list {unload rahm} {unload ragm} {unload rafm} \nmsg_unload {rafm <aL>} $err_evalabort \nmsg_top_unload rahm {} list ragm {} err_urequn rafm testouterr_cmd_re sh {unload rahm} $ans join $tserr \n testouterr_cmd_re sh {unload --force rahm} $ans join $tserr \n set ans list @@ -456,7 +457,7 @@ lappend ans list set __MODULES_LMTAG raem&auto-loaded:rafm&auto-loaded lappend ans list ERR # raem is evaluated as rafm breaks after the 'module load raem' command -set tserr list {unload rahm} {unload ragm} {unload rafm} {unload raem} \nmsg_unload rafm $err_evalabort \nmsg_top_unload rahm {} list ragm {} err_urequn rafm +set tserr list {unload rahm} {unload ragm} {unload rafm} {unload raem} \nmsg_unload {rafm <aL>} $err_evalabort \nmsg_top_unload rahm {} list ragm {} err_urequn rafm testouterr_cmd_re sh {unload --no-auto rahm} $ans join $tserr \n testouterr_cmd_re sh {unload --no-auto --force rahm} $ans join $tserr \n @@ -592,7 +593,7 @@ lappend ans list set LOADEDMODULES rfa:rfi:rfj:rfd:rfm:rfc:rfe:rff:rfh lappend ans list set __MODULES_LMTAG rfi&auto-loaded:rfj&auto-loaded:rfm&auto-loaded lappend ans list ERR -set tserr list {unload rfh} {unload rfg} {unload rff} {unload rfe} {unload rfd} \nmsg_unload rfd $err_evalabort\n {unload rfc} {unload rfn} {unload rfm} \nmsg_unload rfm $err_evalabort\n {unload rfl} \nmsg_unload rfl err_deplof rfm\n {unload rfb} {unload rfk} {unload rfj} \nmsg_unload rfj $err_evalabort\n {load rfc} {load rfe} {load rff} {load rfg} \nmsg_load rfg $err_evalabort\n {load rfh} \nmsg_load rfh err_reqmisf rfg \nmsg_top_unload rfb list rfn rfl list rfk list list rfh rfg rff rfe rfc list rfc rfe rff rfh err_depreunf rfd err_depunf rfm err_urequn rfj err_depref rfg +set tserr list {unload rfh} {unload rfg} {unload rff} {unload rfe} {unload rfd} \nmsg_unload rfd $err_evalabort\n {unload rfc} {unload rfn} {unload rfm} \nmsg_unload {rfm <aL>} $err_evalabort\n {unload rfl} \nmsg_unload {rfl <aL>} err_deplof rfm\n {unload rfb} {unload rfk} {unload rfj} \nmsg_unload {rfj <aL>} $err_evalabort\n {load rfc} {load rfe} {load rff} {load rfg} \nmsg_load rfg $err_evalabort\n {load rfh} \nmsg_load rfh err_reqmisf rfg \nmsg_top_unload rfb list rfn rfl list rfk list list rfh rfg rff rfe rfc list rfc rfe rff rfh err_depreunf rfd err_depunf rfm err_urequn rfj err_depref rfg testouterr_cmd_re sh {unload --force rfb} $ans join $tserr \n # crash in every mechanism (DepUn, UReqUn, DepRe unload, DepRe load) (requirement expressed with 'module load', linked modules, middle one crashed) @@ -609,7 +610,7 @@ lappend ans list set LOADEDMODULES rga:rgi:rgj:rgd:rgm:rgc:rge:rgf:rgh lappend ans list set __MODULES_LMTAG rgi&auto-loaded:rgj&auto-loaded:rgm&auto-loaded lappend ans list ERR -set tserr list {unload rgh} {unload rgg} {unload rgf} {unload rge} {unload rgd} \nmsg_unload rgd $err_evalabort\n {unload rgc} {unload rgn} {unload rgm} \nmsg_unload rgm $err_evalabort\n {unload rgl} \nmsg_unload rgl err_deplof rgm\n {unload rgb} {unload rgk} {unload rgj} \nmsg_unload rgj $err_evalabort\n {load rgc} {load rge} {load rgf} {load rgg} \nmsg_load rgg $err_evalabort\n {load rgh} \nmsg_load rgh err_reqmisf rgg \nmsg_top_unload rgb list rgn rgl list rgk list list rgh rgg rgf rge rgc list rgc rge rgf rgh err_depreunf rgd err_depunf rgm err_urequn rgj err_depref rgg +set tserr list {unload rgh} {unload rgg} {unload rgf} {unload rge} {unload rgd} \nmsg_unload rgd $err_evalabort\n {unload rgc} {unload rgn} {unload rgm} \nmsg_unload {rgm <aL>} $err_evalabort\n {unload rgl} \nmsg_unload {rgl <aL>} err_deplof rgm\n {unload rgb} {unload rgk} {unload rgj} \nmsg_unload {rgj <aL>} $err_evalabort\n {load rgc} {load rge} {load rgf} {load rgg} \nmsg_load rgg $err_evalabort\n {load rgh} \nmsg_load rgh err_reqmisf rgg \nmsg_top_unload rgb list rgn rgl list rgk list list rgh rgg rgf rge rgc list rgc rge rgf rgh err_depreunf rgd err_depunf rgm err_urequn rgj err_depref rgg testouterr_cmd_re sh {unload --force rgb} $ans join $tserr \n @@ -714,7 +715,7 @@ setenv_var __MODULES_LMPREREQ rfj&rfi:rfk&rfj:rfb&rfk:rfc&rfa|rfb:rfd&rfa|rfb&rfc:rfe&rfa|rfb&rfd:rff&rfa|rfb:rfg&rfa|rfb&rff:rfh&rfa|rfb&rfg:rfl&rfb:rfm&rfl:rfn&rfm unsetenv_var __MODULES_LMCONFLICT -set tserr list {unload rfn} {unload rfm} \nmsg_unload rfm $err_evalabort \nmsg_switch rfb rfa err_depreun rfm +set tserr list {unload rfn} {unload rfm} \nmsg_unload {rfm <aL>} $err_evalabort \nmsg_switch rfb rfa err_depreun rfm testouterr_cmd_re sh {switch rfb rfa} ERR join $tserr \n set ans list @@ -723,7 +724,7 @@ lappend ans list set LOADEDMODULES rfi:rfj:rfd:rfm:rfa:rfc:rfe:rff:rfh:rfl:rfn lappend ans list set __MODULES_LMTAG rfi&auto-loaded:rfj&auto-loaded:rfm&auto-loaded:rfl&auto-loaded lappend ans list ERR -set tserr list {unload rfn} {unload rfm} \nmsg_unload rfm $err_evalabort\n {unload rfl} {unload rfh} {unload rfg} {unload rff} {unload rfe} {unload rfd} \nmsg_unload rfd $err_evalabort\n {unload rfc} {unload rfb} {unload rfk} {unload rfj} \nmsg_unload rfj $err_evalabort\n {load rfa} {load rfc} {load rfe} {load rff} {load rfg} \nmsg_load rfg $err_evalabort\n {load rfh} \nmsg_load rfh err_reqmisf rfg\n {load rfl} \nmsg_load rfl err_reqmisf rfb\n {load rfn} \nmsg_top_switch rfb rfa {} list rfk {} {} list list rfn rfl rfh rfg rff rfe rfc list rfc rfe rff rfh rfl rfn err_depreunf rfm err_depreunf rfd err_urequn rfj err_depref rfg +set tserr list {unload rfn} {unload rfm} \nmsg_unload {rfm <aL>} $err_evalabort\n {unload rfl} {unload rfh} {unload rfg} {unload rff} {unload rfe} {unload rfd} \nmsg_unload rfd $err_evalabort\n {unload rfc} {unload rfb} {unload rfk} {unload rfj} \nmsg_unload {rfj <aL>} $err_evalabort\n {load rfa} {load rfc} {load rfe} {load rff} {load rfg} \nmsg_load rfg $err_evalabort\n {load rfh} \nmsg_load rfh err_reqmisf rfg\n {load rfl} \nmsg_load {rfl <aL>} err_reqmisf rfb\n {load rfn} \nmsg_top_switch rfb rfa {} list rfk {} {} list list rfn rfl rfh rfg rff rfe rfc list rfc rfe rff rfh rfl rfn err_depreunf rfm err_depreunf rfd err_urequn rfj err_depref rfg testouterr_cmd_re sh {switch --force rfb rfa} $ans join $tserr \n # crash in every mechanism (DepUn, UReqUn, DepRe unload, DepRe load) (requirement expressed with 'module load', linked modules, middle one crashed) @@ -731,7 +732,7 @@ setenv_var __MODULES_LMPREREQ rgj&rgi:rgk&rgj:rgb&rgk:rgc&rga|rgb:rgd&rga|rgb&rgc:rge&rga|rgb&rgd:rgf&rga|rgb:rgg&rga|rgb&rgf:rgh&rga|rgb&rgg:rgl&rgb:rgm&rgl:rgn&rgm unsetenv_var __MODULES_LMCONFLICT -set tserr list {unload rgn} {unload rgm} \nmsg_unload rgm $err_evalabort \nmsg_switch rgb rga err_depreun rgm +set tserr list {unload rgn} {unload rgm} \nmsg_unload {rgm <aL>} $err_evalabort \nmsg_switch rgb rga err_depreun rgm testouterr_cmd_re sh {switch rgb rga} ERR join $tserr \n set ans list @@ -740,7 +741,7 @@ lappend ans list set LOADEDMODULES rgi:rgj:rgd:rgm:rga:rgc:rge:rgf:rgh:rgl:rgn lappend ans list set __MODULES_LMTAG rgi&auto-loaded:rgj&auto-loaded:rgm&auto-loaded:rgl&auto-loaded lappend ans list ERR -set tserr list {unload rgn} {unload rgm} \nmsg_unload rgm $err_evalabort\n {unload rgl} {unload rgh} {unload rgg} {unload rgf} {unload rge} {unload rgd} \nmsg_unload rgd $err_evalabort\n {unload rgc} {unload rgb} {unload rgk} {unload rgj} \nmsg_unload rgj $err_evalabort\n {load rga} {load rgc} {load rge} {load rgf} {load rgg} \nmsg_load rgg $err_evalabort\n {load rgh} \nmsg_load rgh err_reqmisf rgg\n {load rgl} \nmsg_load rgl err_reqmisf rgb\n {load rgn} \nmsg_switch rgb rga err_depreunf rgm err_depreunf rgd err_urequn rgj err_depref rgg {Unloading dependent: rgn rgl rgh rgg rgf rge rgc} {Unloading useless requirement: rgk} {Reloading dependent: rgc rge rgf rgh rgl rgn} +set tserr list {unload rgn} {unload rgm} \nmsg_unload {rgm <aL>} $err_evalabort\n {unload rgl} {unload rgh} {unload rgg} {unload rgf} {unload rge} {unload rgd} \nmsg_unload rgd $err_evalabort\n {unload rgc} {unload rgb} {unload rgk} {unload rgj} \nmsg_unload {rgj <aL>} $err_evalabort\n {load rga} {load rgc} {load rge} {load rgf} {load rgg} \nmsg_load rgg $err_evalabort\n {load rgh} \nmsg_load rgh err_reqmisf rgg\n {load rgl} \nmsg_load {rgl <aL>} err_reqmisf rgb\n {load rgn} \nmsg_switch rgb rga err_depreunf rgm err_depreunf rgd err_urequn rgj err_depref rgg {Unloading dependent: rgn rgl rgh rgg rgf rge rgc} {Unloading useless requirement: rgk} {Reloading dependent: rgc rge rgf rgh rgl rgn} testouterr_cmd_re sh {switch --force rgb rga} $ans join $tserr \n # crash in every mechanism (ReqLo, DepRe unload, DepRe load) (linked modules, middle one crashed) @@ -756,7 +757,7 @@ lappend ans list set __MODULES_LMPREREQ rfd&rfa|rfb&rfc:rfk&rfj:rfb&rfk:rfc&rfa|rfb:rfe&rfa|rfb&rfd:rff&rfa|rfb:rfh&rfa|rfb&rfg lappend ans list set __MODULES_LMTAG rfk&auto-loaded lappend ans list ERR -set tserr list {unload rfh} {unload rfg} {unload rff} {unload rfe} {unload rfd} \nmsg_unload rfd $err_evalabort\n {unload rfc} {unload rfa} {load rfb} {load rfk} {load rfj} {load rfi} \nmsg_load rfj $err_evalabort \nmsg_load rfk err_reqmisf rfj\n {load rfc} {load rfe} {load rff} {load rfg} \nmsg_load rfg $err_evalabort\n {load rfh} \nmsg_load rfh err_reqmisf rfg \nmsg_top_switch rfa rfb {} {} {} rfk list list rfh rfg rff rfe rfc list rfc rfe rff rfh err_depreunf rfd err_reqlof rfj err_depref rfg +set tserr list {unload rfh} {unload rfg} {unload rff} {unload rfe} {unload rfd} \nmsg_unload rfd $err_evalabort\n {unload rfc} {unload rfa} {load rfb} {load rfk} {load rfj} {load rfi} \nmsg_load rfj $err_evalabort \nmsg_load {rfk <aL>} err_reqmisf rfj\n {load rfc} {load rfe} {load rff} {load rfg} \nmsg_load rfg $err_evalabort\n {load rfh} \nmsg_load rfh err_reqmisf rfg \nmsg_top_switch rfa rfb {} {} {} rfk list list rfh rfg rff rfe rfc list rfc rfe rff rfh err_depreunf rfd err_reqlof rfj err_depref rfg testouterr_cmd_re sh {switch --force rfa rfb} $ans join $tserr \n # crash in every mechanism (ReqLo, DepRe unload, DepRe load) (linked modules, middle one crashed) @@ -772,7 +773,7 @@ lappend ans list set __MODULES_LMPREREQ rgd&rga|rgb&rgc:rgk&rgj:rgb&rgk:rgc&rga|rgb:rge&rga|rgb&rgd:rgf&rga|rgb:rgh&rga|rgb&rgg lappend ans list set __MODULES_LMTAG rgk&auto-loaded lappend ans list ERR -set tserr list {unload rgh} {unload rgg} {unload rgf} {unload rge} {unload rgd} \nmsg_unload rgd $err_evalabort\n {unload rgc} {unload rga} {load rgb} {load rgk} {load rgj} {load rgi} \nmsg_load rgj $err_evalabort \nmsg_load rgk err_reqmisf rgj\n {load rgc} {load rge} {load rgf} {load rgg} \nmsg_load rgg $err_evalabort\n {load rgh} \nmsg_load rgh err_reqmisf rgg \nmsg_top_switch rga rgb {} {} {} rgk list list rgh rgg rgf rge rgc list rgc rge rgf rgh err_depreunf rgd err_reqlof rgj err_depref rgg +set tserr list {unload rgh} {unload rgg} {unload rgf} {unload rge} {unload rgd} \nmsg_unload rgd $err_evalabort\n {unload rgc} {unload rga} {load rgb} {load rgk} {load rgj} {load rgi} \nmsg_load rgj $err_evalabort \nmsg_load {rgk <aL>} err_reqmisf rgj\n {load rgc} {load rge} {load rgf} {load rgg} \nmsg_load rgg $err_evalabort\n {load rgh} \nmsg_load rgh err_reqmisf rgg \nmsg_top_switch rga rgb {} {} {} rgk list list rgh rgg rgf rge rgc list rgc rge rgf rgh err_depreunf rgd err_reqlof rgj err_depref rgg testouterr_cmd_re sh {switch --force rga rgb} $ans join $tserr \n @@ -791,7 +792,7 @@ lappend ans list set __MODULES_LMPREREQ rcc&rcb:rcb&rca lappend ans list set __MODULES_LMTAG rca&auto-loaded:rcb&auto-loaded:rcc&auto-loaded lappend ans list ERR -set tserr list {unload rce} {unload rcd} {unload rcc} \nmsg_unload rcc $err_evalabort\n\nmsg_unload rcb err_deplo rcc\n\nmsg_unload rca err_deplo rcb +set tserr list {unload rce} {unload rcd} {unload rcc} \nmsg_unload {rcc <aL>} $err_evalabort\n\nmsg_unload {rcb <aL>} err_deplo rcc\n\nmsg_unload {rca <aL>} err_deplo rcb testouterr_cmd_re sh {purge} $ans join $tserr \n # adding --force argument unload dependent module @@ -801,7 +802,7 @@ lappend ans list set __MODULES_LMPREREQ rcc&rcb lappend ans list set __MODULES_LMTAG rcc&auto-loaded lappend ans list ERR -set tserr list {unload rce} {unload rcd} {unload rcc} \nmsg_unload rcc $err_evalabort\n {unload rcb} \nmsg_unload rcb err_deplof rcc\n {unload rca} +set tserr list {unload rce} {unload rcd} {unload rcc} \nmsg_unload {rcc <aL>} $err_evalabort\n {unload rcb} \nmsg_unload {rcb <aL>} err_deplof rcc\n {unload rca} testouterr_cmd_re sh {purge --force} $ans join $tserr \n @@ -814,7 +815,7 @@ setenv_var __MODULES_LMPREREQ rce&rcd:rcd&rcc:rcc&rcb:rcb&rca unsetenv_var __MODULES_LMCONFLICT -set tserr list {unload rce} {unload rcd} {unload rcc} \nmsg_unload rcc $err_evalabort +set tserr list {unload rce} {unload rcd} {unload rcc} \nmsg_unload {rcc <aL>} $err_evalabort testouterr_cmd_re sh {reload} ERR join $tserr \n testouterr_cmd_re sh {reload --force} ERR join $tserr \n
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/377-opposite.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/377-opposite.exp
Changed
@@ -182,7 +182,7 @@ lappend ans list set LOADEDMODULES fa:fac lappend ans list set __MODULES_LMTAG fa&auto-loaded # conflict is reported twice: by declaring module and conflict-target module as they are both evaluated here -set tserr msg_load fa err_conloif fac\n\nmsg_top_load fac {} fa {} err_conlof fa +set tserr msg_load {fa <aL>} err_conloif fac\n\nmsg_top_load fac {} fa {} err_conlof fa testouterr_cmd_re sh {load --force --auto fac} $ans $tserr set tserr msg_load fac err_prereq fa testouterr_cmd_re sh {load --no-auto fac} ERR $tserr @@ -250,7 +250,7 @@ lappend ans list set LOADEDMODULES fa:fad lappend ans list set __MODULES_LMTAG fa&auto-loaded # conflict is reported twice: by declaring module and conflict-target module as they are both evaluated here -set tserr msg_load fa err_conloif fad\n\nmsg_top_load fad {} fa {} err_conlof alfa +set tserr msg_load {fa <aL>} err_conloif fad\n\nmsg_top_load fad {} fa {} err_conlof alfa testouterr_cmd_re sh {load --force --auto fad} $ans $tserr set tserr msg_load fad err_prereq fa testouterr_cmd_re sh {load --no-auto fad} ERR $tserr @@ -381,7 +381,7 @@ lappend ans list set LOADEDMODULES fa:faf lappend ans list set __MODULES_LMTAG fa&auto-loaded # conflict is reported twice: by declaring module and conflict-target module as they are both evaluated here -set tserr msg_load fa err_conloif faf\n\nmsg_top_load faf {} fa {} err_conlof fa +set tserr msg_load {fa <aL>} err_conloif faf\n\nmsg_top_load faf {} fa {} err_conlof fa testouterr_cmd_re sh {load --force --auto faf} $ans $tserr testouterr_cmd_re sh {load --force --no-auto faf} $ans $tserr @@ -433,7 +433,7 @@ unsetenv_var __MODULES_LMCONFLICT unsetenv_var __MODULES_LMPREREQ unsetenv_loaded_module -set tserr msg_unload fa err_deplo fai\n\nmsg_load fai err_conun fa +set tserr msg_unload {fa <aL>} err_deplo fai\n\nmsg_load fai err_conun fa testouterr_cmd_re sh {load --auto fai} ERR $tserr set ans list lappend ans list set __MODULES_LMCONFLICT fai&fa @@ -443,7 +443,7 @@ lappend ans list set LOADEDMODULES fa:fai lappend ans list set __MODULES_LMTAG fa&auto-loaded lappend ans list ERR -set tserr msg_unload fa err_deplo fai\n\nmsg_top_load fai {} fa {} err_conunf fa +set tserr msg_unload {fa <aL>} err_deplo fai\n\nmsg_top_load fai {} fa {} err_conunf fa testouterr_cmd_re sh {load --force --auto fai} $ans $tserr set tserr msg_load fai err_prereq fa testouterr_cmd_re sh {load --no-auto fai} ERR $tserr @@ -511,7 +511,7 @@ lappend ans list set LOADEDMODULES fa:faj lappend ans list set __MODULES_LMTAG fa&auto-loaded # conflict is reported twice: by declaring module and conflict-target module as they are both evaluated here -set tserr msg_load fa err_conloif faj\n\nmsg_top_load faj {} fa {} err_conunf fa +set tserr msg_load {fa <aL>} err_conloif faj\n\nmsg_top_load faj {} fa {} err_conunf fa testouterr_cmd_re sh {load --force --auto faj} $ans $tserr # no load suggestion for fa as its previous unload attempt is detected set tserr msg_load faj err_reqmis fa @@ -572,7 +572,7 @@ unsetenv_var __MODULES_LMCONFLICT unsetenv_var __MODULES_LMPREREQ unsetenv_loaded_module -set tserr msg_unload fa err_deplo fak\n\nmsg_load fak err_conun fa +set tserr msg_unload {fa <aL>} err_deplo fak\n\nmsg_load fak err_conun fa testouterr_cmd_re sh {load --auto fak} ERR $tserr testouterr_cmd_re sh {load --no-auto fak} ERR $tserr set ans list @@ -583,7 +583,7 @@ lappend ans list set LOADEDMODULES fa:fak lappend ans list set __MODULES_LMTAG fa&auto-loaded lappend ans list ERR -set tserr msg_unload fa err_deplo fak\n\nmsg_top_load fak {} fa {} err_conunf fa +set tserr msg_unload {fa <aL>} err_deplo fak\n\nmsg_top_load fak {} fa {} err_conunf fa testouterr_cmd_re sh {load --force --auto fak} $ans $tserr testouterr_cmd_re sh {load --force --no-auto fak} $ans $tserr @@ -635,7 +635,7 @@ unsetenv_var __MODULES_LMCONFLICT unsetenv_var __MODULES_LMPREREQ unsetenv_loaded_module -set tserr msg_unload fa err_deplo fal\n\nmsg_load fal err_conun alfa +set tserr msg_unload {fa <aL>} err_deplo fal\n\nmsg_load fal err_conun alfa testouterr_cmd_re sh {load --auto fal} ERR $tserr testouterr_cmd_re sh {load --no-auto fal} ERR $tserr set ans list @@ -646,7 +646,7 @@ lappend ans list set LOADEDMODULES fa:fal lappend ans list set __MODULES_LMTAG fa&auto-loaded lappend ans list ERR -set tserr msg_unload fa err_deplo fal\n\nmsg_top_load fal {} fa {} err_conunf alfa +set tserr msg_unload {fa <aL>} err_deplo fal\n\nmsg_top_load fal {} fa {} err_conunf alfa testouterr_cmd_re sh {load --force --auto fal} $ans $tserr testouterr_cmd_re sh {load --force --no-auto fal} $ans $tserr @@ -709,7 +709,7 @@ lappend ans list set LOADEDMODULES fa:fam lappend ans list set __MODULES_LMTAG fa&auto-loaded # conflict is reported twice: by declaring module and conflict-target module as they are both evaluated here -set tserr msg_load fa err_conloif fam\n\nmsg_top_load fam {} fa {} err_conunf fa +set tserr msg_load {fa <aL>} err_conloif fam\n\nmsg_top_load fam {} fa {} err_conunf fa testouterr_cmd_re sh {load --force --auto fam} $ans $tserr testouterr_cmd_re sh {load --force --no-auto fam} $ans $tserr @@ -772,7 +772,7 @@ lappend ans list set LOADEDMODULES fa:fan lappend ans list set __MODULES_LMTAG fa&auto-loaded # conflict is reported twice: by declaring module and conflict-target module as they are both evaluated here -set tserr msg_load fa err_conloif fan\n\nmsg_top_load fan {} fa {} err_conunf fa +set tserr msg_load {fa <aL>} err_conloif fan\n\nmsg_top_load fan {} fa {} err_conunf fa testouterr_cmd_re sh {load --force --auto fan} $ans $tserr testouterr_cmd_re sh {load --force --no-auto fan} $ans $tserr
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/378-sametarget.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/378-sametarget.exp
Changed
@@ -41,7 +41,7 @@ setenv_path_var MODULEPATH $mp # -# multiple prereqs targetting same module +# multiple prereqs targeting same module # set ans list @@ -151,7 +151,7 @@ lappend ans list unset _LMFILES_ lappend ans list unset LOADEDMODULES lappend ans list unset __MODULES_LMTAG -set tserr "unload hc\nunload ha/2\n\nmsg_top_unload ha/2 hc {} {}" +set tserr "unload hc\nunload ha/2\n\nmsg_top_unload {ha/2 <aL>} hc {} {}" testouterr_cmd_re sh {unload ha} $ans $tserr set tserr "unload hc\nunload ha/2\n\nmsg_top_unload hc {} ha/2 {}" testouterr_cmd_re sh {unload hc} $ans $tserr @@ -234,7 +234,7 @@ lappend ans list set _LMFILES_ $mp/ha/2:$mp/hc lappend ans list set LOADEDMODULES ha/2:hc lappend ans list unset __MODULES_LMTAG - set tserr "unload hc\nunload ha/1\nload hc\n\nmsg_top_unload ha/1 {} {} hc" + set tserr "unload hc\nunload ha/1\nload hc\n\nmsg_top_unload {ha/1 <aL>} {} {} hc" } testouterr_cmd_re sh {unload ha} $ans $tserr set ans list @@ -295,7 +295,7 @@ # # test case challenging the computation of dependencies between modules when unloading -# with multiple deps targetting same entry +# with multiple deps targeting same entry # setenv_loaded_module list ha/2 hb hc list $mp/ha/2 $mp/hb $mp/hc @@ -309,7 +309,7 @@ # -# multiple conflicts targetting same module +# multiple conflicts targeting same module # setenv_loaded_module list ha/2 list $mp/ha/2
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/379-module-unload.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/379-module-unload.exp
Changed
@@ -145,7 +145,7 @@ lappend ans list set _LMFILES_ $mp/ha/1:$mp/una:$mp/unb lappend ans list set LOADEDMODULES ha/1:una:unb lappend ans list set __MODULES_LMTAG una&auto-loaded - set tserr "load unb\nload una\nunload ha/2\n\nmsg_load una err_conlof ha\n\nmsg_top_load unb ha/2 una {}" + set tserr "load unb\nload una\nunload ha/2\n\nmsg_load {una <aL>} err_conlof ha\n\nmsg_top_load unb ha/2 una {}" } else { set ans list lappend ans list set __MODULES_LMCONFLICT una&ha @@ -153,7 +153,7 @@ lappend ans list set _LMFILES_ $mp/ha/2:$mp/una:$mp/unb lappend ans list set LOADEDMODULES ha/2:una:unb lappend ans list set __MODULES_LMTAG una&auto-loaded - set tserr "load unb\nload una\nunload ha/1\n\nmsg_load una err_conlof ha\n\nmsg_top_load unb ha/1 una {}" + set tserr "load unb\nload una\nunload ha/1\n\nmsg_load {una <aL>} err_conlof ha\n\nmsg_top_load unb ha/1 una {}" } testouterr_cmd_re sh {load --force --auto unb} $ans $tserr
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/380-altname.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/380-altname.exp
Changed
@@ -199,10 +199,10 @@ testouterr_cmd "sh" "unload i1" $ans msg_top_unload i1 {} list alt/1 alt/dir/2 {} # unload alias-named prereq -testouterr_cmd "sh" "unload altfoo" $ans msg_top_unload alt/dir/2 i1 alt/1 {} +testouterr_cmd "sh" "unload altfoo" $ans msg_top_unload {alt/dir/2 <aL>} i1 alt/1 {} # unload symbolic-version-named prereq -testouterr_cmd "sh" "unload alt/sym" $ans msg_top_unload alt/1 i1 alt/dir/2 {} +testouterr_cmd "sh" "unload alt/sym" $ans msg_top_unload {alt/1 <aL>} i1 alt/dir/2 {} # load module whereas its alias-named conflict and its symbolic-version-named conflict are not loaded @@ -220,7 +220,7 @@ setenv_var __MODULES_LMALTNAME alt/dir/2&al|altfoo:alt/1&alt/sym&al|foo testouterr_cmd_re "sh" "load i2" ERR msg_load i2 err_conflict altfoo -# load module whose alterative name conflicts with an already loaded module +# load module whose alternative name conflicts with an already loaded module setenv_loaded_module list i2 list $mp/i2 unsetenv_var __MODULES_LMALTNAME setenv_var __MODULES_LMCONFLICT i2&altfoo&alt/sym @@ -314,7 +314,7 @@ lappend ans list unset _LMFILES_ lappend ans list unset LOADEDMODULES lappend ans list unset __MODULES_LMTAG -testouterr_cmd_re sh {unload alt/dir/2} $ans msg_top_unload alt/dir/2 i6 {} {} +testouterr_cmd_re sh {unload alt/dir/2} $ans msg_top_unload {alt/dir/2 <aL>} i6 {} {} # 'module unload' set on an alternative name setenv_loaded_module list alt/dir/2 list $mp/alt/dir/2
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/400-source-sh.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/400-source-sh.exp
Changed
@@ -27,6 +27,7 @@ setenv_path_var MODULEPATH $mp setenv_var TESTSUITE_SHTOMOD_PATHDUP 1 +setenv_var TESTSUITE_SHTOMOD_NOCOMP 1 # @@ -39,7 +40,7 @@ lappend ans list set _LMFILES_ $mp/source-sh/1 lappend ans list set LOADEDMODULES source-sh/1 lappend ans list set FOOPATHDUP "/path/to/dir1:/path/to/dir2:/path/to/dir3:/path/to dir4" -lappend ans list set __MODULES_LMSOURCESH source-sh/1\&bash\ testsuite/example/sh-to-mod.sh\|chdir\ $mp\|prepend-path\ FOOPATH\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHCB\ /path/to/dir1\ /path/to/d\\\{r2\ /path/to/dir3\|prepend-path\ FOOPATHDUP\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\ \{/path/to\ dir4\}\|prepend-path\ FOOPATHDUPEM\ \{\}\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHDUPMIX\ \{\}\ /path/to/dir1\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir1\}\ /path/to/dir3\|prepend-path\ FOOPATHDUPSP\ \{/path/to/dir1\ /path/to/dir1\ /path/to/dir2\ /path/to/dir1\ /path/to/dir3\ /path/to\}\ \{dir4\ /path/to/dir3\}\|prepend-path\ FOOPATHEM\ \{\}\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|set-alias\ alcb\ \{\}\|set-alias\ alem\ \{\}\|set-alias\ alfoo\ \{\}\|set-alias\ alsp\ \{\}\|set-function\ funccb\ \{\}\|set-function\ funcfoo\ \{\}\|set-function\ funcnl\ \{\}\|set-function\ funcsp\ \{\}\|setenv\ FOO\ value\|setenv\ FOOCB\ va\\\{ue\|setenv\ FOOEM\ \{\}\|setenv\ FOOPATHDUPSPEM\ \{/path/to/dir1\ /path/to/dir1\ /path/to/dir2\ /path/to/dir1\ /path/to/dir3\ /path/to/dir3\ \}\|setenv\ FOOPATHSP\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\}\|setenv\ FOOPATHSPEM\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\ \}\|setenv\ FOOSP\ \{value\ \} +lappend ans list set __MODULES_LMSOURCESH source-sh/1\&bash\ testsuite/example/sh-to-mod.sh\|chdir\ $mp\|prepend-path\ FOOPATH\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHCB\ /path/to/dir1\ /path/to/d\\\{r2\ /path/to/dir3\|prepend-path\ FOOPATHDUP\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\ \{/path/to\ dir4\}\|prepend-path\ FOOPATHDUPEM\ \{\}\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHDUPMIX\ \{\}\ /path/to/dir1\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir1\}\ /path/to/dir3\|prepend-path\ FOOPATHDUPSP\ \{/path/to/dir1\ /path/to/dir1\ /path/to/dir2\ /path/to/dir1\ /path/to/dir3\ /path/to\}\ \{dir4\ /path/to/dir3\}\|prepend-path\ FOOPATHEM\ \{\}\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHWC\ /path/to/dir1\ /path/to/d\*r2\ /path/to/dir3\|set-alias\ alcb\ \{\}\|set-alias\ alem\ \{\}\|set-alias\ alfoo\ \{\}\|set-alias\ alsp\ \{\}\|set-function\ funccb\ \{\}\|set-function\ funcfoo\ \{\}\|set-function\ funcnl\ \{\}\|set-function\ funcsp\ \{\}\|set-function\ funcwc\ \{\}\|setenv\ FOO\ value\|setenv\ FOOCB\ va\\\{ue\|setenv\ FOOEM\ \{\}\|setenv\ FOOPATHDUPSPEM\ \{/path/to/dir1\ /path/to/dir1\ /path/to/dir2\ /path/to/dir1\ /path/to/dir3\ /path/to/dir3\ \}\|setenv\ FOOPATHSP\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\}\|setenv\ FOOPATHSPEM\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\ \}\|setenv\ FOOSP\ \{value\ \}\|setenv\ FOOWC\ va\*ue lappend ans list set FOOPATHEM :/path/to/dir1:/path/to/dir2:/path/to/dir3 lappend ans list set FOOPATHSP {/path/to/dir1 /path/to/dir2 /path/to/dir3} lappend ans list set __MODULES_SHARE_FOOPATHDUPEM :1 @@ -48,12 +49,14 @@ lappend ans list set FOOSP {value } lappend ans list set FOOPATHDUPSPEM {/path/to/dir1 /path/to/dir1 /path/to/dir2 /path/to/dir1 /path/to/dir3 /path/to/dir3 } lappend ans list set FOOPATHDUPMIX ":/path/to/dir1:/path/to/dir1 /path/to/dir2 /path/to/dir1:/path/to/dir3" -lappend ans list set FOOPATH /path/to/dir1:/path/to/dir2:/path/to/dir3 lappend ans list set FOOCB va\{ue +lappend ans list set FOOPATH /path/to/dir1:/path/to/dir2:/path/to/dir3 lappend ans list set __MODULES_SHARE_FOOPATHEM :1 +lappend ans list set FOOPATHWC /path/to/dir1:/path/to/d\*r2:/path/to/dir3 lappend ans list set FOOPATHDUPEM :/path/to/dir1:/path/to/dir2:/path/to/dir3 lappend ans list set FOO value lappend ans list set FOOPATHDUPSP "/path/to/dir1 /path/to/dir1 /path/to/dir2 /path/to/dir1 /path/to/dir3 /path/to:dir4 /path/to/dir3" +lappend ans list set FOOWC va\*ue lappend ans list set FOOPATHSPEM {/path/to/dir1 /path/to/dir2 /path/to/dir3 } lappend ans list alias alsp {echo f\"o; echo b\\\"r; echo f\'o} lappend ans list alias alfoo {echo $(grep "report .Modules " ../../modulecmd.tcl | tr -d \\ 2>/dev/null | awk '{print $3}')} @@ -61,6 +64,7 @@ lappend ans list alias alem {} lappend ans list funcfoo "() { echo foo; };" lappend ans list funccb "() { echo f\{o; };" +lappend ans list funcwc "() { echo sou*sh; };" lappend ans list funcnl "() { echo foo; echo bar; };" lappend ans list funcsp "() { echo f\\\"o; @@ -72,10 +76,11 @@ # basic unload setenv_loaded_module list source-sh/1 list $mp/source-sh/1 -setenv_var __MODULES_LMSOURCESH source-sh/1\&bash\ testsuite/example/sh-to-mod.sh\|chdir\ $mp\|prepend-path\ FOOPATH\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHCB\ /path/to/dir1\ /path/to/d\\\{r2\ /path/to/dir3\|prepend-path\ FOOPATHDUP\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\ \{/path/to\ dir4\}\|prepend-path\ FOOPATHDUPEM\ \{\}\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHDUPMIX\ \{\}\ /path/to/dir1\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir1\}\ /path/to/dir3\|prepend-path\ FOOPATHDUPSP\ \{/path/to/dir1\ /path/to/dir1\ /path/to/dir2\ /path/to/dir1\ /path/to/dir3\ /path/to\}\ \{dir4\ /path/to/dir3\}\|prepend-path\ FOOPATHEM\ \{\}\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|set-alias\ alcb\ \{\}\|set-alias\ alem\ \{\}\|set-alias\ alfoo\ \{\}\|set-alias\ alsp\ \{\}\|set-function\ funccb\ \{\}\|set-function\ funcfoo\ \{\}\|set-function\ funcnl\ \{\}\|set-function\ funcsp\ \{\}\|setenv\ FOO\ value\|setenv\ FOOCB\ va\\\{ue\|setenv\ FOOEM\ \{\}\|setenv\ FOOPATHDUPSPEM\ \{/path/to/dir1\ /path/to/dir1\ /path/to/dir2\ /path/to/dir1\ /path/to/dir3\ /path/to/dir3\ \}\|setenv\ FOOPATHSP\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\}\|setenv\ FOOPATHSPEM\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\ \}\|setenv\ FOOSP\ \{value\ \} +setenv_var __MODULES_LMSOURCESH source-sh/1\&bash\ testsuite/example/sh-to-mod.sh\|chdir\ $mp\|prepend-path\ FOOPATH\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHCB\ /path/to/dir1\ /path/to/d\\\{r2\ /path/to/dir3\|prepend-path\ FOOPATHDUP\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\ \{/path/to\ dir4\}\|prepend-path\ FOOPATHDUPEM\ \{\}\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHDUPMIX\ \{\}\ /path/to/dir1\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir1\}\ /path/to/dir3\|prepend-path\ FOOPATHDUPSP\ \{/path/to/dir1\ /path/to/dir1\ /path/to/dir2\ /path/to/dir1\ /path/to/dir3\ /path/to\}\ \{dir4\ /path/to/dir3\}\|prepend-path\ FOOPATHEM\ \{\}\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHWC\ /path/to/dir1\ /path/to/d\*r2\ /path/to/dir3\|set-alias\ alcb\ \{\}\|set-alias\ alem\ \{\}\|set-alias\ alfoo\ \{\}\|set-alias\ alsp\ \{\}\|set-function\ funccb\ \{\}\|set-function\ funcfoo\ \{\}\|set-function\ funcnl\ \{\}\|set-function\ funcsp\ \{\}\|set-function\ funcwc\ \{\}\|setenv\ FOO\ value\|setenv\ FOOCB\ va\\\{ue\|setenv\ FOOEM\ \{\}\|setenv\ FOOPATHDUPSPEM\ \{/path/to/dir1\ /path/to/dir1\ /path/to/dir2\ /path/to/dir1\ /path/to/dir3\ /path/to/dir3\ \}\|setenv\ FOOPATHSP\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\}\|setenv\ FOOPATHSPEM\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\ \}\|setenv\ FOOSP\ \{value\ \}\|setenv\ FOOWC\ va\*ue setenv_path_var FOOPATHDUP "/path/to/dir1:/path/to/dir2:/path/to/dir3:/path/to dir4" setenv_path_var FOOPATHEM {} /path/to/dir1 /path/to/dir2 /path/to/dir3 setenv_path_var FOOPATHCB /path/to/dir1:/path/to/d\{r2:/path/to/dir3 +setenv_path_var FOOPATHWC /path/to/dir1:/path/to/d\*r2:/path/to/dir3 setenv_path_var FOOPATHDUPMIX {} "/path/to/dir1:/path/to/dir1 /path/to/dir2 /path/to/dir1:/path/to/dir3" setenv_path_var FOOPATH /path/to/dir1:/path/to/dir2:/path/to/dir3 setenv_path_var FOOPATHDUPEM {} /path/to/dir1:/path/to/dir2:/path/to/dir3 @@ -85,6 +90,7 @@ setenv_var FOOSP {value } setenv_var FOOPATHDUPSPEM {/path/to/dir1 /path/to/dir1 /path/to/dir2 /path/to/dir1 /path/to/dir3 /path/to/dir3 } setenv_var FOOCB va\{ue +setenv_var FOOWC va\*ue setenv_var FOO value setenv_var FOOPATHSPEM {/path/to/dir1 /path/to/dir2 /path/to/dir3 } @@ -102,12 +108,14 @@ lappend ans list unset FOOSP lappend ans list unset FOOPATHDUPSPEM lappend ans list unset FOOPATHDUPMIX -lappend ans list unset FOOPATH lappend ans list unset FOOCB +lappend ans list unset FOOPATH lappend ans list unset __MODULES_SHARE_FOOPATHEM +lappend ans list unset FOOPATHWC lappend ans list unset FOOPATHDUPEM lappend ans list unset FOO lappend ans list unset FOOPATHDUPSP +lappend ans list unset FOOWC lappend ans list unset FOOPATHSPEM lappend ans list unalias alsp lappend ans list unalias alfoo @@ -115,6 +123,7 @@ lappend ans list unalias alem lappend ans list "unset -f funcfoo;" lappend ans list "unset -f funccb;" +lappend ans list "unset -f funcwc;" lappend ans list "unset -f funcnl;" lappend ans list "unset -f funcsp;" testouterr_cmd sh {unload source-sh/1} $ans {} @@ -127,7 +136,7 @@ lappend ans list set FOOPATH /path/to/mini:/path/to/dir1:/path/to/dir2:/path/to/dir3 lappend ans list set _LMFILES_ $mp/source-sh/1:$mp/source-sh/2 lappend ans list set LOADEDMODULES source-sh/1:source-sh/2 -lappend ans list set __MODULES_LMSOURCESH source-sh/1\&bash\ testsuite/example/sh-to-mod.sh\|chdir\ $mp\|prepend-path\ FOOPATH\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHCB\ /path/to/dir1\ /path/to/d\\\{r2\ /path/to/dir3\|prepend-path\ FOOPATHDUP\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\ \{/path/to\ dir4\}\|prepend-path\ FOOPATHDUPEM\ \{\}\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHDUPMIX\ \{\}\ /path/to/dir1\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir1\}\ /path/to/dir3\|prepend-path\ FOOPATHDUPSP\ \{/path/to/dir1\ /path/to/dir1\ /path/to/dir2\ /path/to/dir1\ /path/to/dir3\ /path/to\}\ \{dir4\ /path/to/dir3\}\|prepend-path\ FOOPATHEM\ \{\}\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|set-alias\ alcb\ \{\}\|set-alias\ alem\ \{\}\|set-alias\ alfoo\ \{\}\|set-alias\ alsp\ \{\}\|set-function\ funccb\ \{\}\|set-function\ funcfoo\ \{\}\|set-function\ funcnl\ \{\}\|set-function\ funcsp\ \{\}\|setenv\ FOO\ value\|setenv\ FOOCB\ va\\\{ue\|setenv\ FOOEM\ \{\}\|setenv\ FOOPATHDUPSPEM\ \{/path/to/dir1\ /path/to/dir1\ /path/to/dir2\ /path/to/dir1\ /path/to/dir3\ /path/to/dir3\ \}\|setenv\ FOOPATHSP\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\}\|setenv\ FOOPATHSPEM\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\ \}\|setenv\ FOOSP\ \{value\ \}:source-sh/2\&sh\ testsuite/example/mini-sh-to-mod.sh\|prepend-path\ FOOPATH\ /path/to/mini\|set-alias\ almini\ \{\}\|setenv\ FOOMINI\ value +lappend ans list set __MODULES_LMSOURCESH source-sh/1\&bash\ testsuite/example/sh-to-mod.sh\|chdir\ $mp\|prepend-path\ FOOPATH\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHCB\ /path/to/dir1\ /path/to/d\\\{r2\ /path/to/dir3\|prepend-path\ FOOPATHDUP\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\ \{/path/to\ dir4\}\|prepend-path\ FOOPATHDUPEM\ \{\}\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHDUPMIX\ \{\}\ /path/to/dir1\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir1\}\ /path/to/dir3\|prepend-path\ FOOPATHDUPSP\ \{/path/to/dir1\ /path/to/dir1\ /path/to/dir2\ /path/to/dir1\ /path/to/dir3\ /path/to\}\ \{dir4\ /path/to/dir3\}\|prepend-path\ FOOPATHEM\ \{\}\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHWC\ /path/to/dir1\ /path/to/d\*r2\ /path/to/dir3\|set-alias\ alcb\ \{\}\|set-alias\ alem\ \{\}\|set-alias\ alfoo\ \{\}\|set-alias\ alsp\ \{\}\|set-function\ funccb\ \{\}\|set-function\ funcfoo\ \{\}\|set-function\ funcnl\ \{\}\|set-function\ funcsp\ \{\}\|set-function\ funcwc\ \{\}\|setenv\ FOO\ value\|setenv\ FOOCB\ va\\\{ue\|setenv\ FOOEM\ \{\}\|setenv\ FOOPATHDUPSPEM\ \{/path/to/dir1\ /path/to/dir1\ /path/to/dir2\ /path/to/dir1\ /path/to/dir3\ /path/to/dir3\ \}\|setenv\ FOOPATHSP\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\}\|setenv\ FOOPATHSPEM\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\ \}\|setenv\ FOOSP\ \{value\ \}\|setenv\ FOOWC\ va\*ue:source-sh/2\&sh\ testsuite/example/mini-sh-to-mod.sh\|prepend-path\ FOOPATH\ /path/to/mini\|set-alias\ almini\ \{\}\|setenv\ FOOMINI\ value lappend ans list alias almini echo\ mini testouterr_cmd_re sh {load source-sh/2} $ans {} @@ -135,14 +144,14 @@ setenv_loaded_module list source-sh/1 source-sh/2 list $mp/source-sh/1 $mp/source-sh/2 setenv_var FOOMINI value setenv_path_var FOOPATH /path/to/mini:/path/to/dir1:/path/to/dir2:/path/to/dir3 -setenv_var __MODULES_LMSOURCESH source-sh/1\&bash\ testsuite/example/sh-to-mod.sh\|chdir\ $mp\|prepend-path\ FOOPATH\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHCB\ /path/to/dir1\ /path/to/d\\\{r2\ /path/to/dir3\|prepend-path\ FOOPATHDUP\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\ \{/path/to\ dir4\}\|prepend-path\ FOOPATHDUPEM\ \{\}\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHDUPMIX\ \{\}\ /path/to/dir1\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir1\}\ /path/to/dir3\|prepend-path\ FOOPATHDUPSP\ \{/path/to/dir1\ /path/to/dir1\ /path/to/dir2\ /path/to/dir1\ /path/to/dir3\ /path/to\}\ \{dir4\ /path/to/dir3\}\|prepend-path\ FOOPATHEM\ \{\}\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|set-alias\ alcb\ \{\}\|set-alias\ alem\ \{\}\|set-alias\ alfoo\ \{\}\|set-alias\ alsp\ \{\}\|set-function\ funccb\ \{\}\|set-function\ funcfoo\ \{\}\|set-function\ funcnl\ \{\}\|set-function\ funcsp\ \{\}\|setenv\ FOO\ value\|setenv\ FOOCB\ va\\\{ue\|setenv\ FOOEM\ \{\}\|setenv\ FOOPATHDUPSPEM\ \{/path/to/dir1\ /path/to/dir1\ /path/to/dir2\ /path/to/dir1\ /path/to/dir3\ /path/to/dir3\ \}\|setenv\ FOOPATHSP\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\}\|setenv\ FOOPATHSPEM\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\ \}\|setenv\ FOOSP\ \{value\ \}:source-sh/2\&sh\ testsuite/example/mini-sh-to-mod.sh\|prepend-path\ FOOPATH\ /path/to/mini\|set-alias\ almini\ \{\}\|setenv\ FOOMINI\ value +setenv_var __MODULES_LMSOURCESH source-sh/1\&bash\ testsuite/example/sh-to-mod.sh\|chdir\ $mp\|prepend-path\ FOOPATH\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHCB\ /path/to/dir1\ /path/to/d\\\{r2\ /path/to/dir3\|prepend-path\ FOOPATHDUP\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\ \{/path/to\ dir4\}\|prepend-path\ FOOPATHDUPEM\ \{\}\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHDUPMIX\ \{\}\ /path/to/dir1\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir1\}\ /path/to/dir3\|prepend-path\ FOOPATHDUPSP\ \{/path/to/dir1\ /path/to/dir1\ /path/to/dir2\ /path/to/dir1\ /path/to/dir3\ /path/to\}\ \{dir4\ /path/to/dir3\}\|prepend-path\ FOOPATHEM\ \{\}\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHWC\ /path/to/dir1\ /path/to/d\*r2\ /path/to/dir3\|set-alias\ alcb\ \{\}\|set-alias\ alem\ \{\}\|set-alias\ alfoo\ \{\}\|set-alias\ alsp\ \{\}\|set-function\ funccb\ \{\}\|set-function\ funcfoo\ \{\}\|set-function\ funcnl\ \{\}\|set-function\ funcsp\ \{\}\|set-function\ funcwc\ \{\}\|setenv\ FOO\ value\|setenv\ FOOCB\ va\\\{ue\|setenv\ FOOEM\ \{\}\|setenv\ FOOPATHDUPSPEM\ \{/path/to/dir1\ /path/to/dir1\ /path/to/dir2\ /path/to/dir1\ /path/to/dir3\ /path/to/dir3\ \}\|setenv\ FOOPATHSP\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\}\|setenv\ FOOPATHSPEM\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\ \}\|setenv\ FOOSP\ \{value\ \}\|setenv\ FOOWC\ va\*ue:source-sh/2\&sh\ testsuite/example/mini-sh-to-mod.sh\|prepend-path\ FOOPATH\ /path/to/mini\|set-alias\ almini\ \{\}\|setenv\ FOOMINI\ value set ans list lappend ans list unset FOOMINI lappend ans list set FOOPATH /path/to/dir1:/path/to/dir2:/path/to/dir3 lappend ans list set _LMFILES_ $mp/source-sh/1 lappend ans list set LOADEDMODULES source-sh/1 -lappend ans list set __MODULES_LMSOURCESH source-sh/1\&bash\ testsuite/example/sh-to-mod.sh\|chdir\ $mp\|prepend-path\ FOOPATH\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHCB\ /path/to/dir1\ /path/to/d\\\{r2\ /path/to/dir3\|prepend-path\ FOOPATHDUP\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\ \{/path/to\ dir4\}\|prepend-path\ FOOPATHDUPEM\ \{\}\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHDUPMIX\ \{\}\ /path/to/dir1\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir1\}\ /path/to/dir3\|prepend-path\ FOOPATHDUPSP\ \{/path/to/dir1\ /path/to/dir1\ /path/to/dir2\ /path/to/dir1\ /path/to/dir3\ /path/to\}\ \{dir4\ /path/to/dir3\}\|prepend-path\ FOOPATHEM\ \{\}\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|set-alias\ alcb\ \{\}\|set-alias\ alem\ \{\}\|set-alias\ alfoo\ \{\}\|set-alias\ alsp\ \{\}\|set-function\ funccb\ \{\}\|set-function\ funcfoo\ \{\}\|set-function\ funcnl\ \{\}\|set-function\ funcsp\ \{\}\|setenv\ FOO\ value\|setenv\ FOOCB\ va\\\{ue\|setenv\ FOOEM\ \{\}\|setenv\ FOOPATHDUPSPEM\ \{/path/to/dir1\ /path/to/dir1\ /path/to/dir2\ /path/to/dir1\ /path/to/dir3\ /path/to/dir3\ \}\|setenv\ FOOPATHSP\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\}\|setenv\ FOOPATHSPEM\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\ \}\|setenv\ FOOSP\ \{value\ \} +lappend ans list set __MODULES_LMSOURCESH source-sh/1\&bash\ testsuite/example/sh-to-mod.sh\|chdir\ $mp\|prepend-path\ FOOPATH\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHCB\ /path/to/dir1\ /path/to/d\\\{r2\ /path/to/dir3\|prepend-path\ FOOPATHDUP\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\ \{/path/to\ dir4\}\|prepend-path\ FOOPATHDUPEM\ \{\}\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHDUPMIX\ \{\}\ /path/to/dir1\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir1\}\ /path/to/dir3\|prepend-path\ FOOPATHDUPSP\ \{/path/to/dir1\ /path/to/dir1\ /path/to/dir2\ /path/to/dir1\ /path/to/dir3\ /path/to\}\ \{dir4\ /path/to/dir3\}\|prepend-path\ FOOPATHEM\ \{\}\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHWC\ /path/to/dir1\ /path/to/d\*r2\ /path/to/dir3\|set-alias\ alcb\ \{\}\|set-alias\ alem\ \{\}\|set-alias\ alfoo\ \{\}\|set-alias\ alsp\ \{\}\|set-function\ funccb\ \{\}\|set-function\ funcfoo\ \{\}\|set-function\ funcnl\ \{\}\|set-function\ funcsp\ \{\}\|set-function\ funcwc\ \{\}\|setenv\ FOO\ value\|setenv\ FOOCB\ va\\\{ue\|setenv\ FOOEM\ \{\}\|setenv\ FOOPATHDUPSPEM\ \{/path/to/dir1\ /path/to/dir1\ /path/to/dir2\ /path/to/dir1\ /path/to/dir3\ /path/to/dir3\ \}\|setenv\ FOOPATHSP\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\}\|setenv\ FOOPATHSPEM\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\ \}\|setenv\ FOOSP\ \{value\ \}\|setenv\ FOOWC\ va\*ue lappend ans list unalias almini testouterr_cmd sh {unload source-sh/2} $ans {} @@ -160,12 +169,14 @@ lappend ans list unset FOOSP lappend ans list unset FOOPATHDUPSPEM lappend ans list unset FOOPATHDUPMIX -lappend ans list set FOOPATH /path/to/mini lappend ans list unset FOOCB +lappend ans list set FOOPATH /path/to/mini lappend ans list unset __MODULES_SHARE_FOOPATHEM +lappend ans list unset FOOPATHWC lappend ans list unset FOOPATHDUPEM lappend ans list unset FOO lappend ans list unset FOOPATHDUPSP +lappend ans list unset FOOWC lappend ans list unset FOOPATHSPEM lappend ans list unalias alsp lappend ans list unalias alfoo @@ -173,6 +184,7 @@ lappend ans list unalias alem lappend ans list "unset -f funcfoo;" lappend ans list "unset -f funccb;" +lappend ans list "unset -f funcwc;" lappend ans list "unset -f funcnl;" lappend ans list "unset -f funcsp;" testouterr_cmd sh {unload source-sh/1} $ans {} @@ -187,13 +199,14 @@ lappend ans list set _LMFILES_ $mp/source-sh/1:$mp/source-sh/2:$mp/source-sh/3 lappend ans list set LOADEDMODULES source-sh/1:source-sh/2:source-sh/3 lappend ans list set FOOPATHDUP "/path/to/dir1:/path/to/dir1:/path/to/dir2:/path/to/dir1:/path/to/dir3:/path/to dir4:/path/to/dir3" -lappend ans list set __MODULES_LMSOURCESH source-sh/1\&bash\ testsuite/example/sh-to-mod.sh\|chdir\ $mp\|prepend-path\ FOOPATH\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHCB\ /path/to/dir1\ /path/to/d\\\{r2\ /path/to/dir3\|prepend-path\ FOOPATHDUP\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\ \{/path/to\ dir4\}\|prepend-path\ FOOPATHDUPEM\ \{\}\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHDUPMIX\ \{\}\ /path/to/dir1\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir1\}\ /path/to/dir3\|prepend-path\ FOOPATHDUPSP\ \{/path/to/dir1\ /path/to/dir1\ /path/to/dir2\ /path/to/dir1\ /path/to/dir3\ /path/to\}\ \{dir4\ /path/to/dir3\}\|prepend-path\ FOOPATHEM\ \{\}\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|set-alias\ alcb\ \{\}\|set-alias\ alem\ \{\}\|set-alias\ alfoo\ \{\}\|set-alias\ alsp\ \{\}\|set-function\ funccb\ \{\}\|set-function\ funcfoo\ \{\}\|set-function\ funcnl\ \{\}\|set-function\ funcsp\ \{\}\|setenv\ FOO\ value\|setenv\ FOOCB\ va\\\{ue\|setenv\ FOOEM\ \{\}\|setenv\ FOOPATHDUPSPEM\ \{/path/to/dir1\ /path/to/dir1\ /path/to/dir2\ /path/to/dir1\ /path/to/dir3\ /path/to/dir3\ \}\|setenv\ FOOPATHSP\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\}\|setenv\ FOOPATHSPEM\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\ \}\|setenv\ FOOSP\ \{value\ \}:source-sh/2\&sh\ testsuite/example/mini-sh-to-mod.sh\|prepend-path\ FOOPATH\ /path/to/mini\|set-alias\ almini\ \{\}\|setenv\ FOOMINI\ value:source-sh/3\&bash\ testsuite/example/sh-to-mod.sh\|append-path\ FOOPATHDUPMIX\ /path/to/dir3\ \{\}\|chdir\ $mp\|set-alias\ alcb\ \{\}\|set-alias\ alem\ \{\}\|set-alias\ alfoo\ \{\}\|set-alias\ alsp\ \{\}\|set-function\ funccb\ \{\}\|set-function\ funcfoo\ \{\}\|set-function\ funcnl\ \{\}\|set-function\ funcsp\ \{\}\|setenv\ FOOPATH\ /path/to/dir1\<EnvModEscPS\>/path/to/dir2\<EnvModEscPS\>/path/to/dir3\|setenv\ FOOPATHDUP\ \{/path/to/dir1\<EnvModEscPS\>/path/to/dir1\<EnvModEscPS\>/path/to/dir2\<EnvModEscPS\>/path/to/dir1\<EnvModEscPS\>/path/to/dir3\<EnvModEscPS\>/path/to\ dir4\<EnvModEscPS\>/path/to/dir3\}\|setenv\ FOOPATHDUPEM\ \<EnvModEscPS\>/path/to/dir1\<EnvModEscPS\>/path/to/dir1\<EnvModEscPS\>/path/to/dir2\<EnvModEscPS\>/path/to/dir1\<EnvModEscPS\>/path/to/dir3\<EnvModEscPS\>\<EnvModEscPS\>/path/to/dir3 +lappend ans list set __MODULES_LMSOURCESH source-sh/1\&bash\ testsuite/example/sh-to-mod.sh\|chdir\ $mp\|prepend-path\ FOOPATH\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHCB\ /path/to/dir1\ /path/to/d\\\{r2\ /path/to/dir3\|prepend-path\ FOOPATHDUP\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\ \{/path/to\ dir4\}\|prepend-path\ FOOPATHDUPEM\ \{\}\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHDUPMIX\ \{\}\ /path/to/dir1\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir1\}\ /path/to/dir3\|prepend-path\ FOOPATHDUPSP\ \{/path/to/dir1\ /path/to/dir1\ /path/to/dir2\ /path/to/dir1\ /path/to/dir3\ /path/to\}\ \{dir4\ /path/to/dir3\}\|prepend-path\ FOOPATHEM\ \{\}\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHWC\ /path/to/dir1\ /path/to/d\*r2\ /path/to/dir3\|set-alias\ alcb\ \{\}\|set-alias\ alem\ \{\}\|set-alias\ alfoo\ \{\}\|set-alias\ alsp\ \{\}\|set-function\ funccb\ \{\}\|set-function\ funcfoo\ \{\}\|set-function\ funcnl\ \{\}\|set-function\ funcsp\ \{\}\|set-function\ funcwc\ \{\}\|setenv\ FOO\ value\|setenv\ FOOCB\ va\\\{ue\|setenv\ FOOEM\ \{\}\|setenv\ FOOPATHDUPSPEM\ \{/path/to/dir1\ /path/to/dir1\ /path/to/dir2\ /path/to/dir1\ /path/to/dir3\ /path/to/dir3\ \}\|setenv\ FOOPATHSP\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\}\|setenv\ FOOPATHSPEM\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\ \}\|setenv\ FOOSP\ \{value\ \}\|setenv\ FOOWC\ va\*ue:source-sh/2\&sh\ testsuite/example/mini-sh-to-mod.sh\|prepend-path\ FOOPATH\ /path/to/mini\|set-alias\ almini\ \{\}\|setenv\ FOOMINI\ value:source-sh/3\&bash\ testsuite/example/sh-to-mod.sh\|append-path\ FOOPATHDUPMIX\ /path/to/dir3\ \{\}\|chdir\ $mp\|set-alias\ alcb\ \{\}\|set-alias\ alem\ \{\}\|set-alias\ alfoo\ \{\}\|set-alias\ alsp\ \{\}\|set-function\ funccb\ \{\}\|set-function\ funcfoo\ \{\}\|set-function\ funcnl\ \{\}\|set-function\ funcsp\ \{\}\|set-function\ funcwc\ \{\}\|setenv\ FOOPATH\ /path/to/dir1\<EnvModEscPS\>/path/to/dir2\<EnvModEscPS\>/path/to/dir3\|setenv\ FOOPATHDUP\ \{/path/to/dir1\<EnvModEscPS\>/path/to/dir1\<EnvModEscPS\>/path/to/dir2\<EnvModEscPS\>/path/to/dir1\<EnvModEscPS\>/path/to/dir3\<EnvModEscPS\>/path/to\ dir4\<EnvModEscPS\>/path/to/dir3\}\|setenv\ FOOPATHDUPEM\ \<EnvModEscPS\>/path/to/dir1\<EnvModEscPS\>/path/to/dir1\<EnvModEscPS\>/path/to/dir2\<EnvModEscPS\>/path/to/dir1\<EnvModEscPS\>/path/to/dir3\<EnvModEscPS\>\<EnvModEscPS\>/path/to/dir3 lappend ans list alias alsp {echo f\"o; echo b\\\"r; echo f\'o} lappend ans list alias alfoo {echo $(grep "report .Modules " ../../modulecmd.tcl | tr -d \\ 2>/dev/null | awk '{print $3}')} lappend ans list alias alcb echo\ f\{o lappend ans list alias alem {} lappend ans list funcfoo "\\\(\\\) { echo foo; };" lappend ans list funccb "\\\(\\\) { echo f\{o; };" +lappend ans list funcwc "\\\(\\\) { echo sou\\\*sh; };" lappend ans list funcnl "\\\(\\\) { echo foo; echo bar; };" lappend ans list funcsp "\\\(\\\) { echo f\\\\\"o; @@ -212,13 +225,13 @@ setenv_path_var FOOPATHDUPMIX :/path/to/dir1:/path/to/dir1\ /path/to/dir2\ /path/to/dir1:/path/to/dir3 setenv_var FOOPATH /path/to/dir1:/path/to/dir2:/path/to/dir3 setenv_var FOOPATHDUPEM :/path/to/dir1:/path/to/dir1:/path/to/dir2:/path/to/dir1:/path/to/dir3::/path/to/dir3 -setenv_var __MODULES_LMSOURCESH source-sh/1\&bash\ testsuite/example/sh-to-mod.sh\|chdir\ $mp\|prepend-path\ FOOPATH\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHCB\ /path/to/dir1\ /path/to/d\\\{r2\ /path/to/dir3\|prepend-path\ FOOPATHDUP\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\ \{/path/to\ dir4\}\|prepend-path\ FOOPATHDUPEM\ \{\}\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHDUPMIX\ \{\}\ /path/to/dir1\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir1\}\ /path/to/dir3\|prepend-path\ FOOPATHDUPSP\ \{/path/to/dir1\ /path/to/dir1\ /path/to/dir2\ /path/to/dir1\ /path/to/dir3\ /path/to\}\ \{dir4\ /path/to/dir3\}\|prepend-path\ FOOPATHEM\ \{\}\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|set-alias\ alcb\ \{\}\|set-alias\ alem\ \{\}\|set-alias\ alfoo\ \{\}\|set-alias\ alsp\ \{\}\|set-function\ funccb\ \{\}\|set-function\ funcfoo\ \{\}\|set-function\ funcnl\ \{\}\|set-function\ funcsp\ \{\}\|setenv\ FOO\ value\|setenv\ FOOCB\ va\\\{ue\|setenv\ FOOEM\ \{\}\|setenv\ FOOPATHDUPSPEM\ \{/path/to/dir1\ /path/to/dir1\ /path/to/dir2\ /path/to/dir1\ /path/to/dir3\ /path/to/dir3\ \}\|setenv\ FOOPATHSP\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\}\|setenv\ FOOPATHSPEM\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\ \}\|setenv\ FOOSP\ \{value\ \}:source-sh/2\&sh\ testsuite/example/mini-sh-to-mod.sh\|prepend-path\ FOOPATH\ /path/to/mini\|set-alias\ almini\ \{\}\|setenv\ FOOMINI\ value:source-sh/3\&bash\ testsuite/example/sh-to-mod.sh\|append-path\ FOOPATHDUPMIX\ /path/to/dir3\ \{\}\|chdir\ $mp\|set-alias\ alcb\ \{\}\|set-alias\ alem\ \{\}\|set-alias\ alfoo\ \{\}\|set-alias\ alsp\ \{\}\|set-function\ funccb\ \{\}\|set-function\ funcfoo\ \{\}\|set-function\ funcnl\ \{\}\|set-function\ funcsp\ \{\}\|setenv\ FOOPATH\ /path/to/dir1\<EnvModEscPS\>/path/to/dir2\<EnvModEscPS\>/path/to/dir3\|setenv\ FOOPATHDUP\ \{/path/to/dir1\<EnvModEscPS\>/path/to/dir1\<EnvModEscPS\>/path/to/dir2\<EnvModEscPS\>/path/to/dir1\<EnvModEscPS\>/path/to/dir3\<EnvModEscPS\>/path/to\ dir4\<EnvModEscPS\>/path/to/dir3\}\|setenv\ FOOPATHDUPEM\ \<EnvModEscPS\>/path/to/dir1\<EnvModEscPS\>/path/to/dir1\<EnvModEscPS\>/path/to/dir2\<EnvModEscPS\>/path/to/dir1\<EnvModEscPS\>/path/to/dir3\<EnvModEscPS\>\<EnvModEscPS\>/path/to/dir3 +setenv_var __MODULES_LMSOURCESH source-sh/1\&bash\ testsuite/example/sh-to-mod.sh\|chdir\ $mp\|prepend-path\ FOOPATH\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHCB\ /path/to/dir1\ /path/to/d\\\{r2\ /path/to/dir3\|prepend-path\ FOOPATHDUP\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\ \{/path/to\ dir4\}\|prepend-path\ FOOPATHDUPEM\ \{\}\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHDUPMIX\ \{\}\ /path/to/dir1\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir1\}\ /path/to/dir3\|prepend-path\ FOOPATHDUPSP\ \{/path/to/dir1\ /path/to/dir1\ /path/to/dir2\ /path/to/dir1\ /path/to/dir3\ /path/to\}\ \{dir4\ /path/to/dir3\}\|prepend-path\ FOOPATHEM\ \{\}\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHWC\ /path/to/dir1\ /path/to/d\*r2\ /path/to/dir3\|set-alias\ alcb\ \{\}\|set-alias\ alem\ \{\}\|set-alias\ alfoo\ \{\}\|set-alias\ alsp\ \{\}\|set-function\ funccb\ \{\}\|set-function\ funcfoo\ \{\}\|set-function\ funcnl\ \{\}\|set-function\ funcsp\ \{\}\|set-function\ funcwc\ \{\}\|setenv\ FOO\ value\|setenv\ FOOCB\ va\\\{ue\|setenv\ FOOEM\ \{\}\|setenv\ FOOPATHDUPSPEM\ \{/path/to/dir1\ /path/to/dir1\ /path/to/dir2\ /path/to/dir1\ /path/to/dir3\ /path/to/dir3\ \}\|setenv\ FOOPATHSP\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\}\|setenv\ FOOPATHSPEM\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\ \}\|setenv\ FOOSP\ \{value\ \}\|setenv\ FOOWC\ va\*ue:source-sh/2\&sh\ testsuite/example/mini-sh-to-mod.sh\|prepend-path\ FOOPATH\ /path/to/mini\|set-alias\ almini\ \{\}\|setenv\ FOOMINI\ value:source-sh/3\&bash\ testsuite/example/sh-to-mod.sh\|append-path\ FOOPATHDUPMIX\ /path/to/dir3\ \{\}\|chdir\ $mp\|set-alias\ alcb\ \{\}\|set-alias\ alem\ \{\}\|set-alias\ alfoo\ \{\}\|set-alias\ alsp\ \{\}\|set-function\ funccb\ \{\}\|set-function\ funcfoo\ \{\}\|set-function\ funcnl\ \{\}\|set-function\ funcsp\ \{\}\|set-function\ funcwc\ \{\}\|setenv\ FOOPATH\ /path/to/dir1\<EnvModEscPS\>/path/to/dir2\<EnvModEscPS\>/path/to/dir3\|setenv\ FOOPATHDUP\ \{/path/to/dir1\<EnvModEscPS\>/path/to/dir1\<EnvModEscPS\>/path/to/dir2\<EnvModEscPS\>/path/to/dir1\<EnvModEscPS\>/path/to/dir3\<EnvModEscPS\>/path/to\ dir4\<EnvModEscPS\>/path/to/dir3\}\|setenv\ FOOPATHDUPEM\ \<EnvModEscPS\>/path/to/dir1\<EnvModEscPS\>/path/to/dir1\<EnvModEscPS\>/path/to/dir2\<EnvModEscPS\>/path/to/dir1\<EnvModEscPS\>/path/to/dir3\<EnvModEscPS\>\<EnvModEscPS\>/path/to/dir3 set ans list lappend ans list set _LMFILES_ $mp/source-sh/2:$mp/source-sh/3 lappend ans list set LOADEDMODULES source-sh/2:source-sh/3 lappend ans list unset FOOPATHDUP -lappend ans list set __MODULES_LMSOURCESH source-sh/2\&sh\ testsuite/example/mini-sh-to-mod.sh\|prepend-path\ FOOPATH\ /path/to/mini\|set-alias\ almini\ \{\}\|setenv\ FOOMINI\ value:source-sh/3\&bash\ testsuite/example/sh-to-mod.sh\|append-path\ FOOPATHDUPMIX\ /path/to/dir3\ \{\}\|chdir\ $mp\|set-alias\ alcb\ \{\}\|set-alias\ alem\ \{\}\|set-alias\ alfoo\ \{\}\|set-alias\ alsp\ \{\}\|set-function\ funccb\ \{\}\|set-function\ funcfoo\ \{\}\|set-function\ funcnl\ \{\}\|set-function\ funcsp\ \{\}\|setenv\ FOOPATH\ /path/to/dir1\<EnvModEscPS\>/path/to/dir2\<EnvModEscPS\>/path/to/dir3\|setenv\ FOOPATHDUP\ \{/path/to/dir1\<EnvModEscPS\>/path/to/dir1\<EnvModEscPS\>/path/to/dir2\<EnvModEscPS\>/path/to/dir1\<EnvModEscPS\>/path/to/dir3\<EnvModEscPS\>/path/to\ dir4\<EnvModEscPS\>/path/to/dir3\}\|setenv\ FOOPATHDUPEM\ \<EnvModEscPS\>/path/to/dir1\<EnvModEscPS\>/path/to/dir1\<EnvModEscPS\>/path/to/dir2\<EnvModEscPS\>/path/to/dir1\<EnvModEscPS\>/path/to/dir3\<EnvModEscPS\>\<EnvModEscPS\>/path/to/dir3 +lappend ans list set __MODULES_LMSOURCESH source-sh/2\&sh\ testsuite/example/mini-sh-to-mod.sh\|prepend-path\ FOOPATH\ /path/to/mini\|set-alias\ almini\ \{\}\|setenv\ FOOMINI\ value:source-sh/3\&bash\ testsuite/example/sh-to-mod.sh\|append-path\ FOOPATHDUPMIX\ /path/to/dir3\ \{\}\|chdir\ $mp\|set-alias\ alcb\ \{\}\|set-alias\ alem\ \{\}\|set-alias\ alfoo\ \{\}\|set-alias\ alsp\ \{\}\|set-function\ funccb\ \{\}\|set-function\ funcfoo\ \{\}\|set-function\ funcnl\ \{\}\|set-function\ funcsp\ \{\}\|set-function\ funcwc\ \{\}\|setenv\ FOOPATH\ /path/to/dir1\<EnvModEscPS\>/path/to/dir2\<EnvModEscPS\>/path/to/dir3\|setenv\ FOOPATHDUP\ \{/path/to/dir1\<EnvModEscPS\>/path/to/dir1\<EnvModEscPS\>/path/to/dir2\<EnvModEscPS\>/path/to/dir1\<EnvModEscPS\>/path/to/dir3\<EnvModEscPS\>/path/to\ dir4\<EnvModEscPS\>/path/to/dir3\}\|setenv\ FOOPATHDUPEM\ \<EnvModEscPS\>/path/to/dir1\<EnvModEscPS\>/path/to/dir1\<EnvModEscPS\>/path/to/dir2\<EnvModEscPS\>/path/to/dir1\<EnvModEscPS\>/path/to/dir3\<EnvModEscPS\>\<EnvModEscPS\>/path/to/dir3 lappend ans list unset FOOPATHEM lappend ans list unset FOOPATHSP lappend ans list unset FOOPATHCB @@ -229,9 +242,11 @@ lappend ans list unset FOOPATH lappend ans list unset FOOCB lappend ans list unset __MODULES_SHARE_FOOPATHEM +lappend ans list unset FOOPATHWC lappend ans list unset FOOPATHDUPEM lappend ans list unset FOO lappend ans list unset FOOPATHDUPSP +lappend ans list unset FOOWC lappend ans list unset FOOPATHSPEM lappend ans list unalias alsp lappend ans list unalias alfoo @@ -239,6 +254,7 @@ lappend ans list unalias alem lappend ans list "unset -f funcfoo;" lappend ans list "unset -f funccb;" +lappend ans list "unset -f funcwc;" lappend ans list "unset -f funcnl;" lappend ans list "unset -f funcsp;" testouterr_cmd_re sh {unload source-sh/1} $ans {} @@ -260,7 +276,10 @@ \\s*source-sh/4.1: source-sh/4.1 \\s*source-sh/4.2: source-sh/4.2 \\s*source-sh/4.3: source-sh/4.3 -\\s*source-sh/6.0: source-sh/6.0" +\\s*source-sh/6.0: source-sh/6.0 +\\s*source-sh/7.0: source-sh/7.0 +\\s*source-sh/7.1: source-sh/7.1 +\\s*source-sh/7.2: source-sh/7.2" # test 'help' sub-command when some modules are loaded testouterr_cmd_re sh {help source-sh/1} OK "$modlin @@ -298,6 +317,7 @@ prepend-path\tFOOPATHDUPMIX {} /path/to/dir1 {/path/to/dir1 /path/to/dir2 /path/to/dir1} /path/to/dir3 prepend-path\tFOOPATHDUPSP {/path/to/dir1 /path/to/dir1 /path/to/dir2 /path/to/dir1 /path/to/dir3 /path/to} {dir4 /path/to/dir3} prepend-path\tFOOPATHEM {} /path/to/dir1 /path/to/dir2 /path/to/dir3 +prepend-path\tFOOPATHWC /path/to/dir1 /path/to/d\*r2 /path/to/dir3 set-alias\talcb {echo\ f\{o} set-alias\talem {} set-alias\talfoo {echo \$(grep \"report .Modules \" ../../modulecmd.tcl | tr -d \\\\ 2>/dev/null | awk '\{print \$3\}')} @@ -313,6 +333,8 @@ echo f\\\"o; echo b\\\\\\\"r; echo f\\'o} +set-function\tfuncwc { + echo sou*sh} setenv\t\tFOO value setenv\t\tFOOCB va\{ue setenv\t\tFOOEM {} @@ -320,6 +342,7 @@ setenv\t\tFOOPATHSP {/path/to/dir1 /path/to/dir2 /path/to/dir3} setenv\t\tFOOPATHSPEM {/path/to/dir1 /path/to/dir2 /path/to/dir3 } setenv\t\tFOOSP {value } +setenv\t\tFOOWC va*ue module-whatis\tsource-sh/1 -------------------------------------------------------------------" testouterr_cmd sh {display source-sh/1} OK $tserr_disp1 @@ -349,6 +372,8 @@ echo f\\\"o; echo b\\\\\\\"r; echo f\\'o} +set-function\tfuncwc { + echo sou*sh} prepend-path FOOPATH /path/to/mini set-alias almini {echo mini} append-path FOOPATHDUPMIX /path/to/dir3 {} @@ -368,6 +393,8 @@ echo f\\\"o; echo b\\\\\\\"r; echo f\\'o} +set-function\tfuncwc { + echo sou*sh} setenv FOOARG1 arg1 setenv FOOPATH /path/to/dir1:/path/to/dir2:/path/to/dir3 -------------------------------------------------------------------" @@ -392,6 +419,8 @@ echo f\\\"o; echo b\\\\\\\"r; echo f\\'o} +set-function\tfuncwc { + echo sou*sh} setenv FOOARG1 arg1 setenv FOOARG2 arg2 prepend-path FOOPATH /path/to/mini @@ -413,6 +442,8 @@ echo f\\\"o; echo b\\\\\\\"r; echo f\\'o} +set-function\tfuncwc { + echo sou*sh} setenv FOOPATH /path/to/dir1:/path/to/dir2:/path/to/dir3 -------------------------------------------------------------------" testouterr_cmd sh {display source-sh/5.1} OK $tserr_disp4 @@ -423,6 +454,7 @@ unsetenv_path_var FOOPATHDUP unsetenv_path_var FOOPATHEM unsetenv_path_var FOOPATHCB +unsetenv_path_var FOOPATHWC unsetenv_path_var FOOPATHDUPMIX unsetenv_path_var FOOPATH unsetenv_path_var FOOPATHDUPEM @@ -432,6 +464,7 @@ unsetenv_var FOOSP unsetenv_var FOOPATHDUPSPEM unsetenv_var FOOCB +unsetenv_var FOOWC unsetenv_var FOO unsetenv_var FOOPATHSPEM unsetenv_var FOOMINI @@ -444,7 +477,10 @@ \\s*source-sh/4.0: source-sh/4.0 \\s*source-sh/4.1: source-sh/4.1 \\s*source-sh/4.2: source-sh/4.2 -\\s*source-sh/4.3: source-sh/4.3" +\\s*source-sh/4.3: source-sh/4.3 +\\s*source-sh/7.0: source-sh/7.0 +\\s*source-sh/7.1: source-sh/7.1 +\\s*source-sh/7.2: source-sh/7.2" # test 'help' sub-command when no module loaded testouterr_cmd_re sh {help source-sh/1} OK "$modlin @@ -484,6 +520,7 @@ prepend-path FOOPATHDUPMIX {} /path/to/dir1 {/path/to/dir1 /path/to/dir2 /path/to/dir1} /path/to/dir3 prepend-path FOOPATHDUPSP {/path/to/dir1 /path/to/dir1 /path/to/dir2 /path/to/dir1 /path/to/dir3 /path/to} {dir4 /path/to/dir3} prepend-path FOOPATHEM {} /path/to/dir1 /path/to/dir2 /path/to/dir3 +prepend-path FOOPATHWC /path/to/dir1 /path/to/d*r2 /path/to/dir3 set-alias\talcb {echo\ f\{o} set-alias\talem {} set-alias\talfoo {echo \$(grep \"report .Modules \" ../../modulecmd.tcl | tr -d \\\\ 2>/dev/null | awk '\{print \$3\}')} @@ -499,6 +536,8 @@ echo f\\\"o; echo b\\\\\\\"r; echo f\\'o} +set-function\tfuncwc { + echo sou*sh} setenv FOO value setenv FOOCB va{ue setenv FOOEM {} @@ -506,6 +545,7 @@ setenv FOOPATHSP {/path/to/dir1 /path/to/dir2 /path/to/dir3} setenv FOOPATHSPEM {/path/to/dir1 /path/to/dir2 /path/to/dir3 } setenv FOOSP {value } +setenv FOOWC va*ue prepend-path FOOPATH /path/to/mini set-alias almini {echo mini} setenv FOOMINI value @@ -526,6 +566,8 @@ echo f\\\"o; echo b\\\\\\\"r; echo f\\'o} +set-function\tfuncwc { + echo sou*sh} setenv FOOARG1 arg1 setenv FOOPATH /path/to/dir1:/path/to/dir2:/path/to/dir3 setenv FOOPATHDUP {/path/to/dir1:/path/to/dir1:/path/to/dir2:/path/to/dir1:/path/to/dir3:/path/to dir4:/path/to/dir3} @@ -543,6 +585,7 @@ prepend-path FOOPATHDUPMIX {} /path/to/dir1 {/path/to/dir1 /path/to/dir2 /path/to/dir1} /path/to/dir3 prepend-path FOOPATHDUPSP {/path/to/dir1 /path/to/dir1 /path/to/dir2 /path/to/dir1 /path/to/dir3 /path/to} {dir4 /path/to/dir3} prepend-path FOOPATHEM {} /path/to/dir1 /path/to/dir2 /path/to/dir3 +prepend-path FOOPATHWC /path/to/dir1 /path/to/d*r2 /path/to/dir3 set-alias\talcb {echo\ f\{o} set-alias\talem {} set-alias\talfoo {echo \$(grep \"report .Modules \" ../../modulecmd.tcl | tr -d \\\\ 2>/dev/null | awk '\{print \$3\}')} @@ -558,6 +601,8 @@ echo f\\\"o; echo b\\\\\\\"r; echo f\\'o} +set-function\tfuncwc { + echo sou*sh} setenv FOO value setenv FOOARG1 arg1 setenv FOOARG2 arg2 @@ -567,6 +612,7 @@ setenv FOOPATHSP {/path/to/dir1 /path/to/dir2 /path/to/dir3} setenv FOOPATHSPEM {/path/to/dir1 /path/to/dir2 /path/to/dir3 } setenv FOOSP {value } +setenv FOOWC va*ue prepend-path FOOPATH /path/to/mini set-alias almini {echo mini} setenv FOOMINI value @@ -587,6 +633,8 @@ echo f\\\"o; echo b\\\\\\\"r; echo f\\'o} +set-function\tfuncwc { + echo sou*sh} setenv FOOPATH /path/to/dir1:/path/to/dir2:/path/to/dir3 setenv FOOPATHDUP {/path/to/dir1:/path/to/dir1:/path/to/dir2:/path/to/dir1:/path/to/dir3:/path/to dir4:/path/to/dir3} setenv FOOPATHDUPEM :/path/to/dir1:/path/to/dir1:/path/to/dir2:/path/to/dir1:/path/to/dir3::/path/to/dir3 @@ -665,17 +713,18 @@ unsetenv_var TESTSUITE_SHTOMOD_NOVAR set ans list -lappend ans list set FOO value -lappend ans list set FOOMINI value lappend ans list set __MODULES_SHARE_FOOPATH :1 -lappend ans list set FOOPATH /path/to/mini: -lappend ans list set FOOCB va\{ue -lappend ans list set _LMFILES_ $mp/source-sh/5.0 +lappend ans list set FOOMINI value lappend ans list set LOADEDMODULES source-sh/5.0 +lappend ans list set _LMFILES_ $mp/source-sh/5.0 +lappend ans list set __MODULES_LMSOURCESH source-sh/5.0\&bash\ testsuite/example/sh-to-mod.sh\|setenv\ FOO\ value\|setenv\ FOOCB\ va\\\{ue\|setenv\ FOOEM\ \{\}\|setenv\ FOOSP\ \{value\ \}\|setenv\ FOOWC\ va\*ue\&sh\ testsuite/example/mini-sh-to-mod.sh\|prepend-path\ FOOPATH\ /path/to/mini\ \{\}\|set-alias\ almini\ \{\}\|setenv\ FOOMINI\ value\&bash\ testsuite/example/sh-to-mod.sh\ arg1\|setenv\ FOOARG1\ arg1 lappend ans list set FOOEM {} -lappend ans list set __MODULES_LMSOURCESH source-sh/5.0\&bash\ testsuite/example/sh-to-mod.sh\|setenv\ FOO\ value\|setenv\ FOOCB\ va\\\{ue\|setenv\ FOOEM\ \{\}\|setenv\ FOOSP\ \{value\ \}\&sh\ testsuite/example/mini-sh-to-mod.sh\|prepend-path\ FOOPATH\ /path/to/mini\ \{\}\|set-alias\ almini\ \{\}\|setenv\ FOOMINI\ value\&bash\ testsuite/example/sh-to-mod.sh\ arg1\|setenv\ FOOARG1\ arg1 -lappend ans list set FOOARG1 arg1 lappend ans list set FOOSP {value } +lappend ans list set FOOARG1 arg1 +lappend ans list set FOOCB va\{ue +lappend ans list set FOOPATH /path/to/mini: +lappend ans list set FOO value +lappend ans list set FOOWC va\*ue lappend ans list alias almini echo\ mini testouterr_cmd sh {load source-sh/5.0} $ans {} @@ -684,7 +733,7 @@ lappend ans list set FOOMINI value lappend ans list set LOADEDMODULES source-sh/5.1 lappend ans list set _LMFILES_ $mp/source-sh/5.1 -lappend ans list set __MODULES_LMSOURCESH source-sh/5.1\&bash\ testsuite/example/sh-to-mod.sh\ arg1\ arg2\|setenv\ FOO\ value\|setenv\ FOOARG1\ arg1\|setenv\ FOOARG2\ arg2\|setenv\ FOOCB\ va\\\{ue\|setenv\ FOOEM\ \{\}\|setenv\ FOOSP\ \{value\ \}\&sh\ testsuite/example/mini-sh-to-mod.sh\|prepend-path\ FOOPATH\ /path/to/mini\ \{\}\|set-alias\ almini\ \{\}\|setenv\ FOOMINI\ value +lappend ans list set __MODULES_LMSOURCESH source-sh/5.1\&bash\ testsuite/example/sh-to-mod.sh\ arg1\ arg2\|setenv\ FOO\ value\|setenv\ FOOARG1\ arg1\|setenv\ FOOARG2\ arg2\|setenv\ FOOCB\ va\\\{ue\|setenv\ FOOEM\ \{\}\|setenv\ FOOSP\ \{value\ \}\|setenv\ FOOWC\ va\*ue\&sh\ testsuite/example/mini-sh-to-mod.sh\|prepend-path\ FOOPATH\ /path/to/mini\ \{\}\|set-alias\ almini\ \{\}\|setenv\ FOOMINI\ value lappend ans list set FOOEM {} lappend ans list set FOOARG1 arg1 lappend ans list set FOOSP {value } @@ -692,6 +741,7 @@ lappend ans list set FOOCB va\{ue lappend ans list set FOOPATH /path/to/mini: lappend ans list set FOO value +lappend ans list set FOOWC va\*ue lappend ans list alias almini echo\ mini testouterr_cmd sh {load source-sh/5.1} $ans {} @@ -776,6 +826,7 @@ setenv_path_var FOOPATHDUP "/path/to/dir1:/path/to/dir2:/path/to/dir3:/path/to dir4" setenv_path_var FOOPATHEM {} /path/to/dir1 /path/to/dir2 /path/to/dir3 setenv_path_var FOOPATHCB /path/to/dir1:/path/to/d\{r2:/path/to/dir3 +setenv_path_var FOOPATHWC /path/to/dir1:/path/to/d\*r2:/path/to/dir3 setenv_path_var FOOPATHDUPMIX {} /path/to/dir1 "/path/to/dir1 /path/to/dir2 /path/to/dir1" /path/to/dir3 setenv_path_var FOOPATH /path/to/dir1:/path/to/dir2:/path/to/dir3 setenv_path_var FOOPATHDUPEM {} /path/to/dir1 /path/to/dir2 /path/to/dir3 @@ -785,6 +836,7 @@ setenv_var FOOSP {value } setenv_var FOOPATHDUPSPEM {/path/to/dir1 /path/to/dir1 /path/to/dir2 /path/to/dir1 /path/to/dir3 /path/to/dir3 } setenv_var FOOCB va\{ue +setenv_var FOOWC va\*ue setenv_var FOO value setenv_var FOOPATHSPEM {/path/to/dir1 /path/to/dir2 /path/to/dir3 } @@ -794,7 +846,7 @@ testouterr_cmd sh {unload source-sh/1} $ans {} # partial __MODULES_LMSOURCESH -setenv_var __MODULES_LMSOURCESH source-sh/1\&bash\ testsuite/example/sh-to-mod.sh\|chdir\ $mp\|prepend-path\ FOOPATH\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHCB\ /path/to/dir1\ /path/to/d\\\{r2\ /path/to/dir3\|prepend-path\ FOOPATHDUP\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\ \{/path/to\ dir4\}\|prepend-path\ FOOPATHDUPEM\ \{\}\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHDUPMIX\ \{\}\ /path/to/dir1\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir1\}\ /path/to/dir3\|prepend-path\ FOOPATHDUPSP\ \{/path/to/dir1\ /path/to/dir1\ /path/to/dir2\ /path/to/dir1\ /path/to/dir3\ /path/to\}\ \{dir4\ /path/to/dir3\}\|prepend-path\ FOOPATHEM\ \{\}\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|set-alias\ alcb\ \{\}\|set-alias\ alem\ \{\}\|set-alias\ alsp\ \{\}\|set-function\ funccb\ \{\}\|set-function\ funcnl\ \{\}\|set-function\ funcsp\ \{\}\|setenv\ FOO\ value\|setenv\ FOOCB\ va\\\{ue\|setenv\ FOOEM\ \{\}\|setenv\ FOOPATHDUPSPEM\ \{/path/to/dir1\ /path/to/dir1\ /path/to/dir2\ /path/to/dir1\ /path/to/dir3\ /path/to/dir3\ \}\|setenv\ FOOPATHSP\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\}\|setenv\ FOOPATHSPEM\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\ \} +setenv_var __MODULES_LMSOURCESH source-sh/1\&bash\ testsuite/example/sh-to-mod.sh\|chdir\ $mp\|prepend-path\ FOOPATH\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHCB\ /path/to/dir1\ /path/to/d\\\{r2\ /path/to/dir3\|prepend-path\ FOOPATHDUP\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\ \{/path/to\ dir4\}\|prepend-path\ FOOPATHDUPEM\ \{\}\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHDUPMIX\ \{\}\ /path/to/dir1\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir1\}\ /path/to/dir3\|prepend-path\ FOOPATHDUPSP\ \{/path/to/dir1\ /path/to/dir1\ /path/to/dir2\ /path/to/dir1\ /path/to/dir3\ /path/to\}\ \{dir4\ /path/to/dir3\}\|prepend-path\ FOOPATHEM\ \{\}\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHWC\ /path/to/dir1\ /path/to/d\*r2\ /path/to/dir3\|set-alias\ alcb\ \{\}\|set-alias\ alem\ \{\}\|set-alias\ alsp\ \{\}\|set-function\ funccb\ \{\}\|set-function\ funcnl\ \{\}\|set-function\ funcsp\ \{\}\|set-function\ funcwc\ \{\}\|setenv\ FOO\ value\|setenv\ FOOCB\ va\\\{ue\|setenv\ FOOEM\ \{\}\|setenv\ FOOPATHDUPSPEM\ \{/path/to/dir1\ /path/to/dir1\ /path/to/dir2\ /path/to/dir1\ /path/to/dir3\ /path/to/dir3\ \}\|setenv\ FOOPATHSP\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\}\|setenv\ FOOPATHSPEM\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\ \}\|setenv\ FOOWC\ va\*ue set ans list lappend ans list unset __MODULES_SHARE_FOOPATHDUPMIX lappend ans list unset _LMFILES_ @@ -808,17 +860,20 @@ lappend ans list unset FOOPATHCB lappend ans list unset FOOPATHDUPSPEM lappend ans list unset FOOPATHDUPMIX -lappend ans list unset FOOPATH lappend ans list unset FOOCB +lappend ans list unset FOOPATH lappend ans list unset __MODULES_SHARE_FOOPATHEM +lappend ans list unset FOOPATHWC lappend ans list unset FOOPATHDUPEM lappend ans list unset FOO lappend ans list unset FOOPATHDUPSP +lappend ans list unset FOOWC lappend ans list unset FOOPATHSPEM lappend ans list unalias alsp lappend ans list unalias alcb lappend ans list unalias alem lappend ans list "unset -f funccb;" +lappend ans list "unset -f funcwc;" lappend ans list "unset -f funcnl;" lappend ans list "unset -f funcsp;" testouterr_cmd sh {unload source-sh/1} $ans {} @@ -827,6 +882,7 @@ unsetenv_path_var FOOPATHDUP unsetenv_path_var FOOPATHEM unsetenv_path_var FOOPATHCB +unsetenv_path_var FOOPATHWC unsetenv_path_var FOOPATHDUPMIX unsetenv_path_var FOOPATHDUPEM unsetenv_path_var FOOPATHDUPSP @@ -895,8 +951,8 @@ # bad modulefile command call in __MODULES_LMSOURCESH (missing variable value arg) setenv_var __MODULES_LMSOURCESH source-sh/5.0\&bash\ testsuite/example/sh-to-mod.sh\&sh\ testsuite/example/mini-sh-to-mod.sh\|prepend-path\ FOOPATH\ /path/to/mini\ \{\}\|set-alias\ almini\ \{\}\|setenv\ FOOMINI\ value\&bash\ testsuite/example/sh-to-mod.sh\ arg1\|setenv\ FOOARG1 -set tserr "$moderr_msgs: wrong # args: should be \"setenv var val\" - invoked from within +set tserr "$moderr_msgs: wrong # args: should be \"setenv ?--set-if-undef? var val\" + while executing \"setenv FOOARG1\" invoked from within \"interp eval \$itrp \$modcmd\" @@ -921,8 +977,8 @@ $err_contactns" testouterr_cmd sh {unload source-sh/5.0} ERR msg_unload source-sh/5.0 $tserr -# alias and function defined in __MODULES_LMSOURCESH but not in script when modulefile is displayed -setenv_var __MODULES_LMSOURCESH source-sh/5.0\&bash\ testsuite/example/sh-to-mod.sh\|setenv\ FOO\ value\|setenv\ FOOCB\ va\\\{ue\|setenv\ FOOEM\ \{\}\|setenv\ FOOSP\ \{value\ \}\&sh\ testsuite/example/mini-sh-to-mod.sh\|prepend-path\ FOOPATH\ /path/to/mini\ \{\}\|set-alias\ almini\ \{\}\|setenv\ FOOMINI\ value\&bash\ testsuite/example/sh-to-mod.sh\ arg1\|setenv\ FOOARG1\ arg1|set-alias\ alunk\ \{\}\|set-function\ funcunk\ \{\} +# alias, function and completion defined in __MODULES_LMSOURCESH but not in script when modulefile is displayed +setenv_var __MODULES_LMSOURCESH source-sh/5.0\&bash\ testsuite/example/sh-to-mod.sh\|setenv\ FOO\ value\|setenv\ FOOCB\ va\\\{ue\|setenv\ FOOEM\ \{\}\|setenv\ FOOSP\ \{value\ \}\|setenv\ FOOWC\ va\*ue\&sh\ testsuite/example/mini-sh-to-mod.sh\|prepend-path\ FOOPATH\ /path/to/mini\ \{\}\|set-alias\ almini\ \{\}\|setenv\ FOOMINI\ value\&bash\ testsuite/example/sh-to-mod.sh\ arg1\|setenv\ FOOARG1\ arg1|set-alias\ alunk\ \{\}\|set-function\ funcunk\ \{\}\|complete\ bash\ compunk\ \{\} set tserr_disp3 "------------------------------------------------------------------- $mp/source-sh/5.0: @@ -930,12 +986,14 @@ setenv FOOCB va{ue setenv FOOEM {} setenv FOOSP {value } +setenv FOOWC va*ue prepend-path FOOPATH /path/to/mini {} set-alias almini {echo mini} setenv FOOMINI value setenv FOOARG1 arg1 set-alias alunk {} set-function funcunk {} +complete bash compunk {} -------------------------------------------------------------------" testouterr_cmd sh {display source-sh/5.0} OK $tserr_disp3 @@ -956,6 +1014,7 @@ unsetenv_var FOOMINI unsetenv_var FOOARG1 unsetenv_var FOOCB +unsetenv_var FOOWC # @@ -967,9 +1026,9 @@ set ans list lappend ans list set __MODULES_SHARE_FOOPATH :1 lappend ans list set FOOMINI value -lappend ans list set LOADEDMODULES source-sh/5.0 lappend ans list set _LMFILES_ $mp/source-sh/5.0 -lappend ans list set __MODULES_LMSOURCESH source-sh/5.0\&bash\ testsuite/example/sh-to-mod.sh\|setenv\ FOO\ value\|setenv\ FOOCB\ va\\\{ue\|setenv\ FOOEM\ \{\}\|setenv\ FOOSP\ \{value\ \}\&sh\ testsuite/example/mini-sh-to-mod.sh\|prepend-path\ FOOESC\ \{\}\|prepend-path\ FOOPATH\ /path/\\\{\<EnvModEscS2\>\ /path/to/mini\ \{\}\ /path/\\\}\<EnvModEscS1\>\|set-alias\ almini\ \{\}\|setenv\ FOOMINI\ value\&bash\ testsuite/example/sh-to-mod.sh\ arg1\|setenv\ FOOARG1\ arg1 +lappend ans list set LOADEDMODULES source-sh/5.0 +lappend ans list set __MODULES_LMSOURCESH source-sh/5.0\&bash\ testsuite/example/sh-to-mod.sh\|setenv\ FOO\ value\|setenv\ FOOCB\ va\\\{ue\|setenv\ FOOEM\ \{\}\|setenv\ FOOSP\ \{value\ \}\|setenv\ FOOWC\ va\*ue\&sh\ testsuite/example/mini-sh-to-mod.sh\|prepend-path\ FOOESC\ \{\}\|prepend-path\ FOOPATH\ /path/\\\{\<EnvModEscS2\>\ /path/to/mini\ \{\}\ /path/\\\}\<EnvModEscS1\>\|set-alias\ almini\ \{\}\|setenv\ FOOMINI\ value\&bash\ testsuite/example/sh-to-mod.sh\ arg1\|setenv\ FOOARG1\ arg1 lappend ans list set FOOEM {} lappend ans list set FOOSP {value } lappend ans list set __MODULES_SHARE_FOOESC :1 @@ -977,6 +1036,7 @@ lappend ans list set FOOCB va\{ue lappend ans list set FOOPATH /path/\{\|:/path/to/mini::/path/\}\& lappend ans list set FOO value +lappend ans list set FOOWC va\*ue lappend ans list set FOOESC {} lappend ans list alias almini echo\ mini testouterr_cmd sh {load source-sh/5.0} $ans {} @@ -987,9 +1047,10 @@ setenv_var FOOSP {value } setenv_var FOOARG1 arg1 setenv_var FOOCB va\{ue +setenv_var FOOWC va\*ue setenv_path_var FOOPATH /path/\{\| /path/to/mini {} /path/\}\& setenv_var FOO value -setenv_var __MODULES_LMSOURCESH source-sh/5.0\&bash\ testsuite/example/sh-to-mod.sh\|setenv\ FOO\ value\|setenv\ FOOCB\ va\\\{ue\|setenv\ FOOEM\ \{\}\|setenv\ FOOSP\ \{value\ \}\&sh\ testsuite/example/mini-sh-to-mod.sh\|prepend-path\ FOOESC\ \{\}\|prepend-path\ FOOPATH\ /path/\\\{\<EnvModEscS2\>\ /path/to/mini\ \{\}\ /path/\\\}\<EnvModEscS1\>\|set-alias\ almini\ \{\}\|setenv\ FOOMINI\ value\&bash\ testsuite/example/sh-to-mod.sh\ arg1\|setenv\ FOOARG1\ arg1 +setenv_var __MODULES_LMSOURCESH source-sh/5.0\&bash\ testsuite/example/sh-to-mod.sh\|setenv\ FOO\ value\|setenv\ FOOCB\ va\\\{ue\|setenv\ FOOEM\ \{\}\|setenv\ FOOSP\ \{value\ \}\|setenv\ FOOWC\ va\*ue\&sh\ testsuite/example/mini-sh-to-mod.sh\|prepend-path\ FOOESC\ \{\}\|prepend-path\ FOOPATH\ /path/\\\{\<EnvModEscS2\>\ /path/to/mini\ \{\}\ /path/\\\}\<EnvModEscS1\>\|set-alias\ almini\ \{\}\|setenv\ FOOMINI\ value\&bash\ testsuite/example/sh-to-mod.sh\ arg1\|setenv\ FOOARG1\ arg1 setenv_path_var FOOESC {} set ans list lappend ans list unset __MODULES_SHARE_FOOPATH @@ -1004,6 +1065,7 @@ lappend ans list unset FOOCB lappend ans list unset FOOPATH lappend ans list unset FOO +lappend ans list unset FOOWC lappend ans list unset FOOESC lappend ans list unalias almini testouterr_cmd sh {unload source-sh/5.0} $ans {} @@ -1014,12 +1076,672 @@ unsetenv_var FOOSP unsetenv_var FOOARG1 unsetenv_var FOOCB +unsetenv_var FOOWC unsetenv_path_var FOOPATH unsetenv_var FOO unsetenv_var __MODULES_LMSOURCESH unsetenv_path_var FOOESC +# complete tests + +unsetenv_var TESTSUITE_SHTOMOD_NOCOMP +unsetenv_var TESTSUITE_SHTOMOD_NOVAR +unsetenv_var TESTSUITE_SHTOMOD_NOPATH +unsetenv_var TESTSUITE_SHTOMOD_NOALIAS +unsetenv_var TESTSUITE_SHTOMOD_NOFUNC +unsetenv_var TESTSUITE_SHTOMOD_NOCD + +# tcsh +if {find_bin tcsh ne {}} { +set ans list +lappend ans list set _LMFILES_ $mp/source-sh/7.0 +lappend ans list set LOADEDMODULES source-sh/7.0 +lappend ans list set __MODULES_LMSOURCESH source-sh/7.0\&tcsh\ testsuite/example/sh-to-mod.csh\|chdir\ $mp\|complete\ tcsh\ cmd\ \{\}\|complete\ tcsh\ mycmd\ \{\}\|complete\ tcsh\ othercmd\ \{\}\|prepend-path\ FOOPATH\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHCB\ /path/to/dir1\ /path/to/d\\\{r2\ /path/to/dir3\|prepend-path\ FOOPATHEM\ \{\}\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHWC\ /path/to/dir1\ /path/to/d\*r2\ /path/to/dir3\|set-alias\ alcb\ \{\}\|set-alias\ alem\ \{\}\|set-alias\ alfoo\ \{\}\|set-alias\ alsp\ \{\}\|setenv\ FOO\ value\|setenv\ FOOCB\ va\\\{ue\|setenv\ FOOEM\ \{\}\|setenv\ FOOPATHSP\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\}\|setenv\ FOOPATHSPEM\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\ \}\|setenv\ FOOSP\ \{value\ \}\|setenv\ FOOWC\ va\*ue +lappend ans list set FOOPATHEM :/path/to/dir1:/path/to/dir2:/path/to/dir3 +lappend ans list set FOOPATHSP {/path/to/dir1 /path/to/dir2 /path/to/dir3} +lappend ans list set FOOPATHCB /path/to/dir1:/path/to/d\{r2:/path/to/dir3 +lappend ans list set FOOEM {} +lappend ans list set FOOSP {value } +lappend ans list set FOOPATH /path/to/dir1:/path/to/dir2:/path/to/dir3 +lappend ans list set FOOCB va\{ue +lappend ans list set __MODULES_SHARE_FOOPATHEM :1 +lappend ans list set FOOPATHWC /path/to/dir1:/path/to/d\*r2:/path/to/dir3 +lappend ans list set FOO value +lappend ans list set FOOPATHSPEM {/path/to/dir1 /path/to/dir2 /path/to/dir3 } +lappend ans list set FOOWC va\*ue +lappend ans list alias alsp {echo f\"o; echo b\\\"r; echo f\'o} +lappend ans list alias alfoo {echo `grep "report .Modules " ../../modulecmd.tcl | tr -d \\ | awk '{print $3}'`} +lappend ans list alias alcb echo\ f\\\{o +lappend ans list alias alem {} +lappend ans list out {complete cmd 'n/-h/n/' 'n/--help/n/' 'n/-V/n/' 'n/--version/n/' 'p/1/(-h -V --help --version)/';} +lappend ans list out {complete othercmd 'n/--help/n/';} +lappend ans list out {complete mycmd 'n/help/`_module_avail`/' 'n/add/`_module_not_yet_loaded; echo "--auto --no-auto --force -f --icase -i --tag --tag="`/';} +lappend ans list chdir $mp +testouterr_cmd tcsh {load source-sh/7.0} $ans {} + +set tserr_disp70 "------------------------------------------------------------------- +$mp/source-sh/7.0: + +chdir\t\t$mp +complete\ttcsh cmd {'n/-h/n/' 'n/--help/n/' 'n/-V/n/' 'n/--version/n/' 'p/1/(-h -V --help --version)/'} +complete\ttcsh mycmd {'n/help/`_module_avail`/' 'n/add/`_module_not_yet_loaded; echo \"--auto --no-auto --force -f --icase -i --tag --tag=\"`/'} +complete\ttcsh othercmd 'n/--help/n/' +prepend-path\tFOOPATH /path/to/dir1 /path/to/dir2 /path/to/dir3 +prepend-path\tFOOPATHCB /path/to/dir1 /path/to/d\{r2 /path/to/dir3 +prepend-path\tFOOPATHEM {} /path/to/dir1 /path/to/dir2 /path/to/dir3 +prepend-path\tFOOPATHWC /path/to/dir1 /path/to/d\*r2 /path/to/dir3 +set-alias\talcb {echo f\\\{o} +set-alias\talem {} +set-alias\talfoo {echo `grep \"report .Modules \" ../../modulecmd.tcl | tr -d \\\\ | awk '{print \\\$3}'`} +set-alias\talsp {echo f\\\"o; echo b\\\\\\\"r; echo f\\'o} +setenv\t\tFOO value +setenv\t\tFOOCB va\{ue +setenv\t\tFOOEM {} +setenv\t\tFOOPATHSP {/path/to/dir1 /path/to/dir2 /path/to/dir3} +setenv\t\tFOOPATHSPEM {/path/to/dir1 /path/to/dir2 /path/to/dir3 } +setenv\t\tFOOSP {value } +setenv\t\tFOOWC va*ue +module-whatis\tsource-sh/7.0 +-------------------------------------------------------------------" +testouterr_cmd sh {display source-sh/7.0} OK $tserr_disp70 +testouterr_cmd tcsh {display source-sh/7.0} OK $tserr_disp70 + +setenv_loaded_module list source-sh/7.0 list $mp/source-sh/7.0 +setenv_var __MODULES_LMSOURCESH source-sh/7.0\&tcsh\ testsuite/example/sh-to-mod.csh\|chdir\ $mp\|complete\ tcsh\ cmd\ \{\}\|complete\ tcsh\ mycmd\ \{\}\|complete\ tcsh\ othercmd\ \{\}\|prepend-path\ FOOPATH\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHCB\ /path/to/dir1\ /path/to/d\\\{r2\ /path/to/dir3\|prepend-path\ FOOPATHEM\ \{\}\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHWC\ /path/to/dir1\ /path/to/d\*r2\ /path/to/dir3\|set-alias\ alcb\ \{\}\|set-alias\ alem\ \{\}\|set-alias\ alfoo\ \{\}\|set-alias\ alsp\ \{\}\|setenv\ FOO\ value\|setenv\ FOOCB\ va\\\{ue\|setenv\ FOOEM\ \{\}\|setenv\ FOOPATHSP\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\}\|setenv\ FOOPATHSPEM\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\ \}\|setenv\ FOOSP\ \{value\ \}\|setenv\ FOOWC\ va\*ue +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list unset __MODULES_LMSOURCESH +lappend ans list unset FOOPATHEM +lappend ans list unset FOOPATHSP +lappend ans list unset FOOPATHCB +lappend ans list unset FOOEM +lappend ans list unset FOOSP +lappend ans list unset FOOPATH +lappend ans list unset FOOCB +lappend ans list unset FOOPATHWC +lappend ans list unset FOO +lappend ans list unset FOOPATHSPEM +lappend ans list unset FOOWC +lappend ans list unalias alsp +lappend ans list unalias alfoo +lappend ans list unalias alcb +lappend ans list unalias alem +lappend ans list out {uncomplete cmd;} +lappend ans list out {uncomplete othercmd;} +lappend ans list out {uncomplete mycmd;} +testouterr_cmd tcsh {unload source-sh/7.0} $ans {} + +set ans list +lappend ans list alias alsp {echo f\"o; echo b\\\"r; echo f\'o} +lappend ans list alias alfoo {echo `grep "report .Modules " ../../modulecmd.tcl | tr -d \\ | awk '{print $3}'`} +lappend ans list alias alcb echo\ f\\\{o +lappend ans list alias alem {} +lappend ans list out {complete cmd 'n/-h/n/' 'n/--help/n/' 'n/-V/n/' 'n/--version/n/' 'p/1/(-h -V --help --version)/';} +lappend ans list out {complete othercmd 'n/--help/n/';} +lappend ans list out {complete mycmd 'n/help/`_module_avail`/' 'n/add/`_module_not_yet_loaded; echo "--auto --no-auto --force -f --icase -i --tag --tag="`/';} +testouterr_cmd tcsh {refresh} $ans {} + +testouterr_cmd tcsh {display source-sh/7.0} OK $tserr_disp70 + +unsetenv_loaded_module +unsetenv_var __MODULES_LMSOURCESH +} + +# bash +set ans list +lappend ans list set _LMFILES_ $mp/source-sh/7.1 +lappend ans list set LOADEDMODULES source-sh/7.1 +lappend ans list set __MODULES_LMSOURCESH source-sh/7.1\&bash\ testsuite/example/sh-to-mod.sh\|chdir\ $mp\|complete\ bash\ cmd\ \{\}\|complete\ bash\ mycmd\ \{\}\|complete\ bash\ othercmd\ \{\}\|prepend-path\ FOOPATH\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHCB\ /path/to/dir1\ /path/to/d\\\{r2\ /path/to/dir3\|prepend-path\ FOOPATHEM\ \{\}\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHWC\ /path/to/dir1\ /path/to/d\*r2\ /path/to/dir3\|set-alias\ alcb\ \{\}\|set-alias\ alem\ \{\}\|set-alias\ alfoo\ \{\}\|set-alias\ alsp\ \{\}\|set-function\ funccb\ \{\}\|set-function\ funcfoo\ \{\}\|set-function\ funcnl\ \{\}\|set-function\ funcsp\ \{\}\|set-function\ funcwc\ \{\}\|setenv\ FOO\ value\|setenv\ FOOCB\ va\\\{ue\|setenv\ FOOEM\ \{\}\|setenv\ FOOPATHSP\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\}\|setenv\ FOOPATHSPEM\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\ \}\|setenv\ FOOSP\ \{value\ \}\|setenv\ FOOWC\ va\*ue +lappend ans list set FOOPATHEM :/path/to/dir1:/path/to/dir2:/path/to/dir3 +lappend ans list set FOOPATHSP {/path/to/dir1 /path/to/dir2 /path/to/dir3} +lappend ans list set FOOPATHCB /path/to/dir1:/path/to/d\{r2:/path/to/dir3 +lappend ans list set FOOEM {} +lappend ans list set FOOSP {value } +lappend ans list set FOOPATH /path/to/dir1:/path/to/dir2:/path/to/dir3 +lappend ans list set FOOCB va\{ue +lappend ans list set __MODULES_SHARE_FOOPATHEM :1 +lappend ans list set FOOPATHWC /path/to/dir1:/path/to/d\*r2:/path/to/dir3 +lappend ans list set FOO value +lappend ans list set FOOPATHSPEM {/path/to/dir1 /path/to/dir2 /path/to/dir3 } +lappend ans list set FOOWC va\*ue +lappend ans list alias alsp {echo f\"o; echo b\\\"r; echo f\'o} +lappend ans list alias alfoo {echo $(grep "report .Modules " ../../modulecmd.tcl | tr -d \\ 2>/dev/null | awk '{print $3}')} +lappend ans list alias alcb echo\ f\{o +lappend ans list alias alem {} +lappend ans list funcfoo "() { echo foo; }; export -f funcfoo;" +lappend ans list funccb "() { echo f\{o; }; export -f funccb;" +lappend ans list funcwc "() { echo sou*sh; }; export -f funcwc;" +lappend ans list funcnl "() { echo foo; + echo bar; }; export -f funcnl;" +lappend ans list funcsp "() { echo f\\\"o; + echo b\\\\\\\"r; + echo f\\'o; }; export -f funcsp;" +lappend ans list out {complete -o default -F _cmd cmd;} +lappend ans list out {complete -u othercmd;} +lappend ans list out {complete -j -P '"%' -S '"' mycmd;} +lappend ans list chdir $mp +testouterr_cmd bash {load source-sh/7.1} $ans {} + +set tserr_disp71 "------------------------------------------------------------------- +$mp/source-sh/7.1: + +chdir\t\t$mp +complete\tbash cmd {-o default -F _cmd} +complete\tbash mycmd {-j -P '\"%' -S '\"'} +complete\tbash othercmd -u +prepend-path\tFOOPATH /path/to/dir1 /path/to/dir2 /path/to/dir3 +prepend-path\tFOOPATHCB /path/to/dir1 /path/to/d\{r2 /path/to/dir3 +prepend-path\tFOOPATHEM {} /path/to/dir1 /path/to/dir2 /path/to/dir3 +prepend-path\tFOOPATHWC /path/to/dir1 /path/to/d\*r2 /path/to/dir3 +set-alias\talcb {echo\ f\{o} +set-alias\talem {} +set-alias\talfoo {echo \$(grep \"report .Modules \" ../../modulecmd.tcl | tr -d \\\\ 2>/dev/null | awk '\{print \$3\}')} +set-alias\talsp {echo f\\\"o; echo b\\\\\\\"r; echo f\\'o} +set-function\tfunccb { + echo f\{o} +set-function\tfuncfoo { + echo foo} +set-function\tfuncnl { + echo foo; + echo bar} +set-function\tfuncsp { + echo f\\\"o; + echo b\\\\\\\"r; + echo f\\'o} +set-function\tfuncwc { + echo sou*sh} +setenv\t\tFOO value +setenv\t\tFOOCB va\{ue +setenv\t\tFOOEM {} +setenv\t\tFOOPATHSP {/path/to/dir1 /path/to/dir2 /path/to/dir3} +setenv\t\tFOOPATHSPEM {/path/to/dir1 /path/to/dir2 /path/to/dir3 } +setenv\t\tFOOSP {value } +setenv\t\tFOOWC va*ue +module-whatis\tsource-sh/7.1 +-------------------------------------------------------------------" +testouterr_cmd sh {display source-sh/7.1} OK $tserr_disp71 +testouterr_cmd bash {display source-sh/7.1} OK $tserr_disp71 + +setenv_loaded_module list source-sh/7.1 list $mp/source-sh/7.1 +setenv_var __MODULES_LMSOURCESH source-sh/7.1\&bash\ testsuite/example/sh-to-mod.sh\|chdir\ $mp\|complete\ bash\ cmd\ \{\}\|complete\ bash\ mycmd\ \{\}\|complete\ bash\ othercmd\ \{\}\|prepend-path\ FOOPATH\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHCB\ /path/to/dir1\ /path/to/d\\\{r2\ /path/to/dir3\|prepend-path\ FOOPATHEM\ \{\}\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHWC\ /path/to/dir1\ /path/to/d\*r2\ /path/to/dir3\|set-alias\ alcb\ \{\}\|set-alias\ alem\ \{\}\|set-alias\ alfoo\ \{\}\|set-alias\ alsp\ \{\}\|set-function\ funccb\ \{\}\|set-function\ funcfoo\ \{\}\|set-function\ funcnl\ \{\}\|set-function\ funcsp\ \{\}\|set-function\ funcwc\ \{\}\|setenv\ FOO\ value\|setenv\ FOOCB\ va\\\{ue\|setenv\ FOOEM\ \{\}\|setenv\ FOOPATHSP\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\}\|setenv\ FOOPATHSPEM\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\ \}\|setenv\ FOOSP\ \{value\ \}\|setenv\ FOOWC\ va\*ue +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list unset __MODULES_LMSOURCESH +lappend ans list unset FOOPATHEM +lappend ans list unset FOOPATHSP +lappend ans list unset FOOPATHCB +lappend ans list unset FOOEM +lappend ans list unset FOOSP +lappend ans list unset FOOPATH +lappend ans list unset FOOCB +lappend ans list unset FOOPATHWC +lappend ans list unset FOO +lappend ans list unset FOOPATHSPEM +lappend ans list unset FOOWC +lappend ans list unalias alsp +lappend ans list unalias alfoo +lappend ans list unalias alcb +lappend ans list unalias alem +lappend ans list out {unset -f funcfoo;} +lappend ans list out {unset -f funccb;} +lappend ans list out {unset -f funcwc;} +lappend ans list out {unset -f funcnl;} +lappend ans list out {unset -f funcsp;} +lappend ans list out {complete -r cmd;} +lappend ans list out {complete -r othercmd;} +lappend ans list out {complete -r mycmd;} +testouterr_cmd bash {unload source-sh/7.1} $ans {} + +set ans list +lappend ans list alias alsp {echo f\"o; echo b\\\"r; echo f\'o} +lappend ans list alias alfoo {echo $(grep "report .Modules " ../../modulecmd.tcl | tr -d \\ 2>/dev/null | awk '{print $3}')} +lappend ans list alias alcb echo\ f\{o +lappend ans list alias alem {} +lappend ans list funcfoo "() { echo foo; }; export -f funcfoo;" +lappend ans list funccb "() { echo f\{o; }; export -f funccb;" +lappend ans list funcwc "() { echo sou*sh; }; export -f funcwc;" +lappend ans list funcnl "() { echo foo; + echo bar; }; export -f funcnl;" +lappend ans list funcsp "() { echo f\\\"o; + echo b\\\\\\\"r; + echo f\\'o; }; export -f funcsp;" +lappend ans list out {complete -o default -F _cmd cmd;} +lappend ans list out {complete -u othercmd;} +lappend ans list out {complete -j -P '"%' -S '"' mycmd;} +testouterr_cmd bash {refresh} $ans {} + +testouterr_cmd bash {display source-sh/7.1} OK $tserr_disp71 + +unsetenv_loaded_module +unsetenv_var __MODULES_LMSOURCESH + +setenv_var TESTSUITE_SHTOMOD_NOALIAS 1 +setenv_var TESTSUITE_SHTOMOD_NOFUNC 1 + +# fish +if {find_bin fish ne {}} { +set ans list +lappend ans list set _LMFILES_ $mp/source-sh/7.2 +lappend ans list set LOADEDMODULES source-sh/7.2 +lappend ans list set __MODULES_LMSOURCESH source-sh/7.2\&fish\ testsuite/example/sh-to-mod.fish\|chdir\ $mp\|complete\ fish\ cmd\ \{\}\|complete\ fish\ mycmd\ \{\}\|complete\ fish\ othercmd\ \{\}\|prepend-path\ FOOPATH\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHCB\ /path/to/dir1\ /path/to/d\\\{r2\ /path/to/dir3\|prepend-path\ FOOPATHEM\ \{\}\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHWC\ /path/to/dir1\ /path/to/d\*r2\ /path/to/dir3\|setenv\ FOO\ value\|setenv\ FOOCB\ va\\\{ue\|setenv\ FOOEM\ \{\}\|setenv\ FOOPATHSP\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\}\|setenv\ FOOPATHSPEM\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\ \}\|setenv\ FOOSP\ \{value\ \}\|setenv\ FOOWC\ va\*ue +lappend ans list set FOOPATHEM :/path/to/dir1:/path/to/dir2:/path/to/dir3 +lappend ans list set FOOPATHSP {/path/to/dir1 /path/to/dir2 /path/to/dir3} +lappend ans list set FOOPATHCB /path/to/dir1:/path/to/d\{r2:/path/to/dir3 +lappend ans list set FOOEM {} +lappend ans list set FOOSP {value } +lappend ans list set FOOPATH /path/to/dir1:/path/to/dir2:/path/to/dir3 +lappend ans list set FOOCB va\{ue +lappend ans list set __MODULES_SHARE_FOOPATHEM :1 +lappend ans list set FOOPATHWC /path/to/dir1:/path/to/d\*r2:/path/to/dir3 +lappend ans list set FOO value +lappend ans list set FOOPATHSPEM {/path/to/dir1 /path/to/dir2 /path/to/dir3 } +lappend ans list set FOOWC va\*ue +if {info exists fish_version_ge31 && $fish_version_ge31} { +lappend ans list out {complete -e -c cmd;} +lappend ans list out {complete -c cmd -l help -d 'Command help';} +lappend ans list out {complete -c cmd -l version -d 'Command version';} +lappend ans list out {complete -c cmd -s h -d 'Command help';} +lappend ans list out {complete -c cmd -s V -d 'Command version';} +lappend ans list out {complete -e -c othercmd;} +lappend ans list out {complete -c othercmd --no-files -l help -d 'Command help';} +lappend ans list out {complete -c othercmd --no-files -s h -d 'Command help';} +lappend ans list out {complete -c othercmd -l version -d 'Command version';} +lappend ans list out {complete -c othercmd -s V -d 'Command version';} +lappend ans list out {complete -e -c mycmd;} +lappend ans list out {complete -c mycmd --exclusive -s h -d 'Command help';} +} else { +lappend ans list out {complete -e -c cmd;} +lappend ans list out {complete -c cmd --long-option help --description 'Command help';} +lappend ans list out {complete -c cmd --long-option version --description 'Command version';} +lappend ans list out {complete -c cmd --short-option 'h' --description 'Command help';} +lappend ans list out {complete -c cmd --short-option 'V' --description 'Command version';} +lappend ans list out {complete -e -c othercmd;} +lappend ans list out {complete -c othercmd --long-option version --description 'Command version';} +lappend ans list out {complete -c othercmd --no-files --long-option help --description 'Command help';} +lappend ans list out {complete -c othercmd --no-files --short-option 'h' --description 'Command help';} +lappend ans list out {complete -c othercmd --short-option 'V' --description 'Command version';} +lappend ans list out {complete -e -c mycmd;} +lappend ans list out {complete -c mycmd --exclusive --short-option 'h' --description 'Command help';} +} +lappend ans list chdir $mp +testouterr_cmd fish {load source-sh/7.2} $ans {} + +if {info exists fish_version_ge31 && $fish_version_ge31} { +set tserr_disp72 "------------------------------------------------------------------- +$mp/source-sh/7.2: + +chdir\t\t$mp +complete\tfish cmd {-l help -d 'Command help'} +complete\tfish cmd {-l version -d 'Command version'} +complete\tfish cmd {-s h -d 'Command help'} +complete\tfish cmd {-s V -d 'Command version'} +complete\tfish mycmd {--exclusive -s h -d 'Command help'} +complete\tfish othercmd {--no-files -l help -d 'Command help'} +complete\tfish othercmd {--no-files -s h -d 'Command help'} +complete\tfish othercmd {-l version -d 'Command version'} +complete\tfish othercmd {-s V -d 'Command version'} +prepend-path\tFOOPATH /path/to/dir1 /path/to/dir2 /path/to/dir3 +prepend-path\tFOOPATHCB /path/to/dir1 /path/to/d\{r2 /path/to/dir3 +prepend-path\tFOOPATHEM {} /path/to/dir1 /path/to/dir2 /path/to/dir3 +prepend-path\tFOOPATHWC /path/to/dir1 /path/to/d\*r2 /path/to/dir3 +setenv\t\tFOO value +setenv\t\tFOOCB va\{ue +setenv\t\tFOOEM {} +setenv\t\tFOOPATHSP {/path/to/dir1 /path/to/dir2 /path/to/dir3} +setenv\t\tFOOPATHSPEM {/path/to/dir1 /path/to/dir2 /path/to/dir3 } +setenv\t\tFOOSP {value } +setenv\t\tFOOWC va*ue +module-whatis\tsource-sh/7.2 +-------------------------------------------------------------------" +} else { +set tserr_disp72 "------------------------------------------------------------------- +$mp/source-sh/7.2: + +chdir\t\t$mp +complete\tfish cmd {--long-option help --description 'Command help'} +complete\tfish cmd {--long-option version --description 'Command version'} +complete\tfish cmd {--short-option 'h' --description 'Command help'} +complete\tfish cmd {--short-option 'V' --description 'Command version'} +complete\tfish mycmd {--exclusive --short-option 'h' --description 'Command help'} +complete\tfish othercmd {--long-option version --description 'Command version'} +complete\tfish othercmd {--no-files --long-option help --description 'Command help'} +complete\tfish othercmd {--no-files --short-option 'h' --description 'Command help'} +complete\tfish othercmd {--short-option 'V' --description 'Command version'} +prepend-path\tFOOPATH /path/to/dir1 /path/to/dir2 /path/to/dir3 +prepend-path\tFOOPATHCB /path/to/dir1 /path/to/d\{r2 /path/to/dir3 +prepend-path\tFOOPATHEM {} /path/to/dir1 /path/to/dir2 /path/to/dir3 +prepend-path\tFOOPATHWC /path/to/dir1 /path/to/d\*r2 /path/to/dir3 +setenv\t\tFOO value +setenv\t\tFOOCB va\{ue +setenv\t\tFOOEM {} +setenv\t\tFOOPATHSP {/path/to/dir1 /path/to/dir2 /path/to/dir3} +setenv\t\tFOOPATHSPEM {/path/to/dir1 /path/to/dir2 /path/to/dir3 } +setenv\t\tFOOSP {value } +setenv\t\tFOOWC va*ue +module-whatis\tsource-sh/7.2 +-------------------------------------------------------------------" +} +testouterr_cmd sh {display source-sh/7.2} OK $tserr_disp72 +testouterr_cmd fish {display source-sh/7.2} OK $tserr_disp72 + +setenv_loaded_module list source-sh/7.2 list $mp/source-sh/7.2 +setenv_var __MODULES_LMSOURCESH source-sh/7.2\&fish\ testsuite/example/sh-to-mod.fish\|chdir\ $mp\|complete\ fish\ cmd\ \{\}\|complete\ fish\ mycmd\ \{\}\|complete\ fish\ othercmd\ \{\}\|prepend-path\ FOOPATH\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHCB\ /path/to/dir1\ /path/to/d\\\{r2\ /path/to/dir3\|prepend-path\ FOOPATHEM\ \{\}\ /path/to/dir1\ /path/to/dir2\ /path/to/dir3\|prepend-path\ FOOPATHWC\ /path/to/dir1\ /path/to/d\*r2\ /path/to/dir3\|setenv\ FOO\ value\|setenv\ FOOCB\ va\\\{ue\|setenv\ FOOEM\ \{\}\|setenv\ FOOPATHSP\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\}\|setenv\ FOOPATHSPEM\ \{/path/to/dir1\ /path/to/dir2\ /path/to/dir3\ \}\|setenv\ FOOSP\ \{value\ \}\|setenv\ FOOWC\ va\*ue +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list unset __MODULES_LMSOURCESH +lappend ans list unset FOOPATHEM +lappend ans list unset FOOPATHSP +lappend ans list unset FOOPATHCB +lappend ans list unset FOOEM +lappend ans list unset FOOSP +lappend ans list unset FOOPATH +lappend ans list unset FOOCB +lappend ans list unset FOOPATHWC +lappend ans list unset FOO +lappend ans list unset FOOPATHSPEM +lappend ans list unset FOOWC +lappend ans list out {complete -e -c cmd;} +lappend ans list out {complete -e -c othercmd;} +lappend ans list out {complete -e -c mycmd;} +testouterr_cmd fish {unload source-sh/7.2} $ans {} + +set ans list +if {info exists fish_version_ge31 && $fish_version_ge31} { +lappend ans list out {complete -e -c cmd;} +lappend ans list out {complete -c cmd -l help -d 'Command help';} +lappend ans list out {complete -c cmd -l version -d 'Command version';} +lappend ans list out {complete -c cmd -s h -d 'Command help';} +lappend ans list out {complete -c cmd -s V -d 'Command version';} +lappend ans list out {complete -e -c othercmd;} +lappend ans list out {complete -c othercmd --no-files -l help -d 'Command help';} +lappend ans list out {complete -c othercmd --no-files -s h -d 'Command help';} +lappend ans list out {complete -c othercmd -l version -d 'Command version';} +lappend ans list out {complete -c othercmd -s V -d 'Command version';} +lappend ans list out {complete -e -c mycmd;} +lappend ans list out {complete -c mycmd --exclusive -s h -d 'Command help';} +} else { +lappend ans list out {complete -e -c cmd;} +lappend ans list out {complete -c cmd --long-option help --description 'Command help';} +lappend ans list out {complete -c cmd --long-option version --description 'Command version';} +lappend ans list out {complete -c cmd --short-option 'h' --description 'Command help';} +lappend ans list out {complete -c cmd --short-option 'V' --description 'Command version';} +lappend ans list out {complete -e -c othercmd;} +lappend ans list out {complete -c othercmd --long-option version --description 'Command version';} +lappend ans list out {complete -c othercmd --no-files --long-option help --description 'Command help';} +lappend ans list out {complete -c othercmd --no-files --short-option 'h' --description 'Command help';} +lappend ans list out {complete -c othercmd --short-option 'V' --description 'Command version';} +lappend ans list out {complete -e -c mycmd;} +lappend ans list out {complete -c mycmd --exclusive --short-option 'h' --description 'Command help';} +} +testouterr_cmd fish {refresh} $ans {} + +if {info exists fish_version_ge31 && $fish_version_ge31} { +set tserr_disp72 "------------------------------------------------------------------- +$mp/source-sh/7.2: + +chdir\t\t$mp +complete\tfish cmd {-l help -d 'Command help'} +complete\tfish cmd {-s h -d 'Command help'} +complete\tfish cmd {-l version -d 'Command version'} +complete\tfish cmd {-s V -d 'Command version'} +complete\tfish mycmd {--exclusive -s h -d 'Command help'} +complete\tfish othercmd {-l version -d 'Command version'} +complete\tfish othercmd {-s V -d 'Command version'} +complete\tfish othercmd {--no-files -l help -d 'Command help'} +complete\tfish othercmd {--no-files -s h -d 'Command help'} +prepend-path\tFOOPATH /path/to/dir1 /path/to/dir2 /path/to/dir3 +prepend-path\tFOOPATHCB /path/to/dir1 /path/to/d\{r2 /path/to/dir3 +prepend-path\tFOOPATHEM {} /path/to/dir1 /path/to/dir2 /path/to/dir3 +prepend-path\tFOOPATHWC /path/to/dir1 /path/to/d\*r2 /path/to/dir3 +setenv\t\tFOO value +setenv\t\tFOOCB va\{ue +setenv\t\tFOOEM {} +setenv\t\tFOOPATHSP {/path/to/dir1 /path/to/dir2 /path/to/dir3} +setenv\t\tFOOPATHSPEM {/path/to/dir1 /path/to/dir2 /path/to/dir3 } +setenv\t\tFOOSP {value } +setenv\t\tFOOWC va*ue +module-whatis\tsource-sh/7.2 +-------------------------------------------------------------------" +} else { +set tserr_disp72 "------------------------------------------------------------------- +$mp/source-sh/7.2: + +chdir\t\t$mp +complete\tfish cmd {--long-option help --description 'Command help'} +complete\tfish cmd {--short-option 'h' --description 'Command help'} +complete\tfish cmd {--long-option version --description 'Command version'} +complete\tfish cmd {--short-option 'V' --description 'Command version'} +complete\tfish mycmd {--exclusive --short-option 'h' --description 'Command help'} +complete\tfish othercmd {--long-option version --description 'Command version'} +complete\tfish othercmd {--short-option 'V' --description 'Command version'} +complete\tfish othercmd {--no-files --long-option help --description 'Command help'} +complete\tfish othercmd {--no-files --short-option 'h' --description 'Command help'} +prepend-path\tFOOPATH /path/to/dir1 /path/to/dir2 /path/to/dir3 +prepend-path\tFOOPATHCB /path/to/dir1 /path/to/d\{r2 /path/to/dir3 +prepend-path\tFOOPATHEM {} /path/to/dir1 /path/to/dir2 /path/to/dir3 +prepend-path\tFOOPATHWC /path/to/dir1 /path/to/d\*r2 /path/to/dir3 +setenv\t\tFOO value +setenv\t\tFOOCB va\{ue +setenv\t\tFOOEM {} +setenv\t\tFOOPATHSP {/path/to/dir1 /path/to/dir2 /path/to/dir3} +setenv\t\tFOOPATHSPEM {/path/to/dir1 /path/to/dir2 /path/to/dir3 } +setenv\t\tFOOSP {value } +setenv\t\tFOOWC va*ue +module-whatis\tsource-sh/7.2 +-------------------------------------------------------------------" +} +testouterr_cmd fish {display source-sh/7.2} OK $tserr_disp72 + +unsetenv_loaded_module +unsetenv_var __MODULES_LMSOURCESH +} + +setenv_var TESTSUITE_SHTOMOD_NOCOMP 1 +unsetenv_var TESTSUITE_SHTOMOD_NOALIAS +unsetenv_var TESTSUITE_SHTOMOD_NOFUNC + + +# test use of module command in script +setenv_path_var MODULEPATH $modpath:$modpath.2 +setenv_var TESTSUITE_SHTOMOD_NOVAR 1 +setenv_var TESTSUITE_SHTOMOD_NOPATH 1 +setenv_var TESTSUITE_SHTOMOD_NOALIAS 1 +setenv_var TESTSUITE_SHTOMOD_NOFUNC 1 +setenv_var TESTSUITE_SHTOMOD_NOCD 1 +setenv_var TESTSUITE_SHTOMOD_MODULE 1 +# set things to trigger a module autoinit within test script in order to ensure +# module is defined, then cleanup not to report this setup within the environment +# changes made by the script +setenv_var MODULES_SET_SHELL_STARTUP 0 +setenv_var MODULES_CMD file normalize $env(TESTSUITEDIR)/../modulecmd.tcl +setenv_var TCLSH $TCLSH + +set ans list +if {$install_versioning eq {y}} { +lappend ans list set MODULE_VERSION_STACK $install_version +} +lappend ans list set _LMFILES_ $mp/source-sh/1 +lappend ans list set LOADEDMODULES source-sh/1 +lappend ans list set testsuite yes +lappend ans list set MODULES_COLLECTION_TARGET bar +# if module was defined in environment prior test, the result of the source-sh evaluation +# will be the unset of the module functions +if {$is_modules_defined} { + set extraans \|unset-function\ _module_raw\|unset-function\ ml\|unset-function\ module +} else { + set extraans {} +} +if {$install_versioning eq {y}} { +lappend ans list set __MODULES_LMSOURCESH source-sh/1\&bash\ testsuite/example/sh-to-mod.sh\|setenv\ MODULE_VERSION\ $install_version\|setenv\ MODULE_VERSION_STACK\ $install_version\|setenv\ MODULES_COLLECTION_TARGET\ bar\|setenv\ testsuite\ yes$extraans +} else { +lappend ans list set __MODULES_LMSOURCESH source-sh/1\&bash\ testsuite/example/sh-to-mod.sh\|setenv\ MODULES_COLLECTION_TARGET\ bar\|setenv\ testsuite\ yes$extraans +} +if {$install_versioning eq {y}} { +lappend ans list set MODULE_VERSION $install_version +} +if {$is_modules_defined} { +lappend ans list {unset -f ml;} +lappend ans list {unset -f module;} +lappend ans list {unset -f _module_raw;} +} +testouterr_cmd sh {load source-sh/1} $ans {} +if {$is_modules_defined} { +set extratserr " +unset-function\t_module_raw +unset-function\tml +unset-function\tmodule" +} else { +set extratserr {} +} + +set tserr "------------------------------------------------------------------- +$mp/source-sh/1:\n\n" +if {$install_versioning eq {y}} { + append tserr "setenv\t\tMODULE_VERSION $install_version +setenv\t\tMODULE_VERSION_STACK $install_version\n" +} +append tserr "setenv\t\tMODULES_COLLECTION_TARGET bar +setenv\t\ttestsuite yes$extratserr +module-whatis\tsource-sh/1 +-------------------------------------------------------------------" +testouterr_cmd sh {display source-sh/1} OK $tserr + +set tserr "$modlin +Module Specific Help for $mpre/source-sh/1: + +$warn_msgs: Unable to find ModulesHelp in $mpre/source-sh/1. +$modlin" +testouterr_cmd_re sh {help source-sh/1} OK $tserr + +set tserr "$modlin +Module Specific Test for $mpre/source-sh/1: + +$warn_msgs: Unable to find ModulesTest in $mpre/source-sh/1. +$modlin" +testouterr_cmd_re sh {test source-sh/1} OK $tserr + +# already set variable with equal or different value +setenv_var MODULES_COLLECTION_TARGET foo +setenv_var testsuite yes +set ans list +if {$install_versioning eq {y}} { +lappend ans list set MODULE_VERSION_STACK $install_version +} +lappend ans list set _LMFILES_ $mp/source-sh/1 +lappend ans list set LOADEDMODULES source-sh/1 +lappend ans list set MODULES_COLLECTION_TARGET bar +if {$install_versioning eq {y}} { +lappend ans list set __MODULES_LMSOURCESH source-sh/1\&bash\ testsuite/example/sh-to-mod.sh\|setenv\ MODULE_VERSION\ $install_version\|setenv\ MODULE_VERSION_STACK\ $install_version\|setenv\ MODULES_COLLECTION_TARGET\ bar$extraans +} else { +lappend ans list set __MODULES_LMSOURCESH source-sh/1\&bash\ testsuite/example/sh-to-mod.sh\|setenv\ MODULES_COLLECTION_TARGET\ bar$extraans +} +if {$install_versioning eq {y}} { +lappend ans list set MODULE_VERSION $install_version +} +if {$is_modules_defined} { +lappend ans list {unset -f ml;} +lappend ans list {unset -f module;} +lappend ans list {unset -f _module_raw;} +} +testouterr_cmd sh {load source-sh/1} $ans {} + +# module is loaded prior sh-to-mod +setenv_var testsuite no +setenv_loaded_module list setenv/1.0 list $modpath/setenv/1.0 +set ans list +if {$install_versioning eq {y}} { +lappend ans list set MODULE_VERSION_STACK $install_version +} +lappend ans list set _LMFILES_ $modpath/setenv/1.0:$mp/source-sh/1 +lappend ans list set LOADEDMODULES setenv/1.0:source-sh/1 +lappend ans list set MODULES_COLLECTION_TARGET bar +if {$install_versioning eq {y}} { +lappend ans list set __MODULES_LMSOURCESH source-sh/1\&bash\ testsuite/example/sh-to-mod.sh\|setenv\ MODULE_VERSION\ $install_version\|setenv\ MODULE_VERSION_STACK\ $install_version\|setenv\ MODULES_COLLECTION_TARGET\ bar$extraans +} else { +lappend ans list set __MODULES_LMSOURCESH source-sh/1\&bash\ testsuite/example/sh-to-mod.sh\|setenv\ MODULES_COLLECTION_TARGET\ bar$extraans +} +if {$install_versioning eq {y}} { +lappend ans list set MODULE_VERSION $install_version +} +if {$is_modules_defined} { +lappend ans list {unset -f ml;} +lappend ans list {unset -f module;} +lappend ans list {unset -f _module_raw;} +} +testouterr_cmd sh {load source-sh/1} $ans {} + + +setenv_loaded_module list source-sh/1 list $mp/source-sh/1 +setenv_var testsuite yes +setenv_var MODULES_COLLECTION_TARGET bar +setenv_var __MODULES_LMSOURCESH source-sh/1\&bash\ testsuite/example/sh-to-mod.sh\|setenv\ MODULES_COLLECTION_TARGET\ bar\|setenv\ testsuite\ yes +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list unset testsuite +lappend ans list unset MODULES_COLLECTION_TARGET +lappend ans list unset __MODULES_LMSOURCESH +testouterr_cmd sh {unload source-sh/1} $ans {} +unsetenv_loaded_module +unsetenv_var __MODULES_LMSOURCESH +unsetenv_var MODULES_COLLECTION_TARGET +unsetenv_var testsuite +unsetenv_var TESTSUITE_SHTOMOD_MODULE + + +# check excepted siteconfig file is installed +if {siteconfig_isStderrTty} { + +# test removal of alias, function and completion from a source-sh script +setenv_var TESTSUITE_SHTOMOD_UNSETALFUNCCOMP 1 + +setenv_var TESTSUITE_ENABLE_SITECONFIG_SOURCESHBASHUNSET 1 +set ans list +lappend ans list set _LMFILES_ $mp/source-sh/1 +lappend ans list set LOADEDMODULES source-sh/1 +lappend ans list set __MODULES_LMSOURCESH source-sh/1\&bash\ testsuite/example/sh-to-mod.sh\|uncomplete\ cmd\|unset-alias\ alfoo\|unset-function\ funcfoo +lappend ans list unalias alfoo +lappend ans list out {unset -f funcfoo;} +lappend ans list out {complete -r cmd;} +testouterr_cmd bash {load source-sh/1} $ans {} +unsetenv_var TESTSUITE_ENABLE_SITECONFIG_SOURCESHBASHUNSET + +if {find_bin tcsh ne {}} { +setenv_var TESTSUITE_ENABLE_SITECONFIG_SOURCESHTCSHUNSET 1 +set ans list +lappend ans list set _LMFILES_ $mp/source-sh/7.0 +lappend ans list set LOADEDMODULES source-sh/7.0 +lappend ans list set __MODULES_LMSOURCESH source-sh/7.0\&tcsh\ testsuite/example/sh-to-mod.csh\|uncomplete\ cmd\|unset-alias\ alfoo +lappend ans list unalias alfoo +lappend ans list out {uncomplete cmd;} +testouterr_cmd tcsh {load source-sh/7.0} $ans {} +unsetenv_var TESTSUITE_ENABLE_SITECONFIG_SOURCESHTCSHUNSET +} + +if {find_bin fish ne {}} { +setenv_var TESTSUITE_ENABLE_SITECONFIG_SOURCESHFISHUNSET 1 +set ans list +lappend ans list set _LMFILES_ $mp/source-sh/7.2 +lappend ans list set LOADEDMODULES source-sh/7.2 +lappend ans list set __MODULES_LMSOURCESH source-sh/7.2\&fish\ testsuite/example/sh-to-mod.fish\|uncomplete\ cmd\|unset-alias\ alfoo\|unset-function\ funcfoo +lappend ans list unalias alfoo +lappend ans list out {functions -e funcfoo;} +lappend ans list out {complete -e -c cmd;} +testouterr_cmd fish {load source-sh/7.2} $ans {} +unsetenv_var TESTSUITE_ENABLE_SITECONFIG_SOURCESHFISHUNSET +} + +unsetenv_var TESTSUITE_SHTOMOD_UNSETALFUNCCOMP + +} elseif {$verbose > 0} { + send_user "\tSkip tests relying on an excepted siteconfig file installed\n" +} + + # # Cleanup #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/430-implicit-req.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/430-implicit-req.exp
Changed
@@ -445,7 +445,7 @@ unsetenv_var __MODULES_LMTAG unsetenv_loaded_module -set tserr msg_load foo/1.0\nmsg_load foo/0.load\nmsg_load impreq/loadsubm\nmsg_load foo/2.0\nmsg_load impreq/switch2 +set tserr msg_load {foo/1.0 <aL>}\nmsg_load {foo/0.load <aL>}\nmsg_load impreq/loadsubm\nmsg_load {foo/2.0 <aL>}\nmsg_load impreq/switch2 testouterr_cmd_re sh {restore ./testcoll} $ans0 $tserr file delete ./testcoll @@ -481,7 +481,7 @@ lappend ans0 list unset _LMFILES_ lappend ans0 list unset LOADEDMODULES lappend ans0 list unset __MODULES_LMTAG -set tserr msg_top_unload impreq/load impreq/prereq foo/2.0 {} +set tserr msg_top_unload {impreq/load <aL>} impreq/prereq foo/2.0 {} testouterr_cmd_re sh {unload --auto impreq/load} $ans0 $tserr # DepRe
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/431-not-req.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/431-not-req.exp
Changed
@@ -12,7 +12,7 @@ # Description: Testuite testsequence # Command: # Modulefiles: notreq, foo, bar -# Sub-Command: load, unload, switch, reload, purge +# Sub-Command: load, try-load, load-any, unload, switch, reload, purge # # Comment: %C{ # Test implicit_requirement configuration disablement via @@ -45,7 +45,11 @@ set tserr "$error_msgs: Invalid option '--not-req'\n$err_typehelp" testouterr_cmd_re sh {load --not-req foo} ERR $tserr +testouterr_cmd_re sh {try-load --not-req foo} ERR $tserr +testouterr_cmd_re sh {load-any --not-req foo} ERR $tserr testouterr_cmd_re sh {ml --not-req foo} ERR $tserr +testouterr_cmd_re sh {ml try-load --not-req foo} ERR $tserr +testouterr_cmd_re sh {ml load-any --not-req foo} ERR $tserr set ans0 list lappend ans0 list set _LMFILES_ $mp/notreq/use @@ -146,6 +150,191 @@ # +# module try-load tests +# + +set ans0 list +lappend ans0 list set _LMFILES_ $mp/foo/2.0:$mp/notreq/tryload +lappend ans0 list set LOADEDMODULES foo/2.0:notreq/tryload +lappend ans0 list set __MODULES_LMTAG foo/2.0&auto-loaded + +set tserr msg_top_load notreq/tryload {} foo/2.0 {} + +# test default implicit_requirement configuration +unsetenv_var MODULES_IMPLICIT_REQUIREMENT +if {$install_implicitrequirement eq {y}} { + testouterr_cmd_re sh {load notreq/tryload} $ans0 $tserr +} else { + testouterr_cmd_re sh {load notreq/tryload} $ans0 $tserr +} +# option disabled +setenv_var MODULES_IMPLICIT_REQUIREMENT 0 +testouterr_cmd_re sh {load notreq/tryload} $ans0 $tserr +# option enabled +setenv_var MODULES_IMPLICIT_REQUIREMENT 1 +testouterr_cmd_re sh {load notreq/tryload} $ans0 $tserr +testouterr_cmd_re sh {load --no-auto notreq/tryload} $ans0 $tserr +testouterr_cmd_re sh {load --auto notreq/tryload} $ans0 $tserr + +# module to load already loaded +setenv_loaded_module list foo/2.0 list $mp/foo/2.0 +set ans0 list +lappend ans0 list set _LMFILES_ $mp/foo/2.0:$mp/notreq/tryload +lappend ans0 list set LOADEDMODULES foo/2.0:notreq/tryload +set tserr {} +testouterr_cmd_re sh {load --no-auto notreq/tryload} $ans0 $tserr +testouterr_cmd_re sh {load --auto notreq/tryload} $ans0 $tserr +unsetenv_loaded_module + +# multiple load on single command +set ans0 list +lappend ans0 list set _LMFILES_ $mp/foo/2.0:$mp/bar/2.0:$mp/notreq/tryloadmul +lappend ans0 list set LOADEDMODULES foo/2.0:bar/2.0:notreq/tryloadmul +lappend ans0 list set __MODULES_LMTAG foo/2.0&auto-loaded:bar/2.0&auto-loaded +set tserr msg_top_load notreq/tryloadmul {} list foo/2.0 bar/2.0 {} +testouterr_cmd_re sh {load --no-auto notreq/tryloadmul} $ans0 $tserr +testouterr_cmd_re sh {load --auto notreq/tryloadmul} $ans0 $tserr + +# unloading tests +setenv_loaded_module list foo/2.0 notreq/tryload list $mp/foo/2.0 $mp/notreq/tryload list foo/2.0 + +# UReqUn +set tserr msg_top_unload notreq/tryload {} foo/2.0 {} +set ans0 list +lappend ans0 list unset _LMFILES_ +lappend ans0 list unset LOADEDMODULES +lappend ans0 list unset __MODULES_LMTAG +testouterr_cmd_re sh {unload --auto notreq/tryload} $ans0 $tserr +testouterr_cmd_re sh {unload --no-auto notreq/tryload} $ans0 $tserr + +# no auto-loaded flag, no unload +unsetenv_var __MODULES_LMTAG +set ans0 list +lappend ans0 list set _LMFILES_ $mp/foo/2.0 +lappend ans0 list set LOADEDMODULES foo/2.0 +set tserr {} +testouterr_cmd_re sh {unload --auto notreq/tryload} $ans0 $tserr +testouterr_cmd_re sh {unload --no-auto notreq/tryload} $ans0 $tserr + +# DepUn (not triggered as requirement not recorded) +setenv_var __MODULES_LMTAG foo/2.0&auto-loaded +set ans0 list +lappend ans0 list set _LMFILES_ $mp/notreq/tryload +lappend ans0 list set LOADEDMODULES notreq/tryload +lappend ans0 list unset __MODULES_LMTAG +set tserr {} +testouterr_cmd_re sh {unload foo/2.0} $ans0 $tserr + +# multiple load on single command +setenv_loaded_module list foo/2.0 bar/2.0 notreq/tryloadmul list $mp/foo/2.0 $mp/bar/2.0 $mp/notreq/tryloadmul list foo/2.0 bar/2.0 +set tserr msg_top_unload notreq/tryloadmul {} list bar/2.0 foo/2.0 {} +set ans0 list +lappend ans0 list unset _LMFILES_ +lappend ans0 list unset LOADEDMODULES +lappend ans0 list unset __MODULES_LMTAG +testouterr_cmd_re sh {unload --auto notreq/tryloadmul} $ans0 $tserr +testouterr_cmd_re sh {unload --no-auto notreq/tryloadmul} $ans0 $tserr + +unsetenv_loaded_module +unsetenv_var __MODULES_LMTAG + + +# +# module load-any tests +# + +set ans0 list +lappend ans0 list set _LMFILES_ $mp/foo/2.0:$mp/notreq/loadany +lappend ans0 list set LOADEDMODULES foo/2.0:notreq/loadany +lappend ans0 list set __MODULES_LMTAG foo/2.0&auto-loaded + +set tserr msg_top_load notreq/loadany {} foo/2.0 {} + +# test default implicit_requirement configuration +unsetenv_var MODULES_IMPLICIT_REQUIREMENT +if {$install_implicitrequirement eq {y}} { + testouterr_cmd_re sh {load notreq/loadany} $ans0 $tserr +} else { + testouterr_cmd_re sh {load notreq/loadany} $ans0 $tserr +} +# option disabled +setenv_var MODULES_IMPLICIT_REQUIREMENT 0 +testouterr_cmd_re sh {load notreq/loadany} $ans0 $tserr +# option enabled +setenv_var MODULES_IMPLICIT_REQUIREMENT 1 +testouterr_cmd_re sh {load notreq/loadany} $ans0 $tserr +testouterr_cmd_re sh {load --no-auto notreq/loadany} $ans0 $tserr +testouterr_cmd_re sh {load --auto notreq/loadany} $ans0 $tserr + +# module to load already loaded +setenv_loaded_module list foo/2.0 list $mp/foo/2.0 +set ans0 list +lappend ans0 list set _LMFILES_ $mp/foo/2.0:$mp/notreq/loadany +lappend ans0 list set LOADEDMODULES foo/2.0:notreq/loadany +set tserr {} +testouterr_cmd_re sh {load --no-auto notreq/loadany} $ans0 $tserr +testouterr_cmd_re sh {load --auto notreq/loadany} $ans0 $tserr +unsetenv_loaded_module + +# multiple load on single command +set ans0 list +lappend ans0 list set _LMFILES_ $mp/foo/2.0:$mp/notreq/loadanymul +lappend ans0 list set LOADEDMODULES foo/2.0:notreq/loadanymul +lappend ans0 list set __MODULES_LMTAG foo/2.0&auto-loaded +set tserr msg_top_load notreq/loadanymul {} list foo/2.0 {} +testouterr_cmd_re sh {load --no-auto notreq/loadanymul} $ans0 $tserr +testouterr_cmd_re sh {load --auto notreq/loadanymul} $ans0 $tserr + +# unloading tests +setenv_loaded_module list foo/2.0 notreq/loadany list $mp/foo/2.0 $mp/notreq/loadany list foo/2.0 + +# UReqUn +set tserr msg_top_unload notreq/loadany {} foo/2.0 {} +set ans0 list +lappend ans0 list unset _LMFILES_ +lappend ans0 list unset LOADEDMODULES +lappend ans0 list unset __MODULES_LMTAG +testouterr_cmd_re sh {unload --auto notreq/loadany} $ans0 $tserr +testouterr_cmd_re sh {unload --no-auto notreq/loadany} $ans0 $tserr + +# no auto-loaded flag, no unload +unsetenv_var __MODULES_LMTAG +set ans0 list +lappend ans0 list set _LMFILES_ $mp/foo/2.0 +lappend ans0 list set LOADEDMODULES foo/2.0 +set tserr {} +testouterr_cmd_re sh {unload --auto notreq/loadany} $ans0 $tserr +testouterr_cmd_re sh {unload --no-auto notreq/loadany} $ans0 $tserr + +# DepUn (not triggered as requirement not recorded) +setenv_var __MODULES_LMTAG foo/2.0&auto-loaded +set ans0 list +lappend ans0 list set _LMFILES_ $mp/notreq/loadany +lappend ans0 list set LOADEDMODULES notreq/loadany +lappend ans0 list unset __MODULES_LMTAG +set tserr {} +testouterr_cmd_re sh {unload foo/2.0} $ans0 $tserr + +# multiple load on single command +setenv_loaded_module list foo/2.0 bar/2.0 notreq/loadanymul list $mp/foo/2.0 $mp/bar/2.0 $mp/notreq/loadanymul list foo/2.0 bar/2.0 +set tserr msg_top_unload notreq/loadanymul {} list bar/2.0 foo/2.0 {} +set ans0 list +lappend ans0 list unset _LMFILES_ +lappend ans0 list unset LOADEDMODULES +lappend ans0 list unset __MODULES_LMTAG +testouterr_cmd_re sh {unload --auto notreq/loadanymul} $ans0 $tserr +testouterr_cmd_re sh {unload --no-auto notreq/loadanymul} $ans0 $tserr + +setenv_loaded_module list bar/2.0 notreq/loadanymul list $mp/bar/2.0 $mp/notreq/loadanymul list bar/2.0 +set tserr msg_top_unload notreq/loadanymul {} list bar/2.0 {} +testouterr_cmd_re sh {unload --auto notreq/loadanymul} $ans0 $tserr +testouterr_cmd_re sh {unload --no-auto notreq/loadanymul} $ans0 $tserr + +unsetenv_loaded_module +unsetenv_var __MODULES_LMTAG + + +# # module unload tests # @@ -446,7 +635,7 @@ unsetenv_var __MODULES_LMPREREQ unsetenv_loaded_module -set tserr msg_load foo/1.0\nmsg_load foo/0.load\nmsg_load notreq/loadsubm\nmsg_load foo/2.0\nmsg_load notreq/switch2 +set tserr msg_load {foo/1.0 <aL>}\nmsg_load {foo/0.load <aL>}\nmsg_load notreq/loadsubm\nmsg_load {foo/2.0 <aL>}\nmsg_load notreq/switch2 testouterr_cmd_re sh {restore ./testcoll} $ans0 $tserr file delete ./testcoll @@ -482,7 +671,7 @@ lappend ans0 list unset _LMFILES_ lappend ans0 list unset LOADEDMODULES lappend ans0 list unset __MODULES_LMTAG -set tserr msg_top_unload notreq/load notreq/prereq foo/2.0 {} +set tserr msg_top_unload {notreq/load <aL>} notreq/prereq foo/2.0 {} testouterr_cmd_re sh {unload --auto notreq/load} $ans0 $tserr # DepRe
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/450-hidden-loaded.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/450-hidden-loaded.exp
Changed
@@ -15,7 +15,7 @@ # Sub-Command: # # Comment: %C{ -# Check hidden loaded modules are not reported accross +# Check hidden loaded modules are not reported across # information messages # }C% # @@ -40,7 +40,7 @@ lappend ans list set _LMFILES_ $mp/h1 lappend ans list set LOADEDMODULES h1 lappend ans list set __MODULES_LMTAG h1&hidden-loaded -testouterr_cmd_re sh {load -v h1} $ans msg_load h1 +testouterr_cmd_re sh {load -v h1} $ans msg_load {h1 <H>} # unload setenv_loaded_module list h1 list $mp/h1 @@ -49,7 +49,7 @@ lappend ans list unset _LMFILES_ lappend ans list unset LOADEDMODULES lappend ans list unset __MODULES_LMTAG -testouterr_cmd_re sh {unload -v h1} $ans msg_unload h1 +testouterr_cmd_re sh {unload -v h1} $ans msg_unload {h1 <H>} skip_if_quick_mode @@ -58,13 +58,13 @@ lappend ans list set _LMFILES_ $mp/h10 lappend ans list set LOADEDMODULES h10 lappend ans list unset __MODULES_LMTAG -testouterr_cmd_re sh {switch -v h1 h10} $ans msg_unload h1\nmsg_load h10\nmsg_switch h1 h10 +testouterr_cmd_re sh {switch -v h1 h10} $ans msg_unload {h1 <H>}\nmsg_load h10\nmsg_switch {h1 <H>} h10 # switch (both modules hidden) set ans list lappend ans list set _LMFILES_ $mp/h3 lappend ans list set LOADEDMODULES h3 lappend ans list set __MODULES_LMTAG h3&hidden-loaded -testouterr_cmd_re sh {switch -v h1 h3} $ans msg_unload h1\nmsg_load h3\nmsg_switch h1 h3 +testouterr_cmd_re sh {switch -v h1 h3} $ans msg_unload {h1 <H>}\nmsg_load {h3 <H>}\nmsg_switch {h1 <H>} {h3 <H>} unsetenv_loaded_module unsetenv_var __MODULES_LMTAG @@ -82,15 +82,15 @@ lappend ans list unset _LMFILES_ lappend ans list unset LOADEDMODULES lappend ans list unset __MODULES_LMTAG -testouterr_cmd_re sh {purge -v} $ans msg_unload h4\nmsg_unload h3\nmsg_unload h2 +testouterr_cmd_re sh {purge -v} $ans msg_unload h4\nmsg_unload {h3 <H>}\nmsg_unload {h2 <aL>} # reload set ans list lappend ans list set __MODULES_LMPREREQ h2&h1:h4&h1&h2|h3 lappend ans list set _LMFILES_ $mp/h1:$mp/h2:$mp/h3:$mp/h4 lappend ans list set LOADEDMODULES h1:h2:h3:h4 -lappend ans list set __MODULES_LMTAG h1&auto-loaded&hidden-loaded:h2&auto-loaded:h3&hidden-loaded -testouterr_cmd_re sh {reload -v} $ans msg_unload h4\nmsg_unload h3\nmsg_unload h2\nmsg_load h2\nmsg_load h3\nmsg_load h4 +lappend ans list set __MODULES_LMTAG h1&hidden-loaded&auto-loaded:h2&auto-loaded:h3&hidden-loaded +testouterr_cmd_re sh {reload -v} $ans msg_unload h4\nmsg_unload {h3 <H>}\nmsg_unload {h2 <aL>}\nmsg_load {h2 <aL>}\nmsg_load {h3 <H>}\nmsg_load h4 unsetenv_loaded_module unsetenv_var __MODULES_LMPREREQ unsetenv_var __MODULES_LMTAG @@ -107,9 +107,9 @@ lappend ans list set _LMFILES_ $mp/h1:$mp/h2:$mp/h4 lappend ans list set LOADEDMODULES h1:h2:h4 lappend ans list set __MODULES_LMTAG h1&hidden-loaded&auto-loaded:h2&auto-loaded -testouterr_cmd_re sh {load -v --auto h4} $ans msg_load h2\n\nmsg_top_load h4 {} h2 {} +testouterr_cmd_re sh {load -v --auto h4} $ans msg_load {h2 <aL>}\n\nmsg_top_load h4 {} h2 {} # unless verbose2 level activated -testouterr_cmd_re sh {load -v -v --auto h4} $ans msg_load h1\nmsg_load h2\n\nmsg_top_load h4 {} {h1 h2} {} +testouterr_cmd_re sh {load -v -v --auto h4} $ans msg_load {h1 <aL:H>}\nmsg_load {h2 <aL>}\n\nmsg_top_load h4 {} {h1 h2} {} # urequn setenv_loaded_module list h1 h2 h4 list $mp/h1 $mp/h2 $mp/h4 list h1 h2 @@ -120,13 +120,13 @@ lappend ans list unset _LMFILES_ lappend ans list unset LOADEDMODULES lappend ans list unset __MODULES_LMTAG -testouterr_cmd_re sh {unload -v --auto h4} $ans msg_unload h2\n\nmsg_top_unload h4 {} h2 {} +testouterr_cmd_re sh {unload -v --auto h4} $ans msg_unload {h2 <aL>}\n\nmsg_top_unload h4 {} h2 {} # unless verbose2 level activated -testouterr_cmd_re sh {unload -vv --auto h4} $ans msg_unload h2\nmsg_unload h1\n\nmsg_top_unload h4 {} {h2 h1} {} +testouterr_cmd_re sh {unload -vv --auto h4} $ans msg_unload {h2 <aL>}\nmsg_unload {h1 <aL:H>}\n\nmsg_top_unload h4 {} {h2 h1} {} # depun # specified module is hidden (should be reported) -testouterr_cmd_re sh {unload -v --auto h1} $ans msg_unload h4\nmsg_unload h2\n\nmsg_top_unload h1 {h4 h2} {} {} +testouterr_cmd_re sh {unload -v --auto h1} $ans msg_unload h4\nmsg_unload {h2 <aL>}\n\nmsg_top_unload {h1 <aL:H>} {h4 h2} {} {} # depun module is hidden and was not automatically loaded (should be reported) setenv_var __MODULES_LMTAG h1&hidden-loaded&auto-loaded:h2&auto-loaded:h4&hidden-loaded setenv_var TESTSUITE_HIDE_HIDDEN_LOADED_SET2 1 @@ -135,7 +135,7 @@ lappend ans list unset _LMFILES_ lappend ans list unset LOADEDMODULES lappend ans list unset __MODULES_LMTAG -testouterr_cmd_re sh {unload -v --auto h2} $ans msg_unload h4\n\nmsg_top_unload h2 h4 {} {} +testouterr_cmd_re sh {unload -v --auto h2} $ans msg_unload {h4 <H>}\n\nmsg_top_unload {h2 <aL>} h4 {} {} # depun module is hidden and was automatically loaded (should not be reported) setenv_var __MODULES_LMTAG h1&hidden-loaded&auto-loaded:h2&auto-loaded:h4&hidden-loaded&auto-loaded set ans list @@ -143,9 +143,9 @@ lappend ans list unset _LMFILES_ lappend ans list unset LOADEDMODULES lappend ans list unset __MODULES_LMTAG -testouterr_cmd_re sh {unload -v --auto h2} $ans msg_unload h2 +testouterr_cmd_re sh {unload -v --auto h2} $ans msg_unload {h2 <aL>} # unless verbose2 level activated -testouterr_cmd_re sh {-v unload -v --auto h2} $ans msg_unload h4\nmsg_unload h1\n\nmsg_top_unload h2 h4 h1 {} +testouterr_cmd_re sh {-v unload -v --auto h2} $ans msg_unload {h4 <aL:H>}\nmsg_unload {h1 <aL:H>}\n\nmsg_top_unload {h2 <aL>} h4 h1 {} # depre (on load) # depun module is hidden and was automatically loaded (should not be reported) @@ -154,7 +154,7 @@ lappend ans list set _LMFILES_ $mp/h1:$mp/h2:$mp/h3:$mp/h4 lappend ans list set LOADEDMODULES h1:h2:h3:h4 lappend ans list set __MODULES_LMTAG h1&hidden-loaded&auto-loaded:h2&auto-loaded:h3&hidden-loaded:h4&hidden-loaded&auto-loaded -testouterr_cmd_re sh {load -v --auto h3} $ans msg_load h3 +testouterr_cmd_re sh {load -v --auto h3} $ans msg_load {h3 <H>} # depun module is hidden and was not automatically loaded (should be reported) setenv_var __MODULES_LMTAG h1&hidden-loaded&auto-loaded:h2&auto-loaded:h4&hidden-loaded set ans list @@ -162,8 +162,8 @@ lappend ans list set _LMFILES_ $mp/h1:$mp/h2:$mp/h3:$mp/h4 lappend ans list set LOADEDMODULES h1:h2:h3:h4 lappend ans list set __MODULES_LMTAG h1&hidden-loaded&auto-loaded:h2&auto-loaded:h3&hidden-loaded:h4&hidden-loaded -testouterr_cmd_re sh {load -v --auto h3} $ans msg_unload h4\nmsg_load h4\n\nmsg_top_load h3 {} {} h4 -testouterr_cmd_re sh {load -v --auto -v h3} $ans msg_unload h4\nmsg_load h4\n\nmsg_top_load h3 {} {} h4 +testouterr_cmd_re sh {load -v --auto h3} $ans msg_unload {h4 <H>}\nmsg_load {h4 <H>}\n\nmsg_top_load {h3 <H>} {} {} h4 +testouterr_cmd_re sh {load -v --auto -v h3} $ans msg_unload {h4 <H>}\nmsg_load {h4 <H>}\n\nmsg_top_load {h3 <H>} {} {} h4 # depre (on unload) # depun module is hidden and was automatically loaded (should not be reported) @@ -174,7 +174,7 @@ lappend ans list set _LMFILES_ $mp/h1:$mp/h2:$mp/h4 lappend ans list set LOADEDMODULES h1:h2:h4 lappend ans list set __MODULES_LMTAG h1&hidden-loaded&auto-loaded:h2&auto-loaded:h4&hidden-loaded&auto-loaded -testouterr_cmd_re sh {unload -v --auto h3} $ans msg_unload h3 +testouterr_cmd_re sh {unload -v --auto h3} $ans msg_unload {h3 <H>} # depun module is hidden and was not automatically loaded (should be reported) setenv_var __MODULES_LMTAG h1&hidden-loaded&auto-loaded:h2&auto-loaded:h3&hidden-loaded:h4&hidden-loaded set ans list @@ -182,7 +182,7 @@ lappend ans list set _LMFILES_ $mp/h1:$mp/h2:$mp/h4 lappend ans list set LOADEDMODULES h1:h2:h4 lappend ans list set __MODULES_LMTAG h1&hidden-loaded&auto-loaded:h2&auto-loaded:h4&hidden-loaded -testouterr_cmd_re sh {unload -v --auto h3} $ans msg_unload h4\nmsg_load h4\n\nmsg_top_unload h3 {} {} h4 +testouterr_cmd_re sh {unload -v --auto h3} $ans msg_unload {h4 <H>}\nmsg_load {h4 <H>}\n\nmsg_top_unload {h3 <H>} {} {} h4 unsetenv_loaded_module unsetenv_var __MODULES_LMPREREQ unsetenv_var __MODULES_LMTAG @@ -197,7 +197,7 @@ lappend ans list set _LMFILES_ $mp/h20:$mp/h21:$mp/h22 lappend ans list set LOADEDMODULES h20:h21:h22 lappend ans list set __MODULES_LMTAG h20&auto-loaded:h21&hidden-loaded&auto-loaded -testouterr_cmd_re sh {load -v --auto h22} $ans msg_load h20\n\nmsg_top_load h22 {} h20 {} +testouterr_cmd_re sh {load -v --auto h22} $ans msg_load {h20 <aL>}\n\nmsg_top_load h22 {} h20 {} setenv_loaded_module list h20 h21 h22 list $mp/h20 $mp/h21 $mp/h2 list h20 h21 setenv_var __MODULES_LMTAG h20&auto-loaded:h21&hidden-loaded&auto-loaded setenv_var __MODULES_LMPREREQ h21&h20:h22&h21 @@ -206,8 +206,8 @@ lappend ans list unset _LMFILES_ lappend ans list unset LOADEDMODULES lappend ans list unset __MODULES_LMTAG -testouterr_cmd_re sh {unload -v --auto h22} $ans msg_unload h20\n\nmsg_top_unload h22 {} h20 {} -testouterr_cmd_re sh {unload -v --auto h20} $ans msg_unload h22\n\nmsg_top_unload h20 h22 {} {} +testouterr_cmd_re sh {unload -v --auto h22} $ans msg_unload {h20 <aL>}\n\nmsg_top_unload h22 {} h20 {} +testouterr_cmd_re sh {unload -v --auto h20} $ans msg_unload h22\n\nmsg_top_unload {h20 <aL>} h22 {} {} unsetenv_loaded_module unsetenv_var __MODULES_LMPREREQ unsetenv_var __MODULES_LMTAG @@ -223,10 +223,10 @@ lappend ans list set LOADEDMODULES swb:swc lappend ans list set __MODULES_LMTAG swb&hidden-loaded&auto-loaded # see switch report however swa was not loaded -testouterr_cmd_re sh {load -v --auto swc} $ans msg_switch swa swb\nmsg_load swc +testouterr_cmd_re sh {load -v --auto swc} $ans msg_switch swa {swb <aL:H>}\nmsg_load swc # set swa loaded setenv_loaded_module list swa list $mp/swa -testouterr_cmd_re sh {load -v --auto swc} $ans msg_unload swa\nmsg_switch swa swb\n\nmsg_top_load swc swa {} {} +testouterr_cmd_re sh {load -v --auto swc} $ans msg_unload swa\nmsg_switch swa {swb <aL:H>}\n\nmsg_top_load swc swa {} {} # set swa loaded and hidden setenv_loaded_module list swa list $mp/swa setenv_var __MODULES_LMTAG swa&hidden-loaded @@ -236,7 +236,7 @@ lappend ans list set _LMFILES_ $mp/swb:$mp/swc lappend ans list set LOADEDMODULES swb:swc lappend ans list set __MODULES_LMTAG swb&hidden-loaded&auto-loaded -testouterr_cmd_re sh {load -v --auto swc} $ans msg_unload swa\nmsg_switch swa swb\n\nmsg_top_load swc swa {} {} +testouterr_cmd_re sh {load -v --auto swc} $ans msg_unload {swa <H>}\nmsg_switch {swa <H>} {swb <aL:H>}\n\nmsg_top_load swc swa {} {} # set swa automatically loaded and hidden setenv_loaded_module list swa list $mp/swa list swa setenv_var __MODULES_LMTAG swa&hidden-loaded&auto-loaded @@ -258,15 +258,15 @@ # setenv_var TESTSUITE_HIDE_HIDDEN_LOADED_SET5 1 -testouterr_cmd sh {load -v --auto rah} ERR msg_load rae\n\nmsg_load raf $err_evalabort\n\nmsg_load rag err_reqmis raf\n\nmsg_load rah err_reqlo raf err_reqlo rag +testouterr_cmd sh {load -v --auto rah} ERR msg_load {rae <aL>}\n\nmsg_load raf $err_evalabort\n\nmsg_load rag err_reqmis raf\n\nmsg_load rah err_reqlo raf err_reqlo rag set ans list lappend ans list set __MODULES_LMPREREQ rag&raf:rah&rag lappend ans list set _LMFILES_ $mp/rag:$mp/rah lappend ans list set LOADEDMODULES rag:rah lappend ans list set __MODULES_LMTAG rag&hidden-loaded&auto-loaded lappend ans list ERR -testouterr_cmd_re sh {load --force -v --auto rah} $ans msg_load rae\n\nmsg_load raf $err_evalabort\n\nmsg_load rag err_reqmisf raf\n\nmsg_top_load rah {} rag {} err_reqlof raf -testouterr_cmd_re sh {load --force -vv --auto rah} $ans msg_load rae\n\nmsg_load raf $err_evalabort\n\nmsg_load rag err_reqmisf raf\n\nmsg_top_load rah {} rag {} err_reqlof raf +testouterr_cmd_re sh {load --force -v --auto rah} $ans msg_load {rae <aL>}\n\nmsg_load raf $err_evalabort\n\nmsg_load {rag <aL:H>} err_reqmisf raf\n\nmsg_top_load rah {} rag {} err_reqlof raf +testouterr_cmd_re sh {load --force -vv --auto rah} $ans msg_load {rae <aL>}\n\nmsg_load raf $err_evalabort\n\nmsg_load {rag <aL:H>} err_reqmisf raf\n\nmsg_top_load rah {} rag {} err_reqlof raf setenv_loaded_module list rae raf rag rah list $mp/rae $mp/raf $mp/rag $mp/rah list rae raf rag setenv_var __MODULES_LMTAG rae&auto-loaded:raf&hidden-loaded&auto-loaded:rag&hidden-loaded&auto-loaded @@ -277,28 +277,28 @@ lappend ans list set __MODULES_LMPREREQ raf&rae lappend ans list set __MODULES_LMTAG rae&auto-loaded:raf&hidden-loaded&auto-loaded lappend ans list ERR -testouterr_cmd_re sh {unload -v --auto rah} $ans msg_unload raf $err_evalabort\n\nmsg_unload rah err_urequn raf -testouterr_cmd_re sh {unload --force -v --auto rah} $ans msg_unload raf $err_evalabort\n\nmsg_unload rah err_urequn raf +testouterr_cmd_re sh {unload -v --auto rah} $ans msg_unload {raf <aL:H>} $err_evalabort\n\nmsg_unload rah err_urequn raf +testouterr_cmd_re sh {unload --force -v --auto rah} $ans msg_unload {raf <aL:H>} $err_evalabort\n\nmsg_unload rah err_urequn raf -testouterr_cmd_re sh {unload -v --auto rae} ERR msg_unload rah\n\nmsg_unload raf $err_evalabort\n\nmsg_unload rae err_depun raf +testouterr_cmd_re sh {unload -v --auto rae} ERR msg_unload rah\n\nmsg_unload {raf <aL:H>} $err_evalabort\n\nmsg_unload {rae <aL>} err_depun raf set ans list lappend ans list set LOADEDMODULES raf lappend ans list set _LMFILES_ $mp/raf lappend ans list set __MODULES_LMPREREQ raf&rae lappend ans list set __MODULES_LMTAG raf&hidden-loaded&auto-loaded lappend ans list ERR -testouterr_cmd_re sh {unload --force -v --auto rae} $ans msg_unload rah\n\nmsg_unload raf $err_evalabort\n\nmsg_top_unload rae {rah} {} {} err_depunf raf +testouterr_cmd_re sh {unload --force -v --auto rae} $ans msg_unload rah\n\nmsg_unload {raf <aL:H>} $err_evalabort\n\nmsg_top_unload {rae <aL>} {rah} {} {} err_depunf raf setenv_loaded_module list rae raf rag rah list $mp/rae $mp/raf $mp/rag $mp/rah list rae rag setenv_var __MODULES_LMTAG rae&auto-loaded:raf&hidden-loaded:rag&hidden-loaded&auto-loaded -testouterr_cmd_re sh {unload -v --auto rae} ERR msg_unload rah\n\nmsg_unload raf $err_evalabort\n\nmsg_unload rae err_depun raf +testouterr_cmd_re sh {unload -v --auto rae} ERR msg_unload rah\n\nmsg_unload {raf <H>} $err_evalabort\n\nmsg_unload {rae <aL>} err_depun raf set ans list lappend ans list set LOADEDMODULES raf lappend ans list set _LMFILES_ $mp/raf lappend ans list set __MODULES_LMPREREQ raf&rae lappend ans list set __MODULES_LMTAG raf&hidden-loaded lappend ans list ERR -testouterr_cmd_re sh {unload --force -v --auto rae} $ans msg_unload rah\n\nmsg_unload raf $err_evalabort\n\nmsg_top_unload rae {rah} {} {} err_depunf raf +testouterr_cmd_re sh {unload --force -v --auto rae} $ans msg_unload rah\n\nmsg_unload {raf <H>} $err_evalabort\n\nmsg_top_unload {rae <aL>} {rah} {} {} err_depunf raf unsetenv_loaded_module unsetenv_var __MODULES_LMPREREQ unsetenv_var TESTSUITE_HIDE_HIDDEN_LOADED_SET5 @@ -308,7 +308,7 @@ setenv_var TESTSUITE_HIDE_HIDDEN_LOADED_SET6 1 setenv_loaded_module list swa list $mp/swa list swa setenv_var __MODULES_LMTAG swa&hidden-loaded&auto-loaded -testouterr_cmd_re sh {load -v --auto swj} ERR msg_load ra $err_evalabort\n\nmsg_switch swa ra\n\nmsg_load swj err_swon ra err_reqlo ra +testouterr_cmd_re sh {load -v --auto swj} ERR msg_load ra $err_evalabort\n\nmsg_switch {swa <aL:H>} ra\n\nmsg_load swj err_swon ra err_reqlo ra set ans list lappend ans list set __MODULES_LMCONFLICT swj&swa lappend ans list set __MODULES_LMPREREQ swj&ra @@ -316,7 +316,7 @@ lappend ans list set _LMFILES_ $mp/swj lappend ans list unset __MODULES_LMTAG lappend ans list ERR -testouterr_cmd_re sh {load --force -v --auto swj} $ans msg_load ra $err_evalabort\n\nmsg_switch swa ra\n\nmsg_load swj err_swon ra err_reqlof ra +testouterr_cmd_re sh {load --force -v --auto swj} $ans msg_load ra $err_evalabort\n\nmsg_switch {swa <aL:H>} ra\n\nmsg_load swj err_swon ra err_reqlof ra unsetenv_var TESTSUITE_HIDE_HIDDEN_LOADED_SET6 # conflict issue @@ -324,14 +324,14 @@ setenv_loaded_module list h33 list $mp/h33 unsetenv_var __MODULES_LMTAG setenv_var __MODULES_LMCONFLICT h33&h31 -testouterr_cmd_re sh {load -v --auto h32} ERR msg_load h30\n\nmsg_load h31 err_conflict h33\n\nmsg_load h32 err_reqlo h31 +testouterr_cmd_re sh {load -v --auto h32} ERR msg_load {h30 <aL>}\n\nmsg_load h31 err_conflict h33\n\nmsg_load h32 err_reqlo h31 set ans list lappend ans list set __MODULES_LMPREREQ h31&h30:h32&h31 lappend ans list set _LMFILES_ $mp/h33:$mp/h30:$mp/h31:$mp/h32 lappend ans list set LOADEDMODULES h33:h30:h31:h32 lappend ans list set __MODULES_LMTAG h30&auto-loaded:h31&hidden-loaded&auto-loaded -testouterr_cmd_re sh {load --force -v --auto h32} $ans msg_load h30\n\nmsg_load h31 err_conlof h33\n\nmsg_top_load h32 {} {h30 h31} {} -testouterr_cmd_re sh {load --force -vv --auto h32} $ans msg_load h30\n\nmsg_load h31 err_conlof h33\n\nmsg_top_load h32 {} {h30 h31} {} +testouterr_cmd_re sh {load --force -v --auto h32} $ans msg_load {h30 <aL>}\n\nmsg_load {h31 <aL:H>} err_conlof h33\n\nmsg_top_load h32 {} {h30 h31} {} +testouterr_cmd_re sh {load --force -vv --auto h32} $ans msg_load {h30 <aL>}\n\nmsg_load {h31 <aL:H>} err_conlof h33\n\nmsg_top_load h32 {} {h30 h31} {} unsetenv_var __MODULES_LMCONFLICT unsetenv_loaded_module unsetenv_var TESTSUITE_HIDE_HIDDEN_LOADED_SET7
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/460-sticky.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/460-sticky.exp
Changed
@@ -41,12 +41,12 @@ setenv_loaded_module list sticky/1.0 list $mp/sticky/1.0 setenv_var __MODULES_LMTAG sticky/1.0&sticky -set tserr msg_unload sticky/1.0 $err_stickyunload +set tserr msg_unload {sticky/1.0 <S>} $err_stickyunload testouterr_cmd_re sh {unload sticky/1.0} ERR $tserr testouterr_cmd_re sh {purge} ERR $tserr -testouterr_cmd_re sh {switch sticky} ERR msg_switch sticky/1.0 sticky $err_stickyunload -testouterr_cmd_re sh {switch sticky/1.0 foo} ERR msg_switch sticky/1.0 foo $err_stickyunload +testouterr_cmd_re sh {switch sticky} ERR msg_switch {sticky/1.0 <S>} sticky $err_stickyunload +testouterr_cmd_re sh {switch sticky/1.0 foo} ERR msg_switch {sticky/1.0 <S>} foo $err_stickyunload testouterr_cmd_re sh {reload} $anslo {} @@ -56,21 +56,21 @@ lappend ans list set _LMFILES_ $mp/sticky/1.0:$mp/foo/2.0 lappend ans list set LOADEDMODULES sticky/1.0:foo/2.0 lappend ans list ERR -set tserr msg_unload sticky/1.0 $err_stickyunload\n\nmsg_load foo/2.0 +set tserr msg_unload {sticky/1.0 <S>} $err_stickyunload\n\nmsg_load foo/2.0 testouterr_cmd_re sh {restore testsuite/home/coll-sticky-0} $ans $tserr set ans list lappend ans list set _LMFILES_ $mp/foo/2.0:$mp/sticky/1.0 lappend ans list set LOADEDMODULES foo/2.0:sticky/1.0 lappend ans list set __MODULES_LMTAG sticky/1.0&sticky -testouterr_cmd_re sh {restore testsuite/home/coll-sticky-1} $ans msg_unload sticky/1.0\nmsg_load foo/2.0\nmsg_load sticky/1.0 +testouterr_cmd_re sh {restore testsuite/home/coll-sticky-1} $ans msg_unload {sticky/1.0 <S>}\nmsg_load foo/2.0\nmsg_load {sticky/1.0 <S>} # force commands set ansun list lappend ansun list unset _LMFILES_ lappend ansun list unset LOADEDMODULES lappend ansun list unset __MODULES_LMTAG -set tserr msg_unload sticky/1.0 $err_stickyunloadf +set tserr msg_unload {sticky/1.0 <S>} $err_stickyunloadf testouterr_cmd_re sh {unload -f sticky/1.0} $ansun $tserr testouterr_cmd_re sh {purge -f} $ansun $tserr @@ -78,7 +78,7 @@ lappend ans list set _LMFILES_ $mp/foo/2.0 lappend ans list set LOADEDMODULES foo/2.0 lappend ans list unset __MODULES_LMTAG -testouterr_cmd_re sh {switch -f sticky/1.0 foo} $ans msg_unload sticky/1.0 $err_stickyunloadf +testouterr_cmd_re sh {switch -f sticky/1.0 foo} $ans msg_unload {sticky/1.0 <S>} $err_stickyunloadf testouterr_cmd_re sh {reload -f} $anslo {} @@ -86,27 +86,27 @@ lappend ans list set _LMFILES_ $mp/foo/2.0 lappend ans list set LOADEDMODULES foo/2.0 lappend ans list unset __MODULES_LMTAG -set tserr msg_unload sticky/1.0 $err_stickyunloadf\n\nmsg_load foo/2.0 +set tserr msg_unload {sticky/1.0 <S>} $err_stickyunloadf\n\nmsg_load foo/2.0 testouterr_cmd_re sh {restore -f testsuite/home/coll-sticky-0} $ans $tserr set ans list lappend ans list set _LMFILES_ $mp/foo/2.0:$mp/sticky/1.0 lappend ans list set LOADEDMODULES foo/2.0:sticky/1.0 lappend ans list set __MODULES_LMTAG sticky/1.0&sticky -testouterr_cmd_re sh {restore -f testsuite/home/coll-sticky-1} $ans msg_unload sticky/1.0\nmsg_load foo/2.0\nmsg_load sticky/1.0 +testouterr_cmd_re sh {restore -f testsuite/home/coll-sticky-1} $ans msg_unload {sticky/1.0 <S>}\nmsg_load foo/2.0\nmsg_load {sticky/1.0 <S>} # test with multiple module loaded, one is sticky setenv_loaded_module list foo/2.0 sticky/1.0 bar/2.0 list $mp/foo/2.0 $mp/sticky/1.0 $mp/bar/2.0 setenv_var __MODULES_LMTAG sticky/1.0&sticky -set tserr msg_unload sticky/1.0 $err_stickyunload +set tserr msg_unload {sticky/1.0 <S>} $err_stickyunload testouterr_cmd_re sh {unload sticky/1.0} ERR $tserr set ans list lappend ans list set _LMFILES_ $mp/foo/2.0:$mp/bar/2.0 lappend ans list set LOADEDMODULES foo/2.0:bar/2.0 lappend ans list unset __MODULES_LMTAG -set tserr msg_unload sticky/1.0 $err_stickyunloadf +set tserr msg_unload {sticky/1.0 <S>} $err_stickyunloadf testouterr_cmd_re sh {unload -f sticky/1.0} $ans $tserr testouterr_cmd_re sh {purge -f} $ansun $tserr @@ -114,7 +114,7 @@ lappend ans list set LOADEDMODULES sticky/1.0 lappend ans list set _LMFILES_ $mp/sticky/1.0 lappend ans list ERR -set tserr msg_unload sticky/1.0 $err_stickyunload +set tserr msg_unload {sticky/1.0 <S>} $err_stickyunload testouterr_cmd_re sh {purge} $ans $tserr set ans list @@ -129,14 +129,14 @@ lappend ans list set LOADEDMODULES foo/2.0:bar/2.0:baz/2.0 lappend ans list unset __MODULES_LMTAG -testouterr_cmd_re sh {switch sticky baz} ERR msg_switch sticky/1.0 baz $err_stickyunload -testouterr_cmd_re sh {switch -f sticky baz} $ans msg_unload sticky/1.0 $err_stickyunloadf +testouterr_cmd_re sh {switch sticky baz} ERR msg_switch {sticky/1.0 <S>} baz $err_stickyunload +testouterr_cmd_re sh {switch -f sticky baz} $ans msg_unload {sticky/1.0 <S>} $err_stickyunloadf set ans list lappend ans list set _LMFILES_ $mp/sticky/1.0:$mp/foo/2.0 lappend ans list set LOADEDMODULES sticky/1.0:foo/2.0 lappend ans list set __MODULES_LMTAG sticky/1.0&sticky -set tserr msg_unload bar/2.0\nmsg_unload sticky/1.0\nmsg_unload foo/2.0\nmsg_load sticky/1.0\nmsg_load foo/2.0 +set tserr msg_unload bar/2.0\nmsg_unload {sticky/1.0 <S>}\nmsg_unload foo/2.0\nmsg_load {sticky/1.0 <S>}\nmsg_load foo/2.0 testouterr_cmd_re sh {restore testsuite/home/coll-sticky-2} $ans $tserr testouterr_cmd_re sh {restore -f testsuite/home/coll-sticky-2} $ans $tserr @@ -144,13 +144,13 @@ lappend ans list set LOADEDMODULES sticky/1.0:sticky/4.0:foo/2.0 lappend ans list set _LMFILES_ $mp/sticky/1.0:$mp/sticky/4.0:$mp/foo/2.0 lappend ans list ERR -set tserr msg_unload bar/2.0\n\nmsg_unload sticky/1.0 $err_stickyunload\n\nmsg_unload foo/2.0\nmsg_load sticky/4.0\nmsg_load foo/2.0 +set tserr msg_unload bar/2.0\n\nmsg_unload {sticky/1.0 <S>} $err_stickyunload\n\nmsg_unload foo/2.0\nmsg_load sticky/4.0\nmsg_load foo/2.0 testouterr_cmd_re sh {restore testsuite/home/coll-sticky-3} $ans $tserr set ans list lappend ans list set _LMFILES_ $mp/sticky/4.0:$mp/foo/2.0 lappend ans list set LOADEDMODULES sticky/4.0:foo/2.0 lappend ans list unset __MODULES_LMTAG -set tserr msg_unload bar/2.0\n\nmsg_unload sticky/1.0 $err_stickyunloadf\n\nmsg_unload foo/2.0\nmsg_load sticky/4.0\nmsg_load foo/2.0 +set tserr msg_unload bar/2.0\n\nmsg_unload {sticky/1.0 <S>} $err_stickyunloadf\n\nmsg_unload foo/2.0\nmsg_load sticky/4.0\nmsg_load foo/2.0 testouterr_cmd_re sh {restore -f testsuite/home/coll-sticky-3} $ans $tserr # test over *Dependency Reload* mechanism @@ -188,7 +188,7 @@ lappend ans list unset _LMFILES_ lappend ans list unset LOADEDMODULES lappend ans list unset __MODULES_LMTAG -testouterr_cmd_re sh {unload -f --auto foo/2.0} $ans msg_unload sticky/1.0 $err_stickyunloadf\n\nmsg_top_unload foo/2.0 {bar/2.0 sticky/1.0} {} {} +testouterr_cmd_re sh {unload -f --auto foo/2.0} $ans msg_unload {sticky/1.0 <S>} $err_stickyunloadf\n\nmsg_top_unload foo/2.0 {bar/2.0 sticky/1.0} {} {} # test over *Useless Requirement Unload* mechanism setenv_loaded_module list foo/2.0 sticky/1.0 bar/2.0 list $mp/foo/2.0 $mp/sticky/1.0 $mp/bar/2.0 list foo/2.0 sticky/1.0 @@ -207,7 +207,7 @@ lappend ans list unset _LMFILES_ lappend ans list unset LOADEDMODULES lappend ans list unset __MODULES_LMTAG -testouterr_cmd_re sh {unload -f --auto bar/2.0} $ans msg_unload sticky/1.0 $err_stickyunloadf\n\nmsg_top_unload bar/2.0 {} {sticky/1.0 foo/2.0} {} +testouterr_cmd_re sh {unload -f --auto bar/2.0} $ans msg_unload {sticky/1.0 <aL:S>} $err_stickyunloadf\n\nmsg_top_unload bar/2.0 {} {sticky/1.0 foo/2.0} {} set ans list lappend ans list set LOADEDMODULES foo/2.0:sticky/1.0:bar/1.0 @@ -221,9 +221,9 @@ lappend ans list set _LMFILES_ $mp/bar/1.0 lappend ans list set LOADEDMODULES bar/1.0 lappend ans list unset __MODULES_LMTAG -testouterr_cmd_re sh {switch -f --auto bar/2.0 bar/1.0} $ans msg_unload sticky/1.0 $err_stickyunloadf\n\nmsg_top_switch bar/2.0 bar/1.0 {} {sticky/1.0 foo/2.0} {} {} {} +testouterr_cmd_re sh {switch -f --auto bar/2.0 bar/1.0} $ans msg_unload {sticky/1.0 <aL:S>} $err_stickyunloadf\n\nmsg_top_switch bar/2.0 bar/1.0 {} {sticky/1.0 foo/2.0} {} {} {} -# test when stickyness is defined over generic module name +# test when stickiness is defined over generic module name unsetenv_var TESTSUITE_STICKY_DEP setenv_var TESTSUITE_STICKY_GENERIC 1 setenv_loaded_module list sticky/1.0 list $mp/sticky/1.0 @@ -234,7 +234,7 @@ lappend ans list set _LMFILES_ $mp/sticky/2.0:$mp/foo/2.0 lappend ans list set LOADEDMODULES sticky/2.0:foo/2.0 lappend ans list set __MODULES_LMTAG sticky/2.0&sticky -set tserr msg_unload sticky/1.0\nmsg_load sticky/2.0\nmsg_load foo/2.0 +set tserr msg_unload {sticky/1.0 <S>}\nmsg_load {sticky/2.0 <S>}\nmsg_load foo/2.0 testouterr_cmd_re sh {restore testsuite/home/coll-sticky-4} $ans $tserr testouterr_cmd_re sh {restore -f testsuite/home/coll-sticky-4} $ans $tserr @@ -242,7 +242,7 @@ lappend ans list set _LMFILES_ $mp/sticky/4.0:$mp/foo/2.0 lappend ans list set LOADEDMODULES sticky/4.0:foo/2.0 lappend ans list set __MODULES_LMTAG sticky/4.0&sticky -set tserr msg_unload sticky/1.0\nmsg_load sticky/4.0\nmsg_load foo/2.0 +set tserr msg_unload {sticky/1.0 <S>}\nmsg_load {sticky/4.0 <S>}\nmsg_load foo/2.0 testouterr_cmd_re sh {restore testsuite/home/coll-sticky-5} $ans $tserr testouterr_cmd_re sh {restore -f testsuite/home/coll-sticky-5} $ans $tserr @@ -262,17 +262,17 @@ testouterr_cmd_re sh {switch sticky sticky} $ans {} testouterr_cmd_re sh {switch -f sticky sticky} $ans {} -set tserr msg_switch sticky/1.0 foo $err_stickyunload +set tserr msg_switch {sticky/1.0 <S>} foo $err_stickyunload testouterr_cmd_re sh {switch sticky foo} ERR $tserr set ans list lappend ans list set _LMFILES_ $mp/foo/2.0 lappend ans list set LOADEDMODULES foo/2.0 lappend ans list unset __MODULES_LMTAG -set tserr msg_unload sticky/1.0 $err_stickyunloadf +set tserr msg_unload {sticky/1.0 <S>} $err_stickyunloadf testouterr_cmd_re sh {switch -f sticky foo} $ans $tserr -# test when stickyness is defined over generic module name with deep module +# test when stickiness is defined over generic module name with deep module setenv_var TESTSUITE_STICKY_GENERIC 1 setenv_loaded_module list stickysub/dir1/1.0 list $mp/stickysub/dir1/1.0 setenv_var __MODULES_LMTAG stickysub/dir1/1.0&sticky @@ -302,18 +302,18 @@ testouterr_cmd_re sh {switch stickysub/dir1/2.0} $ans1 {} testouterr_cmd_re sh {switch stickysub/dir1} $ans1 {} -set tserr msg_switch stickysub/dir1/1.0 stickysub $err_stickyunload +set tserr msg_switch {stickysub/dir1/1.0 <S>} stickysub $err_stickyunload testouterr_cmd_re sh {switch stickysub} ERR $tserr -set tserr msg_switch stickysub/dir1/1.0 stickysub/dir2 $err_stickyunload +set tserr msg_switch {stickysub/dir1/1.0 <S>} stickysub/dir2 $err_stickyunload testouterr_cmd_re sh {switch stickysub/dir2} ERR $tserr -set tserr msg_switch stickysub/dir1/1.0 stickysub/dir2/4.0 $err_stickyunload +set tserr msg_switch {stickysub/dir1/1.0 <S>} stickysub/dir2/4.0 $err_stickyunload testouterr_cmd_re sh {switch stickysub/dir2/4.0} ERR $tserr set ans list lappend ans list set _LMFILES_ $mp/stickysub/dir2/4.0 lappend ans list set LOADEDMODULES stickysub/dir2/4.0 lappend ans list unset __MODULES_LMTAG -set tserr msg_unload stickysub/dir1/1.0 $err_stickyunloadf +set tserr msg_unload {stickysub/dir1/1.0 <S>} $err_stickyunloadf testouterr_cmd_re sh {switch -f stickysub} $ans $tserr testouterr_cmd_re sh {switch -f stickysub/dir2} $ans $tserr @@ -321,52 +321,52 @@ lappend ans list set _LMFILES_ $mp/stickysub/dir1/1.0:$mp/stickysub/dir2/4.0:$mp/foo/2.0 lappend ans list set LOADEDMODULES stickysub/dir1/1.0:stickysub/dir2/4.0:foo/2.0 lappend ans list ERR -set tserr msg_unload stickysub/dir1/1.0 $err_stickyunload\n\nmsg_load stickysub/dir2/4.0\nmsg_load foo/2.0 +set tserr msg_unload {stickysub/dir1/1.0 <S>} $err_stickyunload\n\nmsg_load stickysub/dir2/4.0\nmsg_load foo/2.0 testouterr_cmd_re sh {restore testsuite/home/coll-sticky-6} $ans $tserr set ans list lappend ans list set _LMFILES_ $mp/stickysub/dir2/4.0:$mp/foo/2.0 lappend ans list set LOADEDMODULES stickysub/dir2/4.0:foo/2.0 lappend ans list unset __MODULES_LMTAG -set tserr msg_unload stickysub/dir1/1.0 $err_stickyunloadf\n\nmsg_load stickysub/dir2/4.0\nmsg_load foo/2.0 +set tserr msg_unload {stickysub/dir1/1.0 <S>} $err_stickyunloadf\n\nmsg_load stickysub/dir2/4.0\nmsg_load foo/2.0 testouterr_cmd_re sh {restore -f testsuite/home/coll-sticky-6} $ans $tserr setenv_var TESTSUITE_STICKY_GENERIC 3 -set tserr msg_switch stickysub/dir1/1.0 stickysub $err_stickyunload +set tserr msg_switch {stickysub/dir1/1.0 <S>} stickysub $err_stickyunload testouterr_cmd_re sh {switch stickysub} ERR $tserr set ans list lappend ans list set _LMFILES_ $mp/stickysub/dir2/4.0 lappend ans list set LOADEDMODULES stickysub/dir2/4.0 lappend ans list unset __MODULES_LMTAG -set tserr msg_unload stickysub/dir1/1.0 $err_stickyunloadf +set tserr msg_unload {stickysub/dir1/1.0 <S>} $err_stickyunloadf testouterr_cmd_re sh {switch -f stickysub} $ans $tserr -set tserr msg_switch stickysub/dir1/1.0 stickysub/dir1/2.0 $err_stickyunload +set tserr msg_switch {stickysub/dir1/1.0 <S>} stickysub/dir1/2.0 $err_stickyunload testouterr_cmd_re sh {switch stickysub/dir1/2.0} ERR $tserr set ans list lappend ans list set _LMFILES_ $mp/stickysub/dir1/2.0 lappend ans list set LOADEDMODULES stickysub/dir1/2.0 lappend ans list unset __MODULES_LMTAG -set tserr msg_unload stickysub/dir1/1.0 $err_stickyunloadf +set tserr msg_unload {stickysub/dir1/1.0 <S>} $err_stickyunloadf testouterr_cmd_re sh {switch -f stickysub/dir1/2.0} $ans $tserr set ans list lappend ans list set _LMFILES_ $mp/stickysub/dir1/1.0:$mp/stickysub/dir2/4.0:$mp/foo/2.0 lappend ans list set LOADEDMODULES stickysub/dir1/1.0:stickysub/dir2/4.0:foo/2.0 lappend ans list ERR -set tserr msg_unload stickysub/dir1/1.0 $err_stickyunload\n\nmsg_load stickysub/dir2/4.0\nmsg_load foo/2.0 +set tserr msg_unload {stickysub/dir1/1.0 <S>} $err_stickyunload\n\nmsg_load stickysub/dir2/4.0\nmsg_load foo/2.0 testouterr_cmd_re sh {restore testsuite/home/coll-sticky-6} $ans $tserr set ans list lappend ans list set _LMFILES_ $mp/stickysub/dir2/4.0:$mp/foo/2.0 lappend ans list set LOADEDMODULES stickysub/dir2/4.0:foo/2.0 lappend ans list unset __MODULES_LMTAG -set tserr msg_unload stickysub/dir1/1.0 $err_stickyunloadf\n\nmsg_load stickysub/dir2/4.0\nmsg_load foo/2.0 +set tserr msg_unload {stickysub/dir1/1.0 <S>} $err_stickyunloadf\n\nmsg_load stickysub/dir2/4.0\nmsg_load foo/2.0 testouterr_cmd_re sh {restore -f testsuite/home/coll-sticky-6} $ans $tserr setenv_var MODULES_ADVANCED_VERSION_SPEC 1 setenv_var TESTSUITE_STICKY_GENERIC 4 -set tserr msg_switch stickysub/dir1/1.0 stickysub/dir1/2.0 $err_stickyunload +set tserr msg_switch {stickysub/dir1/1.0 <S>} stickysub/dir1/2.0 $err_stickyunload testouterr_cmd_re sh {switch stickysub/dir1/2.0} ERR $tserr -set tserr msg_switch stickysub/dir1/1.0 stickysub/dir1 $err_stickyunload +set tserr msg_switch {stickysub/dir1/1.0 <S>} stickysub/dir1 $err_stickyunload testouterr_cmd_re sh {switch stickysub/dir1} ERR $tserr set ans list @@ -374,7 +374,7 @@ lappend ans list set _LMFILES_ $mp/stickysub/dir1/2.0 lappend ans list set LOADEDMODULES stickysub/dir1/2.0 lappend ans list set __MODULES_LMTAG stickysub/dir1/2.0&sticky -set tserr msg_unload stickysub/dir1/1.0 $err_stickyunloadf +set tserr msg_unload {stickysub/dir1/1.0 <S>} $err_stickyunloadf testouterr_cmd_re sh {switch -f stickysub/dir1/2.0} $ans $tserr testouterr_cmd_re sh {switch -f stickysub/dir1} $ans $tserr @@ -383,20 +383,20 @@ lappend ans list set _LMFILES_ $mp/stickysub/dir1/1.0:$mp/stickysub/dir2/4.0:$mp/foo/2.0 lappend ans list set LOADEDMODULES stickysub/dir1/1.0:stickysub/dir2/4.0:foo/2.0 lappend ans list ERR -set tserr msg_unload stickysub/dir1/1.0 $err_stickyunload\n\nmsg_load stickysub/dir2/4.0\nmsg_load foo/2.0 +set tserr msg_unload {stickysub/dir1/1.0 <S>} $err_stickyunload\n\nmsg_load stickysub/dir2/4.0\nmsg_load foo/2.0 testouterr_cmd_re sh {restore testsuite/home/coll-sticky-6} $ans $tserr set ans list lappend ans list set __MODULES_LMALTNAME stickysub/dir2/4.0&as|stickysub/default&as|stickysub/latest&as|stickysub/dir2/default&as|stickysub/dir2/latest:foo/2.0&as|foo/default&as|foo/latest lappend ans list set _LMFILES_ $mp/stickysub/dir2/4.0:$mp/foo/2.0 lappend ans list set LOADEDMODULES stickysub/dir2/4.0:foo/2.0 lappend ans list unset __MODULES_LMTAG -set tserr msg_unload stickysub/dir1/1.0 $err_stickyunloadf\n\nmsg_load stickysub/dir2/4.0\nmsg_load foo/2.0 +set tserr msg_unload {stickysub/dir1/1.0 <S>} $err_stickyunloadf\n\nmsg_load stickysub/dir2/4.0\nmsg_load foo/2.0 testouterr_cmd_re sh {restore -f testsuite/home/coll-sticky-6} $ans $tserr setenv_var TESTSUITE_STICKY_GENERIC 5 -set tserr msg_switch stickysub/dir1/1.0 stickysub/dir1/2.0 $err_stickyunload +set tserr msg_switch {stickysub/dir1/1.0 <S>} stickysub/dir1/2.0 $err_stickyunload testouterr_cmd_re sh {switch stickysub/dir1/2.0} ERR $tserr -set tserr msg_switch stickysub/dir1/1.0 stickysub/dir1 $err_stickyunload +set tserr msg_switch {stickysub/dir1/1.0 <S>} stickysub/dir1 $err_stickyunload testouterr_cmd_re sh {switch stickysub/dir1} ERR $tserr set ans list @@ -404,7 +404,7 @@ lappend ans list set _LMFILES_ $mp/stickysub/dir1/2.0 lappend ans list set LOADEDMODULES stickysub/dir1/2.0 lappend ans list set __MODULES_LMTAG stickysub/dir1/2.0&sticky -set tserr msg_unload stickysub/dir1/1.0 $err_stickyunloadf +set tserr msg_unload {stickysub/dir1/1.0 <S>} $err_stickyunloadf testouterr_cmd_re sh {switch -f stickysub/dir1/2.0} $ans $tserr testouterr_cmd_re sh {switch -f stickysub/dir1} $ans $tserr @@ -413,14 +413,14 @@ lappend ans list set _LMFILES_ $mp/stickysub/dir1/1.0:$mp/stickysub/dir2/4.0:$mp/foo/2.0 lappend ans list set LOADEDMODULES stickysub/dir1/1.0:stickysub/dir2/4.0:foo/2.0 lappend ans list ERR -set tserr msg_unload stickysub/dir1/1.0 $err_stickyunload\n\nmsg_load stickysub/dir2/4.0\nmsg_load foo/2.0 +set tserr msg_unload {stickysub/dir1/1.0 <S>} $err_stickyunload\n\nmsg_load stickysub/dir2/4.0\nmsg_load foo/2.0 testouterr_cmd_re sh {restore testsuite/home/coll-sticky-6} $ans $tserr set ans list lappend ans list set __MODULES_LMALTNAME stickysub/dir2/4.0&as|stickysub/default&as|stickysub/latest&as|stickysub/dir2/default&as|stickysub/dir2/latest:foo/2.0&as|foo/default&as|foo/latest lappend ans list set _LMFILES_ $mp/stickysub/dir2/4.0:$mp/foo/2.0 lappend ans list set LOADEDMODULES stickysub/dir2/4.0:foo/2.0 lappend ans list unset __MODULES_LMTAG -set tserr msg_unload stickysub/dir1/1.0 $err_stickyunloadf\n\nmsg_load stickysub/dir2/4.0\nmsg_load foo/2.0 +set tserr msg_unload {stickysub/dir1/1.0 <S>} $err_stickyunloadf\n\nmsg_load stickysub/dir2/4.0\nmsg_load foo/2.0 testouterr_cmd_re sh {restore -f testsuite/home/coll-sticky-6} $ans $tserr # test purge and reload when sticky module has a dependency @@ -444,14 +444,14 @@ lappend ans list set _LMFILES_ $mp/foo/2.0:$mp/sticky/1.0 lappend ans list set __MODULES_LMPREREQ sticky/1.0&foo|baz lappend ans list ERR -set tserr msg_unload sticky/1.0 $err_stickyunload\n\nmsg_unload foo/2.0 err_deplo sticky/1.0 +set tserr msg_unload {sticky/1.0 <S>} $err_stickyunload\n\nmsg_unload foo/2.0 err_deplo sticky/1.0 testouterr_cmd_re sh {purge} $ans $tserr set ans list lappend ans list unset __MODULES_LMPREREQ lappend ans list unset _LMFILES_ lappend ans list unset LOADEDMODULES lappend ans list unset __MODULES_LMTAG -set tserr msg_unload sticky/1.0 $err_stickyunloadf +set tserr msg_unload {sticky/1.0 <S>} $err_stickyunloadf testouterr_cmd_re sh {purge -f} $ans $tserr
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/461-super-sticky.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/461-super-sticky.exp
Changed
@@ -43,16 +43,16 @@ setenv_loaded_module list sticky/1.0 list $mp/sticky/1.0 setenv_var __MODULES_LMTAG sticky/1.0&super-sticky -set tserr msg_unload sticky/1.0 $err_superstickyunload +set tserr msg_unload {sticky/1.0 <sS>} $err_superstickyunload testouterr_cmd_re sh {unload sticky/1.0} ERR $tserr testouterr_cmd_re sh {unload -f sticky/1.0} ERR $tserr testouterr_cmd_re sh {purge} ERR $tserr testouterr_cmd_re sh {purge -f} ERR $tserr -testouterr_cmd_re sh {switch sticky} ERR msg_switch sticky/1.0 sticky $err_superstickyunload -testouterr_cmd_re sh {switch -f sticky} ERR msg_switch sticky/1.0 sticky $err_superstickyunload -testouterr_cmd_re sh {switch sticky/1.0 foo} ERR msg_switch sticky/1.0 foo $err_superstickyunload -testouterr_cmd_re sh {switch -f sticky/1.0 foo} ERR msg_switch sticky/1.0 foo $err_superstickyunload +testouterr_cmd_re sh {switch sticky} ERR msg_switch {sticky/1.0 <sS>} sticky $err_superstickyunload +testouterr_cmd_re sh {switch -f sticky} ERR msg_switch {sticky/1.0 <sS>} sticky $err_superstickyunload +testouterr_cmd_re sh {switch sticky/1.0 foo} ERR msg_switch {sticky/1.0 <sS>} foo $err_superstickyunload +testouterr_cmd_re sh {switch -f sticky/1.0 foo} ERR msg_switch {sticky/1.0 <sS>} foo $err_superstickyunload testouterr_cmd_re sh {reload} $anslo {} testouterr_cmd_re sh {reload -f} $anslo {} @@ -63,7 +63,7 @@ lappend ans list set _LMFILES_ $mp/sticky/1.0:$mp/foo/2.0 lappend ans list set LOADEDMODULES sticky/1.0:foo/2.0 lappend ans list ERR -set tserr msg_unload sticky/1.0 $err_superstickyunload\n\nmsg_load foo/2.0 +set tserr msg_unload {sticky/1.0 <sS>} $err_superstickyunload\n\nmsg_load foo/2.0 testouterr_cmd_re sh {restore testsuite/home/coll-sticky-0} $ans $tserr testouterr_cmd_re sh {restore -f testsuite/home/coll-sticky-0} $ans $tserr @@ -71,14 +71,14 @@ lappend ans list set _LMFILES_ $mp/foo/2.0:$mp/sticky/1.0 lappend ans list set LOADEDMODULES foo/2.0:sticky/1.0 lappend ans list set __MODULES_LMTAG sticky/1.0&super-sticky -testouterr_cmd_re sh {restore testsuite/home/coll-sticky-1} $ans msg_unload sticky/1.0\nmsg_load foo/2.0\nmsg_load sticky/1.0 -testouterr_cmd_re sh {restore -f testsuite/home/coll-sticky-1} $ans msg_unload sticky/1.0\nmsg_load foo/2.0\nmsg_load sticky/1.0 +testouterr_cmd_re sh {restore testsuite/home/coll-sticky-1} $ans msg_unload {sticky/1.0 <sS>}\nmsg_load foo/2.0\nmsg_load {sticky/1.0 <sS>} +testouterr_cmd_re sh {restore -f testsuite/home/coll-sticky-1} $ans msg_unload {sticky/1.0 <sS>}\nmsg_load foo/2.0\nmsg_load {sticky/1.0 <sS>} # test with multiple module loaded, one is super-sticky setenv_loaded_module list foo/2.0 sticky/1.0 bar/2.0 list $mp/foo/2.0 $mp/sticky/1.0 $mp/bar/2.0 setenv_var __MODULES_LMTAG sticky/1.0&super-sticky -set tserr msg_unload sticky/1.0 $err_superstickyunload +set tserr msg_unload {sticky/1.0 <sS>} $err_superstickyunload testouterr_cmd_re sh {unload sticky/1.0} ERR $tserr testouterr_cmd_re sh {unload -f sticky/1.0} ERR $tserr @@ -86,7 +86,7 @@ lappend ans list set LOADEDMODULES sticky/1.0 lappend ans list set _LMFILES_ $mp/sticky/1.0 lappend ans list ERR -set tserr msg_unload sticky/1.0 $err_superstickyunload +set tserr msg_unload {sticky/1.0 <sS>} $err_superstickyunload testouterr_cmd_re sh {purge} $ans $tserr testouterr_cmd_re sh {purge -f} $ans $tserr @@ -97,14 +97,14 @@ testouterr_cmd_re sh {reload} $ans {} testouterr_cmd_re sh {reload -f} $ans {} -testouterr_cmd_re sh {switch sticky baz} ERR msg_switch sticky/1.0 baz $err_superstickyunload -testouterr_cmd_re sh {switch -f sticky baz} ERR msg_switch sticky/1.0 baz $err_superstickyunload +testouterr_cmd_re sh {switch sticky baz} ERR msg_switch {sticky/1.0 <sS>} baz $err_superstickyunload +testouterr_cmd_re sh {switch -f sticky baz} ERR msg_switch {sticky/1.0 <sS>} baz $err_superstickyunload set ans list lappend ans list set _LMFILES_ $mp/sticky/1.0:$mp/foo/2.0 lappend ans list set LOADEDMODULES sticky/1.0:foo/2.0 lappend ans list set __MODULES_LMTAG sticky/1.0&super-sticky -set tserr msg_unload bar/2.0\nmsg_unload sticky/1.0\nmsg_unload foo/2.0\nmsg_load sticky/1.0\nmsg_load foo/2.0 +set tserr msg_unload bar/2.0\nmsg_unload {sticky/1.0 <sS>}\nmsg_unload foo/2.0\nmsg_load {sticky/1.0 <sS>}\nmsg_load foo/2.0 testouterr_cmd_re sh {restore testsuite/home/coll-sticky-2} $ans $tserr testouterr_cmd_re sh {restore -f testsuite/home/coll-sticky-2} $ans $tserr @@ -112,7 +112,7 @@ lappend ans list set LOADEDMODULES sticky/1.0:sticky/4.0:foo/2.0 lappend ans list set _LMFILES_ $mp/sticky/1.0:$mp/sticky/4.0:$mp/foo/2.0 lappend ans list ERR -set tserr msg_unload bar/2.0\n\nmsg_unload sticky/1.0 $err_superstickyunload\n\nmsg_unload foo/2.0\nmsg_load sticky/4.0\nmsg_load foo/2.0 +set tserr msg_unload bar/2.0\n\nmsg_unload {sticky/1.0 <sS>} $err_superstickyunload\n\nmsg_unload foo/2.0\nmsg_load sticky/4.0\nmsg_load foo/2.0 testouterr_cmd_re sh {restore testsuite/home/coll-sticky-3} $ans $tserr testouterr_cmd_re sh {restore -f testsuite/home/coll-sticky-3} $ans $tserr @@ -175,7 +175,7 @@ testouterr_cmd_re sh {switch --auto bar/2.0 bar/1.0} $ans msg_switch bar/2.0 bar/1.0 $err_superstickyunload err_urequn sticky/1.0 testouterr_cmd_re sh {switch -f --auto bar/2.0 bar/1.0} $ans msg_switch bar/2.0 bar/1.0 $err_superstickyunload err_urequn sticky/1.0 -# test when stickyness is defined over generic module name +# test when stickiness is defined over generic module name unsetenv_var TESTSUITE_STICKY_DEP setenv_var TESTSUITE_STICKY_GENERIC 1 setenv_loaded_module list sticky/1.0 list $mp/sticky/1.0 @@ -186,7 +186,7 @@ lappend ans list set _LMFILES_ $mp/sticky/2.0:$mp/foo/2.0 lappend ans list set LOADEDMODULES sticky/2.0:foo/2.0 lappend ans list set __MODULES_LMTAG sticky/2.0&super-sticky -set tserr msg_unload sticky/1.0\nmsg_load sticky/2.0\nmsg_load foo/2.0 +set tserr msg_unload {sticky/1.0 <sS>}\nmsg_load {sticky/2.0 <sS>}\nmsg_load foo/2.0 testouterr_cmd_re sh {restore testsuite/home/coll-sticky-4} $ans $tserr testouterr_cmd_re sh {restore -f testsuite/home/coll-sticky-4} $ans $tserr @@ -194,7 +194,7 @@ lappend ans list set _LMFILES_ $mp/sticky/4.0:$mp/foo/2.0 lappend ans list set LOADEDMODULES sticky/4.0:foo/2.0 lappend ans list set __MODULES_LMTAG sticky/4.0&super-sticky -set tserr msg_unload sticky/1.0\nmsg_load sticky/4.0\nmsg_load foo/2.0 +set tserr msg_unload {sticky/1.0 <sS>}\nmsg_load {sticky/4.0 <sS>}\nmsg_load foo/2.0 testouterr_cmd_re sh {restore testsuite/home/coll-sticky-5} $ans $tserr testouterr_cmd_re sh {restore -f testsuite/home/coll-sticky-5} $ans $tserr @@ -214,11 +214,11 @@ testouterr_cmd_re sh {switch sticky sticky} $ans {} testouterr_cmd_re sh {switch -f sticky sticky} $ans {} -set tserr msg_switch sticky/1.0 foo $err_superstickyunload +set tserr msg_switch {sticky/1.0 <sS>} foo $err_superstickyunload testouterr_cmd_re sh {switch sticky foo} ERR $tserr testouterr_cmd_re sh {switch -f sticky foo} ERR $tserr -# test when stickyness is defined over generic module name with deep module +# test when stickiness is defined over generic module name with deep module setenv_var TESTSUITE_STICKY_GENERIC 1 setenv_loaded_module list stickysub/dir1/1.0 list $mp/stickysub/dir1/1.0 setenv_var __MODULES_LMTAG stickysub/dir1/1.0&super-sticky @@ -248,29 +248,29 @@ testouterr_cmd_re sh {switch stickysub/dir1/2.0} $ans1 {} testouterr_cmd_re sh {switch stickysub/dir1} $ans1 {} -set tserr msg_switch stickysub/dir1/1.0 stickysub $err_superstickyunload +set tserr msg_switch {stickysub/dir1/1.0 <sS>} stickysub $err_superstickyunload testouterr_cmd_re sh {switch stickysub} ERR $tserr testouterr_cmd_re sh {switch -f stickysub} ERR $tserr -set tserr msg_switch stickysub/dir1/1.0 stickysub/dir2 $err_superstickyunload +set tserr msg_switch {stickysub/dir1/1.0 <sS>} stickysub/dir2 $err_superstickyunload testouterr_cmd_re sh {switch stickysub/dir2} ERR $tserr testouterr_cmd_re sh {switch -f stickysub/dir2} ERR $tserr -set tserr msg_switch stickysub/dir1/1.0 stickysub/dir2/4.0 $err_superstickyunload +set tserr msg_switch {stickysub/dir1/1.0 <sS>} stickysub/dir2/4.0 $err_superstickyunload testouterr_cmd_re sh {switch stickysub/dir2/4.0} ERR $tserr set ans list lappend ans list set _LMFILES_ $mp/stickysub/dir1/1.0:$mp/stickysub/dir2/4.0:$mp/foo/2.0 lappend ans list set LOADEDMODULES stickysub/dir1/1.0:stickysub/dir2/4.0:foo/2.0 lappend ans list ERR -set tserr msg_unload stickysub/dir1/1.0 $err_superstickyunload\n\nmsg_load stickysub/dir2/4.0\nmsg_load foo/2.0 +set tserr msg_unload {stickysub/dir1/1.0 <sS>} $err_superstickyunload\n\nmsg_load stickysub/dir2/4.0\nmsg_load foo/2.0 testouterr_cmd_re sh {restore testsuite/home/coll-sticky-6} $ans $tserr testouterr_cmd_re sh {restore -f testsuite/home/coll-sticky-6} $ans $tserr setenv_var TESTSUITE_STICKY_GENERIC 3 -set tserr msg_switch stickysub/dir1/1.0 stickysub $err_superstickyunload +set tserr msg_switch {stickysub/dir1/1.0 <sS>} stickysub $err_superstickyunload testouterr_cmd_re sh {switch stickysub} ERR $tserr testouterr_cmd_re sh {switch -f stickysub} ERR $tserr -set tserr msg_switch stickysub/dir1/1.0 stickysub/dir1/2.0 $err_superstickyunload +set tserr msg_switch {stickysub/dir1/1.0 <sS>} stickysub/dir1/2.0 $err_superstickyunload testouterr_cmd_re sh {switch stickysub/dir1/2.0} ERR $tserr testouterr_cmd_re sh {switch -f stickysub/dir1/2.0} ERR $tserr @@ -278,16 +278,16 @@ lappend ans list set _LMFILES_ $mp/stickysub/dir1/1.0:$mp/stickysub/dir2/4.0:$mp/foo/2.0 lappend ans list set LOADEDMODULES stickysub/dir1/1.0:stickysub/dir2/4.0:foo/2.0 lappend ans list ERR -set tserr msg_unload stickysub/dir1/1.0 $err_superstickyunload\n\nmsg_load stickysub/dir2/4.0\nmsg_load foo/2.0 +set tserr msg_unload {stickysub/dir1/1.0 <sS>} $err_superstickyunload\n\nmsg_load stickysub/dir2/4.0\nmsg_load foo/2.0 testouterr_cmd_re sh {restore testsuite/home/coll-sticky-6} $ans $tserr testouterr_cmd_re sh {restore -f testsuite/home/coll-sticky-6} $ans $tserr setenv_var MODULES_ADVANCED_VERSION_SPEC 1 setenv_var TESTSUITE_STICKY_GENERIC 4 -set tserr msg_switch stickysub/dir1/1.0 stickysub/dir1/2.0 $err_superstickyunload +set tserr msg_switch {stickysub/dir1/1.0 <sS>} stickysub/dir1/2.0 $err_superstickyunload testouterr_cmd_re sh {switch stickysub/dir1/2.0} ERR $tserr testouterr_cmd_re sh {switch -f stickysub/dir1/2.0} ERR $tserr -set tserr msg_switch stickysub/dir1/1.0 stickysub/dir1 $err_superstickyunload +set tserr msg_switch {stickysub/dir1/1.0 <sS>} stickysub/dir1 $err_superstickyunload testouterr_cmd_re sh {switch stickysub/dir1} ERR $tserr testouterr_cmd_re sh {switch -f stickysub/dir1} ERR $tserr @@ -296,15 +296,15 @@ lappend ans list set _LMFILES_ $mp/stickysub/dir1/1.0:$mp/stickysub/dir2/4.0:$mp/foo/2.0 lappend ans list set LOADEDMODULES stickysub/dir1/1.0:stickysub/dir2/4.0:foo/2.0 lappend ans list ERR -set tserr msg_unload stickysub/dir1/1.0 $err_superstickyunload\n\nmsg_load stickysub/dir2/4.0\nmsg_load foo/2.0 +set tserr msg_unload {stickysub/dir1/1.0 <sS>} $err_superstickyunload\n\nmsg_load stickysub/dir2/4.0\nmsg_load foo/2.0 testouterr_cmd_re sh {restore testsuite/home/coll-sticky-6} $ans $tserr testouterr_cmd_re sh {restore -f testsuite/home/coll-sticky-6} $ans $tserr setenv_var TESTSUITE_STICKY_GENERIC 5 -set tserr msg_switch stickysub/dir1/1.0 stickysub/dir1/2.0 $err_superstickyunload +set tserr msg_switch {stickysub/dir1/1.0 <sS>} stickysub/dir1/2.0 $err_superstickyunload testouterr_cmd_re sh {switch stickysub/dir1/2.0} ERR $tserr testouterr_cmd_re sh {switch -f stickysub/dir1/2.0} ERR $tserr -set tserr msg_switch stickysub/dir1/1.0 stickysub/dir1 $err_superstickyunload +set tserr msg_switch {stickysub/dir1/1.0 <sS>} stickysub/dir1 $err_superstickyunload testouterr_cmd_re sh {switch stickysub/dir1} ERR $tserr testouterr_cmd_re sh {switch -f stickysub/dir1} ERR $tserr @@ -313,7 +313,7 @@ lappend ans list set _LMFILES_ $mp/stickysub/dir1/1.0:$mp/stickysub/dir2/4.0:$mp/foo/2.0 lappend ans list set LOADEDMODULES stickysub/dir1/1.0:stickysub/dir2/4.0:foo/2.0 lappend ans list ERR -set tserr msg_unload stickysub/dir1/1.0 $err_superstickyunload\n\nmsg_load stickysub/dir2/4.0\nmsg_load foo/2.0 +set tserr msg_unload {stickysub/dir1/1.0 <sS>} $err_superstickyunload\n\nmsg_load stickysub/dir2/4.0\nmsg_load foo/2.0 testouterr_cmd_re sh {restore testsuite/home/coll-sticky-6} $ans $tserr testouterr_cmd_re sh {restore -f testsuite/home/coll-sticky-6} $ans $tserr @@ -338,14 +338,14 @@ lappend ans list set _LMFILES_ $mp/foo/2.0:$mp/sticky/1.0 lappend ans list set __MODULES_LMPREREQ sticky/1.0&foo|baz lappend ans list ERR -set tserr msg_unload sticky/1.0 $err_superstickyunload\n\nmsg_unload foo/2.0 err_deplo sticky/1.0 +set tserr msg_unload {sticky/1.0 <sS>} $err_superstickyunload\n\nmsg_unload foo/2.0 err_deplo sticky/1.0 testouterr_cmd_re sh {purge} $ans $tserr set ans list lappend ans list set LOADEDMODULES sticky/1.0 lappend ans list set _LMFILES_ $mp/sticky/1.0 lappend ans list set __MODULES_LMPREREQ sticky/1.0&foo|baz lappend ans list ERR -set tserr msg_unload sticky/1.0 $err_superstickyunload\n\nmsg_unload foo/2.0 err_deplof sticky/1.0 +set tserr msg_unload {sticky/1.0 <sS>} $err_superstickyunload\n\nmsg_unload foo/2.0 err_deplof sticky/1.0 testouterr_cmd_re sh {purge -f} $ans $tserr
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/462-sticky-corner.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/462-sticky-corner.exp
Changed
@@ -44,8 +44,8 @@ setenv_loaded_module list sticky/2.0 list $mp/sticky/2.0 setenv_var __MODULES_LMTAG sticky/2.0&sticky&super-sticky -testouterr_cmd_re sh {unload sticky/2.0} ERR msg_unload sticky/2.0 $err_superstickyunload -testouterr_cmd_re sh {unload -f sticky/2.0} ERR msg_unload sticky/2.0 $err_superstickyunload +testouterr_cmd_re sh {unload sticky/2.0} ERR msg_unload {sticky/2.0 <S:sS>} $err_superstickyunload +testouterr_cmd_re sh {unload -f sticky/2.0} ERR msg_unload {sticky/2.0 <S:sS>} $err_superstickyunload # test when persistent info is cleared unsetenv_var __MODULES_LMTAG @@ -64,64 +64,64 @@ setenv_var TESTSUITE_STICKY_BREAK 1 testouterr_cmd_re sh {unload sticky/3.0} ERR msg_unload sticky/3.0 $err_evalabort -# test cumulative stickyness declarations +# test cumulative stickiness declarations setenv_loaded_module list sticky/1.0 list $mp/sticky/1.0 setenv_var __MODULES_LMTAG sticky/1.0&sticky setenv_var TESTSUITE_STICKY_GENERIC 2 -set tserr msg_switch sticky/1.0 sticky/2.0 $err_stickyunload +set tserr msg_switch {sticky/1.0 <S>} sticky/2.0 $err_stickyunload testouterr_cmd_re sh {switch sticky/2.0} ERR $tserr -set tserr msg_switch sticky/1.0 sticky $err_stickyunload +set tserr msg_switch {sticky/1.0 <S>} sticky $err_stickyunload testouterr_cmd_re sh {switch sticky} ERR $tserr set ans list lappend ans list set _LMFILES_ $mp/sticky/1.0:$mp/sticky/2.0:$mp/foo/2.0 lappend ans list set LOADEDMODULES sticky/1.0:sticky/2.0:foo/2.0 lappend ans list set __MODULES_LMTAG sticky/1.0&sticky:sticky/2.0&sticky lappend ans list ERR -set tserr msg_unload sticky/1.0 $err_stickyunload\n\nmsg_load sticky/2.0\nmsg_load foo/2.0 +set tserr msg_unload {sticky/1.0 <S>} $err_stickyunload\n\nmsg_load {sticky/2.0 <S>}\nmsg_load foo/2.0 testouterr_cmd_re sh {restore testsuite/home/coll-sticky-4} $ans $tserr set ans list lappend ans list set _LMFILES_ $mp/sticky/1.0:$mp/sticky/4.0:$mp/foo/2.0 lappend ans list set LOADEDMODULES sticky/1.0:sticky/4.0:foo/2.0 lappend ans list set __MODULES_LMTAG sticky/1.0&sticky:sticky/4.0&sticky lappend ans list ERR -set tserr msg_unload sticky/1.0 $err_stickyunload\n\nmsg_load sticky/4.0\nmsg_load foo/2.0 +set tserr msg_unload {sticky/1.0 <S>} $err_stickyunload\n\nmsg_load {sticky/4.0 <S>}\nmsg_load foo/2.0 testouterr_cmd_re sh {restore testsuite/home/coll-sticky-5} $ans $tserr setenv_var TESTSUITE_SUPER_STICKY 1 setenv_var __MODULES_LMTAG sticky/1.0&super-sticky -set tserr msg_switch sticky/1.0 sticky $err_superstickyunload +set tserr msg_switch {sticky/1.0 <sS>} sticky $err_superstickyunload testouterr_cmd_re sh {switch sticky} ERR $tserr set ans list lappend ans list set _LMFILES_ $mp/sticky/1.0:$mp/sticky/2.0:$mp/foo/2.0 lappend ans list set LOADEDMODULES sticky/1.0:sticky/2.0:foo/2.0 lappend ans list set __MODULES_LMTAG sticky/1.0&super-sticky:sticky/2.0&super-sticky lappend ans list ERR -set tserr msg_unload sticky/1.0 $err_superstickyunload\n\nmsg_load sticky/2.0\nmsg_load foo/2.0 +set tserr msg_unload {sticky/1.0 <sS>} $err_superstickyunload\n\nmsg_load {sticky/2.0 <sS>}\nmsg_load foo/2.0 testouterr_cmd_re sh {restore testsuite/home/coll-sticky-4} $ans $tserr unsetenv_var TESTSUITE_SUPER_STICKY setenv_var __MODULES_LMTAG sticky/1.0&sticky&super-sticky setenv_var TESTSUITE_STICKY_GENERIC 3 -set tserr msg_switch sticky/1.0 sticky/2.0 $err_stickyunload +set tserr msg_switch {sticky/1.0 <S:sS>} sticky/2.0 $err_stickyunload testouterr_cmd_re sh {switch sticky/2.0} ERR $tserr set ans list lappend ans list set _LMFILES_ $mp/sticky/1.0:$mp/sticky/2.0:$mp/foo/2.0 lappend ans list set LOADEDMODULES sticky/1.0:sticky/2.0:foo/2.0 lappend ans list set __MODULES_LMTAG sticky/1.0&sticky&super-sticky:sticky/2.0&super-sticky lappend ans list ERR -set tserr msg_unload sticky/1.0 $err_stickyunload\n\nmsg_load sticky/2.0\nmsg_load foo/2.0 +set tserr msg_unload {sticky/1.0 <S:sS>} $err_stickyunload\n\nmsg_load {sticky/2.0 <sS>}\nmsg_load foo/2.0 testouterr_cmd_re sh {restore testsuite/home/coll-sticky-4} $ans $tserr setenv_var TESTSUITE_STICKY_GENERIC 4 -set tserr msg_switch sticky/1.0 sticky $err_superstickyunload +set tserr msg_switch {sticky/1.0 <S:sS>} sticky $err_superstickyunload testouterr_cmd_re sh {switch sticky} ERR $tserr set ans list lappend ans list set _LMFILES_ $mp/sticky/1.0:$mp/sticky/2.0:$mp/foo/2.0 lappend ans list set LOADEDMODULES sticky/1.0:sticky/2.0:foo/2.0 lappend ans list set __MODULES_LMTAG sticky/1.0&sticky&super-sticky:sticky/2.0&sticky lappend ans list ERR -set tserr msg_unload sticky/1.0 $err_superstickyunload\n\nmsg_load sticky/2.0\nmsg_load foo/2.0 +set tserr msg_unload {sticky/1.0 <S:sS>} $err_superstickyunload\n\nmsg_load {sticky/2.0 <S>}\nmsg_load foo/2.0 testouterr_cmd_re sh {restore testsuite/home/coll-sticky-4} $ans $tserr setenv_var TESTSUITE_STICKY_GENERIC 5 @@ -134,56 +134,56 @@ lappend ans list set _LMFILES_ $mp/sticky/4.0:$mp/foo/2.0 lappend ans list set LOADEDMODULES sticky/4.0:foo/2.0 lappend ans list set __MODULES_LMTAG sticky/4.0&sticky&super-sticky -set tserr msg_unload sticky/1.0\nmsg_load sticky/4.0\nmsg_load foo/2.0 +set tserr msg_unload {sticky/1.0 <S:sS>}\nmsg_load {sticky/4.0 <S:sS>}\nmsg_load foo/2.0 testouterr_cmd_re sh {restore testsuite/home/coll-sticky-5} $ans $tserr -# test cumulative stickyness declarations on deep modules +# test cumulative stickiness declarations on deep modules setenv_var TESTSUITE_STICKY_GENERIC 6 setenv_loaded_module list stickysub/dir1/1.0 list $mp/stickysub/dir1/1.0 setenv_var __MODULES_LMTAG stickysub/dir1/1.0&sticky -set tserr msg_switch stickysub/dir1/1.0 stickysub $err_stickyunload +set tserr msg_switch {stickysub/dir1/1.0 <S>} stickysub $err_stickyunload testouterr_cmd_re sh {switch stickysub} ERR $tserr -set tserr msg_switch stickysub/dir1/1.0 stickysub/dir1 $err_stickyunload +set tserr msg_switch {stickysub/dir1/1.0 <S>} stickysub/dir1 $err_stickyunload testouterr_cmd_re sh {switch stickysub/dir1} ERR $tserr set ans list lappend ans list set _LMFILES_ $mp/stickysub/dir1/1.0 lappend ans list set LOADEDMODULES stickysub/dir1/1.0 lappend ans list set __MODULES_LMTAG stickysub/dir1/1.0&sticky testouterr_cmd_re sh {switch stickysub/dir1/1.0} $ans {} -set tserr msg_switch stickysub/dir1/1.0 stickysub/dir1/2.0 $err_stickyunload +set tserr msg_switch {stickysub/dir1/1.0 <S>} stickysub/dir1/2.0 $err_stickyunload testouterr_cmd_re sh {switch stickysub/dir1/2.0} ERR $tserr set ans list lappend ans list set _LMFILES_ $mp/stickysub/dir1/1.0:$mp/stickysub/dir2/4.0:$mp/foo/2.0 lappend ans list set LOADEDMODULES stickysub/dir1/1.0:stickysub/dir2/4.0:foo/2.0 lappend ans list ERR -set tserr msg_unload stickysub/dir1/1.0 $err_stickyunload\n\nmsg_load stickysub/dir2/4.0\nmsg_load foo/2.0 +set tserr msg_unload {stickysub/dir1/1.0 <S>} $err_stickyunload\n\nmsg_load stickysub/dir2/4.0\nmsg_load foo/2.0 testouterr_cmd_re sh {restore testsuite/home/coll-sticky-6} $ans $tserr setenv_var TESTSUITE_SUPER_STICKY 1 setenv_var __MODULES_LMTAG stickysub/dir1/1.0&super-sticky -set tserr msg_switch stickysub/dir1/1.0 stickysub $err_superstickyunload +set tserr msg_switch {stickysub/dir1/1.0 <sS>} stickysub $err_superstickyunload testouterr_cmd_re sh {switch stickysub} ERR $tserr -set tserr msg_switch stickysub/dir1/1.0 stickysub/dir1 $err_superstickyunload +set tserr msg_switch {stickysub/dir1/1.0 <sS>} stickysub/dir1 $err_superstickyunload testouterr_cmd_re sh {switch stickysub/dir1} ERR $tserr set ans list lappend ans list set _LMFILES_ $mp/stickysub/dir1/1.0 lappend ans list set LOADEDMODULES stickysub/dir1/1.0 lappend ans list set __MODULES_LMTAG stickysub/dir1/1.0&super-sticky testouterr_cmd_re sh {switch stickysub/dir1/1.0} $ans {} -set tserr msg_switch stickysub/dir1/1.0 stickysub/dir1/2.0 $err_superstickyunload +set tserr msg_switch {stickysub/dir1/1.0 <sS>} stickysub/dir1/2.0 $err_superstickyunload testouterr_cmd_re sh {switch stickysub/dir1/2.0} ERR $tserr set ans list lappend ans list set _LMFILES_ $mp/stickysub/dir1/1.0:$mp/stickysub/dir2/4.0:$mp/foo/2.0 lappend ans list set LOADEDMODULES stickysub/dir1/1.0:stickysub/dir2/4.0:foo/2.0 lappend ans list ERR -set tserr msg_unload stickysub/dir1/1.0 $err_superstickyunload\n\nmsg_load stickysub/dir2/4.0\nmsg_load foo/2.0 +set tserr msg_unload {stickysub/dir1/1.0 <sS>} $err_superstickyunload\n\nmsg_load stickysub/dir2/4.0\nmsg_load foo/2.0 testouterr_cmd_re sh {restore testsuite/home/coll-sticky-6} $ans $tserr unsetenv_var TESTSUITE_SUPER_STICKY setenv_var __MODULES_LMTAG stickysub/dir1/1.0&sticky&super-sticky setenv_var TESTSUITE_STICKY_GENERIC 7 -set tserr msg_switch stickysub/dir1/1.0 stickysub $err_superstickyunload +set tserr msg_switch {stickysub/dir1/1.0 <S:sS>} stickysub $err_superstickyunload testouterr_cmd_re sh {switch stickysub} ERR $tserr set ans list lappend ans list set _LMFILES_ $mp/stickysub/dir1/1.0 @@ -195,44 +195,44 @@ lappend ans list set LOADEDMODULES stickysub/dir1/2.0 lappend ans list set __MODULES_LMTAG stickysub/dir1/2.0&super-sticky&sticky testouterr_cmd_re sh {switch stickysub/dir1/2.0} $ans {} -set tserr msg_switch stickysub/dir1/1.0 stickysub/dir2 $err_superstickyunload +set tserr msg_switch {stickysub/dir1/1.0 <S:sS>} stickysub/dir2 $err_superstickyunload testouterr_cmd_re sh {switch stickysub/dir2} ERR $tserr set ans list lappend ans list set _LMFILES_ $mp/stickysub/dir1/1.0:$mp/stickysub/dir2/4.0:$mp/foo/2.0 lappend ans list set LOADEDMODULES stickysub/dir1/1.0:stickysub/dir2/4.0:foo/2.0 lappend ans list set __MODULES_LMTAG stickysub/dir1/1.0&sticky&super-sticky:stickysub/dir2/4.0&sticky lappend ans list ERR -set tserr msg_unload stickysub/dir1/1.0 $err_superstickyunload\n\nmsg_load stickysub/dir2/4.0\nmsg_load foo/2.0 +set tserr msg_unload {stickysub/dir1/1.0 <S:sS>} $err_superstickyunload\n\nmsg_load {stickysub/dir2/4.0 <S>}\nmsg_load foo/2.0 testouterr_cmd_re sh {restore testsuite/home/coll-sticky-6} $ans $tserr setenv_var TESTSUITE_STICKY_GENERIC 8 -set tserr msg_switch stickysub/dir1/1.0 stickysub $err_stickyunload +set tserr msg_switch {stickysub/dir1/1.0 <S:sS>} stickysub $err_stickyunload testouterr_cmd_re sh {switch stickysub} ERR $tserr -set tserr msg_switch stickysub/dir1/1.0 stickysub/dir1/2.0 $err_stickyunload +set tserr msg_switch {stickysub/dir1/1.0 <S:sS>} stickysub/dir1/2.0 $err_stickyunload testouterr_cmd_re sh {switch stickysub/dir1/2.0} ERR $tserr -set tserr msg_switch stickysub/dir1/1.0 stickysub/dir2 $err_stickyunload +set tserr msg_switch {stickysub/dir1/1.0 <S:sS>} stickysub/dir2 $err_stickyunload testouterr_cmd_re sh {switch stickysub/dir2} ERR $tserr set ans list lappend ans list set _LMFILES_ $mp/stickysub/dir1/1.0:$mp/stickysub/dir2/4.0:$mp/foo/2.0 lappend ans list set LOADEDMODULES stickysub/dir1/1.0:stickysub/dir2/4.0:foo/2.0 lappend ans list set __MODULES_LMTAG stickysub/dir1/1.0&sticky&super-sticky:stickysub/dir2/4.0&super-sticky lappend ans list ERR -set tserr msg_unload stickysub/dir1/1.0 $err_stickyunload\n\nmsg_load stickysub/dir2/4.0\nmsg_load foo/2.0 +set tserr msg_unload {stickysub/dir1/1.0 <S:sS>} $err_stickyunload\n\nmsg_load {stickysub/dir2/4.0 <sS>}\nmsg_load foo/2.0 testouterr_cmd_re sh {restore testsuite/home/coll-sticky-6} $ans $tserr setenv_var TESTSUITE_STICKY_GENERIC 9 -set tserr msg_switch stickysub/dir1/1.0 stickysub $err_superstickyunload +set tserr msg_switch {stickysub/dir1/1.0 <S:sS>} stickysub $err_superstickyunload testouterr_cmd_re sh {switch stickysub} ERR $tserr -set tserr msg_switch stickysub/dir1/1.0 stickysub/dir1 $err_superstickyunload +set tserr msg_switch {stickysub/dir1/1.0 <S:sS>} stickysub/dir1 $err_superstickyunload testouterr_cmd_re sh {switch stickysub/dir1} ERR $tserr -set tserr msg_switch stickysub/dir1/1.0 stickysub/dir2/3.0 $err_superstickyunload +set tserr msg_switch {stickysub/dir1/1.0 <S:sS>} stickysub/dir2/3.0 $err_superstickyunload testouterr_cmd_re sh {switch stickysub/dir2/3.0} ERR $tserr set ans list lappend ans list set _LMFILES_ $mp/stickysub/dir1/1.0:$mp/stickysub/dir2/4.0:$mp/foo/2.0 lappend ans list set LOADEDMODULES stickysub/dir1/1.0:stickysub/dir2/4.0:foo/2.0 lappend ans list set __MODULES_LMTAG stickysub/dir1/1.0&sticky&super-sticky:stickysub/dir2/4.0&sticky lappend ans list ERR -set tserr msg_unload stickysub/dir1/1.0 $err_superstickyunload\n\nmsg_load stickysub/dir2/4.0\nmsg_load foo/2.0 +set tserr msg_unload {stickysub/dir1/1.0 <S:sS>} $err_superstickyunload\n\nmsg_load {stickysub/dir2/4.0 <S>}\nmsg_load foo/2.0 testouterr_cmd_re sh {restore testsuite/home/coll-sticky-6} $ans $tserr setenv_var TESTSUITE_STICKY_GENERIC 10 @@ -241,9 +241,9 @@ #FIXME: even if stickysub/dir1/1.0 is declared default, switch sub-command does not know it # it should reload stickysub/dir1/1.0 with no error in the 2 following cases -set tserr msg_switch stickysub/dir1/1.0 stickysub $err_stickyunload +set tserr msg_switch {stickysub/dir1/1.0 <S>} stickysub $err_stickyunload testouterr_cmd_re sh {switch stickysub} ERR $tserr -set tserr msg_switch stickysub/dir1/1.0 stickysub/dir1 $err_stickyunload +set tserr msg_switch {stickysub/dir1/1.0 <S>} stickysub/dir1 $err_stickyunload testouterr_cmd_re sh {switch stickysub/dir1} ERR $tserr set ans list lappend ans list set __MODULES_LMALTNAME stickysub/dir1/1.0&stickysub/dir1/default&stickysub/dir1&stickysub/default&stickysub @@ -251,7 +251,7 @@ lappend ans list set LOADEDMODULES stickysub/dir1/1.0 lappend ans list set __MODULES_LMTAG stickysub/dir1/1.0&sticky testouterr_cmd_re sh {switch stickysub/dir1/1.0} $ans {} -set tserr msg_switch stickysub/dir1/1.0 stickysub/dir1/2.0 $err_stickyunload +set tserr msg_switch {stickysub/dir1/1.0 <S>} stickysub/dir1/2.0 $err_stickyunload testouterr_cmd_re sh {switch stickysub/dir1/2.0} ERR $tserr # stickysub/dir1/1.0 is correctly seen as default when restoring set ans list @@ -267,9 +267,9 @@ #FIXME: even if stickysub/dir2/4.0 is the implicit default, switch sub-command does not know it # it should reload stickysub/dir2/4.0 with no error in the 2 following cases -set tserr msg_switch stickysub/dir2/4.0 stickysub $err_stickyunload +set tserr msg_switch {stickysub/dir2/4.0 <S>} stickysub $err_stickyunload testouterr_cmd_re sh {switch stickysub} ERR $tserr -set tserr msg_switch stickysub/dir2/4.0 stickysub/dir2 $err_stickyunload +set tserr msg_switch {stickysub/dir2/4.0 <S>} stickysub/dir2 $err_stickyunload testouterr_cmd_re sh {switch stickysub/dir2} ERR $tserr set ans list lappend ans list set _LMFILES_ $mp/stickysub/dir2/4.0
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/465-tag-opt.exp
Added
@@ -0,0 +1,1333 @@ +############################################################################## +# Modules Revision 3.0 +# Providing a flexible user environment +# +# File: modules.50-cmds/%M% +# Revision: %I% +# First Edition: 2021/12/05 +# Last Mod.: %U%, %G% +# +# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr +# +# Description: Testuite testsequence +# Command: load, try-load, load-any, unload, switch, source +# Modulefiles: tag +# Sub-Command: +# +# Comment: %C{ +# Test --tag modulefile command option and sub-command option +# }C% +# +############################################################################## + +skip_if_quick_mode + +set mp $modpath.3 +set mpre $modpathre.3 +setenv_path_var MODULEPATH $mp + +set mod tag/8.0 +set modfile $mp/$mod +set modfilere $mpre/$mod + + + +# load / try-load +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set __MODULES_LMEXTRATAG $mod&foo +lappend ans list set __MODULES_LMTAG $mod&foo +testouterr_cmd sh "load --tag=foo $mod" $ans {} +testouterr_cmd sh "load --tag=bar $mod --tag=foo" $ans {} +testouterr_cmd sh "try-load --tag=foo $mod" $ans {} +testouterr_cmd sh "load --tag foo $mod" $ans {} +set tserr "$error_msgs: Invalid command '--tag=foo'\n$err_typehelp" +testouterr_cmd sh "--tag=foo load $mod" ERR $tserr + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set __MODULES_LMEXTRATAG $mod&foo&bar +lappend ans list set __MODULES_LMTAG $mod&foo&bar +testouterr_cmd sh "load --tag=foo:bar $mod" $ans {} +testouterr_cmd sh "load --tag=bar $mod --tag=foo:bar" $ans {} +testouterr_cmd sh "try-load --tag=bar $mod --tag=foo:bar" $ans {} +testouterr_cmd sh "try-load --tag=bar $mod --tag foo:bar" $ans {} +set tserr "$error_msgs: Invalid command '--tag=bar'\n$err_typehelp" +testouterr_cmd sh "--tag=bar try-load $mod --tag foo:bar" ERR $tserr + +testouterr_cmd sh "ml --tag=foo:bar $mod" $ans {} +testouterr_cmd sh "ml $mod --tag=foo:bar" $ans {} +testouterr_cmd sh "ml try-load --tag=foo:bar $mod" $ans {} + +# switch +setenv_loaded_module list foo/1.0 list $mp/foo/1.0 +testouterr_cmd sh "switch --tag=foo:bar foo $mod" $ans {} +testouterr_cmd sh "switch foo --tag=foo:bar $mod" $ans {} +testouterr_cmd sh "switch --tag foo:bar foo $mod" $ans {} + +testouterr_cmd sh "ml switch foo $mod --tag=foo:bar" $ans {} +testouterr_cmd sh "ml -foo $mod --tag=foo:bar" $ans {} +testouterr_cmd sh "ml --tag=foo:bar -foo $mod" $ans {} + +# test tag update on already loaded module (switch) +set ans list +lappend ans list set _LMFILES_ $mp/foo/1.0 +lappend ans list set LOADEDMODULES foo/1.0 +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&foo&bar +lappend ans list set __MODULES_LMTAG foo/1.0&foo&bar +testouterr_cmd sh "switch --tag=foo:bar foo/1.0" $ans {} + +setenv_loaded_module list $mod foo/1.0 list $modfile $mp/foo/1.0 +setenv_path_var __MODULES_LMEXTRATAG foo/1.0&foo +setenv_path_var __MODULES_LMTAG foo/1.0&foo +testouterr_cmd sh "switch --tag=foo:bar $mod foo/1.0" $ans {} + +unsetenv_path_var __MODULES_LMEXTRATAG +unsetenv_path_var __MODULES_LMTAG +setenv_loaded_module list foo/1.0 list $mp/foo/1.0 +setenv_var TESTSUITE_TAG_OPT switchtag1 + +set ans list +lappend ans list set __MODULES_LMCONFLICT $mod&bar/1.0 +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&foo +lappend ans list set __MODULES_LMTAG foo/1.0&foo +testouterr_cmd sh "load $mod" $ans {} + +setenv_path_var __MODULES_LMEXTRATAG foo/1.0&foo +setenv_path_var __MODULES_LMTAG foo/1.0&foo +set ans list +lappend ans list set __MODULES_LMCONFLICT $mod&bar/1.0 +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_var TESTSUITE_TAG_OPT switchtag2 +setenv_loaded_module list bar/1.0 foo/1.0 list $mp/bar/1.0 $mp/foo/1.0 +setenv_path_var __MODULES_LMEXTRATAG foo/1.0&bar&foo +setenv_path_var __MODULES_LMTAG foo/1.0&bar&foo + +set ans list +lappend ans list set __MODULES_LMCONFLICT $mod&bar/1.0 +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&bar&foo&hidden-loaded +lappend ans list set __MODULES_LMTAG foo/1.0&bar&foo&hidden-loaded +set tserr msg_top_load $mod bar/1.0 {} {} +testouterr_cmd sh "load $mod" $ans $tserr + +setenv_loaded_module list foo/1.0 list $mp/foo/1.0 +unsetenv_path_var __MODULES_LMEXTRATAG +unsetenv_path_var __MODULES_LMTAG +unsetenv_var TESTSUITE_TAG_OPT + +# unload (no error but option is ignored) +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload --tag=foo foo" $ans {} +testouterr_cmd sh "unload foo --tag=bar" $ans {} +testouterr_cmd sh "ml unload --tag=foo foo" $ans {} +testouterr_cmd sh "ml --tag=foo -foo" $ans {} + +# error with other sub-commands +set tserr "$error_msgs: Unsupported option '--tag' on list sub-command" +testouterr_cmd sh "list --tag=foo" ERR $tserr +testouterr_cmd sh "ml list --tag=foo" ERR $tserr +testouterr_cmd sh "ml --tag=foo" ERR $tserr +set tserr "$error_msgs: Unsupported option '--tag' on avail sub-command" +testouterr_cmd sh "avail --tag=foo bar" ERR $tserr +testouterr_cmd sh "ml avail --tag=foo bar" ERR $tserr +set tserr "$error_msgs: Unsupported option '--tag' on save sub-command" +testouterr_cmd sh "save --tag foo bar" ERR $tserr + +unsetenv_loaded_module + +# variant module +setenv_var MODULES_ADVANCED_VERSION_SPEC 1 +setenv_var TESTSUITE_TAG_OPT vr1 +set ans list +lappend ans list set __MODULES_LMVARIANT $mod&foo|val1|0|0 +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set __MODULES_LMEXTRATAG $mod&foo&bar +lappend ans list set __MODULES_LMTAG $mod&foo&bar +testouterr_cmd sh "load --tag=foo:bar $mod foo=val1" $ans {} +testouterr_cmd sh "load $mod --tag=foo:bar foo=val1" $ans {} +unsetenv_var TESTSUITE_TAG_OPT +unsetenv_var MODULES_ADVANCED_VERSION_SPEC + +# duplicate tag specifications +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set __MODULES_LMEXTRATAG $mod&foo&bar +lappend ans list set __MODULES_LMTAG $mod&foo&bar +testouterr_cmd sh "load --tag=foo:bar:foo $mod" $ans {} + +setenv_var TESTSUITE_TAG_OPT duprc1 +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set __MODULES_LMEXTRATAG $mod&bar&foo +lappend ans list set __MODULES_LMTAG $mod&bar&foo +testouterr_cmd sh "load --tag=bar:foo $mod" $ans {} + +setenv_var TESTSUITE_TAG_OPT duprc2 +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set __MODULES_LMEXTRATAG $mod&bar&foo +lappend ans list set __MODULES_LMTAG $mod&bar&foo +testouterr_cmd sh "load --tag=bar:foo $mod" $ans {} + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set __MODULES_LMEXTRATAG $mod&foo&bar +lappend ans list set __MODULES_LMTAG $mod&foo&bar +testouterr_cmd sh "load --tag=foo:bar $mod" $ans {} + +unsetenv_var TESTSUITE_TAG_OPT + +# try known tag +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set __MODULES_LMEXTRATAG $mod&hidden-loaded&sticky&super-sticky +lappend ans list set __MODULES_LMTAG $mod&hidden-loaded&sticky&super-sticky +testouterr_cmd sh "load --tag=hidden-loaded:sticky:super-sticky $mod" $ans {} +set tserr msg_load "$mod <H:S:sS>" +testouterr_cmd sh "load -v --tag=hidden-loaded:sticky:super-sticky $mod" $ans $tserr + +# test tags that could not be set manually +testouterr_cmd sh "load --tag=loaded:hidden $mod" ERR err_tagmanset loaded +testouterr_cmd sh "load --tag=hidden:foo:loaded $mod" ERR err_tagmanset hidden +testouterr_cmd sh "try-load --tag=forbidden $mod" ERR err_tagmanset forbidden +testouterr_cmd sh "load --tag=nearly-forbidden $mod" ERR err_tagmanset nearly-forbidden +testouterr_cmd sh "switch --tag=auto-loaded $mod" ERR err_tagmanset auto-loaded + +# apply tag over module command in modulefile +setenv_var TESTSUITE_TAG_OPT loadtag1 +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&foo:$mod&bar +lappend ans list set __MODULES_LMTAG foo/1.0&foo&auto-loaded:$mod&bar +set tserr msg_top_load "$mod <bar>" {} foo/1.0 {} +testouterr_cmd sh "load --auto --tag=bar $mod" $ans $tserr +testouterr_cmd sh "load --no-auto --tag=bar $mod" $ans $tserr + +# test verbose messages +set tserr msg_load {foo/1.0 <aL:foo>}\n\nmsg_top_load "$mod <bar>" {} foo/1.0 {} +testouterr_cmd sh "load -v --auto --tag=bar $mod" $ans $tserr +testouterr_cmd sh "load -v --no-auto --tag=bar $mod" $ans $tserr +testouterr_cmd sh "load -vv --auto --tag=bar $mod" $ans $tserr + +# test messages when dependency is already loaded but not tagged +setenv_loaded_module list foo/1.0 list $mp/foo/1.0 +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&foo:$mod&bar +lappend ans list set __MODULES_LMTAG foo/1.0&foo:$mod&bar +testouterr_cmd sh "load --auto --tag=bar $mod" $ans {} +set tserr msg_tag {foo/1.0 <foo>}\nmsg_load "$mod <bar>" +testouterr_cmd sh "load -v --auto --tag=bar $mod" $ans $tserr +testouterr_cmd sh "load -vv --auto --tag=bar $mod" $ans $tserr + +setenv_loaded_module list foo/1.0 $mod list $mp/foo/1.0 $modfile +setenv_path_var __MODULES_LMPREREQ $mod&foo/1.0 +setenv_path_var __MODULES_LMEXTRATAG foo/1.0&foo:$mod&bar +setenv_path_var __MODULES_LMTAG foo/1.0&auto-loaded&foo:$mod&bar + +set ans list +lappend ans list unset __MODULES_LMPREREQ +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list unset __MODULES_LMEXTRATAG +lappend ans list unset __MODULES_LMTAG +set tserr msg_top_unload "$mod <bar>" {} foo/1.0 {} +testouterr_cmd sh "unload $mod" $ans $tserr + +unsetenv_loaded_module +unsetenv_path_var __MODULES_LMPREREQ +unsetenv_path_var __MODULES_LMEXTRATAG +unsetenv_path_var __MODULES_LMTAG + + +setenv_var TESTSUITE_TAG_OPT loadtag2 +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&hidden-loaded&foo:$mod&bar +lappend ans list set __MODULES_LMTAG foo/1.0&hidden-loaded&foo&auto-loaded:$mod&bar +set tserr msg_load "$mod <bar>" +testouterr_cmd sh "load -v --tag=bar $mod" $ans $tserr + +# test verbose messages +set tserr msg_load {foo/1.0 <aL:foo:H>}\n\nmsg_top_load "$mod <bar>" {} foo/1.0 {} +testouterr_cmd sh "load -vv --tag=bar $mod" $ans $tserr + +# test messages when dependency is already loaded but not tagged +setenv_loaded_module list foo/1.0 list $mp/foo/1.0 +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&hidden-loaded&foo:$mod&bar +lappend ans list set __MODULES_LMTAG foo/1.0&hidden-loaded&foo:$mod&bar +testouterr_cmd sh "load --tag=bar $mod" $ans {} +set tserr msg_load "$mod <bar>" +testouterr_cmd sh "load -v --tag=bar $mod" $ans $tserr +set tserr msg_tag {foo/1.0 <foo:H>}\nmsg_load "$mod <bar>" +testouterr_cmd sh "load -vv --tag=bar $mod" $ans $tserr + +# test messages when dependency is already loaded, auto-loaded, but not tagged +setenv_loaded_module list foo/1.0 list $mp/foo/1.0 list foo/1.0 +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&hidden-loaded&foo:$mod&bar +lappend ans list set __MODULES_LMTAG foo/1.0&auto-loaded&hidden-loaded&foo:$mod&bar +testouterr_cmd sh "load --tag=bar $mod" $ans {} +set tserr msg_load "$mod <bar>" +testouterr_cmd sh "load -v --tag=bar $mod" $ans $tserr +set tserr msg_tag {foo/1.0 <aL:foo:H>}\nmsg_load "$mod <bar>" +testouterr_cmd sh "load -vv --tag=bar $mod" $ans $tserr + +setenv_loaded_module list foo/1.0 $mod list $mp/foo/1.0 $modfile +setenv_path_var __MODULES_LMPREREQ $mod&foo/1.0 +setenv_path_var __MODULES_LMEXTRATAG foo/1.0&hidden-loaded&foo:$mod&bar +setenv_path_var __MODULES_LMTAG foo/1.0&auto-loaded&hidden-loaded&foo:$mod&bar + +set ans list +lappend ans list unset __MODULES_LMPREREQ +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list unset __MODULES_LMEXTRATAG +lappend ans list unset __MODULES_LMTAG +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module +unsetenv_path_var __MODULES_LMPREREQ +unsetenv_path_var __MODULES_LMEXTRATAG +unsetenv_path_var __MODULES_LMTAG + + +setenv_var TESTSUITE_TAG_OPT loadtag3 +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 17} +set tserr escre msg_load $mod msg_moderr {Tag 'loaded' cannot be manually set} {module load --tag loaded:hidden foo/1.0<EXM>} $modfile $ln +testouterr_cmd_re sh "load --tag=bar $mod" ERR $tserr + +setenv_loaded_module list foo/1.0 $mod list $mp/foo/1.0 $modfile +setenv_path_var __MODULES_LMPREREQ $mod&foo/1.0 +setenv_path_var __MODULES_LMEXTRATAG $mod&bar +setenv_path_var __MODULES_LMTAG foo/1.0&auto-loaded:$mod&bar + +set tserr escre msg_unload "$mod <bar>" msg_moderr {Tag 'loaded' cannot be manually set} {module load --tag loaded:hidden foo/1.0<EXM>} $modfile $ln +testouterr_cmd_re sh "unload $mod" ERR $tserr + +unsetenv_loaded_module +unsetenv_path_var __MODULES_LMPREREQ +unsetenv_path_var __MODULES_LMEXTRATAG +unsetenv_path_var __MODULES_LMTAG + + +setenv_var MODULES_ADVANCED_VERSION_SPEC 1 +setenv_var TESTSUITE_TAG_OPT loadtag4 +set ans list +lappend ans list set __MODULES_LMVARIANT variant/3.0&bar|val1|0|0 +lappend ans list set __MODULES_LMPREREQ $mod&variant@3.0\ bar=val1 +lappend ans list set _LMFILES_ $mp/variant/3.0:$modfile +lappend ans list set LOADEDMODULES variant/3.0:$mod +lappend ans list set __MODULES_LMEXTRATAG variant/3.0&foo:$mod&bar +lappend ans list set __MODULES_LMTAG variant/3.0&foo&auto-loaded:$mod&bar +set tserr msg_top_load "$mod <bar>" {} {variant/3.0{bar=val1}} {} +testouterr_cmd sh "load --tag=bar $mod" $ans $tserr + +setenv_loaded_module list variant/3.0 $mod list $mp/variant/3.0 $modfile +setenv_path_var __MODULES_LMVARIANT variant/3.0&bar|val1|0|0 +setenv_path_var __MODULES_LMPREREQ $mod&variant@3.0\ bar=val1 +setenv_path_var __MODULES_LMEXTRATAG variant/3.0&foo:$mod&bar +setenv_path_var __MODULES_LMTAG variant/3.0&foo&auto-loaded:$mod&bar + +set ans list +lappend ans list unset __MODULES_LMVARIANT +lappend ans list unset __MODULES_LMPREREQ +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list unset __MODULES_LMEXTRATAG +lappend ans list unset __MODULES_LMTAG +set tserr msg_top_unload "$mod <bar>" {} {variant/3.0{bar=val1}} {} +testouterr_cmd sh "unload $mod" $ans $tserr + +unsetenv_loaded_module +unsetenv_path_var __MODULES_LMVARIANT +unsetenv_path_var __MODULES_LMPREREQ +unsetenv_path_var __MODULES_LMEXTRATAG +unsetenv_path_var __MODULES_LMTAG +unsetenv_var MODULES_ADVANCED_VERSION_SPEC + +# duplicate tag definition in modulefile +setenv_var TESTSUITE_TAG_OPT loadtagdup1 +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&foo&bar +lappend ans list set __MODULES_LMTAG foo/1.0&foo&bar&auto-loaded +set tserr msg_top_load $mod {} foo/1.0 {} +testouterr_cmd sh "load $mod" $ans $tserr + +setenv_var TESTSUITE_TAG_OPT loadtagdup2 +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&bar +lappend ans list set __MODULES_LMTAG foo/1.0&bar&auto-loaded +set tserr msg_top_load $mod {} foo/1.0 {} +testouterr_cmd sh "load $mod" $ans $tserr + +setenv_var TESTSUITE_TAG_OPT loadtagdup3 +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&hidden-loaded&bar +lappend ans list set __MODULES_LMTAG foo/1.0&hidden-loaded&bar&auto-loaded +testouterr_cmd sh "load $mod" $ans {} +set tserr msg_load $mod +testouterr_cmd sh "load -v $mod" $ans $tserr + +unsetenv_var TESTSUITE_TAG_OPT + + +# already loaded module with different tag set +setenv_loaded_module list $mod list $modfile +set ans list +lappend ans list set __MODULES_LMEXTRATAG $mod&bar +lappend ans list set __MODULES_LMTAG $mod&bar +testouterr_cmd sh "load $mod --tag=bar" $ans {} +testouterr_cmd sh "try-load $mod --tag=bar" $ans {} + +setenv_path_var __MODULES_LMEXTRATAG $mod&bar +setenv_path_var __MODULES_LMTAG $mod&bar +testouterr_cmd sh "load $mod --tag=bar" OK {} +testouterr_cmd sh "load $mod --tag=bar:bar" OK {} +testouterr_cmd sh "try-load $mod --tag=bar:bar" OK {} +set ans list +lappend ans list set __MODULES_LMEXTRATAG $mod&bar&foo +lappend ans list set __MODULES_LMTAG $mod&bar&foo +testouterr_cmd sh "load $mod --tag=foo" $ans {} +testouterr_cmd sh "try-load $mod --tag=foo" $ans {} +set ans list +lappend ans list set __MODULES_LMEXTRATAG $mod&bar&hidden-loaded +lappend ans list set __MODULES_LMTAG $mod&bar&hidden-loaded +testouterr_cmd sh "load $mod --tag=hidden-loaded" $ans {} +testouterr_cmd sh "try-load $mod --tag=hidden-loaded" $ans {} +set tserr err_tagmanset auto-loaded +testouterr_cmd sh "load $mod --tag=foo:auto-loaded" ERR $tserr +testouterr_cmd sh "try-load $mod --tag=foo:auto-loaded" ERR $tserr +set ans list +lappend ans list set __MODULES_LMEXTRATAG $mod&bar +lappend ans list set __MODULES_LMTAG $mod&bar&keep-loaded +testouterr_cmd sh "load $mod --tag=keep-loaded" $ans {} +testouterr_cmd sh "try-load $mod --tag=keep-loaded" $ans {} + +# tag already set but as non-extra tag +setenv_path_var __MODULES_LMEXTRATAG $mod&bar +setenv_path_var __MODULES_LMTAG $mod&bar&foo&hidden-loaded +testouterr_cmd sh "load $mod --tag=hidden-loaded:foo" OK {} + +setenv_var TESTSUITE_TAG_OPT loadtag1 +setenv_loaded_module list foo/1.0 list $mp/foo/1.0 +unsetenv_path_var __MODULES_LMEXTRATAG +unsetenv_path_var __MODULES_LMTAG +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&foo +lappend ans list set __MODULES_LMTAG foo/1.0&foo +testouterr_cmd sh "load $mod" $ans {} + +# test verbose message when requirement is already loaded +set tserr msg_tag {foo/1.0 <foo>}\nmsg_load tag/8.0 +testouterr_cmd sh "load -v $mod" $ans $tserr +testouterr_cmd sh "load -vv $mod" $ans $tserr + +setenv_path_var __MODULES_LMEXTRATAG foo/1.0&bar +setenv_path_var __MODULES_LMTAG foo/1.0&bar +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&bar&foo +lappend ans list set __MODULES_LMTAG foo/1.0&bar&foo +testouterr_cmd sh "load $mod" $ans {} + +setenv_path_var __MODULES_LMEXTRATAG foo/1.0&bar&foo +setenv_path_var __MODULES_LMTAG foo/1.0&bar&foo +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_path_var __MODULES_LMEXTRATAG foo/1.0&bar +setenv_path_var __MODULES_LMTAG foo/1.0&auto-loaded&bar +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&bar&foo +lappend ans list set __MODULES_LMTAG foo/1.0&auto-loaded&bar&foo +testouterr_cmd sh "load $mod" $ans {} + +# multiple module load requirements already loaded (all updated) +setenv_var TESTSUITE_TAG_OPT loadtag5 +setenv_loaded_module list bar/1.0 foo/1.0 list $mp/bar/1.0 $mp/foo/1.0 +setenv_path_var __MODULES_LMEXTRATAG foo/1.0&foo +setenv_path_var __MODULES_LMTAG foo/1.0&foo +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0&bar/1.0 +lappend ans list set _LMFILES_ $mp/bar/1.0:$mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES bar/1.0:foo/1.0:$mod +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&foo&bar:bar/1.0&bar&foo +lappend ans list set __MODULES_LMTAG foo/1.0&foo&bar&keep-loaded:bar/1.0&bar&foo&keep-loaded +testouterr_cmd sh "load --auto $mod" $ans {} +testouterr_cmd sh "load --no-auto $mod" $ans {} + +# auto-loaded tag set manually on already loaded (module load) +setenv_var TESTSUITE_TAG_OPT loadtag6 +setenv_loaded_module list foo/1.0 list $mp/foo/1.0 +setenv_path_var __MODULES_LMEXTRATAG foo/1.0&foo +setenv_path_var __MODULES_LMTAG foo/1.0&foo +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 134} +set tserr escre msg_load $mod msg_moderr {Tag 'auto-loaded' cannot be manually set} {module load --tag=bar:keep-loaded:auto-loaded foo/1.0<EXM>} $modfile $ln +testouterr_cmd_re sh "load --auto $mod" ERR $tserr +testouterr_cmd_re sh "load --no-auto $mod" ERR $tserr + + +# test tag update on already loaded module (try-load) +unsetenv_path_var __MODULES_LMEXTRATAG +unsetenv_path_var __MODULES_LMTAG +setenv_var MODULES_ADVANCED_VERSION_SPEC 1 +setenv_var TESTSUITE_TAG_OPT loadtag4 +setenv_loaded_module list variant/3.0 list $mp/variant/3.0 +setenv_path_var __MODULES_LMVARIANT variant/3.0&bar|val1|0|0 + +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&variant@3.0\ bar=val1 +lappend ans list set _LMFILES_ $mp/variant/3.0:$modfile +lappend ans list set LOADEDMODULES variant/3.0:$mod +lappend ans list set __MODULES_LMEXTRATAG variant/3.0&foo +lappend ans list set __MODULES_LMTAG variant/3.0&foo +testouterr_cmd sh "load $mod" $ans {} + +setenv_path_var __MODULES_LMEXTRATAG variant/3.0&bar +setenv_path_var __MODULES_LMTAG variant/3.0&bar + +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&variant@3.0\ bar=val1 +lappend ans list set _LMFILES_ $mp/variant/3.0:$modfile +lappend ans list set LOADEDMODULES variant/3.0:$mod +lappend ans list set __MODULES_LMEXTRATAG variant/3.0&bar&foo +lappend ans list set __MODULES_LMTAG variant/3.0&bar&foo +testouterr_cmd sh "load $mod" $ans {} + +unsetenv_loaded_module +unsetenv_path_var __MODULES_LMVARIANT +unsetenv_path_var __MODULES_LMEXTRATAG +unsetenv_path_var __MODULES_LMTAG +unsetenv_var TESTSUITE_TAG_OPT +unsetenv_var MODULES_ADVANCED_VERSION_SPEC + + +# test manually set tags over loaded module actions +setenv_loaded_module list $mod list $modfile +setenv_path_var __MODULES_LMEXTRATAG $mod&foo&bar +setenv_path_var __MODULES_LMTAG $mod&foo&bar + +setenv_var MODULES_ADVANCED_VERSION_SPEC 1 +set tserr {tag/8.0 <bar:foo:L> } +testouterr_cmd sh "avail -o tag tag@7.2:8.2" OK $tserr +unsetenv_var MODULES_ADVANCED_VERSION_SPEC + +set tserr {tag/8.0 <bar:foo> } +testouterr_cmd sh "list -o tag" OK $tserr + +testouterr_cmd sh {refresh} OK {} + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set __MODULES_LMEXTRATAG $mod&foo&bar +lappend ans list set __MODULES_LMTAG $mod&foo&bar +testouterr_cmd sh {reload} $ans {} + +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list unset __MODULES_LMEXTRATAG +lappend ans list unset __MODULES_LMTAG +testouterr_cmd sh {purge} $ans {} + +unsetenv_loaded_module +unsetenv_path_var __MODULES_LMEXTRATAG +unsetenv_path_var __MODULES_LMTAG + + +# module-info tags +setenv_var TESTSUITE_TAG_OPT infotags1 +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set __MODULES_LMEXTRATAG $mod&foo&bar +lappend ans list set __MODULES_LMTAG $mod&foo&bar +lappend ans list set TS {bar foo} +testouterr_cmd sh "load --tag=foo:bar $mod" $ans {} + +setenv_var TESTSUITE_TAG_OPT infotags2 +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set __MODULES_LMEXTRATAG $mod&foo&bar +lappend ans list set __MODULES_LMTAG $mod&foo&bar +lappend ans list set TS {bar foo} +testouterr_cmd sh "load --tag=foo:bar $mod" $ans {} + +unsetenv_var TESTSUITE_TAG_OPT + + +# bad specifications +testouterr_cmd sh {load --tag} ERR err_misoptval --tag +testouterr_cmd sh {load --tag foo} OK {} +testouterr_cmd sh {load --tag=} ERR err_misoptval --tag +testouterr_cmd sh {load --tag=foo} OK {} + +setenv_var TESTSUITE_TAG_OPT loadtagbad1 +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 35} +set tserr escre msg_load $mod msg_moderr {Missing value for '--tag' option} {module load --tag<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr +setenv_var TESTSUITE_TAG_OPT loadtagbad2 +testouterr_cmd_re sh "load $mod" $ans {} +setenv_var TESTSUITE_TAG_OPT loadtagbad3 +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 41} +set tserr escre msg_load $mod msg_moderr {Missing value for '--tag' option} {module load --tag=<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr +setenv_var TESTSUITE_TAG_OPT loadtagbad4 +testouterr_cmd_re sh "load $mod" $ans {} +setenv_var TESTSUITE_TAG_OPT loadtagbad5 +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 47} +set tserr escre msg_load $mod msg_moderr {Missing value for '--tag' option} {module load --tag= foo/1.0<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + + +# prereq +setenv_var TESTSUITE_TAG_OPT prtag1 +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&foo +lappend ans list set __MODULES_LMTAG foo/1.0&foo&auto-loaded +set tserr msg_top_load $mod {} foo/1.0 {} +testouterr_cmd sh "load --auto $mod" $ans $tserr + +set tserr msg_load $mod err_prereq foo/1.0 +testouterr_cmd sh "load --no-auto $mod" ERR $tserr + +setenv_var TESTSUITE_TAG_OPT prtag2 +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&hidden-loaded&foo +lappend ans list set __MODULES_LMTAG foo/1.0&hidden-loaded&foo&auto-loaded +testouterr_cmd sh "load --auto $mod" $ans {} + +set tserr msg_load $mod err_prereq foo/1.0 +testouterr_cmd sh "load --no-auto $mod" ERR $tserr + +setenv_var TESTSUITE_TAG_OPT prtag3 +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 56} +set tserr escre msg_load $mod msg_moderr {Tag 'loaded' cannot be manually set} {prereq --tag loaded:hidden foo/1.0<EXM>} $modfile $ln +testouterr_cmd_re sh "load --auto $mod" ERR $tserr +testouterr_cmd_re sh "load --no-auto $mod" ERR $tserr + +# test tag update on already loaded module (prereq) +setenv_var TESTSUITE_TAG_OPT prtag2 +setenv_loaded_module list foo/1.0 list $mp/foo/1.0 +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&hidden-loaded&foo +lappend ans list set __MODULES_LMTAG foo/1.0&hidden-loaded&foo +testouterr_cmd sh "load --auto $mod" $ans {} +testouterr_cmd sh "load --no-auto $mod" $ans {} + +setenv_path_var __MODULES_LMEXTRATAG foo/1.0&hidden-loaded +setenv_path_var __MODULES_LMTAG foo/1.0&hidden-loaded +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&hidden-loaded&foo +lappend ans list set __MODULES_LMTAG foo/1.0&hidden-loaded&foo +testouterr_cmd sh "load --auto $mod" $ans {} +testouterr_cmd sh "load --no-auto $mod" $ans {} + +setenv_path_var __MODULES_LMEXTRATAG foo/1.0&foo&hidden-loaded +setenv_path_var __MODULES_LMTAG foo/1.0&foo&hidden-loaded +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +testouterr_cmd sh "load --auto $mod" $ans {} +testouterr_cmd sh "load --no-auto $mod" $ans {} + +# multiple prereqs already loaded +setenv_var TESTSUITE_TAG_OPT prtag10 +setenv_loaded_module list bar/1.0 foo/1.0 list $mp/bar/1.0 $mp/foo/1.0 +setenv_path_var __MODULES_LMEXTRATAG foo/1.0&foo +setenv_path_var __MODULES_LMTAG foo/1.0&foo +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0|bar/1.0 +lappend ans list set _LMFILES_ $mp/bar/1.0:$mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES bar/1.0:foo/1.0:$mod +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&foo&hidden-loaded:bar/1.0&hidden-loaded&foo +lappend ans list set __MODULES_LMTAG foo/1.0&foo&hidden-loaded:bar/1.0&hidden-loaded&foo +testouterr_cmd sh "load --auto $mod" $ans {} + +# auto-loaded tag set manually on already loaded (prereq) +setenv_var TESTSUITE_TAG_OPT prtag11 +setenv_loaded_module list foo/1.0 list $mp/foo/1.0 +setenv_path_var __MODULES_LMEXTRATAG foo/1.0&foo +setenv_path_var __MODULES_LMTAG foo/1.0&foo +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 137} +set tserr escre msg_load $mod msg_moderr {Tag 'auto-loaded' cannot be manually set} {prereq --tag=auto-loaded:keep-loaded:foo foo/1.0<EXM>} $modfile $ln +testouterr_cmd_re sh "load --auto $mod" ERR $tserr +testouterr_cmd_re sh "load --no-auto $mod" ERR $tserr + +# tag set manually on loading module (prereq) +setenv_var TESTSUITE_TAG_OPT prtag12 +unsetenv_path_var __MODULES_LMEXTRATAG +unsetenv_path_var __MODULES_LMTAG +unsetenv_loaded_module +set ans list +lappend ans list set __MODULES_LMPREREQ foo/1.0&$mod:$mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +# tags not updated on loading module +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&foo +lappend ans list set __MODULES_LMTAG foo/1.0&keep-loaded&foo&auto-loaded +set tserr msg_top_load $mod {} foo/1.0 {} +testouterr_cmd sh "load --auto $mod" $ans $tserr + +# tag set manually on second optional requirement (prereq) +setenv_var TESTSUITE_TAG_OPT prtag13 +setenv_loaded_module list foo/1.0 $mod list $mp/foo/1.0 $modfile +setenv_path_var __MODULES_LMEXTRATAG foo/1.0&foo +setenv_path_var __MODULES_LMTAG foo/1.0&foo&auto-loaded +setenv_path_var __MODULES_LMPREREQ $mod&foo/1.0|bar/1.0 +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0|bar/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$mp/bar/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:bar/1.0:$mod +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&foo:bar/1.0&foo +lappend ans list set __MODULES_LMTAG foo/1.0&foo&auto-loaded:bar/1.0&foo +set tserr msg_top_load {bar/1.0 <foo>} {} {} $mod +testouterr_cmd sh "load --auto bar/1.0" $ans $tserr + +# both requirement loaded, but not tagged +unsetenv_path_var __MODULES_LMEXTRATAG +unsetenv_path_var __MODULES_LMTAG +unsetenv_path_var __MODULES_LMPREREQ +setenv_loaded_module list foo/1.0 bar/1.0 list $mp/foo/1.0 $mp/bar/1.0 +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0|bar/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$mp/bar/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:bar/1.0:$mod +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&foo:bar/1.0&foo +lappend ans list set __MODULES_LMTAG foo/1.0&foo:bar/1.0&foo +set tserr {} +#FIXME: info messages do not mention that requirements have been updated with tag +testouterr_cmd sh "load --auto $mod" $ans $tserr +testouterr_cmd sh "load --no-auto $mod" $ans $tserr +set tserr msg_tag {foo/1.0 <foo>}\nmsg_tag {bar/1.0 <foo>}\nmsg_load $mod +testouterr_cmd sh "load -v --auto $mod" $ans $tserr +testouterr_cmd sh "load -v --no-auto $mod" $ans $tserr + + +unsetenv_path_var __MODULES_LMEXTRATAG +unsetenv_path_var __MODULES_LMTAG +unsetenv_path_var __MODULES_LMPREREQ +unsetenv_loaded_module + + +# prereq-any +setenv_var TESTSUITE_TAG_OPT prtag4 +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&foo +lappend ans list set __MODULES_LMTAG foo/1.0&foo&auto-loaded +set tserr msg_top_load $mod {} foo/1.0 {} +testouterr_cmd sh "load --auto $mod" $ans $tserr + +set tserr msg_load $mod err_prereq foo/1.0 +testouterr_cmd sh "load --no-auto $mod" ERR $tserr + +# test tag update on already loaded module (prereq-any) +setenv_loaded_module list foo/1.0 list $mp/foo/1.0 +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&foo +lappend ans list set __MODULES_LMTAG foo/1.0&foo +testouterr_cmd sh "load --auto $mod" $ans {} +testouterr_cmd sh "load --no-auto $mod" $ans {} + +setenv_path_var __MODULES_LMEXTRATAG foo/1.0&bar +setenv_path_var __MODULES_LMTAG foo/1.0&bar +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&bar&foo +lappend ans list set __MODULES_LMTAG foo/1.0&bar&foo +testouterr_cmd sh "load --auto $mod" $ans {} +testouterr_cmd sh "load --no-auto $mod" $ans {} + +setenv_path_var __MODULES_LMEXTRATAG foo/1.0&foo&bar +setenv_path_var __MODULES_LMTAG foo/1.0&foo&bar +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +testouterr_cmd sh "load --auto $mod" $ans {} +testouterr_cmd sh "load --no-auto $mod" $ans {} + +unsetenv_path_var __MODULES_LMEXTRATAG +unsetenv_path_var __MODULES_LMTAG +unsetenv_loaded_module + + +# prereq-all +setenv_var TESTSUITE_TAG_OPT prtag5 +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&hidden-loaded&foo +lappend ans list set __MODULES_LMTAG foo/1.0&hidden-loaded&foo&auto-loaded +testouterr_cmd sh "load --auto $mod" $ans {} + +set tserr msg_load $mod err_prereq foo/1.0 +testouterr_cmd sh "load --no-auto $mod" ERR $tserr + +# test tag update on already loaded module (prereq-all) +setenv_loaded_module list foo/1.0 list $mp/foo/1.0 +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&hidden-loaded&foo +lappend ans list set __MODULES_LMTAG foo/1.0&hidden-loaded&foo +testouterr_cmd sh "load --auto $mod" $ans {} +testouterr_cmd sh "load --no-auto $mod" $ans {} + +setenv_path_var __MODULES_LMEXTRATAG foo/1.0&foo +setenv_path_var __MODULES_LMTAG foo/1.0&foo +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&foo&hidden-loaded +lappend ans list set __MODULES_LMTAG foo/1.0&foo&hidden-loaded +testouterr_cmd sh "load --auto $mod" $ans {} +testouterr_cmd sh "load --no-auto $mod" $ans {} + +setenv_path_var __MODULES_LMEXTRATAG foo/1.0&foo&hidden-loaded&bar +setenv_path_var __MODULES_LMTAG foo/1.0&foo&hidden-loaded&bar +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +testouterr_cmd sh "load --auto $mod" $ans {} +testouterr_cmd sh "load --no-auto $mod" $ans {} + +unsetenv_path_var __MODULES_LMEXTRATAG +unsetenv_path_var __MODULES_LMTAG +unsetenv_loaded_module + + +# depends-on +setenv_var TESTSUITE_TAG_OPT prtag6 +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 65} +set tserr escre msg_load $mod msg_moderr {Tag 'hidden' cannot be manually set} {depends-on --tag hidden:loaded foo/1.0<EXM>} $modfile $ln +testouterr_cmd_re sh "load --auto $mod" ERR $tserr +testouterr_cmd_re sh "load --no-auto $mod" ERR $tserr + +# test tag update on already loaded module (depends-on) +setenv_var TESTSUITE_TAG_OPT prtag9 +setenv_loaded_module list foo/1.0 list $mp/foo/1.0 +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&foo +lappend ans list set __MODULES_LMTAG foo/1.0&foo +testouterr_cmd sh "load --auto $mod" $ans {} +testouterr_cmd sh "load --no-auto $mod" $ans {} + +setenv_path_var __MODULES_LMEXTRATAG foo/1.0&bar +setenv_path_var __MODULES_LMTAG foo/1.0&bar +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&bar&foo +lappend ans list set __MODULES_LMTAG foo/1.0&bar&foo +testouterr_cmd sh "load --auto $mod" $ans {} +testouterr_cmd sh "load --no-auto $mod" $ans {} + +setenv_path_var __MODULES_LMEXTRATAG foo/1.0&foo&bar +setenv_path_var __MODULES_LMTAG foo/1.0&foo&bar +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +testouterr_cmd sh "load --auto $mod" $ans {} +testouterr_cmd sh "load --no-auto $mod" $ans {} + +unsetenv_path_var __MODULES_LMEXTRATAG +unsetenv_path_var __MODULES_LMTAG +unsetenv_loaded_module + + +# always-load +setenv_var TESTSUITE_TAG_OPT prtag7 +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 104} +set tserr escre msg_load $mod msg_moderr {Tag 'hidden' cannot be manually set} {always-load --tag hidden:loaded foo/1.0<EXM>} $modfile $ln +testouterr_cmd_re sh "load --auto $mod" ERR $tserr +testouterr_cmd_re sh "load --no-auto $mod" ERR $tserr + +setenv_var TESTSUITE_TAG_OPT prtag8 +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&foo +lappend ans list set __MODULES_LMTAG foo/1.0&foo&keep-loaded&auto-loaded +set tserr msg_top_load $mod {} foo/1.0 {} +testouterr_cmd sh "load --auto $mod" $ans $tserr +testouterr_cmd sh "load --no-auto $mod" $ans $tserr + +# test tag update on already loaded module (always-load) +setenv_loaded_module list foo/1.0 list $mp/foo/1.0 +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&foo +lappend ans list set __MODULES_LMTAG foo/1.0&foo&keep-loaded +testouterr_cmd sh "load --auto $mod" $ans {} +testouterr_cmd sh "load --no-auto $mod" $ans {} + +setenv_path_var __MODULES_LMTAG foo/1.0&bar +setenv_path_var __MODULES_LMEXTRATAG foo/1.0&bar + +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&bar&foo +lappend ans list set __MODULES_LMTAG foo/1.0&bar&foo&keep-loaded +testouterr_cmd sh "load --auto $mod" $ans {} +testouterr_cmd sh "load --no-auto $mod" $ans {} + +unsetenv_loaded_module +unsetenv_path_var __MODULES_LMTAG +unsetenv_path_var __MODULES_LMEXTRATAG + + +# load-any +set ans list +lappend ans list set _LMFILES_ $mp/foo/1.0 +lappend ans list set LOADEDMODULES foo/1.0 +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&foo +lappend ans list set __MODULES_LMTAG foo/1.0&foo +testouterr_cmd sh "load-any --auto foo/1.0 --tag foo bar/1.0" $ans {} +testouterr_cmd sh "load-any --no-auto foo/1.0 --tag foo bar/1.0" $ans {} + +setenv_loaded_module list bar/1.0 list $mp/bar/1.0 +set ans list +lappend ans list set _LMFILES_ $mp/bar/1.0:$mp/foo/1.0 +lappend ans list set LOADEDMODULES bar/1.0:foo/1.0 +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&foo +lappend ans list set __MODULES_LMTAG foo/1.0&foo +testouterr_cmd sh "load-any --auto foo/1.0 --tag foo bar/1.0" $ans {} +testouterr_cmd sh "load-any --no-auto foo/1.0 --tag foo bar/1.0" $ans {} + +# test tag update on already loaded module (load-any) +setenv_loaded_module list foo/1.0 list $mp/foo/1.0 +set ans list +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&foo +lappend ans list set __MODULES_LMTAG foo/1.0&foo +testouterr_cmd sh "load-any --auto foo/1.0 bar/1.0 --tag foo" $ans {} +testouterr_cmd sh "load-any --no-auto foo/1.0 bar/1.0 --tag foo" $ans {} + +setenv_path_var __MODULES_LMEXTRATAG foo/1.0&foo +setenv_path_var __MODULES_LMTAG foo/1.0&foo +testouterr_cmd sh "load-any --auto foo/1.0 --tag foo bar/1.0" OK {} +testouterr_cmd sh "load-any --no-auto foo/1.0 --tag foo bar/1.0" OK {} + +set ans list +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&foo&bar +lappend ans list set __MODULES_LMTAG foo/1.0&foo&bar +testouterr_cmd sh "load-any --no-auto foo/1.0 --tag foo:bar bar/1.0" $ans {} +testouterr_cmd sh "load-any --no-auto foo/1.0 --tag bar bar/1.0" $ans {} + +# multiple load-any modules already loaded (first one updated only) +setenv_loaded_module list bar/1.0 foo/1.0 list $mp/bar/1.0 $mp/foo/1.0 +set ans list +lappend ans list set __MODULES_LMTAG foo/1.0&foo&bar +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&foo&bar +testouterr_cmd sh "load-any --no-auto foo/1.0 --tag foo:bar bar/1.0" $ans {} +testouterr_cmd sh "load-any --auto foo/1.0 --tag foo:bar bar/1.0" $ans {} + +setenv_var TESTSUITE_TAG_OPT loadanytag1 +setenv_var MODULES_ADVANCED_VERSION_SPEC 1 +unsetenv_path_var __MODULES_LMEXTRATAG +unsetenv_path_var __MODULES_LMTAG +unsetenv_loaded_module + +set ans list +lappend ans list set __MODULES_LMVARIANT variant/3.0&bar|val1|0|0 +lappend ans list set __MODULES_LMPREREQ $mod&variant@3.0\ bar=val1|foo/1.0 +lappend ans list set _LMFILES_ $mp/variant/3.0:$modfile +lappend ans list set LOADEDMODULES variant/3.0:$mod +lappend ans list set __MODULES_LMEXTRATAG variant/3.0&foo +lappend ans list set __MODULES_LMTAG variant/3.0&foo&auto-loaded +set tserr msg_top_load $mod {} {variant/3.0{bar=val1}} {} +testouterr_cmd sh "load-any --auto $mod" $ans $tserr +testouterr_cmd sh "load-any --no-auto $mod" $ans $tserr + +setenv_loaded_module list foo/1.0 list $mp/foo/1.0 +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&variant@3.0\ bar=val1|foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&foo +lappend ans list set __MODULES_LMTAG foo/1.0&foo +testouterr_cmd sh "load-any --auto $mod" $ans {} +testouterr_cmd sh "load-any --no-auto $mod" $ans {} + +setenv_path_var __MODULES_LMEXTRATAG foo/1.0&foo +setenv_path_var __MODULES_LMTAG foo/1.0&foo +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&variant@3.0\ bar=val1|foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +testouterr_cmd sh "load-any --auto $mod" $ans {} +testouterr_cmd sh "load-any --no-auto $mod" $ans {} + +setenv_path_var __MODULES_LMEXTRATAG foo/1.0&bar +setenv_path_var __MODULES_LMTAG foo/1.0&bar +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&variant@3.0\ bar=val1|foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&bar&foo +lappend ans list set __MODULES_LMTAG foo/1.0&bar&foo +testouterr_cmd sh "load-any --auto $mod" $ans {} +testouterr_cmd sh "load-any --no-auto $mod" $ans {} + +setenv_loaded_module list variant/3.0 $mod list $mp/variant/3.0 $modfile +setenv_path_var __MODULES_LMVARIANT variant/3.0&bar|val1|0|0 +setenv_path_var __MODULES_LMPREREQ $mod&variant@3.0\ bar=val1|foo/1.0 +setenv_path_var __MODULES_LMEXTRATAG variant/3.0&foo +setenv_path_var __MODULES_LMTAG variant/3.0&foo&auto-loaded + +set ans list +lappend ans list unset __MODULES_LMVARIANT +lappend ans list unset __MODULES_LMPREREQ +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list unset __MODULES_LMEXTRATAG +lappend ans list unset __MODULES_LMTAG +set tserr msg_top_unload $mod {} {variant/3.0{bar=val1}} {} +testouterr_cmd sh "unload --auto $mod" $ans $tserr +testouterr_cmd sh "unload --no-auto $mod" $ans $tserr + +setenv_path_var __MODULES_LMEXTRATAG variant/3.0&bar +setenv_path_var __MODULES_LMTAG variant/3.0&auto-loaded&bar +testouterr_cmd sh "unload --auto $mod" $ans $tserr +testouterr_cmd sh "unload --no-auto $mod" $ans $tserr + +unsetenv_path_var __MODULES_LMEXTRATAG +unsetenv_path_var __MODULES_LMTAG +set ans list +lappend ans list unset __MODULES_LMPREREQ +lappend ans list set _LMFILES_ $mp/variant/3.0 +lappend ans list set LOADEDMODULES variant/3.0 +testouterr_cmd sh "unload --auto $mod" $ans {} +testouterr_cmd sh "unload --no-auto $mod" $ans {} + +unsetenv_path_var __MODULES_LMVARIANT +unsetenv_path_var __MODULES_LMPREREQ +unsetenv_loaded_module +unsetenv_var MODULES_ADVANCED_VERSION_SPEC + + +# reload & extra tags +setenv_var TESTSUITE_TAG_OPT reloadtag1 +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&foo +lappend ans list set __MODULES_LMTAG foo/1.0&foo&keep-loaded&auto-loaded +set tserr msg_top_load $mod {} foo/1.0 {} +testouterr_cmd sh "load --auto $mod" $ans $tserr + +setenv_loaded_module list foo/1.0 $mod list $mp/foo/1.0 $modfile +setenv_path_var __MODULES_LMPREREQ $mod&foo/1.0 +setenv_path_var __MODULES_LMEXTRATAG foo/1.0&foo +setenv_path_var __MODULES_LMTAG foo/1.0&foo&keep-loaded&auto-loaded + +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&foo +lappend ans list set __MODULES_LMTAG foo/1.0&foo&auto-loaded&keep-loaded +testouterr_cmd sh {reload} $ans {} + +setenv_path_var __MODULES_LMEXTRATAG foo/1.0&foo:$mod&bar +setenv_path_var __MODULES_LMTAG foo/1.0&foo&keep-loaded&auto-loaded:$mod&bar + +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMEXTRATAG foo/1.0&foo:$mod&bar +lappend ans list set __MODULES_LMTAG foo/1.0&foo&auto-loaded&keep-loaded:$mod&bar +testouterr_cmd sh {reload} $ans {} + +unsetenv_loaded_module +unsetenv_path_var __MODULES_LMPREREQ +unsetenv_path_var __MODULES_LMEXTRATAG +unsetenv_path_var __MODULES_LMTAG + + +# fullpath module specification and already loaded module +# skip these tests, if fullpath module could be confused with variant spec +if {string first {+} $modfile == -1} { + +unsetenv_var TESTSUITE_TAG_OPT +setenv_loaded_module list $modfile list $modfile +set ans list +lappend ans list set __MODULES_LMEXTRATAG $modfile&foo +lappend ans list set __MODULES_LMTAG $modfile&foo +testouterr_cmd sh "load --tag=foo $mod" $ans {} +testouterr_cmd sh "load --tag=foo $modfile" $ans {} + +setenv_path_var __MODULES_LMEXTRATAG $modfile&bar +setenv_path_var __MODULES_LMTAG $modfile&bar +set ans list +lappend ans list set __MODULES_LMEXTRATAG $modfile&bar&foo +lappend ans list set __MODULES_LMTAG $modfile&bar&foo +testouterr_cmd sh "load --tag=foo $mod" $ans {} +testouterr_cmd sh "load --tag=foo $modfile" $ans {} + +unsetenv_path_var __MODULES_LMEXTRATAG +unsetenv_path_var __MODULES_LMTAG +setenv_loaded_module list $mod list $modfile +set ans list +lappend ans list set __MODULES_LMEXTRATAG $mod&foo +lappend ans list set __MODULES_LMTAG $mod&foo +testouterr_cmd sh "load --tag=foo $modfile" $ans {} + +setenv_path_var __MODULES_LMEXTRATAG $mod&bar +setenv_path_var __MODULES_LMTAG $mod&bar +set ans list +lappend ans list set __MODULES_LMEXTRATAG $mod&bar&foo +lappend ans list set __MODULES_LMTAG $mod&bar&foo +testouterr_cmd sh "load --tag=foo $modfile" $ans {} + +unsetenv_loaded_module +unsetenv_path_var __MODULES_LMEXTRATAG +unsetenv_path_var __MODULES_LMTAG + +} + + +# bad prereq specifications +setenv_var TESTSUITE_TAG_OPT prtagbad1 +setenv_var MODULES_ADVANCED_VERSION_SPEC 1 +setenv_var MODULES_IMPLICIT_DEFAULT 1 +set ans list +lappend ans list set __MODULES_LMALTNAME foo/2.0&as|foo/default&as|foo/latest +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0\ --tag|foo +lappend ans list set _LMFILES_ $mp/foo/2.0:$modfile +lappend ans list set LOADEDMODULES foo/2.0:$mod +lappend ans list set __MODULES_LMTAG foo/2.0&auto-loaded +lappend ans list ERR +set tserr msg_top_load $mod {} foo/2.0 {} +testouterr_cmd sh "load --auto $mod" $ans $tserr + +setenv_var MODULES_ADVANCED_VERSION_SPEC 0 +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0|--tag|foo +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMTAG foo/1.0&auto-loaded +set tserr msg_top_load $mod {} foo/1.0 {} +testouterr_cmd sh "load --auto $mod" $ans $tserr +unsetenv_var MODULES_IMPLICIT_DEFAULT +unsetenv_var MODULES_ADVANCED_VERSION_SPEC + +setenv_var TESTSUITE_TAG_OPT prtagbad2 +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 71} +set tserr escre msg_load $mod msg_moderr {wrong # args: should be "prereq ?--tag? ?taglist? modulefile ?...?"} {prereq --tag<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr +setenv_var TESTSUITE_TAG_OPT prtagbad3 +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 74} +set tserr escre msg_load $mod msg_moderr {wrong # args: should be "prereq ?--tag? ?taglist? modulefile ?...?"} {prereq --tag foo<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr +setenv_var TESTSUITE_TAG_OPT prtagbad4 +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 77} +set tserr escre msg_load $mod msg_moderr {Missing value for '--tag' option} {prereq --tag=<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr +setenv_var TESTSUITE_TAG_OPT prtagbad5 +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 80} +set tserr escre msg_load $mod msg_moderr {wrong # args: should be "prereq ?--tag? ?taglist? modulefile ?...?"} {prereq --tag=foo<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr +setenv_var TESTSUITE_TAG_OPT prtagbad6 +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 83} +set tserr escre msg_load $mod msg_moderr {Missing value for '--tag' option} {prereq --tag= foo/1.0<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_var TESTSUITE_TAG_OPT prtagbad7 +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 86} +set tserr escre msg_load $mod msg_moderr {wrong # args: should be "prereq-all ?--tag? ?taglist? modulefile ?...?"} {prereq-all --tag<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr +setenv_var TESTSUITE_TAG_OPT prtagbad8 +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 89} +set tserr escre msg_load $mod msg_moderr {wrong # args: should be "prereq ?--tag? ?taglist? modulefile ?...?"} {prereq-any --tag foo<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr +setenv_var TESTSUITE_TAG_OPT prtagbad9 +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 92} +set tserr escre msg_load $mod msg_moderr {Missing value for '--tag' option} {prereq-all --tag=<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr +setenv_var TESTSUITE_TAG_OPT prtagbad10 +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 95} +set tserr escre msg_load $mod msg_moderr {wrong # args: should be "prereq-all ?--tag? ?taglist? modulefile ?...?"} {depends-on --tag=foo<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr +setenv_var TESTSUITE_TAG_OPT prtagbad11 +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 98} +set tserr escre msg_load $mod msg_moderr {Missing value for '--tag' option} {depends-on --tag= foo/1.0<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr +setenv_var TESTSUITE_TAG_OPT prtagbad12 +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 110} +set tserr escre msg_load $mod msg_moderr {wrong # args: should be "always-load ?--tag? ?taglist? modulefile ?...?"} {always-load --tag=foo<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr +setenv_var TESTSUITE_TAG_OPT prtagbad13 +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 113} +set tserr escre msg_load $mod msg_moderr {Missing value for '--tag' option} {always-load --tag= foo/1.0<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + + +# test verbose messages on source sub-cmd with already loaded modules +# 3rd module is auto-loaded, 2nd is not +# 4th module is hidden-loaded as extra tag, so it will be removed +# see messages in normal, verbose and verbose2 mode +setenv_var TESTSUITE_TAG_OPT coll49 +setenv_var TESTSUITE_KEEP_LOADED coll49 +setenv_var MODULES_ADVANCED_VERSION_SPEC 1 + +setenv_var __MODULES_LMVARIANT variant/3.0&bar|val2|0|0:tag/8.0&bar|0|1|0&foo|1|1|0 +setenv_var __MODULES_LMPREREQ keep/1.0&foo/1.0 +setenv_loaded_module list variant/3.0 tag/8.0 foo/1.0 keep/1.0 list $modpath.3/variant/3.0 $modpath.3/tag/8.0 $modpath.3/foo/1.0 $modpath.3/keep/1.0 list foo/1.0 +setenv_var __MODULES_LMTAG tag/8.0&hidden-loaded:foo/1.0&auto-loaded&hidden-loaded:keep/1.0&hidden-loaded +setenv_var __MODULES_LMEXTRATAG keep/1.0&hidden-loaded +set ans list +lappend ans list set __MODULES_LMEXTRATAG keep/1.0&hidden-loaded:tag/8.0&foo:foo/1.0&bar +lappend ans list set __MODULES_LMTAG keep/1.0&hidden-loaded:tag/8.0&hidden-loaded&foo&keep-loaded:foo/1.0&auto-loaded&hidden-loaded&bar&keep-loaded +set coll49fp $env(HOME)/home/coll49-tosource +set tserr msg_tag {tag/8.0{-bar:+foo} <foo:H:kL>}\nmsg_tag {foo/1.0 <aL:bar:H:kL>} +testouterr_cmd sh "source $coll49fp" $ans {} +testouterr_cmd sh "source -v $coll49fp" $ans $tserr +set tserr msg_load variant/3.0{bar=val2} info_alreadyloaded variant/3.0\n\nmsg_tag {tag/8.0{-bar:+foo} <foo:H:kL>}\nmsg_tag {foo/1.0 <aL:bar:H:kL>}\n\nmsg_load {keep/1.0 <H>} info_alreadyloaded keep/1.0 +testouterr_cmd sh "source -vv $coll49fp" $ans $tserr + +unsetenv_var __MODULES_LMVARIANT +unsetenv_var __MODULES_LMPREREQ +unsetenv_var __MODULES_LMTAG +unsetenv_var __MODULES_LMEXTRATAG +unsetenv_loaded_module +unsetenv_var TESTSUITE_KEEP_LOADED +unsetenv_var MODULES_ADVANCED_VERSION_SPEC + + +# test module designation rendering with tags when module evaluation fails +setenv_var TESTSUITE_TAG_OPT prtagbad2 +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 71} +set tserr escre msg_load $mod msg_moderr {wrong # args: should be "prereq ?--tag? ?taglist? modulefile ?...?"} {prereq --tag<EXM>} $modfile $ln +testouterr_cmd_re sh "load --tag=foo $mod" ERR $tserr +unsetenv_var TESTSUITE_TAG_OPT + +# test module designation rendering with tags when module is already loaded +setenv_loaded_module list $mod list $modfile +setenv_var __MODULES_LMTAG $mod&bar +set tserr msg_load "$mod <bar>" info_alreadyloaded $mod +testouterr_cmd sh "load -vv $mod" OK $tserr + +set ans list +lappend ans list set __MODULES_LMEXTRATAG $mod&foo +lappend ans list set __MODULES_LMTAG $mod&bar&foo +set tserr msg_tag "$mod <bar:foo>" +testouterr_cmd sh "load -vv --tag=foo $mod" $ans $tserr + + +# test module load with no new tags set on already loaded module +set tserr msg_load "$mod <bar>" info_alreadyloaded $mod +testouterr_cmd sh "load -vv --tag=bar $mod" OK $tserr + + +unsetenv_loaded_module +unsetenv_var __MODULES_LMTAG + + +# +# Cleanup +# + +reset_test_env
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/467-keep-loaded.exp
Added
@@ -0,0 +1,126 @@ +############################################################################## +# Modules Revision 3.0 +# Providing a flexible user environment +# +# File: modules.50-cmds/%M% +# Revision: %I% +# First Edition: 2021/12/14 +# Last Mod.: %U%, %G% +# +# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr +# +# Description: Testuite testsequence +# Command: load, unload, display, help, test, whatis, refresh, avail +# Modulefiles: keep +# Sub-Command: +# +# Comment: %C{ +# Test keep-loaded module tag +# }C% +# +############################################################################## + +skip_if_quick_mode + +set mp $modpath.3 +set mpre $modpathre.3 +setenv_path_var MODULEPATH $mp + +set mod keep/1.0 +set modfile $mp/$mod +set modfilere $mpre/$mod + + +# load tests + +setenv_var TESTSUITE_KEEP_LOADED load1 +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMTAG foo/1.0&keep-loaded&auto-loaded +set tserr msg_top_load $mod {} foo/1.0 {} +testouterr_cmd sh "load --auto $mod" $ans $tserr + +setenv_var TESTSUITE_KEEP_LOADED prereq1 +testouterr_cmd sh "load --auto $mod" $ans $tserr + +setenv_var TESTSUITE_KEEP_LOADED switch1 +set ans list +lappend ans list set __MODULES_LMCONFLICT $mod&bar +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMTAG foo/1.0&keep-loaded&auto-loaded +set tserr msg_top_load $mod {} foo/1.0 {} +testouterr_cmd sh "load --auto $mod" $ans $tserr + +setenv_var TESTSUITE_KEEP_LOADED allo1 +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMTAG foo/1.0&keep-loaded&auto-loaded +set tserr msg_top_load $mod {} foo/1.0 {} +testouterr_cmd sh "load --auto $mod" $ans $tserr + + +# unload tests + +setenv_loaded_module list foo/1.0 $mod list $mp/foo/1.0 $modfile +setenv_path_var __MODULES_LMPREREQ $mod&foo/1.0 +setenv_path_var __MODULES_LMTAG foo/1.0&keep-loaded&auto-loaded + +setenv_var TESTSUITE_KEEP_LOADED load1 +set ans list +lappend ans list unset __MODULES_LMPREREQ +lappend ans list set _LMFILES_ $mp/foo/1.0 +lappend ans list set LOADEDMODULES foo/1.0 +testouterr_cmd sh "unload --auto $mod" $ans {} +testouterr_cmd sh "unload --no-auto $mod" $ans {} + +setenv_var TESTSUITE_KEEP_LOADED prereq1 +testouterr_cmd sh "unload --auto $mod" $ans {} +testouterr_cmd sh "unload --no-auto $mod" $ans {} + +setenv_var TESTSUITE_KEEP_LOADED allo1 +set ans list +lappend ans list unset __MODULES_LMPREREQ +lappend ans list set _LMFILES_ $mp/foo/1.0 +lappend ans list set LOADEDMODULES foo/1.0 +testouterr_cmd sh "unload --auto $mod" $ans {} +testouterr_cmd sh "unload --no-auto $mod" $ans {} + +setenv_path_var __MODULES_LMCONFLICT $mod&bar + +setenv_var TESTSUITE_KEEP_LOADED switch1 +set ans list +lappend ans list unset __MODULES_LMCONFLICT +lappend ans list unset __MODULES_LMPREREQ +lappend ans list set _LMFILES_ $mp/foo/1.0 +lappend ans list set LOADEDMODULES foo/1.0 +testouterr_cmd sh "unload --auto $mod" $ans {} +testouterr_cmd sh "unload --no-auto $mod" $ans {} + + +# avail/list + +setenv_var MODULES_TAG_ABBREV auto-loaded=aL:keep-loaded=kL + +set tserr "foo/1.0 <aL:kL> + +Key: +<module-tag> <aL>=auto-loaded <kL>=keep-loaded " +testouterr_cmd sh "avail -o tag:key foo/1.0" OK $tserr + +set tserr "foo/1.0 <aL:kL> $mod + +Key: +<module-tag> <aL>=auto-loaded <kL>=keep-loaded " +testouterr_cmd sh "list -o tag:key" OK $tserr + +# +# Cleanup +# + +reset_test_env
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/470-variant.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/470-variant.exp
Changed
@@ -128,7 +128,23 @@ set ln expr {cmpversion $tclsh_version 8.5 < 1 ? {3} : {25}} testouterr_cmd sh {load variant/1.0} ERR msg_load variant/1.0 err_novarval foo {0 1 2} testouterr_cmd sh {load variant/1.0 foo=val2 bar=val} ERR msg_load variant/1.0{bar=val:foo=val2} err_invalvarval foo val2 {0 1 2} -testouterr_cmd_re sh {load variant/1.0 foo=0 bar=val} ERR escre msg_load variant/1.0{bar=val:foo=0} msg_moderr {No allowed value list defined for variant 'bar'} {variant bar<EXM>} $mp/variant/1.0 $ln +testouterr_cmd sh {load variant/1.0 foo=0} ERR msg_load variant/1.0{foo=0} err_nofreevarval bar +# any kind of value accepted +set ans list +lappend ans list set __MODULES_LMVARIANT variant/1.0&foo|0|0|0&bar|val|0|0 +lappend ans list set TS1 {bar=val:foo=0} +lappend ans list set _LMFILES_ $mp/variant/1.0 +lappend ans list set LOADEDMODULES variant/1.0 +lappend ans list set TS0 {bar foo} +testouterr_cmd_re sh {load variant/1.0 foo=0 bar=val} $ans {} +# empty string value +set ans list +lappend ans list set __MODULES_LMVARIANT variant/1.0&foo|0|0|0&bar||0|0 +lappend ans list set TS1 {bar=:foo=0} +lappend ans list set _LMFILES_ $mp/variant/1.0 +lappend ans list set LOADEDMODULES variant/1.0 +lappend ans list set TS0 {bar foo} +testouterr_cmd_re sh {load variant/1.0 foo=0 bar=} $ans {} setenv_var TESTSUITE_VARIANT 7 set ln expr {cmpversion $tclsh_version 8.5 < 1 ? {3} : {28}} @@ -272,8 +288,13 @@ # variant with no value defined setenv_var TESTSUITE_VARIANT 12 -set ln expr {cmpversion $tclsh_version 8.5 < 1 ? {3} : {50}} -testouterr_cmd_re sh {load variant/1.0 foo=val1} ERR escre msg_load variant/1.0{foo=val1} msg_moderr {No allowed value list defined for variant 'foo'} {variant foo<EXM>} $mp/variant/1.0 $ln +set ans list +lappend ans list set __MODULES_LMVARIANT variant/1.0&foo|val1|0|0 +lappend ans list set TS1 {foo=val1} +lappend ans list set _LMFILES_ $mp/variant/1.0 +lappend ans list set LOADEDMODULES variant/1.0 +lappend ans list set TS0 {foo} +testouterr_cmd_re sh {load variant/1.0 foo=val1} $ans {} # force load whereas another variant of module is already loaded setenv_var __MODULES_LMVARIANT variant/3.0&bar|val1|0|0 @@ -423,6 +444,28 @@ lappend ans list set TS0 {foo} testouterr_cmd sh {load variant/1.0} $ans {} +setenv_var TESTSUITE_VARIANT free1 +set ans list +lappend ans list set __MODULES_LMVARIANT variant/1.0&foo|val1|0|2 +lappend ans list set TS1 {foo=val1} +lappend ans list set _LMFILES_ $mp/variant/1.0 +lappend ans list set LOADEDMODULES variant/1.0 +lappend ans list set TS0 {foo} +testouterr_cmd sh {load variant/1.0} $ans {} +set ans list +lappend ans list set __MODULES_LMVARIANT variant/1.0&foo|val1|0|1 +lappend ans list set TS1 {foo=val1} +lappend ans list set _LMFILES_ $mp/variant/1.0 +lappend ans list set LOADEDMODULES variant/1.0 +lappend ans list set TS0 {foo} +testouterr_cmd sh {load variant/1.0 foo=val1} $ans {} +set ans list +lappend ans list set __MODULES_LMVARIANT variant/1.0&foo|1|0|0 +lappend ans list set TS1 {foo=1} +lappend ans list set _LMFILES_ $mp/variant/1.0 +lappend ans list set LOADEDMODULES variant/1.0 +lappend ans list set TS0 {foo} +testouterr_cmd sh {load variant/1.0 foo=1} $ans {} # # icase & extended_default test
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/471-variant-unload.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/471-variant-unload.exp
Changed
@@ -152,6 +152,19 @@ unsetenv_var MODULES_UNLOAD_MATCH_ORDER +# free variant value +setenv_var TESTSUITE_VARIANT free1 +setenv_loaded_module list variant/1.0 list $mp/variant/1.0 +setenv_var __MODULES_LMVARIANT variant/1.0&foo|val1|0|0 +set ans list +lappend ans list unset __MODULES_LMVARIANT +lappend ans list unset TS1 +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list unset TS0 +testouterr_cmd sh {unload variant foo=val1} $ans {} +testouterr_cmd sh {unload variant/1.0} $ans {} + # # variant issues
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/472-getvariant.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/472-getvariant.exp
Changed
@@ -174,6 +174,129 @@ # +# --return-value test +# + +set module variant/5.1 +set modulefile $mp/$module +set modulefilere $mpre/$module + +setenv_var TESTSUITE_GETVARIANT toomany1 +set ln expr {cmpversion $tclsh_version 8.5 < 1 ? {7} : {10}} +set tserr escre msg_load $module{foo=val1} msg_moderr {wrong # args: should be "getvariant ?--return-value? name ?valifundef?"} {getvariant foo {} other<EXM>} $modulefile $ln +testouterr_cmd_re sh "load $module foo=val1" ERR $tserr + +set tserr "$modlin +$modulefilere: + +variant\\s*foo\\s*val1 val2 val3 +escre msg_moderr {wrong # args: should be "getvariant ?--return-value? name ?valifundef?"} {getvariant foo {} other<EXM>} $modulefile $ln { } +$modlin" +testouterr_cmd_re sh "display $module foo=val1" ERR $tserr + +setenv_var TESTSUITE_GETVARIANT toomany2 +set ln expr {cmpversion $tclsh_version 8.5 < 1 ? {7} : {13}} +set tserr escre msg_load $module{foo=val1} msg_moderr {wrong # args: should be "getvariant ?--return-value? name ?valifundef?"} {getvariant --return-value foo {} other<EXM>} $modulefile $ln +testouterr_cmd_re sh "load $module foo=val1" ERR $tserr + +set tserr "$modlin +$modulefilere: + +variant\\s*foo\\s*val1 val2 val3 +escre msg_moderr {wrong # args: should be "getvariant ?--return-value? name ?valifundef?"} {getvariant --return-value foo {} other<EXM>} $modulefile $ln { } +$modlin" +testouterr_cmd_re sh "display $module foo=val1" ERR $tserr + +setenv_var TESTSUITE_GETVARIANT toofew1 +set ln expr {cmpversion $tclsh_version 8.5 < 1 ? {7} : {16}} +set tserr escre msg_load $module{foo=val1} msg_moderr {wrong # args: should be "getvariant ?--return-value? name ?valifundef?"} {getvariant<EXM>} $modulefile $ln +testouterr_cmd_re sh "load $module foo=val1" ERR $tserr + +set tserr "$modlin +$modulefilere: + +variant\\s*foo\\s*val1 val2 val3 +escre msg_moderr {wrong # args: should be "getvariant ?--return-value? name ?valifundef?"} {getvariant<EXM>} $modulefile $ln { } +$modlin" +testouterr_cmd_re sh "display $module foo=val1" ERR $tserr + +setenv_var TESTSUITE_GETVARIANT toofew2 +set ans list +lappend ans list set __MODULES_LMVARIANT {variant/5.1&foo|val1|0|0} +lappend ans list set _LMFILES_ $mp/variant/5.1 +lappend ans list set LOADEDMODULES variant/5.1 +lappend ans list set testsuite {} +testouterr_cmd sh "load $module foo=val1" $ans {} + +set tserr "$modlin +$modulefilere: + +variant\\s*foo\\s*val1 val2 val3 +setenv\\s*testsuite {--return-value} +$modlin" +testouterr_cmd_re sh "display $module foo=val1" OK $tserr + +setenv_var TESTSUITE_GETVARIANT misplaced1 +set ans list +lappend ans list set __MODULES_LMVARIANT {variant/5.1&foo|val1|0|0} +lappend ans list set _LMFILES_ $mp/variant/5.1 +lappend ans list set LOADEDMODULES variant/5.1 +lappend ans list set testsuite {val1} +testouterr_cmd sh "load $module foo=val1" $ans {} + +set tserr "$modlin +$modulefilere: + +variant\\s*foo\\s*val1 val2 val3 +setenv\\s*testsuite {foo} +$modlin" +testouterr_cmd_re sh "display $module foo=val1" OK $tserr + +setenv_var TESTSUITE_GETVARIANT misplaced2 +set ln expr {cmpversion $tclsh_version 8.5 < 1 ? {7} : {25}} +set tserr escre msg_load $module{foo=val1} msg_moderr {wrong # args: should be "getvariant ?--return-value? name ?valifundef?"} {getvariant foo bar --return-value<EXM>} $modulefile $ln +testouterr_cmd_re sh "load $module foo=val1" ERR $tserr + +set tserr "$modlin +$modulefilere: + +variant\\s*foo\\s*val1 val2 val3 +escre msg_moderr {wrong # args: should be "getvariant ?--return-value? name ?valifundef?"} {getvariant foo bar --return-value<EXM>} $modulefile $ln { } +$modlin" +testouterr_cmd_re sh "display $module foo=val1" ERR $tserr + +setenv_var TESTSUITE_GETVARIANT return1 +set ans list +lappend ans list set _LMFILES_ $mp/variant/5.1 +lappend ans list set LOADEDMODULES variant/5.1 +lappend ans list set testsuite {bar} +testouterr_cmd sh "load $module" $ans {} + +set tserr "$modlin +$modulefilere: + +setenv\\s*testsuite bar +$modlin" +testouterr_cmd_re sh "display $module" OK $tserr + +setenv_var TESTSUITE_GETVARIANT return2 +set ans list +lappend ans list set __MODULES_LMVARIANT {variant/5.1&foo|val1|0|0} +lappend ans list set _LMFILES_ $mp/variant/5.1 +lappend ans list set LOADEDMODULES variant/5.1 +lappend ans list set testsuite val1 +testouterr_cmd sh "load $module foo=val1" $ans {} + +set tserr "$modlin +$modulefilere: + +variant\\s*foo\\s*val1 val2 val3 +setenv\\s*testsuite val1 +$modlin" +testouterr_cmd_re sh "display $module foo=val1" OK $tserr + + +# # Cleanup #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/473-variant-prereq.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/473-variant-prereq.exp
Changed
@@ -86,9 +86,9 @@ testouterr_cmd_re sh {unload --auto variant/7.0 foo=val2} $ans $tserr # dependent unload -set tserr msg_unload vrreq2/1.0{bar=1:foo=val1} err_prerequn vrreq1/1.0 +set tserr msg_unload {vrreq2/1.0{bar=1:foo=val1} <aL>} err_prerequn vrreq1/1.0 testouterr_cmd_re sh {unload --no-auto vrreq2/1.0} ERR $tserr -set tserr msg_top_unload vrreq2/1.0{bar=1:foo=val1} {variant/7.0{foo=val2} vrreq1/1.0{foo=val1}} {} {} +set tserr msg_top_unload {vrreq2/1.0{bar=1:foo=val1} <aL>} {variant/7.0{foo=val2} vrreq1/1.0{foo=val1}} {} {} testouterr_cmd_re sh {unload --auto vrreq2/1.0} $ans $tserr # dependent reload when loading @@ -136,7 +136,7 @@ lappend ans list set _LMFILES_ $mp/vrreq3/1.0:$mp/vrreq1/1.0:$mp/variant/7.0 lappend ans list set LOADEDMODULES vrreq3/1.0:vrreq1/1.0:variant/7.0 lappend ans list set __MODULES_LMTAG vrreq1/1.0&auto-loaded -set tserr msg_top_unload vrreq2/1.0{bar=1:foo=val1} {} {} {vrreq1/1.0{foo=val1} variant/7.0{foo=val2}} +set tserr msg_top_unload {vrreq2/1.0{bar=1:foo=val1} <aL>} {} {} {vrreq1/1.0{foo=val1} variant/7.0{foo=val2}} testouterr_cmd_re sh {unload --auto vrreq2/1.0 bar=1 foo=val1} $ans $tserr # reload modules @@ -170,7 +170,7 @@ lappend ans list set _LMFILES_ $mp/vrreq1/1.0:$mp/variant/7.0 lappend ans list set LOADEDMODULES vrreq1/1.0:variant/7.0 lappend ans list set __MODULES_LMTAG vrreq1/1.0&auto-loaded -set tserr msg_unload vrreq2/1.0{bar=1:foo=val1} err_deplof vrreq1/1.0{foo=val1} +set tserr msg_unload {vrreq2/1.0{bar=1:foo=val1} <aL>} err_deplof vrreq1/1.0{foo=val1} testouterr_cmd_re sh {unload --no-auto -f vrreq2/1.0 bar=1 foo=val1} $ans $tserr # prereq violation solved @@ -250,15 +250,15 @@ lappend ans list set _LMFILES_ $mp/vrreq2/1.0:$mp/vrreq1/1.0 lappend ans list set __MODULES_LMPREREQ {vrreq1/1.0&vrreq2@1.0 bar=1 foo=val1|vrreq3@1.0 bar=1 foo=val1} lappend ans list ERR -set tserr msg_unload vrreq1/1.0{foo=val1} $err_evalabort\n\nmsg_unload variant/7.0{foo=val2} err_urequn vrreq1/1.0{foo=val1} +set tserr msg_unload {vrreq1/1.0{foo=val1} <aL>} $err_evalabort\n\nmsg_unload variant/7.0{foo=val2} err_urequn vrreq1/1.0{foo=val1} testouterr_cmd_re sh {unload --auto variant/7.0 foo=val2} $ans $tserr # error during module evaluation when unloading prereq (DepUn) -set tserr msg_unload vrreq1/1.0{foo=val1} $err_evalabort\n\nmsg_unload vrreq2/1.0{bar=1:foo=val1} err_depun vrreq1/1.0{foo=val1} +set tserr msg_unload {vrreq1/1.0{foo=val1} <aL>} $err_evalabort\n\nmsg_unload {vrreq2/1.0{bar=1:foo=val1} <aL>} err_depun vrreq1/1.0{foo=val1} testouterr_cmd_re sh {unload --auto vrreq2/1.0 foo=val1} ERR $tserr # error during module evaluation when unloading prereq (DepRe) -set tserr msg_unload vrreq1/1.0{foo=val1} $err_evalabort\n\nmsg_load vrreq3/1.0{bar=1:foo=val1} err_depun vrreq1/1.0{foo=val1} +set tserr msg_unload {vrreq1/1.0{foo=val1} <aL>} $err_evalabort\n\nmsg_load vrreq3/1.0{bar=1:foo=val1} err_depun vrreq1/1.0{foo=val1} testouterr_cmd_re sh {load --auto vrreq3/1.0 foo=val1 bar=1} ERR $tserr unsetenv_loaded_module @@ -328,9 +328,9 @@ testouterr_cmd_re sh {unload --auto variant/7.0 foo=val2} $ans $tserr # dependent unload -set tserr msg_unload vrreq2/2.0{bar=1:foo=val1} err_prerequn vrreq1/1.0 +set tserr msg_unload {vrreq2/2.0{bar=1:foo=val1} <aL>} err_prerequn vrreq1/1.0 testouterr_cmd_re sh {unload --no-auto vrreq2/2.0} ERR $tserr -set tserr msg_top_unload vrreq2/2.0{bar=1:foo=val1} {variant/7.0{foo=val2} vrreq1/1.0{foo=val1}} {} {} +set tserr msg_top_unload {vrreq2/2.0{bar=1:foo=val1} <aL>} {variant/7.0{foo=val2} vrreq1/1.0{foo=val1}} {} {} testouterr_cmd_re sh {unload --auto vrreq2/2.0} $ans $tserr testouterr_cmd_re sh {unload --auto vrreq2@:2} $ans $tserr @@ -384,7 +384,7 @@ lappend ans list set _LMFILES_ $mp/vrreq3/2.0:$mp/vrreq1/1.0:$mp/variant/7.0 lappend ans list set LOADEDMODULES vrreq3/2.0:vrreq1/1.0:variant/7.0 lappend ans list set __MODULES_LMTAG vrreq1/1.0&auto-loaded -set tserr msg_top_unload vrreq2/2.0{bar=1:foo=val1} {} {} {vrreq1/1.0{foo=val1} variant/7.0{foo=val2}} +set tserr msg_top_unload {vrreq2/2.0{bar=1:foo=val1} <aL>} {} {} {vrreq1/1.0{foo=val1} variant/7.0{foo=val2}} testouterr_cmd_re sh {unload --auto vrreq2/2.0 bar=1 foo=val1} $ans $tserr # reload modules @@ -420,7 +420,7 @@ lappend ans list set _LMFILES_ $mp/vrreq1/1.0:$mp/variant/7.0 lappend ans list set LOADEDMODULES vrreq1/1.0:variant/7.0 lappend ans list set __MODULES_LMTAG vrreq1/1.0&auto-loaded -set tserr msg_unload vrreq2/2.0{bar=1:foo=val1} err_deplof vrreq1/1.0{foo=val1} +set tserr msg_unload {vrreq2/2.0{bar=1:foo=val1} <aL>} err_deplof vrreq1/1.0{foo=val1} testouterr_cmd_re sh {unload --no-auto -f vrreq2/2.0 bar=1 foo=val1} $ans $tserr # prereq violation solved @@ -502,15 +502,15 @@ lappend ans list set _LMFILES_ $mp/vrreq2/2.0:$mp/vrreq1/1.0 lappend ans list set __MODULES_LMPREREQ {vrreq1/1.0&vrreq2@1<2 bar=1 foo=val1|vrreq3 bar=1 foo=val1} lappend ans list ERR -set tserr msg_unload vrreq1/1.0{foo=val1} $err_evalabort\n\nmsg_unload variant/7.0{foo=val2} err_urequn vrreq1/1.0{foo=val1} +set tserr msg_unload {vrreq1/1.0{foo=val1} <aL>} $err_evalabort\n\nmsg_unload variant/7.0{foo=val2} err_urequn vrreq1/1.0{foo=val1} testouterr_cmd_re sh {unload --auto variant/7.0 foo=val2} $ans $tserr # error during module evaluation when unloading prereq (DepUn) -set tserr msg_unload vrreq1/1.0{foo=val1} $err_evalabort\n\nmsg_unload vrreq2/2.0{bar=1:foo=val1} err_depun vrreq1/1.0{foo=val1} +set tserr msg_unload {vrreq1/1.0{foo=val1} <aL>} $err_evalabort\n\nmsg_unload {vrreq2/2.0{bar=1:foo=val1} <aL>} err_depun vrreq1/1.0{foo=val1} testouterr_cmd_re sh {unload --auto vrreq2/2.0 foo=val1} ERR $tserr # error during module evaluation when unloading prereq (DepRe) -set tserr msg_unload vrreq1/1.0{foo=val1} $err_evalabort\n\nmsg_load vrreq3/2.0{bar=1:foo=val1} err_depun vrreq1/1.0{foo=val1} +set tserr msg_unload {vrreq1/1.0{foo=val1} <aL>} $err_evalabort\n\nmsg_load vrreq3/2.0{bar=1:foo=val1} err_depun vrreq1/1.0{foo=val1} testouterr_cmd_re sh {load --auto vrreq3/2.0 foo=val1 bar=1} ERR $tserr unsetenv_loaded_module @@ -585,9 +585,9 @@ testouterr_cmd_re sh {unload --auto variant/7.0 foo=val2} $ans $tserr # dependent unload -set tserr msg_unload vrreq2/1.0{bar=1:foo=val1} err_prerequn vrreq1/1.0 +set tserr msg_unload {vrreq2/1.0{bar=1:foo=val1} <aL>} err_prerequn vrreq1/1.0 testouterr_cmd_re sh {unload --no-auto vrreq2/1.0} ERR $tserr -set tserr msg_top_unload vrreq2/1.0{bar=1:foo=val1} {variant/7.0{foo=val2} vrreq1/1.0{foo=val1}} {} {} +set tserr msg_top_unload {vrreq2/1.0{bar=1:foo=val1} <aL>} {variant/7.0{foo=val2} vrreq1/1.0{foo=val1}} {} {} testouterr_cmd_re sh {unload --auto vrreq2/1.0} $ans $tserr # dependent reload when loading @@ -640,7 +640,7 @@ lappend ans list set _LMFILES_ $mp/vrreq3/1.0:$mp/vrreq1/1.0:$mp/variant/7.0 lappend ans list set LOADEDMODULES vrreq3/1.0:vrreq1/1.0:variant/7.0 lappend ans list set __MODULES_LMTAG vrreq1/1.0&auto-loaded -set tserr msg_top_unload vrreq2/1.0{bar=1:foo=val1} {} {} {vrreq1/1.0{foo=val1} variant/7.0{foo=val2}} +set tserr msg_top_unload {vrreq2/1.0{bar=1:foo=val1} <aL>} {} {} {vrreq1/1.0{foo=val1} variant/7.0{foo=val2}} testouterr_cmd_re sh {unload --auto vrreq2/1.0 bar=1 foo=val1} $ans $tserr # reload modules @@ -678,7 +678,7 @@ lappend ans list set _LMFILES_ $mp/vrreq1/1.0:$mp/variant/7.0 lappend ans list set LOADEDMODULES vrreq1/1.0:variant/7.0 lappend ans list set __MODULES_LMTAG vrreq1/1.0&auto-loaded -set tserr msg_unload vrreq2/1.0{bar=1:foo=val1} err_deplof vrreq1/1.0{foo=val1} +set tserr msg_unload {vrreq2/1.0{bar=1:foo=val1} <aL>} err_deplof vrreq1/1.0{foo=val1} testouterr_cmd_re sh {unload --no-auto -f vrreq2/1.0 bar=1 foo=val1} $ans $tserr # prereq violation solved @@ -764,15 +764,15 @@ lappend ans list set _LMFILES_ $mp/vrreq2/1.0:$mp/vrreq1/1.0 lappend ans list set __MODULES_LMPREREQ {vrreq1/1.0&alvrreq2 bar=1 foo=val1|alvrreq3@1.0 bar=1 foo=val1} lappend ans list ERR -set tserr msg_unload vrreq1/1.0{foo=val1} $err_evalabort\n\nmsg_unload variant/7.0{foo=val2} err_urequn vrreq1/1.0{foo=val1} +set tserr msg_unload {vrreq1/1.0{foo=val1} <aL>} $err_evalabort\n\nmsg_unload variant/7.0{foo=val2} err_urequn vrreq1/1.0{foo=val1} testouterr_cmd_re sh {unload --auto variant/7.0 foo=val2} $ans $tserr # error during module evaluation when unloading prereq (DepUn) -set tserr msg_unload vrreq1/1.0{foo=val1} $err_evalabort\n\nmsg_unload vrreq2/1.0{bar=1:foo=val1} err_depun vrreq1/1.0{foo=val1} +set tserr msg_unload {vrreq1/1.0{foo=val1} <aL>} $err_evalabort\n\nmsg_unload {vrreq2/1.0{bar=1:foo=val1} <aL>} err_depun vrreq1/1.0{foo=val1} testouterr_cmd_re sh {unload --auto vrreq2/1.0 foo=val1} ERR $tserr # error during module evaluation when unloading prereq (DepRe) -set tserr msg_unload vrreq1/1.0{foo=val1} $err_evalabort\n\nmsg_load vrreq3/1.0{bar=1:foo=val1} err_depun vrreq1/1.0{foo=val1} +set tserr msg_unload {vrreq1/1.0{foo=val1} <aL>} $err_evalabort\n\nmsg_load vrreq3/1.0{bar=1:foo=val1} err_depun vrreq1/1.0{foo=val1} testouterr_cmd_re sh {load --auto vrreq3/1.0 foo=val1 bar=1} ERR $tserr unsetenv_loaded_module @@ -849,9 +849,9 @@ testouterr_cmd_re sh {unload --auto variant/7.0 foo=val2} $ans $tserr # dependent unload -set tserr msg_unload vrreq2/2.0{bar=1:foo=val1} err_prerequn vrreq1/1.0 +set tserr msg_unload {vrreq2/2.0{bar=1:foo=val1} <aL>} err_prerequn vrreq1/1.0 testouterr_cmd_re sh {unload --no-auto vrreq2/2.0} ERR $tserr -set tserr msg_top_unload vrreq2/2.0{bar=1:foo=val1} {variant/7.0{foo=val2} vrreq1/1.0{foo=val1}} {vrreq3/2.0{bar=1:foo=val1}} {} +set tserr msg_top_unload {vrreq2/2.0{bar=1:foo=val1} <aL>} {variant/7.0{foo=val2} vrreq1/1.0{foo=val1}} {vrreq3/2.0{bar=1:foo=val1}} {} testouterr_cmd_re sh {unload --auto vrreq2/2.0} $ans $tserr testouterr_cmd_re sh {unload --auto vrreq2@:2} $ans $tserr @@ -889,7 +889,7 @@ lappend ans list set _LMFILES_ $mp/vrreq3/2.0:$mp/vrreq1/1.0:$mp/variant/7.0 lappend ans list set LOADEDMODULES vrreq3/2.0:vrreq1/1.0:variant/7.0 lappend ans list set __MODULES_LMTAG vrreq3/2.0&auto-loaded:vrreq1/1.0&auto-loaded -set tserr msg_unload vrreq2/2.0{bar=1:foo=val1} err_deplof vrreq1/1.0{foo=val1} +set tserr msg_unload {vrreq2/2.0{bar=1:foo=val1} <aL>} err_deplof vrreq1/1.0{foo=val1} testouterr_cmd_re sh {unload --no-auto -f vrreq2/2.0 bar=1 foo=val1} $ans $tserr # prereq violation solved @@ -972,11 +972,11 @@ lappend ans list set _LMFILES_ $mp/vrreq2/2.0:$mp/vrreq3/2.0:$mp/vrreq1/1.0 lappend ans list set __MODULES_LMPREREQ {vrreq1/1.0&vrreq2@1<2 bar=1 foo=val1&vrreq3 bar=1 foo=val1} lappend ans list ERR -set tserr msg_unload vrreq1/1.0{foo=val1} $err_evalabort\n\nmsg_unload variant/7.0{foo=val2} err_urequn vrreq1/1.0{foo=val1} +set tserr msg_unload {vrreq1/1.0{foo=val1} <aL>} $err_evalabort\n\nmsg_unload variant/7.0{foo=val2} err_urequn vrreq1/1.0{foo=val1} testouterr_cmd_re sh {unload --auto variant/7.0 foo=val2} $ans $tserr # error during module evaluation when unloading prereq (DepUn) -set tserr msg_unload vrreq1/1.0{foo=val1} $err_evalabort\n\nmsg_unload vrreq2/2.0{bar=1:foo=val1} err_depun vrreq1/1.0{foo=val1} +set tserr msg_unload {vrreq1/1.0{foo=val1} <aL>} $err_evalabort\n\nmsg_unload {vrreq2/2.0{bar=1:foo=val1} <aL>} err_depun vrreq1/1.0{foo=val1} testouterr_cmd_re sh {unload --auto vrreq2/2.0 foo=val1} ERR $tserr unsetenv_loaded_module @@ -1004,7 +1004,7 @@ lappend ans list set _LMFILES_ $mp/vrreq2/1.0:$mp/vrreq1/2.0:$mp/variant/7.0 lappend ans list set LOADEDMODULES vrreq2/1.0:vrreq1/2.0:variant/7.0 lappend ans list set __MODULES_LMTAG vrreq1/2.0&auto-loaded -set tserr msg_top_switch vrreq2/2.0{bar=1:foo=val2} vrreq2/1.0{bar=1:foo=val1} {} {} {} {} {vrreq1/2.0{foo=val1} variant/7.0{foo=val2}} +set tserr msg_top_switch {vrreq2/2.0{bar=1:foo=val2} <aL>} vrreq2/1.0{bar=1:foo=val1} {} {} {} {} {vrreq1/2.0{foo=val1} variant/7.0{foo=val2}} testouterr_cmd_re sh {switch --auto vrreq2/2.0 vrreq2/1.0 bar=1} $ans $tserr # replace a requirement by an alternative: other version (1-arg form) testouterr_cmd_re sh {switch --auto vrreq2/1.0 bar=1} $ans $tserr @@ -1017,7 +1017,7 @@ lappend ans list set _LMFILES_ $mp/vrreq2/2.0:$mp/vrreq1/2.0:$mp/variant/7.0 lappend ans list set LOADEDMODULES vrreq2/2.0:vrreq1/2.0:variant/7.0 lappend ans list set __MODULES_LMTAG vrreq1/2.0&auto-loaded -set tserr msg_top_switch vrreq2/2.0{bar=1:foo=val2} vrreq2/2.0{bar=1:foo=val1} {} {} {} {} {vrreq1/2.0{foo=val1} variant/7.0{foo=val2}} +set tserr msg_top_switch {vrreq2/2.0{bar=1:foo=val2} <aL>} vrreq2/2.0{bar=1:foo=val1} {} {} {} {} {vrreq1/2.0{foo=val1} variant/7.0{foo=val2}} testouterr_cmd_re sh {switch --auto vrreq2/2.0 vrreq2/2.0 bar=1 foo=val1} $ans $tserr # replace a requirement by an alternative: other variant (1-arg form) testouterr_cmd_re sh {switch --auto vrreq2/2.0 bar=1 foo=val1} $ans $tserr @@ -1031,7 +1031,7 @@ lappend ans list set LOADEDMODULES vrreq2/2.0 lappend ans list unset __MODULES_LMTAG lappend ans list ERR -set tserr msg_load vrreq1/2.0{foo=val1} err_reqmis vrreq2@:2.0{bar=1} vrreq3@1.0:{foo=val1}\n\nmsg_load variant/7.0{foo=val2} err_reqmis vrreq1@1:{foo=val1}\n\nmsg_top_switch vrreq2/2.0{bar=1:foo=val2} vrreq2/2.0{bar=2:foo=val2} {variant/7.0{foo=val2} vrreq1/2.0{foo=val1}} {} {} {} {} err_depref vrreq1/2.0{foo=val1} err_depref variant/7.0{foo=val2} +set tserr msg_load vrreq1/2.0{foo=val1} err_reqmis vrreq2@:2.0{bar=1} vrreq3@1.0:{foo=val1}\n\nmsg_load variant/7.0{foo=val2} err_reqmis vrreq1@1:{foo=val1}\n\nmsg_top_switch {vrreq2/2.0{bar=1:foo=val2} <aL>} vrreq2/2.0{bar=2:foo=val2} {variant/7.0{foo=val2} vrreq1/2.0{foo=val1}} {} {} {} {} err_depref vrreq1/2.0{foo=val1} err_depref variant/7.0{foo=val2} testouterr_cmd_re sh {switch --auto vrreq2/2.0 vrreq2/2.0 bar=2} $ans $tserr # replace a requirement by something that is not a requirement: a different variant (1-arg form) testouterr_cmd_re sh {switch --auto vrreq2/2.0 bar=2} $ans $tserr @@ -1062,7 +1062,7 @@ lappend ans list set __MODULES_LMPREREQ {variant/7.1&vrreq3@1< foo=val1} lappend ans list set __MODULES_LMTAG vrreq2/2.0&auto-loaded:vrreq3/2.0&auto-loaded lappend ans list ERR -set tserr msg_unload vrreq2/2.0{bar=1:foo=val2} $err_evalabort\n\nmsg_top_switch variant/7.0{foo=val2} variant/7.1{foo=val3} {} {vrreq1/2.0{foo=val1}} {} {vrreq3/2.0{bar=1:foo=val1}} {} err_urequn vrreq2/2.0{bar=1:foo=val2} +set tserr msg_unload {vrreq2/2.0{bar=1:foo=val2} <aL>} $err_evalabort\n\nmsg_top_switch variant/7.0{foo=val2} variant/7.1{foo=val3} {} {vrreq1/2.0{foo=val1}} {} {vrreq3/2.0{bar=1:foo=val1}} {} err_urequn vrreq2/2.0{bar=1:foo=val2} testouterr_cmd_re sh {switch --auto variant/7.0 variant/7.1 foo=val3} $ans $tserr # replace leaf module with something else: error when unloading a useless requirement (1-arg form) testouterr_cmd_re sh {switch --auto variant/7.1 foo=val3} $ans $tserr @@ -1112,19 +1112,19 @@ setenv_var __MODULES_LMCONFLICT vrreq2/2.0&vrreq2:vrreq1/2.0&vrreq1 setenv_var __MODULES_LMPREREQ {vrreq1/2.0&vrreq2@<2.0 bar=1|vrreq3@1.0< foo=val1:variant/7.0&vrreq1@1< foo=val1} setenv_var __MODULES_LMVARIANT vrreq2/2.0&foo|val2|0|1&bar|1|0|0:vrreq1/2.0&foo|val1|0|0:variant/7.0&foo|val2|0|0 -set tserr msg_unload vrreq2/2.0{bar=1:foo=val2} err_prerequn vrreq1/2.0\n\nmsg_switch vrreq2/2.0{bar=1:foo=val2} vrreq2/1.0{bar=1} err_swoff vrreq2/2.0{bar=1:foo=val2} +set tserr msg_unload {vrreq2/2.0{bar=1:foo=val2} <aL>} err_prerequn vrreq1/2.0\n\nmsg_switch {vrreq2/2.0{bar=1:foo=val2} <aL>} vrreq2/1.0{bar=1} err_swoff vrreq2/2.0{bar=1:foo=val2} testouterr_cmd_re sh {switch --no-auto vrreq2/2.0 vrreq2/1.0 bar=1} ERR $tserr # replace a requirement by an alternative: other version (1-arg form) testouterr_cmd_re sh {switch --no-auto vrreq2/1.0 bar=1} ERR $tserr # replace a requirement by an alternative: other variant (2-arg form) -set tserr msg_unload vrreq2/2.0{bar=1:foo=val2} err_prerequn vrreq1/2.0\n\nmsg_switch vrreq2/2.0{bar=1:foo=val2} vrreq2/2.0{bar=1:foo=val1} err_swoff vrreq2/2.0{bar=1:foo=val2} +set tserr msg_unload {vrreq2/2.0{bar=1:foo=val2} <aL>} err_prerequn vrreq1/2.0\n\nmsg_switch {vrreq2/2.0{bar=1:foo=val2} <aL>} vrreq2/2.0{bar=1:foo=val1} err_swoff vrreq2/2.0{bar=1:foo=val2} testouterr_cmd_re sh {switch --no-auto vrreq2/2.0 vrreq2/2.0 bar=1 foo=val1} ERR $tserr # replace a requirement by an alternative: other variant (1-arg form) testouterr_cmd_re sh {switch --no-auto vrreq2/2.0 bar=1 foo=val1} ERR $tserr # replace a requirement by something that is not a requirement: a different variant (2-arg form) -set tserr msg_unload vrreq2/2.0{bar=1:foo=val2} err_prerequn vrreq1/2.0\n\nmsg_switch vrreq2/2.0{bar=1:foo=val2} vrreq2/2.0{bar=2} err_swoff vrreq2/2.0{bar=1:foo=val2} +set tserr msg_unload {vrreq2/2.0{bar=1:foo=val2} <aL>} err_prerequn vrreq1/2.0\n\nmsg_switch {vrreq2/2.0{bar=1:foo=val2} <aL>} vrreq2/2.0{bar=2} err_swoff vrreq2/2.0{bar=1:foo=val2} testouterr_cmd_re sh {switch --no-auto vrreq2/2.0 vrreq2/2.0 bar=2} ERR $tserr # replace a requirement by something that is not a requirement: a different variant (1-arg form) testouterr_cmd_re sh {switch --no-auto vrreq2/2.0 bar=2} ERR $tserr @@ -1155,7 +1155,7 @@ lappend ans list set LOADEDMODULES vrreq2/2.0:vrreq3/2.0:variant/7.1 lappend ans list set __MODULES_LMTAG vrreq2/2.0&auto-loaded:vrreq3/2.0&auto-loaded lappend ans list ERR -set tserr msg_unload vrreq2/2.0{bar=1:foo=val2} $err_evalabort\n\nmsg_top_switch variant/7.0{foo=val2} variant/7.1{foo=val3} {} {vrreq1/2.0{foo=val1}} {} {vrreq3/2.0{bar=1:foo=val1}} {} err_urequn vrreq2/2.0{bar=1:foo=val2} +set tserr msg_unload {vrreq2/2.0{bar=1:foo=val2} <aL>} $err_evalabort\n\nmsg_top_switch variant/7.0{foo=val2} variant/7.1{foo=val3} {} {vrreq1/2.0{foo=val1}} {} {vrreq3/2.0{bar=1:foo=val1}} {} err_urequn vrreq2/2.0{bar=1:foo=val2} testouterr_cmd_re sh {switch --no-auto variant/7.0 variant/7.1 foo=val3} $ans $tserr # replace leaf module with something else: error when unloading a useless requirement (1-arg form) testouterr_cmd_re sh {switch --no-auto variant/7.1 foo=val3} $ans $tserr @@ -1347,6 +1347,21 @@ # +# free value variant test +# + +setenv_var TESTSUITE_VARIANT free1 + +set ans list +lappend ans list set __MODULES_LMVARIANT vrreq2/1.0&foo|val1|0|0:vrreq1/1.0&foo|val1|0|0 +lappend ans list set __MODULES_LMPREREQ {vrreq1/1.0&vrreq2/1.0 foo=val1} +lappend ans list set _LMFILES_ $mp/vrreq2/1.0:$mp/vrreq1/1.0 +lappend ans list set LOADEDMODULES vrreq2/1.0:vrreq1/1.0 +lappend ans list set __MODULES_LMTAG vrreq2/1.0&auto-loaded +testouterr_cmd_re sh {load --auto vrreq1/1.0 foo=val1} $ans msg_top_load vrreq1/1.0{foo=val1} {} vrreq2/1.0{foo=val1} {} + + +# # icase & extended_default test #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/474-variant-conflict.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/474-variant-conflict.exp
Changed
@@ -87,7 +87,7 @@ lappend ans list set _LMFILES_ $mp/vrreq1/2.0:$mp/vrreq2/1.0:$mp/vrreq1/1.0:$mp/variant/7.0 lappend ans list set LOADEDMODULES vrreq1/2.0:vrreq2/1.0:vrreq1/1.0:variant/7.0 lappend ans list set __MODULES_LMTAG vrreq2/1.0&auto-loaded:vrreq1/1.0&auto-loaded -set tserr msg_load vrreq1/1.0{foo=val1} err_conlof vrreq1/2.0\n\nmsg_top_load variant/7.0{foo=val2} {} {vrreq2/1.0{bar=1:foo=val1} vrreq1/1.0{foo=val1}} {} +set tserr msg_load {vrreq1/1.0{foo=val1} <aL>} err_conlof vrreq1/2.0\n\nmsg_top_load variant/7.0{foo=val2} {} {vrreq2/1.0{bar=1:foo=val1} vrreq1/1.0{foo=val1}} {} testouterr_cmd_re sh {load -f --auto variant/7.0 foo=val2} $ans $tserr # ReqLo tentative hitting another variant loaded @@ -235,7 +235,7 @@ lappend ans list set _LMFILES_ $mp/vrreq1/2.0:$mp/vrreq2/1.0:$mp/vrreq1/1.0:$mp/variant/7.0 lappend ans list set LOADEDMODULES vrreq1/2.0:vrreq2/1.0:vrreq1/1.0:variant/7.0 lappend ans list set __MODULES_LMTAG vrreq2/1.0&auto-loaded:vrreq1/1.0&auto-loaded -set tserr msg_load vrreq1/1.0{foo=val1} err_conlof vrreq1@:2.0\n\nmsg_top_load variant/7.0{foo=val2} {} {vrreq2/1.0{bar=1:foo=val1} vrreq1/1.0{foo=val1}} {} +set tserr msg_load {vrreq1/1.0{foo=val1} <aL>} err_conlof vrreq1@:2.0\n\nmsg_top_load variant/7.0{foo=val2} {} {vrreq2/1.0{bar=1:foo=val1} vrreq1/1.0{foo=val1}} {} testouterr_cmd_re sh {load -f --auto variant/7.0 foo=val2} $ans $tserr # ReqLo tentative hitting another variant loaded @@ -387,7 +387,7 @@ lappend ans list set _LMFILES_ $mp/vrreq1/2.0:$mp/vrreq2/1.0:$mp/vrreq1/1.0:$mp/variant/7.0 lappend ans list set LOADEDMODULES vrreq1/2.0:vrreq2/1.0:vrreq1/1.0:variant/7.0 lappend ans list set __MODULES_LMTAG vrreq2/1.0&auto-loaded:vrreq1/1.0&auto-loaded -set tserr msg_load vrreq1/1.0{foo=val1} err_conlof alvrreq12\n\nmsg_top_load variant/7.0{foo=val2} {} {vrreq2/1.0{bar=1:foo=val1} vrreq1/1.0{foo=val1}} {} +set tserr msg_load {vrreq1/1.0{foo=val1} <aL>} err_conlof alvrreq12\n\nmsg_top_load variant/7.0{foo=val2} {} {vrreq2/1.0{bar=1:foo=val1} vrreq1/1.0{foo=val1}} {} testouterr_cmd_re sh {load -f --auto variant/7.0 foo=val2} $ans $tserr # ReqLo tentative hitting another variant loaded @@ -494,7 +494,7 @@ setenv_var __MODULES_LMCONFLICT vrreq2/1.0&vrreq2:vrreq1/1.0&vrreq1@2.0 setenv_var __MODULES_LMPREREQ {vrreq1/1.0&vrreq2@1.0 bar=1 foo=val1|vrreq3@1.0 bar=1 foo=val1:variant/7.0&vrreq1@1.0 foo=val1} setenv_var __MODULES_LMVARIANT vrreq2/1.0&foo|val1|0|0&bar|1|0|0:vrreq1/1.0&foo|val1|0|0:variant/7.0&foo|val2|0|0 -set tserr msg_unload vrreq1/1.0{foo=val1} err_prerequn variant/7.0\n\nmsg_load vrreq1/2.0{foo=val1} err_conun vrreq1/1.0 +set tserr msg_unload {vrreq1/1.0{foo=val1} <aL>} err_prerequn variant/7.0\n\nmsg_load vrreq1/2.0{foo=val1} err_conun vrreq1/1.0 testouterr_cmd_re sh {load --auto vrreq1/2.0 foo=val1} ERR $tserr set ans list @@ -503,7 +503,7 @@ lappend ans list set _LMFILES_ $mp/vrreq2/1.0:$mp/vrreq1/1.0:$mp/variant/7.0:$mp/vrreq1/2.0 lappend ans list set LOADEDMODULES vrreq2/1.0:vrreq1/1.0:variant/7.0:vrreq1/2.0 lappend ans list ERR -set tserr msg_unload vrreq1/1.0{foo=val1} err_prerequn variant/7.0\n\nmsg_load vrreq1/2.0{foo=val1} err_conunf vrreq1/1.0 +set tserr msg_unload {vrreq1/1.0{foo=val1} <aL>} err_prerequn variant/7.0\n\nmsg_load vrreq1/2.0{foo=val1} err_conunf vrreq1/1.0 testouterr_cmd_re sh {load -f --auto vrreq1/2.0 foo=val1} $ans $tserr # load conflicting module (another version set) @@ -653,9 +653,9 @@ lappend ans list set LOADEDMODULES vrreq2/1.0 lappend ans list unset __MODULES_LMTAG lappend ans list ERR -set tserr msg_load vrreq1/2.0{foo=val1} err_reqmis vrreq2@:2.0{bar=1} vrreq3@1.0:{foo=val1}\n\nmsg_load variant/7.0{foo=val2} err_reqmis vrreq1@1:{foo=val1}\n\nmsg_top_switch vrreq2/2.0{bar=1:foo=val2} vrreq2/1.0{bar=2:foo=val1} {variant/7.0{foo=val2} vrreq1/2.0{foo=val1}} {} {} {} {} err_depref vrreq1/2.0{foo=val1} err_depref variant/7.0{foo=val2} +set tserr msg_load vrreq1/2.0{foo=val1} err_reqmis vrreq2@:2.0{bar=1} vrreq3@1.0:{foo=val1}\n\nmsg_load variant/7.0{foo=val2} err_reqmis vrreq1@1:{foo=val1}\n\nmsg_top_switch {vrreq2/2.0{bar=1:foo=val2} <aL>} vrreq2/1.0{bar=2:foo=val1} {variant/7.0{foo=val2} vrreq1/2.0{foo=val1}} {} {} {} {} err_depref vrreq1/2.0{foo=val1} err_depref variant/7.0{foo=val2} testouterr_cmd_re sh {switch --auto vrreq2/1.0 bar=2} $ans $tserr -set tserr msg_unload vrreq2/2.0{bar=1:foo=val2} err_prerequn vrreq1/2.0\n\nmsg_switch vrreq2/2.0{bar=1:foo=val2} vrreq2/1.0{bar=2} err_swoff vrreq2/2.0{bar=1:foo=val2} +set tserr msg_unload {vrreq2/2.0{bar=1:foo=val2} <aL>} err_prerequn vrreq1/2.0\n\nmsg_switch {vrreq2/2.0{bar=1:foo=val2} <aL>} vrreq2/1.0{bar=2} err_swoff vrreq2/2.0{bar=1:foo=val2} testouterr_cmd_re sh {switch --no-auto vrreq2/1.0 bar=2} ERR $tserr
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/475-variant-tag.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/475-variant-tag.exp
Changed
@@ -641,24 +641,24 @@ setenv_loaded_module list variant/8.0 list $mp/variant/8.0 setenv_var __MODULES_LMVARIANT variant/8.0&foo|val1|0|0&bar|1|0|0 setenv_var __MODULES_LMTAG variant/8.0&sticky -set tserr msg_unload variant/8.0{bar=1:foo=val1} $err_stickyunload +set tserr msg_unload "variant/8.0{bar=1:foo=val1} <S>" $err_stickyunload testouterr_cmd sh {unload variant@8.0} ERR $tserr set ans list lappend ans list unset __MODULES_LMVARIANT lappend ans list unset _LMFILES_ lappend ans list unset LOADEDMODULES lappend ans list unset __MODULES_LMTAG -set tserr msg_unload variant/8.0{bar=1:foo=val1} $err_stickyunloadf +set tserr msg_unload "variant/8.0{bar=1:foo=val1} <S>" $err_stickyunloadf testouterr_cmd sh {unload -f variant@8.0} $ans $tserr # switch to a sticky variant -set tserr msg_switch variant/8.0{bar=1:foo=val1} variant/8.0{bar=2:foo=val1} $err_stickyunload +set tserr msg_switch "variant/8.0{bar=1:foo=val1} <S>" variant/8.0{bar=2:foo=val1} $err_stickyunload testouterr_cmd sh {switch variant@8.0 foo=val1 bar=2} ERR $tserr -set tserr msg_switch variant/8.0{bar=1:foo=val1} variant/8.0{foo=val1} $err_stickyunload +set tserr msg_switch "variant/8.0{bar=1:foo=val1} <S>" variant/8.0{foo=val1} $err_stickyunload testouterr_cmd sh {switch variant@8.0 foo=val1} ERR $tserr # switch to a non-sticky variant -set tserr msg_switch variant/8.0{bar=1:foo=val1} variant/8.0{foo=val2} $err_stickyunload +set tserr msg_switch "variant/8.0{bar=1:foo=val1} <S>" variant/8.0{foo=val2} $err_stickyunload testouterr_cmd sh {switch variant@8.0 foo=val2} ERR $tserr # reload @@ -732,17 +732,17 @@ setenv_loaded_module list variant/8.0 list $mp/variant/8.0 setenv_var __MODULES_LMVARIANT variant/8.0&foo|val1|0|0&bar|2|0|2 setenv_var __MODULES_LMTAG variant/8.0&sticky -set tserr msg_unload variant/8.0{bar=2:foo=val1} $err_stickyunload +set tserr msg_unload "variant/8.0{bar=2:foo=val1} <S>" $err_stickyunload testouterr_cmd sh {unload variant@8.0} ERR $tserr # switch to a sticky variant -set tserr msg_switch variant/8.0{bar=2:foo=val1} variant/8.0{bar=3:foo=val1} $err_stickyunload +set tserr msg_switch "variant/8.0{bar=2:foo=val1} <S>" variant/8.0{bar=3:foo=val1} $err_stickyunload testouterr_cmd sh {switch variant@8.0 foo=val1 bar=3} ERR $tserr -set tserr msg_switch variant/8.0{bar=2:foo=val1} variant/8.0{foo=val1} $err_stickyunload +set tserr msg_switch "variant/8.0{bar=2:foo=val1} <S>" variant/8.0{foo=val1} $err_stickyunload testouterr_cmd sh {switch variant@8.0 foo=val1} ERR $tserr # switch to a non-sticky variant -set tserr msg_switch variant/8.0{bar=2:foo=val1} variant/8.0{foo=val2} $err_stickyunload +set tserr msg_switch "variant/8.0{bar=2:foo=val1} <S>" variant/8.0{foo=val2} $err_stickyunload testouterr_cmd sh {switch variant@8.0 foo=val2} ERR $tserr # reload @@ -794,13 +794,13 @@ setenv_loaded_module list variant/8.0 list $mp/variant/8.0 setenv_var __MODULES_LMVARIANT variant/8.0&foo|val1|0|0&bar|1|0|0 setenv_var __MODULES_LMTAG variant/8.0&sticky -set tserr msg_unload variant/8.0{bar=1:foo=val1} $err_stickyunload +set tserr msg_unload "variant/8.0{bar=1:foo=val1} <S>" $err_stickyunload testouterr_cmd sh {unload variant@8.0} ERR $tserr # switch to a non-sticky variant -set tserr msg_switch variant/8.0{bar=1:foo=val1} variant/8.0{foo=val2} $err_stickyunload +set tserr msg_switch "variant/8.0{bar=1:foo=val1} <S>" variant/8.0{foo=val2} $err_stickyunload testouterr_cmd sh {switch variant@8.0 foo=val2} ERR $tserr -set tserr msg_switch variant/8.0{bar=1:foo=val1} variant/8.0{bar=1:foo=val2} $err_stickyunload +set tserr msg_switch "variant/8.0{bar=1:foo=val1} <S>" variant/8.0{bar=1:foo=val2} $err_stickyunload testouterr_cmd sh {switch variant@8.0 foo=val2 bar=1} ERR $tserr unsetenv_loaded_module @@ -878,11 +878,11 @@ setenv_loaded_module list variant/8.0 list $mp/variant/8.0 setenv_var __MODULES_LMVARIANT variant/8.0&foo|val1|0|0&bar|1|0|0 setenv_var __MODULES_LMTAG variant/8.0&super-sticky -set tserr msg_unload variant/8.0{bar=1:foo=val1} $err_superstickyunload +set tserr msg_unload "variant/8.0{bar=1:foo=val1} <sS>" $err_superstickyunload testouterr_cmd sh {unload variant@8.0} ERR $tserr # switch to a sticky variant -set tserr msg_switch variant/8.0{bar=1:foo=val1} 'variant/.w\ s'{bar=1:foo=val1} $err_superstickyunload +set tserr msg_switch "variant/8.0{bar=1:foo=val1} <sS>" 'variant/.w\ s'{bar=1:foo=val1} $err_superstickyunload set ans list lappend ans list set __MODULES_LMVARIANT variant/.w\ s&foo|val1|0|0&bar|1|0|0 lappend ans list set _LMFILES_ $mp/variant/.w\ s @@ -890,7 +890,7 @@ lappend ans list set __MODULES_LMTAG variant/.w\ s&super-sticky testouterr_cmd sh {switch variant@.w\ s foo=val1 bar=1} $ans {} testouterr_cmd sh {switch variant@.w\ s bar=1 foo=val1} $ans {} -set tserr msg_switch variant/8.0{bar=1:foo=val1} 'variant/.w\ s'{foo=val1} $err_superstickyunload +set tserr msg_switch "variant/8.0{bar=1:foo=val1} <sS>" 'variant/.w\ s'{foo=val1} $err_superstickyunload testouterr_cmd sh {switch variant@.w\ s foo=val1} ERR $tserr set ans list lappend ans list set __MODULES_LMVARIANT variant/8.0&foo|val1|0|0&bar|1|0|0 @@ -900,7 +900,7 @@ testouterr_cmd sh {switch variant@8.0 foo=val1 bar=1} $ans {} # switch to a non-sticky variant -set tserr msg_switch variant/8.0{bar=1:foo=val1} variant/8.0{foo=val2} $err_superstickyunload +set tserr msg_switch "variant/8.0{bar=1:foo=val1} <sS>" variant/8.0{foo=val2} $err_superstickyunload testouterr_cmd sh {switch variant@8.0 foo=val2} ERR $tserr unsetenv_loaded_module @@ -948,19 +948,19 @@ setenv_loaded_module list variant/8.0 list $mp/variant/8.0 setenv_var __MODULES_LMVARIANT variant/8.0&foo|val1|0|0&bar|1|0|0 setenv_var __MODULES_LMTAG variant/8.0&sticky -set tserr msg_unload variant/8.0{bar=1:foo=val1} $err_stickyunload +set tserr msg_unload "variant/8.0{bar=1:foo=val1} <S>" $err_stickyunload testouterr_cmd sh {unload variant@8.0} ERR $tserr # switch to a sticky variant -set tserr msg_switch variant/8.0{bar=1:foo=val1} variant/8.0{bar=1:foo=val2} $err_stickyunload +set tserr msg_switch "variant/8.0{bar=1:foo=val1} <S>" variant/8.0{bar=1:foo=val2} $err_stickyunload testouterr_cmd sh {switch variant@8.0 foo=val2 bar=1} ERR $tserr -set tserr msg_switch variant/8.0{bar=1:foo=val1} variant/8.0{foo=val1} $err_stickyunload +set tserr msg_switch "variant/8.0{bar=1:foo=val1} <S>" variant/8.0{foo=val1} $err_stickyunload testouterr_cmd sh {switch variant@8.0 foo=val1} ERR $tserr -set tserr msg_switch variant/8.0{bar=1:foo=val1} variant/8.0{foo=val2} $err_stickyunload +set tserr msg_switch "variant/8.0{bar=1:foo=val1} <S>" variant/8.0{foo=val2} $err_stickyunload testouterr_cmd sh {switch variant@8.0 foo=val2} ERR $tserr # switch to a non-sticky variant -set tserr msg_switch variant/8.0{bar=1:foo=val1} 'variant/.w\ s'{foo=val2} $err_stickyunload +set tserr msg_switch "variant/8.0{bar=1:foo=val1} <S>" 'variant/.w\ s'{foo=val2} $err_stickyunload testouterr_cmd sh {switch variant@.w\ s foo=val2} ERR $tserr unsetenv_loaded_module @@ -1010,8 +1010,8 @@ setenv_var __MODULES_LMTAG variant/8.0&super-sticky # switch to a sticky variant -# CORNER CASE: stickyness swap do not know that default value of variant bar matches sticky rule -set tserr msg_switch variant/8.0{bar=2:foo=val1} 'variant/.w\ s'{foo=val1} $err_superstickyunload +# CORNER CASE: stickiness swap do not know that default value of variant bar matches sticky rule +set tserr msg_switch "variant/8.0{bar=2:foo=val1} <sS>" 'variant/.w\ s'{foo=val1} $err_superstickyunload testouterr_cmd sh {switch variant@.w\ s foo=val1} ERR $tserr set ans list lappend ans list set __MODULES_LMVARIANT variant/.w\ s&foo|val1|0|0&bar|2|0|1
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.50-cmds/479-variant-boolean.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/479-variant-boolean.exp
Changed
@@ -57,7 +57,6 @@ set tserr escre msg_load variant/1.0{+foo} msg_moderr err_booldflvarval foo {variant --default val1 --boolean foo<EXM>} $mp/variant/1.0 $linenum testouterr_cmd_re sh {load variant/1.0 +foo} ERR $tserr - # test variant redefinition setenv_var TESTSUITE_VARIANT bool6 set ans list @@ -253,6 +252,39 @@ # +# boolean default value or boolean specification on free value variant +# + +setenv_var TESTSUITE_VARIANT free2 + +set ans list +lappend ans list set __MODULES_LMVARIANT variant/1.0&foo|1|0|0 +lappend ans list set TS1 foo=1 +lappend ans list set _LMFILES_ $mp/variant/1.0 +lappend ans list set LOADEDMODULES variant/1.0 +lappend ans list set TS0 foo +testouterr_cmd_re sh {load variant/1.0 +foo} $ans {} +testouterr_cmd_re sh {load variant/1.0 foo=true} $ans {} + +set ans list +lappend ans list set __MODULES_LMVARIANT variant/1.0&foo|0|0|0 +lappend ans list set TS1 foo=0 +lappend ans list set _LMFILES_ $mp/variant/1.0 +lappend ans list set LOADEDMODULES variant/1.0 +lappend ans list set TS0 foo +testouterr_cmd_re sh {load variant/1.0 -foo} $ans {} +testouterr_cmd_re sh {load variant/1.0 foo=off} $ans {} + +set ans list +lappend ans list set __MODULES_LMVARIANT variant/1.0&foo|text|0|0 +lappend ans list set TS1 foo=text +lappend ans list set _LMFILES_ $mp/variant/1.0 +lappend ans list set LOADEDMODULES variant/1.0 +lappend ans list set TS0 foo +testouterr_cmd_re sh {load variant/1.0 foo=text} $ans {} + + +# # getvariant test on boolean #
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/500-remove-on-load.exp
Added
@@ -0,0 +1,533 @@ +############################################################################## +# Modules Revision 3.0 +# Providing a flexible user environment +# +# File: modules.50-cmds/%M% +# Revision: %I% +# First Edition: 2021/11/02 +# Last Mod.: %U%, %G% +# +# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr +# +# Description: Testuite testsequence +# Command: load, unload, display, help, test, whatis, refresh +# Modulefiles: path-cmd-opt +# Sub-Command: +# +# Comment: %C{ +# Test --remove-on-unload option of path modulefile commands +# }C% +# +############################################################################## + +skip_if_quick_mode + +set mp $modpath.3 +set mpre $modpathre.3 +setenv_path_var MODULEPATH $mp + +set mod path-cmd-opt/1.0 +set modfile $mp/path-cmd-opt/1.0 + + +# +# append-path +# + +setenv_var TESTSUITE_PATH_CMD_OPT append1 + +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 8} +set tserr escre msg_load $mod msg_moderr {invalid option '--remove-on-unload' for append-path} {append-path FOO /tmp --remove-on-unload<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_var TESTSUITE_PATH_CMD_OPT append2 + +# load +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 11} +set tserr escre msg_load $mod msg_moderr {invalid option '--remove-on-unload' for append-path} {append-path --remove-on-unload FOO /tmp<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_loaded_module list $mod list $modfile +setenv_var FOO /tmp + +# unload +set tserr escre msg_unload $mod msg_moderr {invalid option '--remove-on-unload' for append-path} {append-path --remove-on-unload FOO /tmp<EXM>} $modfile $ln +testouterr_cmd_re sh "unload $mod" ERR $tserr + +# refresh +testouterr_cmd sh {refresh} OK {} + +unsetenv_loaded_module +unsetenv_var FOO + +# whatis +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re sh "whatis $mod" OK $tserr + +# display +set tserr "$modlin +$mpre/$mod: + +module-whatis\t$mod +append-path\t--remove-on-unload FOO /tmp +escre msg_moderr {invalid option '--remove-on-unload' for append-path} {append-path --remove-on-unload FOO /tmp<EXM>} $modfile $ln { } +$modlin" +testouterr_cmd_re sh "display $mod" ERR $tserr + +# help +set tserr "$modlin +Module Specific Help for $mpre/$mod: + +escre msg_moderr {invalid option '--remove-on-unload' for append-path} {append-path --remove-on-unload FOO /tmp<EXM>} $modfile $ln { } +$modlin" +testouterr_cmd_re sh "help $mod" ERR $tserr + +# test +set tserr "$modlin +Module Specific Test for $mpre/$mod: + +escre msg_moderr {invalid option '--remove-on-unload' for append-path} {append-path --remove-on-unload FOO /tmp<EXM>} $modfile $ln { } +$modlin" +testouterr_cmd_re sh "test $mod" ERR $tserr + + +# +# prepend-path +# + +setenv_var TESTSUITE_PATH_CMD_OPT prepend1 + +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 14} +set tserr escre msg_load $mod msg_moderr {invalid option '--remove-on-unload' for prepend-path} {prepend-path --remove-on-unload FOO /tmp<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_var TESTSUITE_PATH_CMD_OPT prepend2 + +setenv_loaded_module list $mod list $modfile +setenv_var FOO /tmp + +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 17} +set tserr escre msg_unload $mod msg_moderr {invalid option '--remove-on-unload' for prepend-path} {prepend-path --remove-on-unload FOO /tmp /dir1<EXM>} $modfile $ln +testouterr_cmd_re sh "unload $mod" ERR $tserr + +unsetenv_loaded_module +unsetenv_var FOO + + +# +# remove-path +# + +setenv_var TESTSUITE_PATH_CMD_OPT remove1 + +# load +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_path_var FOO /tmp:/dir1 + +set ans list +lappend ans list set FOO /dir1 +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO + +# unload +set ans list +lappend ans list unset FOO +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +setenv_var FOO /tmp +set ans list +lappend ans list unset FOO +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +setenv_path_var FOO /tmp:/dir1 +set ans list +lappend ans list set FOO /dir1 +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +# refresh +testouterr_cmd sh {refresh} OK {} + +unsetenv_loaded_module +unsetenv_var FOO + +# whatis +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re sh "whatis $mod" OK $tserr + +# display +set tserr "$modlin +$mpre/$mod: + +module-whatis\t$mod +remove-path\t--remove-on-unload FOO /tmp +$modlin" +testouterr_cmd_re sh "display $mod" OK $tserr + +# help +set tserr "$modlin +Module Specific Help for $mpre/$mod: + +WARNING: Unable to find ModulesHelp in $mpre/$mod. +$modlin" +testouterr_cmd_re sh "help $mod" OK $tserr + +# test +set tserr "$modlin +Module Specific Test for $mpre/$mod: + +WARNING: Unable to find ModulesTest in $mpre/$mod. +$modlin" +testouterr_cmd_re sh "test $mod" OK $tserr + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO + + +setenv_var TESTSUITE_PATH_CMD_OPT remove2 + +set ans list +lappend ans list unset FOO +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +setenv_var FOO /tmp +set ans list +lappend ans list unset FOO +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +setenv_path_var FOO /tmp:/dir1 +set ans list +lappend ans list unset FOO +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module +unsetenv_var FOO + + +setenv_var TESTSUITE_PATH_CMD_OPT remove3 + +# load +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_path_var FOO /tmp:/dir1:--remove-on-unload + +set ans list +lappend ans list set FOO --remove-on-unload +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile + +# unload +set ans list +lappend ans list set FOO --remove-on-unload +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module +unsetenv_var FOO + + +setenv_var TESTSUITE_PATH_CMD_OPT remove4 + +setenv_var FOO /tmp +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 41} +set tserr escre msg_load $mod msg_moderr {--index and --remove-on-unload options cannot be simultaneously set} {remove-path --remove-on-unload --index FOO 3<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO +set tserr escre msg_unload $mod msg_moderr {--index and --remove-on-unload options cannot be simultaneously set} {remove-path --remove-on-unload --index FOO 3<EXM>} $modfile $ln +testouterr_cmd_re sh "unload $mod" ERR $tserr + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove5 + +setenv_path_var FOO /tmp +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 44} +set tserr escre msg_load $mod msg_moderr {remove-path should get a value for environment variable FOO} {remove-path FOO --remove-on-unload<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_loaded_module list $mod list $modfile +setenv_path_var FOO /tmp +set tserr escre msg_unload $mod msg_moderr {remove-path should get a value for environment variable FOO} {remove-path FOO --remove-on-unload<EXM>} $modfile $ln +testouterr_cmd_re sh "unload $mod" ERR $tserr + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove6 + +setenv_path_var FOO /tmp /dir1 +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_path_var FOO /tmp /dir1 +set ans list +lappend ans list unset FOO +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove7 + +setenv_path_var FOO /tmp {} +set ans list +lappend ans list unset __MODULES_SHARE_FOO +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_path_var FOO /tmp {} +set ans list +lappend ans list unset __MODULES_SHARE_FOO +lappend ans list unset FOO +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module +unsetenv_path_var FOO + + +# +# module use +# + +setenv_var TESTSUITE_PATH_CMD_OPT use1 + +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 26} +set tserr escre msg_load $mod msg_moderr {Invalid option '--remove-on-unload'} {module use /tmp --remove-on-unload<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_var TESTSUITE_PATH_CMD_OPT use2 + +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 29} +set tserr escre msg_load $mod msg_moderr {Invalid option '--remove-on-unload'} {module use --remove-on-unload /tmp<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_loaded_module list $mod list $modfile + +# unload +set tserr escre msg_unload $mod msg_moderr {Invalid option '--remove-on-unload'} {module use --remove-on-unload /tmp<EXM>} $modfile $ln +testouterr_cmd_re sh "unload $mod" ERR $tserr + +setenv_path_var MODULEPATH $mp /tmp +testouterr_cmd_re sh "unload $mod" ERR $tserr + +# refresh +testouterr_cmd sh {refresh} OK {} + +unsetenv_loaded_module +setenv_path_var MODULEPATH $mp + +# whatis +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re sh "whatis $mod" OK $tserr + +# display +set tserr "$modlin +$mpre/$mod: + +module-whatis\t$mod +module\t\tuse --remove-on-unload /tmp +$modlin" +testouterr_cmd_re sh "display $mod" OK $tserr + +# help +set tserr "$modlin +Module Specific Help for $mpre/$mod: + +WARNING: Unable to find ModulesHelp in $mpre/$mod. +$modlin" +testouterr_cmd_re sh "help $mod" OK $tserr + +# test +set tserr "$modlin +Module Specific Test for $mpre/$mod: + +WARNING: Unable to find ModulesTest in $mpre/$mod. +$modlin" +testouterr_cmd_re sh "test $mod" OK $tserr + + +# +# module unuse +# + +setenv_var TESTSUITE_PATH_CMD_OPT unuse1 + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set MODULEPATH $mp +testouterr_cmd sh "load $mod" $ans {} + +setenv_var TESTSUITE_PATH_CMD_OPT unuse2 + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set MODULEPATH $mp +testouterr_cmd sh "load $mod" $ans {} + +setenv_path_var MODULEPATH $mp /tmp +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_path_var MODULEPATH $mp + +# unload +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list set MODULEPATH $mp +testouterr_cmd sh "unload $mod" $ans {} + +setenv_path_var MODULEPATH $mp /tmp +testouterr_cmd sh "unload $mod" $ans {} + +# refresh +testouterr_cmd sh {refresh} OK {} + +unsetenv_loaded_module +setenv_path_var MODULEPATH $mp + +# whatis +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re sh "whatis $mod" OK $tserr + +# display +set tserr "$modlin +$mpre/$mod: + +module-whatis\t$mod +module\t\tunuse --remove-on-unload /tmp /dir1 +$modlin" +testouterr_cmd_re sh "display $mod" OK $tserr + +# help +set tserr "$modlin +Module Specific Help for $mpre/$mod: + +WARNING: Unable to find ModulesHelp in $mpre/$mod. +$modlin" +testouterr_cmd_re sh "help $mod" OK $tserr + +# test +set tserr "$modlin +Module Specific Test for $mpre/$mod: + +WARNING: Unable to find ModulesTest in $mpre/$mod. +$modlin" +testouterr_cmd_re sh "test $mod" OK $tserr + + +setenv_var TESTSUITE_PATH_CMD_OPT unuse3 + +setenv_path_var MODULEPATH $mp /tmp +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 53} +set tserr escre msg_load $mod msg_moderr {remove-path should get a value for environment variable MODULEPATH} {module unuse --remove-on-unload<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_loaded_module list $mod list $modfile +setenv_path_var MODULEPATH $mp /tmp +set tserr escre msg_unload $mod msg_moderr {remove-path should get a value for environment variable MODULEPATH} {module unuse --remove-on-unload<EXM>} $modfile $ln +testouterr_cmd_re sh "unload $mod" ERR $tserr + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT unuse4 + +setenv_path_var MODULEPATH $mp /tmp /dir1 +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set MODULEPATH $mp +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_path_var MODULEPATH $mp /tmp /dir1 +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list set MODULEPATH $mp +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT unuse5 + +setenv_path_var MODULEPATH $mp /tmp {} +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set __MODULES_SHARE_MODULEPATH :1 +lappend ans list set MODULEPATH $mp: +lappend ans list ERR +set tserr msg_load $mod $err_emptydirname +testouterr_cmd sh "load $mod" $ans $tserr + +setenv_loaded_module list $mod list $modfile +setenv_path_var MODULEPATH $mp /tmp {} +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list set __MODULES_SHARE_MODULEPATH :1 +lappend ans list set MODULEPATH $mp: +lappend ans list ERR +set tserr msg_unload $mod $err_emptydirname +testouterr_cmd sh "unload $mod" $ans $tserr + +unsetenv_loaded_module +setenv_path_var MODULEPATH $mp + + +# +# Cleanup +# + +reset_test_env
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/501-append-on-unload.exp
Added
@@ -0,0 +1,972 @@ +############################################################################## +# Modules Revision 3.0 +# Providing a flexible user environment +# +# File: modules.50-cmds/%M% +# Revision: %I% +# First Edition: 2021/11/12 +# Last Mod.: %U%, %G% +# +# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr +# +# Description: Testuite testsequence +# Command: load, unload, display, help, test, whatis, refresh +# Modulefiles: path-cmd-opt +# Sub-Command: +# +# Comment: %C{ +# Test --append-on-unload option of path modulefile commands +# }C% +# +############################################################################## + +skip_if_quick_mode + +set mp $modpath.3 +set mpre $modpathre.3 +setenv_path_var MODULEPATH $mp + +set mod path-cmd-opt/1.1 +set modfile $mp/path-cmd-opt/1.1 + + +# +# append-path +# + +setenv_var TESTSUITE_PATH_CMD_OPT append1 + +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 8} +set tserr escre msg_load $mod msg_moderr {invalid option '--append-on-unload' for append-path} {append-path FOO /tmp --append-on-unload /dir1<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_var TESTSUITE_PATH_CMD_OPT append2 + +# load +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 11} +set tserr escre msg_load $mod msg_moderr {invalid option '--append-on-unload' for append-path} {append-path --append-on-unload FOO /tmp<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_loaded_module list $mod list $modfile +setenv_var FOO /tmp + +# unload +set tserr escre msg_unload $mod msg_moderr {invalid option '--append-on-unload' for append-path} {append-path --append-on-unload FOO /tmp<EXM>} $modfile $ln +testouterr_cmd_re sh "unload $mod" ERR $tserr + +# refresh +testouterr_cmd sh {refresh} OK {} + +unsetenv_loaded_module +unsetenv_var FOO + +# whatis +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re sh "whatis $mod" OK $tserr + +# display +set tserr "$modlin +$mpre/$mod: + +module-whatis\t$mod +append-path\t--append-on-unload FOO /tmp +escre msg_moderr {invalid option '--append-on-unload' for append-path} {append-path --append-on-unload FOO /tmp<EXM>} $modfile $ln { } +$modlin" +testouterr_cmd_re sh "display $mod" ERR $tserr + +# help +set tserr "$modlin +Module Specific Help for $mpre/$mod: + +escre msg_moderr {invalid option '--append-on-unload' for append-path} {append-path --append-on-unload FOO /tmp<EXM>} $modfile $ln { } +$modlin" +testouterr_cmd_re sh "help $mod" ERR $tserr + +# test +set tserr "$modlin +Module Specific Test for $mpre/$mod: + +escre msg_moderr {invalid option '--append-on-unload' for append-path} {append-path --append-on-unload FOO /tmp<EXM>} $modfile $ln { } +$modlin" +testouterr_cmd_re sh "test $mod" ERR $tserr + + +# +# prepend-path +# + +setenv_var TESTSUITE_PATH_CMD_OPT prepend1 + +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 14} +set tserr escre msg_load $mod msg_moderr {invalid option '--append-on-unload' for prepend-path} {prepend-path --append-on-unload FOO /tmp<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_var TESTSUITE_PATH_CMD_OPT prepend2 + +setenv_loaded_module list $mod list $modfile +setenv_var FOO /tmp + +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 17} +set tserr escre msg_unload $mod msg_moderr {invalid option '--append-on-unload' for prepend-path} {prepend-path --append-on-unload FOO /tmp /dir1<EXM>} $modfile $ln +testouterr_cmd_re sh "unload $mod" ERR $tserr + +unsetenv_loaded_module +unsetenv_var FOO + + +# +# remove-path +# + +setenv_var TESTSUITE_PATH_CMD_OPT remove1 + +# load +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_path_var FOO /tmp:/dir1 + +set ans list +lappend ans list set FOO /dir1 +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO + +# unload +set ans list +lappend ans list set FOO /tmp +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +setenv_var FOO /tmp +set ans list +lappend ans list set __MODULES_SHARE_FOO /tmp:2 +lappend ans list set FOO /tmp +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +setenv_path_var FOO /tmp:/dir1 +set ans list +lappend ans list set __MODULES_SHARE_FOO /tmp:2 +lappend ans list set FOO /tmp:/dir1 +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +# refresh +testouterr_cmd sh {refresh} OK {} + +unsetenv_loaded_module +unsetenv_var FOO + +# whatis +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re sh "whatis $mod" OK $tserr + +# display +set tserr "$modlin +$mpre/$mod: + +module-whatis\t$mod +remove-path\t--append-on-unload FOO /tmp +$modlin" +testouterr_cmd_re sh "display $mod" OK $tserr + +# help +set tserr "$modlin +Module Specific Help for $mpre/$mod: + +WARNING: Unable to find ModulesHelp in $mpre/$mod. +$modlin" +testouterr_cmd_re sh "help $mod" OK $tserr + +# test +set tserr "$modlin +Module Specific Test for $mpre/$mod: + +WARNING: Unable to find ModulesTest in $mpre/$mod. +$modlin" +testouterr_cmd_re sh "test $mod" OK $tserr + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO + + +setenv_var TESTSUITE_PATH_CMD_OPT remove2 + +set ans list +lappend ans list set FOO /tmp:/dir1 +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +setenv_var FOO /tmp +set ans list +lappend ans list set __MODULES_SHARE_FOO /tmp:2 +lappend ans list set FOO /tmp:/dir1 +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +setenv_path_var FOO /tmp:/dir1 +set ans list +lappend ans list set __MODULES_SHARE_FOO /tmp:2:/dir1:2 +lappend ans list set FOO /tmp:/dir1 +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module +unsetenv_var FOO + + +setenv_var TESTSUITE_PATH_CMD_OPT remove3 + +setenv_var FOO /tmp +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd_re sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO +set ans list +lappend ans list set FOO /tmp +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove4 + +setenv_var FOO /tmp +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO +set ans list +lappend ans list set FOO /dir1:/dir2 +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove5 + +setenv_var FOO /tmp +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd_re sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO +set ans list +lappend ans list set FOO /tmp:/dir1 +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd_re sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove6 + +setenv_var FOO /tmp +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd_re sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO +set ans list +lappend ans list set FOO /tmp:/dir1 +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd_re sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove7 + +setenv_var FOO /tmp +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO +set ans list +lappend ans list unset FOO +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove8 + +setenv_var FOO /tmp +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO +set ans list +lappend ans list set FOO /tmp:/dir1 +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove9 + +setenv_var FOO /tmp +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO +set ans list +lappend ans list set FOO /dir1:/dir2 +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove10 + +setenv_var FOO /dir1,/tmp +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO +set ans list +lappend ans list set FOO /dir1,/dir2 +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove11 + +setenv_var FOO /tmp,/dir1 +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO +set ans list +lappend ans list set FOO /tmp,/dir1 +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove12 + +setenv_var FOO /tmp +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 65} +set tserr escre msg_load $mod msg_moderr {--index and --append-on-unload options cannot be simultaneously set} {remove-path --append-on-unload --index FOO 3<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO +set tserr escre msg_unload $mod msg_moderr {--index and --append-on-unload options cannot be simultaneously set} {remove-path --append-on-unload --index FOO 3<EXM>} $modfile $ln +testouterr_cmd_re sh "unload $mod" ERR $tserr + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove13 + +setenv_var FOO /tmp +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 68} +set tserr escre msg_load $mod msg_moderr {--index and --append-on-unload options cannot be simultaneously set} {remove-path --index FOO 3 --append-on-unload /tmp<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO +set tserr escre msg_unload $mod msg_moderr {--index and --append-on-unload options cannot be simultaneously set} {remove-path --index FOO 3 --append-on-unload /tmp<EXM>} $modfile $ln +testouterr_cmd_re sh "unload $mod" ERR $tserr + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove14 + +setenv_var FOO /tmp +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +set tserr msg_load $mod "$warn_msgs: --duplicates option has no effect on remove-path" +testouterr_cmd sh "load $mod" $ans $tserr + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO +set ans list +lappend ans list set FOO /tmp:/dir1 +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +set tserr msg_unload $mod "$warn_msgs: --duplicates option has no effect on remove-path" +testouterr_cmd sh "unload $mod" $ans $tserr + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove15 + +setenv_var FOO /tmp +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO +set ans list +lappend ans list set FOO /tmp:/dir1 +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove16 + +setenv_path_var FOO /tmp +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 98} +set tserr escre msg_load $mod msg_moderr {remove-path should get a value for environment variable FOO} {remove-path FOO --append-on-unload<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_loaded_module list $mod list $modfile +setenv_path_var FOO /tmp +set tserr escre msg_unload $mod msg_moderr {remove-path should get a value for environment variable FOO} {remove-path FOO --append-on-unload<EXM>} $modfile $ln +testouterr_cmd_re sh "unload $mod" ERR $tserr + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove17 + +setenv_path_var FOO /tmp /dir1 +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_path_var FOO /tmp +set ans list +lappend ans list unset FOO +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove18 + +setenv_path_var FOO /tmp /dir1 +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_path_var FOO /tmp +set ans list +lappend ans list unset FOO +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove19 + +setenv_path_var FOO /tmp {} +set ans list +lappend ans list unset __MODULES_SHARE_FOO +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_path_var FOO /tmp {} +set ans list +lappend ans list set __MODULES_SHARE_FOO /tmp:2::2 +lappend ans list set FOO /tmp: +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +setenv_path_var FOO /tmp +set ans list +lappend ans list set __MODULES_SHARE_FOO :1:/tmp:2 +lappend ans list set FOO /tmp: +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module +unsetenv_path_var FOO + + +# +# module use +# + +setenv_var TESTSUITE_PATH_CMD_OPT use1 + +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 26} +set tserr escre msg_load $mod msg_moderr {Invalid option '--append-on-unload'} {module use /tmp --append-on-unload<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_var TESTSUITE_PATH_CMD_OPT use2 + +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 29} +set tserr escre msg_load $mod msg_moderr {Invalid option '--append-on-unload'} {module use --append-on-unload /tmp<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_loaded_module list $mod list $modfile + +# unload +set tserr escre msg_unload $mod msg_moderr {Invalid option '--append-on-unload'} {module use --append-on-unload /tmp<EXM>} $modfile $ln +testouterr_cmd_re sh "unload $mod" ERR $tserr + +setenv_path_var MODULEPATH $mp /tmp +testouterr_cmd_re sh "unload $mod" ERR $tserr + +# refresh +testouterr_cmd sh {refresh} OK {} + +unsetenv_loaded_module +setenv_path_var MODULEPATH $mp + +# whatis +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re sh "whatis $mod" OK $tserr + +# display +set tserr "$modlin +$mpre/$mod: + +module-whatis\t$mod +module\t\tuse --append-on-unload /tmp +$modlin" +testouterr_cmd_re sh "display $mod" OK $tserr + +# help +set tserr "$modlin +Module Specific Help for $mpre/$mod: + +WARNING: Unable to find ModulesHelp in $mpre/$mod. +$modlin" +testouterr_cmd_re sh "help $mod" OK $tserr + +# test +set tserr "$modlin +Module Specific Test for $mpre/$mod: + +WARNING: Unable to find ModulesTest in $mpre/$mod. +$modlin" +testouterr_cmd_re sh "test $mod" OK $tserr + + +# +# module unuse +# + +setenv_var TESTSUITE_PATH_CMD_OPT unuse1 + +# load +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set MODULEPATH $mp +testouterr_cmd_re sh "load $mod" $ans {} + +setenv_path_var MODULEPATH $mp /tmp + +testouterr_cmd_re sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_path_var MODULEPATH $mp + +# unload +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list set MODULEPATH $mp:/dir1 +testouterr_cmd_re sh "unload $mod" $ans {} + +setenv_path_var MODULEPATH $mp /tmp +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list set MODULEPATH $mp:/tmp:/dir1 +testouterr_cmd_re sh "unload $mod" $ans {} + + +setenv_var TESTSUITE_PATH_CMD_OPT unuse2 +unsetenv_loaded_module +setenv_path_var MODULEPATH $mp + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set MODULEPATH $mp +testouterr_cmd_re sh "load $mod" $ans {} + +setenv_path_var MODULEPATH /dir1 $mp /tmp +testouterr_cmd_re sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_path_var MODULEPATH $mp + +# unload +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list set MODULEPATH $mp:/tmp:/dir1 +testouterr_cmd_re sh "unload $mod" $ans {} + +setenv_path_var MODULEPATH $mp /tmp + +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list set __MODULES_SHARE_MODULEPATH /tmp:2 +lappend ans list set MODULEPATH $mp:/tmp:/dir1 +testouterr_cmd_re sh "unload $mod" $ans {} + +# refresh +testouterr_cmd sh {refresh} OK {} + +unsetenv_loaded_module +setenv_path_var MODULEPATH $mp + +# whatis +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re sh "whatis $mod" OK $tserr + +# display +set tserr "$modlin +$mpre/$mod: + +module-whatis\t$mod +module\t\tunuse --append-on-unload /tmp /dir1 +$modlin" +testouterr_cmd_re sh "display $mod" OK $tserr + +# help +set tserr "$modlin +Module Specific Help for $mpre/$mod: + +WARNING: Unable to find ModulesHelp in $mpre/$mod. +$modlin" +testouterr_cmd_re sh "help $mod" OK $tserr + +# test +set tserr "$modlin +Module Specific Test for $mpre/$mod: + +WARNING: Unable to find ModulesTest in $mpre/$mod. +$modlin" +testouterr_cmd_re sh "test $mod" OK $tserr + + +setenv_var TESTSUITE_PATH_CMD_OPT unuse3 + +setenv_path_var MODULEPATH $mp /tmp +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set MODULEPATH $mp +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_path_var MODULEPATH $mp +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list set MODULEPATH $mp:/tmp +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT unuse4 + +setenv_path_var MODULEPATH $mp /tmp +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set MODULEPATH $mp +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_path_var MODULEPATH $mp +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list set MODULEPATH $mp:/dir1:/dir2 +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT unuse5 + +setenv_path_var MODULEPATH $mp /tmp +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set MODULEPATH $mp +testouterr_cmd_re sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_path_var MODULEPATH $mp +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list set MODULEPATH $mp:/tmp:/dir1 +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT unuse6 + +setenv_path_var MODULEPATH $mp /tmp +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set MODULEPATH $mp +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_path_var MODULEPATH $mp +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list set MODULEPATH $mp:/tmp:/dir1 +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT unuse7 + +setenv_path_var MODULEPATH $mp /tmp +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set MODULEPATH $mp +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_path_var MODULEPATH $mp /dir1 /tmp +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list set MODULEPATH $mp +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT unuse8 + +setenv_path_var MODULEPATH $mp /tmp +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set MODULEPATH $mp +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_path_var MODULEPATH $mp +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list set MODULEPATH $mp:/tmp:/dir1 +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT unuse9 + +setenv_path_var MODULEPATH $mp /tmp +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set MODULEPATH $mp +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_path_var MODULEPATH $mp +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list set MODULEPATH $mp:/dir1:/dir2 +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT unuse10 + +setenv_path_var MODULEPATH $mp /tmp +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 110} +set tserr escre msg_load $mod msg_moderr {remove-path should get a value for environment variable MODULEPATH} {module unuse --append-on-unload<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_loaded_module list $mod list $modfile +setenv_path_var MODULEPATH $mp /tmp +set tserr escre msg_unload $mod msg_moderr {remove-path should get a value for environment variable MODULEPATH} {module unuse --append-on-unload<EXM>} $modfile $ln +testouterr_cmd_re sh "unload $mod" ERR $tserr + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT unuse11 + +setenv_path_var MODULEPATH $mp /tmp /dir1 +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set MODULEPATH $mp +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_path_var MODULEPATH $mp /tmp /dir1 +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list set MODULEPATH $mp +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT unuse12 + +setenv_path_var MODULEPATH $mp /tmp /dir1 +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set MODULEPATH $mp +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_path_var MODULEPATH $mp /tmp /dir1 +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list set MODULEPATH $mp +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT unuse13 + +setenv_path_var MODULEPATH $mp /tmp {} +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set __MODULES_SHARE_MODULEPATH :1 +lappend ans list set MODULEPATH $mp: +lappend ans list ERR +set tserr msg_load $mod $err_emptydirname +testouterr_cmd sh "load $mod" $ans $tserr + +setenv_loaded_module list $mod list $modfile +setenv_path_var MODULEPATH $mp /tmp {} +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list set __MODULES_SHARE_MODULEPATH /tmp:2::1 +lappend ans list set MODULEPATH $mp:/tmp: +lappend ans list ERR +set tserr msg_unload $mod $err_emptydirname +testouterr_cmd sh "unload $mod" $ans $tserr + +setenv_path_var MODULEPATH $mp +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list set MODULEPATH $mp:/tmp +lappend ans list ERR +set tserr msg_unload $mod $err_emptydirname +testouterr_cmd sh "unload $mod" $ans $tserr + +unsetenv_loaded_module +setenv_path_var MODULEPATH $mp + + +# +# Cleanup +# + +reset_test_env
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/502-prepend-on-unload.exp
Added
@@ -0,0 +1,981 @@ +############################################################################## +# Modules Revision 3.0 +# Providing a flexible user environment +# +# File: modules.50-cmds/%M% +# Revision: %I% +# First Edition: 2021/11/14 +# Last Mod.: %U%, %G% +# +# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr +# +# Description: Testuite testsequence +# Command: load, unload, display, help, test, whatis, refresh +# Modulefiles: path-cmd-opt +# Sub-Command: +# +# Comment: %C{ +# Test --prepend-on-unload option of path modulefile commands +# }C% +# +############################################################################## + +skip_if_quick_mode + +set mp $modpath.3 +set mpre $modpathre.3 +setenv_path_var MODULEPATH $mp + +set mod path-cmd-opt/1.2 +set modfile $mp/path-cmd-opt/1.2 + + +# +# append-path +# + +setenv_var TESTSUITE_PATH_CMD_OPT append1 + +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 8} +set tserr escre msg_load $mod msg_moderr {invalid option '--prepend-on-unload' for append-path} {append-path FOO /tmp --prepend-on-unload /dir1<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_var TESTSUITE_PATH_CMD_OPT append2 + +# load +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 11} +set tserr escre msg_load $mod msg_moderr {invalid option '--prepend-on-unload' for append-path} {append-path --prepend-on-unload FOO /tmp<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_loaded_module list $mod list $modfile +setenv_var FOO /tmp + +# unload +set tserr escre msg_unload $mod msg_moderr {invalid option '--prepend-on-unload' for append-path} {append-path --prepend-on-unload FOO /tmp<EXM>} $modfile $ln +testouterr_cmd_re sh "unload $mod" ERR $tserr + +# refresh +testouterr_cmd sh {refresh} OK {} + +unsetenv_loaded_module +unsetenv_var FOO + +# whatis +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re sh "whatis $mod" OK $tserr + +# display +set tserr "$modlin +$mpre/$mod: + +module-whatis\t$mod +append-path\t--prepend-on-unload FOO /tmp +escre msg_moderr {invalid option '--prepend-on-unload' for append-path} {append-path --prepend-on-unload FOO /tmp<EXM>} $modfile $ln { } +$modlin" +testouterr_cmd_re sh "display $mod" ERR $tserr + +# help +set tserr "$modlin +Module Specific Help for $mpre/$mod: + +escre msg_moderr {invalid option '--prepend-on-unload' for append-path} {append-path --prepend-on-unload FOO /tmp<EXM>} $modfile $ln { } +$modlin" +testouterr_cmd_re sh "help $mod" ERR $tserr + +# test +set tserr "$modlin +Module Specific Test for $mpre/$mod: + +escre msg_moderr {invalid option '--prepend-on-unload' for append-path} {append-path --prepend-on-unload FOO /tmp<EXM>} $modfile $ln { } +$modlin" +testouterr_cmd_re sh "test $mod" ERR $tserr + + +# +# prepend-path +# + +setenv_var TESTSUITE_PATH_CMD_OPT prepend1 + +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 14} +set tserr escre msg_load $mod msg_moderr {invalid option '--prepend-on-unload' for prepend-path} {prepend-path --prepend-on-unload FOO /tmp<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_var TESTSUITE_PATH_CMD_OPT prepend2 + +setenv_loaded_module list $mod list $modfile +setenv_var FOO /tmp + +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 17} +set tserr escre msg_unload $mod msg_moderr {invalid option '--prepend-on-unload' for prepend-path} {prepend-path --prepend-on-unload FOO /tmp /dir1<EXM>} $modfile $ln +testouterr_cmd_re sh "unload $mod" ERR $tserr + +unsetenv_loaded_module +unsetenv_var FOO + + +# +# remove-path +# + +setenv_var TESTSUITE_PATH_CMD_OPT remove1 + +# load +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_path_var FOO /tmp:/dir1 + +set ans list +lappend ans list set FOO /dir1 +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO + +# unload +set ans list +lappend ans list set FOO /tmp +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +setenv_var FOO /tmp +set ans list +lappend ans list set __MODULES_SHARE_FOO /tmp:2 +lappend ans list set FOO /tmp +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +setenv_path_var FOO /tmp:/dir1 +set ans list +lappend ans list set __MODULES_SHARE_FOO /tmp:2 +lappend ans list set FOO /tmp:/dir1 +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +# refresh +testouterr_cmd sh {refresh} OK {} + +unsetenv_loaded_module +unsetenv_var FOO + +# whatis +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re sh "whatis $mod" OK $tserr + +# display +set tserr "$modlin +$mpre/$mod: + +module-whatis\t$mod +remove-path\t--prepend-on-unload FOO /tmp +$modlin" +testouterr_cmd_re sh "display $mod" OK $tserr + +# help +set tserr "$modlin +Module Specific Help for $mpre/$mod: + +WARNING: Unable to find ModulesHelp in $mpre/$mod. +$modlin" +testouterr_cmd_re sh "help $mod" OK $tserr + +# test +set tserr "$modlin +Module Specific Test for $mpre/$mod: + +WARNING: Unable to find ModulesTest in $mpre/$mod. +$modlin" +testouterr_cmd_re sh "test $mod" OK $tserr + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO + + +setenv_var TESTSUITE_PATH_CMD_OPT remove2 + +set ans list +lappend ans list set FOO /tmp:/dir1 +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +setenv_var FOO /tmp +set ans list +lappend ans list set __MODULES_SHARE_FOO /tmp:2 +lappend ans list set FOO /dir1:/tmp +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +setenv_path_var FOO /tmp:/dir1 +set ans list +lappend ans list set __MODULES_SHARE_FOO /tmp:2:/dir1:2 +lappend ans list set FOO /tmp:/dir1 +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module +unsetenv_var FOO + + +setenv_var TESTSUITE_PATH_CMD_OPT remove3 + +setenv_var FOO /tmp +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd_re sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO +set ans list +lappend ans list set FOO /tmp +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove4 + +setenv_var FOO /tmp +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO +set ans list +lappend ans list set FOO /dir1:/dir2 +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove5 + +setenv_var FOO /tmp +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd_re sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO +set ans list +lappend ans list set FOO /tmp:/dir1 +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd_re sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove6 + +setenv_var FOO /tmp +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd_re sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO +set ans list +lappend ans list set FOO /tmp:/dir1 +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd_re sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove7 + +setenv_var FOO /tmp +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO +set ans list +lappend ans list unset FOO +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove8 + +setenv_var FOO /tmp +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO +set ans list +lappend ans list set FOO /tmp:/dir1 +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove9 + +setenv_var FOO /tmp +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO +set ans list +lappend ans list set FOO /dir1:/dir2 +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +setenv_var FOO /dir1 +set ans list +lappend ans list set __MODULES_SHARE_FOO /dir1:2 +lappend ans list set FOO /dir2:/dir1 +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_var FOO +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove10 + +setenv_var FOO /dir1,/tmp +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO +set ans list +lappend ans list set FOO /dir1,/dir2 +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove11 + +setenv_var FOO /tmp,/dir1 +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO +set ans list +lappend ans list set FOO /tmp,/dir1 +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove12 + +setenv_var FOO /tmp +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 65} +set tserr escre msg_load $mod msg_moderr {--index and --prepend-on-unload options cannot be simultaneously set} {remove-path --prepend-on-unload --index FOO 3<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO +set tserr escre msg_unload $mod msg_moderr {--index and --prepend-on-unload options cannot be simultaneously set} {remove-path --prepend-on-unload --index FOO 3<EXM>} $modfile $ln +testouterr_cmd_re sh "unload $mod" ERR $tserr + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove13 + +setenv_var FOO /tmp +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 68} +set tserr escre msg_load $mod msg_moderr {--index and --prepend-on-unload options cannot be simultaneously set} {remove-path --index FOO 3 --prepend-on-unload /tmp<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO +set tserr escre msg_unload $mod msg_moderr {--index and --prepend-on-unload options cannot be simultaneously set} {remove-path --index FOO 3 --prepend-on-unload /tmp<EXM>} $modfile $ln +testouterr_cmd_re sh "unload $mod" ERR $tserr + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove14 + +setenv_var FOO /tmp +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +set tserr msg_load $mod "$warn_msgs: --duplicates option has no effect on remove-path" +testouterr_cmd sh "load $mod" $ans $tserr + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO +set ans list +lappend ans list set FOO /tmp:/dir1 +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +set tserr msg_unload $mod "$warn_msgs: --duplicates option has no effect on remove-path" +testouterr_cmd sh "unload $mod" $ans $tserr + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove15 + +setenv_var FOO /tmp +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO +set ans list +lappend ans list set FOO /tmp:/dir1 +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove16 + +setenv_path_var FOO /tmp +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 98} +set tserr escre msg_load $mod msg_moderr {remove-path should get a value for environment variable FOO} {remove-path FOO --prepend-on-unload<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_loaded_module list $mod list $modfile +setenv_path_var FOO /tmp +set tserr escre msg_unload $mod msg_moderr {remove-path should get a value for environment variable FOO} {remove-path FOO --prepend-on-unload<EXM>} $modfile $ln +testouterr_cmd_re sh "unload $mod" ERR $tserr + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove17 + +setenv_path_var FOO /tmp /dir1 +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_path_var FOO /tmp +set ans list +lappend ans list set FOO /tmp:/dir2 +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove18 + +setenv_path_var FOO /tmp /dir1 +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_path_var FOO /tmp +set ans list +lappend ans list unset FOO +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove19 + +setenv_path_var FOO /tmp {} +set ans list +lappend ans list unset __MODULES_SHARE_FOO +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_path_var FOO /tmp {} +set ans list +lappend ans list set __MODULES_SHARE_FOO /tmp:2::2 +lappend ans list set FOO /tmp: +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +setenv_path_var FOO /tmp +set ans list +lappend ans list set __MODULES_SHARE_FOO :1:/tmp:2 +lappend ans list set FOO :/tmp +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module +unsetenv_path_var FOO + + +# +# module use +# + +setenv_var TESTSUITE_PATH_CMD_OPT use1 + +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 26} +set tserr escre msg_load $mod msg_moderr {Invalid option '--prepend-on-unload'} {module use /tmp --prepend-on-unload<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_var TESTSUITE_PATH_CMD_OPT use2 + +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 29} +set tserr escre msg_load $mod msg_moderr {Invalid option '--prepend-on-unload'} {module use --prepend-on-unload /tmp<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_loaded_module list $mod list $modfile + +# unload +set tserr escre msg_unload $mod msg_moderr {Invalid option '--prepend-on-unload'} {module use --prepend-on-unload /tmp<EXM>} $modfile $ln +testouterr_cmd_re sh "unload $mod" ERR $tserr + +setenv_path_var MODULEPATH $mp /tmp +testouterr_cmd_re sh "unload $mod" ERR $tserr + +# refresh +testouterr_cmd sh {refresh} OK {} + +unsetenv_loaded_module +setenv_path_var MODULEPATH $mp + +# whatis +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re sh "whatis $mod" OK $tserr + +# display +set tserr "$modlin +$mpre/$mod: + +module-whatis\t$mod +module\t\tuse --prepend-on-unload /tmp +$modlin" +testouterr_cmd_re sh "display $mod" OK $tserr + +# help +set tserr "$modlin +Module Specific Help for $mpre/$mod: + +WARNING: Unable to find ModulesHelp in $mpre/$mod. +$modlin" +testouterr_cmd_re sh "help $mod" OK $tserr + +# test +set tserr "$modlin +Module Specific Test for $mpre/$mod: + +WARNING: Unable to find ModulesTest in $mpre/$mod. +$modlin" +testouterr_cmd_re sh "test $mod" OK $tserr + + +# +# module unuse +# + +setenv_var TESTSUITE_PATH_CMD_OPT unuse1 + +# load +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set MODULEPATH $mp +testouterr_cmd_re sh "load $mod" $ans {} + +setenv_path_var MODULEPATH $mp /tmp + +testouterr_cmd_re sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_path_var MODULEPATH $mp + +# unload +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list set MODULEPATH /dir1:$mp +testouterr_cmd_re sh "unload $mod" $ans {} + +setenv_path_var MODULEPATH $mp /tmp +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list set MODULEPATH /dir1:$mp:/tmp +testouterr_cmd_re sh "unload $mod" $ans {} + + +setenv_var TESTSUITE_PATH_CMD_OPT unuse2 +unsetenv_loaded_module +setenv_path_var MODULEPATH $mp + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set MODULEPATH $mp +testouterr_cmd_re sh "load $mod" $ans {} + +setenv_path_var MODULEPATH /dir1 $mp /tmp +testouterr_cmd_re sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_path_var MODULEPATH $mp + +# unload +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list set MODULEPATH /tmp:/dir1:$mp +testouterr_cmd_re sh "unload $mod" $ans {} + +setenv_path_var MODULEPATH $mp /tmp + +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list set __MODULES_SHARE_MODULEPATH /tmp:2 +lappend ans list set MODULEPATH /dir1:$mp:/tmp +testouterr_cmd_re sh "unload $mod" $ans {} + +# refresh +testouterr_cmd sh {refresh} OK {} + +unsetenv_loaded_module +setenv_path_var MODULEPATH $mp + +# whatis +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re sh "whatis $mod" OK $tserr + +# display +set tserr "$modlin +$mpre/$mod: + +module-whatis\t$mod +module\t\tunuse --prepend-on-unload /tmp /dir1 +$modlin" +testouterr_cmd_re sh "display $mod" OK $tserr + +# help +set tserr "$modlin +Module Specific Help for $mpre/$mod: + +WARNING: Unable to find ModulesHelp in $mpre/$mod. +$modlin" +testouterr_cmd_re sh "help $mod" OK $tserr + +# test +set tserr "$modlin +Module Specific Test for $mpre/$mod: + +WARNING: Unable to find ModulesTest in $mpre/$mod. +$modlin" +testouterr_cmd_re sh "test $mod" OK $tserr + + +setenv_var TESTSUITE_PATH_CMD_OPT unuse3 + +setenv_path_var MODULEPATH $mp /tmp +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set MODULEPATH $mp +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_path_var MODULEPATH $mp +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list set MODULEPATH /tmp:$mp +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT unuse4 + +setenv_path_var MODULEPATH $mp /tmp +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set MODULEPATH $mp +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_path_var MODULEPATH $mp +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list set MODULEPATH /dir1:/dir2:$mp +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT unuse5 + +setenv_path_var MODULEPATH $mp /tmp +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set MODULEPATH $mp +testouterr_cmd_re sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_path_var MODULEPATH $mp +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list set MODULEPATH /tmp:/dir1:$mp +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT unuse6 + +setenv_path_var MODULEPATH $mp /tmp +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set MODULEPATH $mp +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_path_var MODULEPATH $mp +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list set MODULEPATH /tmp:/dir1:$mp +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT unuse7 + +setenv_path_var MODULEPATH $mp /tmp +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set MODULEPATH $mp +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_path_var MODULEPATH $mp /dir1 /tmp +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list set MODULEPATH $mp +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT unuse8 + +setenv_path_var MODULEPATH $mp /tmp +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set MODULEPATH $mp +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_path_var MODULEPATH $mp +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list set MODULEPATH /tmp:/dir1:$mp +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT unuse9 + +setenv_path_var MODULEPATH $mp /tmp +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set MODULEPATH $mp +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_path_var MODULEPATH $mp +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list set MODULEPATH /dir1:/dir2:$mp +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT unuse10 + +setenv_path_var MODULEPATH $mp /tmp +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 110} +set tserr escre msg_load $mod msg_moderr {remove-path should get a value for environment variable MODULEPATH} {module unuse --prepend-on-unload<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_loaded_module list $mod list $modfile +setenv_path_var MODULEPATH $mp /tmp +set tserr escre msg_unload $mod msg_moderr {remove-path should get a value for environment variable MODULEPATH} {module unuse --prepend-on-unload<EXM>} $modfile $ln +testouterr_cmd_re sh "unload $mod" ERR $tserr + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT unuse11 + +setenv_path_var MODULEPATH $mp /tmp /dir1 +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set MODULEPATH $mp +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_path_var MODULEPATH $mp /tmp /dir1 +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list set MODULEPATH $mp:/tmp:/dir1:/dir2 +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT unuse12 + +setenv_path_var MODULEPATH $mp /tmp /dir1 +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set MODULEPATH $mp +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_path_var MODULEPATH $mp /tmp /dir1 +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list set MODULEPATH $mp +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT unuse13 + +setenv_path_var MODULEPATH $mp /tmp {} +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set __MODULES_SHARE_MODULEPATH :1 +lappend ans list set MODULEPATH $mp: +lappend ans list ERR +set tserr msg_load $mod $err_emptydirname +testouterr_cmd sh "load $mod" $ans $tserr + +setenv_loaded_module list $mod list $modfile +setenv_path_var MODULEPATH $mp /tmp {} +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list set __MODULES_SHARE_MODULEPATH /tmp:2::1 +lappend ans list set MODULEPATH $mp:/tmp: +lappend ans list ERR +set tserr msg_unload $mod $err_emptydirname +testouterr_cmd sh "unload $mod" $ans $tserr + +setenv_path_var MODULEPATH $mp +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list set MODULEPATH /tmp:$mp +lappend ans list ERR +set tserr msg_unload $mod $err_emptydirname +testouterr_cmd sh "unload $mod" $ans $tserr + +unsetenv_loaded_module +setenv_path_var MODULEPATH $mp + + +# +# Cleanup +# + +reset_test_env
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/503-noop-on-unload.exp
Added
@@ -0,0 +1,913 @@ +############################################################################## +# Modules Revision 3.0 +# Providing a flexible user environment +# +# File: modules.50-cmds/%M% +# Revision: %I% +# First Edition: 2021/11/16 +# Last Mod.: %U%, %G% +# +# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr +# +# Description: Testuite testsequence +# Command: load, unload, display, help, test, whatis, refresh +# Modulefiles: path-cmd-opt +# Sub-Command: +# +# Comment: %C{ +# Test --noop-on-unload option of path modulefile commands +# }C% +# +############################################################################## + +skip_if_quick_mode + +set mp $modpath.3 +set mpre $modpathre.3 +setenv_path_var MODULEPATH $mp + +set mod path-cmd-opt/1.3 +set modfile $mp/path-cmd-opt/1.3 + + +# +# append-path +# + +setenv_var TESTSUITE_PATH_CMD_OPT append1 + +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 8} +set tserr escre msg_load $mod msg_moderr {invalid option '--noop-on-unload' for append-path} {append-path FOO /tmp --noop-on-unload /dir1<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_var TESTSUITE_PATH_CMD_OPT append2 + +# load +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 11} +set tserr escre msg_load $mod msg_moderr {invalid option '--noop-on-unload' for append-path} {append-path --noop-on-unload FOO /tmp<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_loaded_module list $mod list $modfile +setenv_var FOO /tmp + +# unload +set tserr escre msg_unload $mod msg_moderr {invalid option '--noop-on-unload' for append-path} {append-path --noop-on-unload FOO /tmp<EXM>} $modfile $ln +testouterr_cmd_re sh "unload $mod" ERR $tserr + +# refresh +testouterr_cmd sh {refresh} OK {} + +unsetenv_loaded_module +unsetenv_var FOO + +# whatis +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re sh "whatis $mod" OK $tserr + +# display +set tserr "$modlin +$mpre/$mod: + +module-whatis\t$mod +append-path\t--noop-on-unload FOO /tmp +escre msg_moderr {invalid option '--noop-on-unload' for append-path} {append-path --noop-on-unload FOO /tmp<EXM>} $modfile $ln { } +$modlin" +testouterr_cmd_re sh "display $mod" ERR $tserr + +# help +set tserr "$modlin +Module Specific Help for $mpre/$mod: + +escre msg_moderr {invalid option '--noop-on-unload' for append-path} {append-path --noop-on-unload FOO /tmp<EXM>} $modfile $ln { } +$modlin" +testouterr_cmd_re sh "help $mod" ERR $tserr + +# test +set tserr "$modlin +Module Specific Test for $mpre/$mod: + +escre msg_moderr {invalid option '--noop-on-unload' for append-path} {append-path --noop-on-unload FOO /tmp<EXM>} $modfile $ln { } +$modlin" +testouterr_cmd_re sh "test $mod" ERR $tserr + + +# +# prepend-path +# + +setenv_var TESTSUITE_PATH_CMD_OPT prepend1 + +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 14} +set tserr escre msg_load $mod msg_moderr {invalid option '--noop-on-unload' for prepend-path} {prepend-path --noop-on-unload FOO /tmp<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_var TESTSUITE_PATH_CMD_OPT prepend2 + +setenv_loaded_module list $mod list $modfile +setenv_var FOO /tmp + +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 17} +set tserr escre msg_unload $mod msg_moderr {invalid option '--noop-on-unload' for prepend-path} {prepend-path --noop-on-unload FOO /tmp /dir1<EXM>} $modfile $ln +testouterr_cmd_re sh "unload $mod" ERR $tserr + +unsetenv_loaded_module +unsetenv_var FOO + + +# +# remove-path +# + +setenv_var TESTSUITE_PATH_CMD_OPT remove1 + +# load +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_path_var FOO /tmp:/dir1 + +set ans list +lappend ans list set FOO /dir1 +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO + +# unload +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +setenv_var FOO /tmp +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +# refresh +testouterr_cmd sh {refresh} OK {} + +unsetenv_loaded_module +unsetenv_var FOO + +# whatis +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re sh "whatis $mod" OK $tserr + +# display +set tserr "$modlin +$mpre/$mod: + +module-whatis\t$mod +remove-path\t--noop-on-unload FOO /tmp +$modlin" +testouterr_cmd_re sh "display $mod" OK $tserr + +# help +set tserr "$modlin +Module Specific Help for $mpre/$mod: + +WARNING: Unable to find ModulesHelp in $mpre/$mod. +$modlin" +testouterr_cmd_re sh "help $mod" OK $tserr + +# test +set tserr "$modlin +Module Specific Test for $mpre/$mod: + +WARNING: Unable to find ModulesTest in $mpre/$mod. +$modlin" +testouterr_cmd_re sh "test $mod" OK $tserr + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO + + +setenv_var TESTSUITE_PATH_CMD_OPT remove2 + +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +setenv_path_var FOO /tmp:/dir1 +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module +unsetenv_var FOO + + +setenv_var TESTSUITE_PATH_CMD_OPT remove3 + +setenv_var FOO /tmp +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd_re sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove4 + +setenv_var FOO /tmp +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd_re sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd_re sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove5 + +setenv_var FOO /tmp +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd_re sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd_re sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove6 + +setenv_var FOO /tmp +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove7 + +setenv_var FOO /tmp +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_var FOO /dir1 +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_var FOO +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove8 +setenv_var FOO /tmp +set ans list +lappend ans list set FOO /tmp +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd_re sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd_re sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove9 + +setenv_var FOO /tmp +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 56} +set tserr escre msg_load $mod msg_moderr {remove-path should get valid number as index value} {remove-path --index FOO 3 --noop-on-unload /tmp<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO +set tserr escre msg_unload $mod msg_moderr {remove-path should get valid number as index value} {remove-path --index FOO 3 --noop-on-unload /tmp<EXM>} $modfile $ln +testouterr_cmd_re sh "unload $mod" ERR $tserr + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove10 + +setenv_var FOO /tmp +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +set tserr msg_load $mod "$warn_msgs: --duplicates option has no effect on remove-path" +testouterr_cmd sh "load $mod" $ans $tserr + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +set tserr msg_unload $mod "$warn_msgs: --duplicates option has no effect on remove-path" +testouterr_cmd sh "unload $mod" $ans $tserr + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove11 + +setenv_var FOO /tmp +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove12 + +setenv_path_var FOO /tmp +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 77} +set tserr escre msg_load $mod msg_moderr {remove-path should get a value for environment variable FOO} {remove-path FOO --noop-on-unload<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_loaded_module list $mod list $modfile +setenv_path_var FOO /tmp +set tserr escre msg_unload $mod msg_moderr {remove-path should get a value for environment variable FOO} {remove-path FOO --noop-on-unload<EXM>} $modfile $ln +testouterr_cmd_re sh "unload $mod" ERR $tserr + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove13 + +setenv_path_var FOO /tmp /dir1 /dir3 +set ans list +lappend ans list set FOO /dir1:/dir3 +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_path_var FOO /tmp /dir3 +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT remove14 + +setenv_path_var FOO /tmp /dir1 +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_path_var FOO /tmp +set ans list +lappend ans list unset FOO +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module +unsetenv_path_var FOO + + +# +# module use +# + +setenv_var TESTSUITE_PATH_CMD_OPT use1 + +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 26} +set tserr escre msg_load $mod msg_moderr {Invalid option '--noop-on-unload'} {module use /tmp --noop-on-unload<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_var TESTSUITE_PATH_CMD_OPT use2 + +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 29} +set tserr escre msg_load $mod msg_moderr {Invalid option '--noop-on-unload'} {module use --noop-on-unload /tmp<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_loaded_module list $mod list $modfile + +# unload +set tserr escre msg_unload $mod msg_moderr {Invalid option '--noop-on-unload'} {module use --noop-on-unload /tmp<EXM>} $modfile $ln +testouterr_cmd_re sh "unload $mod" ERR $tserr + +setenv_path_var MODULEPATH $mp /tmp +testouterr_cmd_re sh "unload $mod" ERR $tserr + +# refresh +testouterr_cmd sh {refresh} OK {} + +unsetenv_loaded_module +setenv_path_var MODULEPATH $mp + +# whatis +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re sh "whatis $mod" OK $tserr + +# display +set tserr "$modlin +$mpre/$mod: + +module-whatis\t$mod +module\t\tuse --noop-on-unload /tmp +$modlin" +testouterr_cmd_re sh "display $mod" OK $tserr + +# help +set tserr "$modlin +Module Specific Help for $mpre/$mod: + +WARNING: Unable to find ModulesHelp in $mpre/$mod. +$modlin" +testouterr_cmd_re sh "help $mod" OK $tserr + +# test +set tserr "$modlin +Module Specific Test for $mpre/$mod: + +WARNING: Unable to find ModulesTest in $mpre/$mod. +$modlin" +testouterr_cmd_re sh "test $mod" OK $tserr + + +# +# module unuse +# + +setenv_var TESTSUITE_PATH_CMD_OPT unuse1 + +# load +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set MODULEPATH $mp +testouterr_cmd_re sh "load $mod" $ans {} + +setenv_path_var MODULEPATH $mp /tmp + +testouterr_cmd_re sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_path_var MODULEPATH $mp + +# unload +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd_re sh "unload $mod" $ans {} + +setenv_path_var MODULEPATH $mp /tmp +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd_re sh "unload $mod" $ans {} + + +setenv_var TESTSUITE_PATH_CMD_OPT unuse2 +unsetenv_loaded_module +setenv_path_var MODULEPATH $mp + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set MODULEPATH $mp +testouterr_cmd_re sh "load $mod" $ans {} + +setenv_path_var MODULEPATH /dir1 $mp /tmp +testouterr_cmd_re sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_path_var MODULEPATH $mp + +# unload +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd_re sh "unload $mod" $ans {} + +setenv_path_var MODULEPATH $mp /tmp + +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd_re sh "unload $mod" $ans {} + +# refresh +testouterr_cmd sh {refresh} OK {} + +unsetenv_loaded_module +setenv_path_var MODULEPATH $mp + +# whatis +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re sh "whatis $mod" OK $tserr + +# display +set tserr "$modlin +$mpre/$mod: + +module-whatis\t$mod +module\t\tunuse --noop-on-unload /tmp /dir1 +$modlin" +testouterr_cmd_re sh "display $mod" OK $tserr + +# help +set tserr "$modlin +Module Specific Help for $mpre/$mod: + +WARNING: Unable to find ModulesHelp in $mpre/$mod. +$modlin" +testouterr_cmd_re sh "help $mod" OK $tserr + +# test +set tserr "$modlin +Module Specific Test for $mpre/$mod: + +WARNING: Unable to find ModulesTest in $mpre/$mod. +$modlin" +testouterr_cmd_re sh "test $mod" OK $tserr + + +setenv_var TESTSUITE_PATH_CMD_OPT unuse3 + +setenv_path_var MODULEPATH $mp /tmp +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set MODULEPATH $mp +testouterr_cmd_re sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_path_var MODULEPATH $mp +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT unuse4 + +setenv_path_var MODULEPATH $mp /tmp +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set MODULEPATH $mp +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_path_var MODULEPATH $mp +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT unuse5 + +setenv_path_var MODULEPATH $mp /tmp +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set MODULEPATH $mp +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_path_var MODULEPATH $mp +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT unuse6 + +setenv_path_var MODULEPATH $mp /tmp +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set MODULEPATH $mp +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_path_var MODULEPATH $mp +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT unuse7 + +setenv_path_var MODULEPATH $mp /tmp +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 86} +set tserr escre msg_load $mod msg_moderr {remove-path should get a value for environment variable MODULEPATH} {module unuse --noop-on-unload<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_loaded_module list $mod list $modfile +setenv_path_var MODULEPATH $mp /tmp +set tserr escre msg_unload $mod msg_moderr {remove-path should get a value for environment variable MODULEPATH} {module unuse --noop-on-unload<EXM>} $modfile $ln +testouterr_cmd_re sh "unload $mod" ERR $tserr + +unsetenv_loaded_module + + +setenv_var TESTSUITE_PATH_CMD_OPT unuse8 + +setenv_path_var MODULEPATH $mp /tmp /dir1 +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set MODULEPATH $mp +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_path_var MODULEPATH $mp /tmp /dir1 +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module +setenv_path_var MODULEPATH $mp + + +# +# unsetenv +# + +setenv_var TESTSUITE_PATH_CMD_OPT unsetenv1 + +# load +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_var FOO /tmp +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO + +# unload +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +setenv_var FOO /tmp +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module +unsetenv_var FOO + + +setenv_var TESTSUITE_PATH_CMD_OPT unsetenv2 + +setenv_var FOO /tmp + +# load +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO + +# unload +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +# refresh +testouterr_cmd sh {refresh} OK {} + +unsetenv_loaded_module +unsetenv_var FOO + +# whatis +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re sh "whatis $mod" OK $tserr + +# display +set tserr "$modlin +$mpre/$mod: + +module-whatis\t$mod +unsetenv\t--noop-on-unload FOO +$modlin" +testouterr_cmd_re sh "display $mod" OK $tserr + +# help +set tserr "$modlin +Module Specific Help for $mpre/$mod: + +WARNING: Unable to find ModulesHelp in $mpre/$mod. +$modlin" +testouterr_cmd_re sh "help $mod" OK $tserr + +# test +set tserr "$modlin +Module Specific Test for $mpre/$mod: + +WARNING: Unable to find ModulesTest in $mpre/$mod. +$modlin" +testouterr_cmd_re sh "test $mod" OK $tserr + + +setenv_var TESTSUITE_PATH_CMD_OPT unsetenv3 + +# load +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_var FOO /tmp +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO + +# unload +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +setenv_var FOO /tmp +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module +unsetenv_var FOO + + +setenv_var TESTSUITE_PATH_CMD_OPT unsetenv4 + +# load +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_var FOO /tmp +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO + +# unload +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +setenv_var FOO /tmp +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module +unsetenv_var FOO + + +setenv_var TESTSUITE_PATH_CMD_OPT unsetenv5 + +setenv_var FOO /tmp + +# load +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO + +# unload +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +# refresh +testouterr_cmd sh {refresh} OK {} + +unsetenv_loaded_module +unsetenv_var FOO + +# whatis +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re sh "whatis $mod" OK $tserr + +# display +set tserr "$modlin +$mpre/$mod: + +module-whatis\t$mod +unsetenv\tFOO val --noop-on-unload +$modlin" +testouterr_cmd_re sh "display $mod" OK $tserr + +# help +set tserr "$modlin +Module Specific Help for $mpre/$mod: + +WARNING: Unable to find ModulesHelp in $mpre/$mod. +$modlin" +testouterr_cmd_re sh "help $mod" OK $tserr + +# test +set tserr "$modlin +Module Specific Test for $mpre/$mod: + +WARNING: Unable to find ModulesTest in $mpre/$mod. +$modlin" +testouterr_cmd_re sh "test $mod" OK $tserr + + +# +# Cleanup +# + +reset_test_env
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/504-unset-on-unload.exp
Added
@@ -0,0 +1,361 @@ +############################################################################## +# Modules Revision 3.0 +# Providing a flexible user environment +# +# File: modules.50-cmds/%M% +# Revision: %I% +# First Edition: 2021/11/18 +# Last Mod.: %U%, %G% +# +# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr +# +# Description: Testuite testsequence +# Command: load, unload, display, help, test, whatis, refresh +# Modulefiles: path-cmd-opt +# Sub-Command: +# +# Comment: %C{ +# Test --noop-on-unload option of path modulefile commands +# }C% +# +############################################################################## + +skip_if_quick_mode + +set mp $modpath.3 +set mpre $modpathre.3 +setenv_path_var MODULEPATH $mp + +set mod path-cmd-opt/1.4 +set modfile $mp/path-cmd-opt/1.4 + + +# +# setenv +# + +setenv_var TESTSUITE_PATH_CMD_OPT setenv1 + +# load +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 8} +set tserr escre msg_load $mod msg_moderr {wrong # args: should be "setenv ?--set-if-undef? var val"} {setenv --unset-on-unload FOO val<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_loaded_module list $mod list $modfile +setenv_var FOO val + +# unload +set tserr escre msg_unload $mod msg_moderr {wrong # args: should be "setenv ?--set-if-undef? var val"} {setenv --unset-on-unload FOO val<EXM>} $modfile $ln +testouterr_cmd_re sh "unload $mod" ERR $tserr + +unsetenv_loaded_module +unsetenv_var FOO + + +# +# unsetenv +# + +setenv_var TESTSUITE_PATH_CMD_OPT unsetenv1 + +# load +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_var FOO /tmp +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO + +# unload +set ans list +lappend ans list unset FOO +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +setenv_var FOO /tmp +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module +unsetenv_var FOO + + +setenv_var TESTSUITE_PATH_CMD_OPT unsetenv2 + +setenv_var FOO /tmp + +# load +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO + +# unload +set ans list +lappend ans list unset FOO +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +# refresh +testouterr_cmd sh {refresh} OK {} + +unsetenv_loaded_module +unsetenv_var FOO + +# whatis +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re sh "whatis $mod" OK $tserr + +# display +set tserr "$modlin +$mpre/$mod: + +module-whatis\t$mod +unsetenv\t--unset-on-unload FOO +$modlin" +testouterr_cmd_re sh "display $mod" OK $tserr + +# help +set tserr "$modlin +Module Specific Help for $mpre/$mod: + +WARNING: Unable to find ModulesHelp in $mpre/$mod. +$modlin" +testouterr_cmd_re sh "help $mod" OK $tserr + +# test +set tserr "$modlin +Module Specific Test for $mpre/$mod: + +WARNING: Unable to find ModulesTest in $mpre/$mod. +$modlin" +testouterr_cmd_re sh "test $mod" OK $tserr + + +setenv_var TESTSUITE_PATH_CMD_OPT unsetenv3 + +# load +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_var FOO /tmp +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO + +# unload +set ans list +lappend ans list unset FOO +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +setenv_var FOO /tmp +testouterr_cmd sh "unload $mod" $ans {} + +setenv_path_var FOO /tmp /dir1 +setenv_var __MODULES_SHARE_FOO /tmp:2 +set ans list +lappend ans list unset FOO +lappend ans list unset __MODULES_SHARE_FOO +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module +unsetenv_var __MODULES_SHARE_FOO +unsetenv_var FOO + + +setenv_var TESTSUITE_PATH_CMD_OPT unsetenv4 + +# load +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_var FOO /tmp +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO + +# unload +set ans list +lappend ans list unset FOO +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +setenv_var FOO /tmp +testouterr_cmd sh "unload $mod" $ans {} + +setenv_path_var FOO /tmp /dir1 +setenv_var __MODULES_SHARE_FOO /tmp:2 +set ans list +lappend ans list unset FOO +lappend ans list unset __MODULES_SHARE_FOO +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module +unsetenv_var __MODULES_SHARE_FOO +unsetenv_var FOO + + +setenv_var TESTSUITE_PATH_CMD_OPT unsetenv5 + +setenv_var FOO /tmp + +# load +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO + +# unload +set ans list +lappend ans list unset FOO +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +# refresh +testouterr_cmd sh {refresh} OK {} + +unsetenv_loaded_module +unsetenv_var FOO + +# whatis +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re sh "whatis $mod" OK $tserr + +# display +set tserr "$modlin +$mpre/$mod: + +module-whatis\t$mod +unsetenv\tFOO val --unset-on-unload +$modlin" +testouterr_cmd_re sh "display $mod" OK $tserr + +# help +set tserr "$modlin +Module Specific Help for $mpre/$mod: + +WARNING: Unable to find ModulesHelp in $mpre/$mod. +$modlin" +testouterr_cmd_re sh "help $mod" OK $tserr + +# test +set tserr "$modlin +Module Specific Test for $mpre/$mod: + +WARNING: Unable to find ModulesTest in $mpre/$mod. +$modlin" +testouterr_cmd_re sh "test $mod" OK $tserr + + +setenv_var TESTSUITE_PATH_CMD_OPT unsetenv6 + +# load +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_var FOO /tmp +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO + +# unload +set ans list +lappend ans list unset FOO +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +setenv_var FOO /tmp +testouterr_cmd sh "unload $mod" $ans {} + +setenv_path_var FOO /tmp /dir1 +setenv_var __MODULES_SHARE_FOO /tmp:2 +set ans list +lappend ans list unset FOO +lappend ans list unset __MODULES_SHARE_FOO +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module +unsetenv_var __MODULES_SHARE_FOO +unsetenv_var FOO + + +setenv_var TESTSUITE_PATH_CMD_OPT unsetenv7 + +# load +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_var FOO /tmp +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO + +# unload +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +setenv_var FOO /tmp +testouterr_cmd sh "unload $mod" $ans {} + +setenv_path_var FOO /tmp /dir1 +setenv_var __MODULES_SHARE_FOO /tmp:2 +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module +unsetenv_var __MODULES_SHARE_FOO +unsetenv_var FOO + + +# +# Cleanup +# + +reset_test_env
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/505-set-if-undef.exp
Added
@@ -0,0 +1,222 @@ +############################################################################## +# Modules Revision 3.0 +# Providing a flexible user environment +# +# File: modules.50-cmds/%M% +# Revision: %I% +# First Edition: 2021/11/20 +# Last Mod.: %U%, %G% +# +# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr +# +# Description: Testuite testsequence +# Command: load, unload, display, help, test, whatis, refresh +# Modulefiles: path-cmd-opt +# Sub-Command: +# +# Comment: %C{ +# Test --set-if-undef option of path modulefile commands +# }C% +# +############################################################################## + +skip_if_quick_mode + +set mp $modpath.3 +set mpre $modpathre.3 +setenv_path_var MODULEPATH $mp + +set mod path-cmd-opt/1.5 +set modfile $mp/path-cmd-opt/1.5 + + +# +# setenv +# + +setenv_var TESTSUITE_PATH_CMD_OPT setenv1 + +# load +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 8} +set tserr escre msg_load $mod msg_moderr {wrong # args: should be "setenv ?--set-if-undef? var val"} {setenv FOO --set-if-undef<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_loaded_module list $mod list $modfile +setenv_var FOO val + +# unload +set tserr escre msg_unload $mod msg_moderr {wrong # args: should be "setenv ?--set-if-undef? var val"} {setenv FOO --set-if-undef<EXM>} $modfile $ln +testouterr_cmd_re sh "unload $mod" ERR $tserr + +unsetenv_loaded_module +unsetenv_var FOO + + +setenv_var TESTSUITE_PATH_CMD_OPT setenv2 + +# load +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 11} +set tserr escre msg_load $mod msg_moderr {wrong # args: should be "setenv ?--set-if-undef? var val"} {setenv --set-if-undef<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + + +setenv_var TESTSUITE_PATH_CMD_OPT setenv3 + +# load +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 14} +set tserr escre msg_load $mod msg_moderr {wrong # args: should be "setenv ?--set-if-undef? var val"} {setenv --set-if-undef FOO<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + + +setenv_var TESTSUITE_PATH_CMD_OPT setenv4 + +# load +set ans list +lappend ans list set FOO val +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_var FOO /tmp + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO + +# unload +set ans list +lappend ans list unset FOO +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +setenv_var FOO /tmp + +set ans list +lappend ans list unset FOO +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +# refresh +testouterr_cmd sh {refresh} OK {} + +unsetenv_loaded_module +unsetenv_var FOO + +# whatis +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re sh "whatis $mod" OK $tserr + +# display +set tserr "$modlin +$mpre/$mod: + +module-whatis\t$mod +setenv\t\t--set-if-undef FOO val +$modlin" +testouterr_cmd_re sh "display $mod" OK $tserr + +# help +set tserr "$modlin +Module Specific Help for $mpre/$mod: + +WARNING: Unable to find ModulesHelp in $mpre/$mod. +$modlin" +testouterr_cmd_re sh "help $mod" OK $tserr + +# test +set tserr "$modlin +Module Specific Test for $mpre/$mod: + +WARNING: Unable to find ModulesTest in $mpre/$mod. +$modlin" +testouterr_cmd_re sh "test $mod" OK $tserr + + +setenv_var TESTSUITE_PATH_CMD_OPT setenv5 + +# load +set ans list +lappend ans list set FOO val +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_var FOO /tmp + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO + +# unload +set ans list +lappend ans list unset FOO +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +setenv_var FOO /tmp + +set ans list +lappend ans list unset FOO +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module +unsetenv_var FOO + + +setenv_var TESTSUITE_PATH_CMD_OPT setenv6 + +# load +set ans list +lappend ans list set FOO val +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_var FOO /tmp + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +unsetenv_var FOO + +# unload +set ans list +lappend ans list unset FOO +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +setenv_var FOO /tmp + +set ans list +lappend ans list unset FOO +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module +unsetenv_var FOO + + +# +# Cleanup +# + +reset_test_env
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/510-add-property.exp
Added
@@ -0,0 +1,132 @@ +############################################################################## +# Modules Revision 3.0 +# Providing a flexible user environment +# +# File: modules.50-cmds/%M% +# Revision: %I% +# First Edition: 2021/11/26 +# Last Mod.: %U%, %G% +# +# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr +# +# Description: Testuite testsequence +# Command: load, unload, display, help, test, whatis, refresh, avail +# Modulefiles: lcompat +# Sub-Command: +# +# Comment: %C{ +# Test add-property modulefile command +# }C% +# +############################################################################## + +skip_if_quick_mode + +set mp $modpath.3 +set mpre $modpathre.3 +setenv_path_var MODULEPATH $mp + +set mod lcompat/1.0 +set modfile $mp/$mod +set modfilere $mpre/$mod + + +setenv_var TESTSUITE_LCOMPAT addprop1 + +# load +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile + +# unload +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +# refresh +testouterr_cmd sh {refresh} OK {} + +unsetenv_loaded_module + +# whatis +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re sh "whatis $mod" OK $tserr + +# display +set tserr "$modlin +$mpre/$mod: + +module-whatis\t$mod +add-property\tkey value +$modlin" +testouterr_cmd_re sh "display $mod" OK $tserr + +# help +set tserr "$modlin +Module Specific Help for $mpre/$mod: + +$warn_msgs: Unable to find ModulesHelp in $modfilere. +$modlin" +testouterr_cmd_re sh "help $mod" OK $tserr + +# test +set tserr "$modlin +Module Specific Test for $mpre/$mod: + +$warn_msgs: Unable to find ModulesTest in $modfilere. +$modlin" +testouterr_cmd_re sh "test $mod" OK $tserr + + +setenv_var TESTSUITE_LCOMPAT addprop2 + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + + +setenv_var TESTSUITE_LCOMPAT addprop3 + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + + +setenv_var TESTSUITE_LCOMPAT addprop4 + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + + +setenv_var TESTSUITE_LCOMPAT addproprc1 + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list ERR +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 3 : 6} +set tserr escre msg_moderr {invalid command name "add-property"} {add-property key value<EXM>} $mp/lcompat/.modulerc $ln { } +testouterr_cmd_re sh "load $mod" $ans $tserr + +set tserr $mp:\n$mod +testouterr_cmd sh "avail -t $mod" OK $tserr + +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re sh "whatis $mod" OK $tserr + + +# +# Cleanup +# + +reset_test_env
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/511-remove-property.exp
Added
@@ -0,0 +1,132 @@ +############################################################################## +# Modules Revision 3.0 +# Providing a flexible user environment +# +# File: modules.50-cmds/%M% +# Revision: %I% +# First Edition: 2021/11/26 +# Last Mod.: %U%, %G% +# +# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr +# +# Description: Testuite testsequence +# Command: load, unload, display, help, test, whatis, refresh, avail +# Modulefiles: lcompat +# Sub-Command: +# +# Comment: %C{ +# Test remove-property modulefile command +# }C% +# +############################################################################## + +skip_if_quick_mode + +set mp $modpath.3 +set mpre $modpathre.3 +setenv_path_var MODULEPATH $mp + +set mod lcompat/1.1 +set modfile $mp/$mod +set modfilere $mpre/$mod + + +setenv_var TESTSUITE_LCOMPAT remprop1 + +# load +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile + +# unload +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +# refresh +testouterr_cmd sh {refresh} OK {} + +unsetenv_loaded_module + +# whatis +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re sh "whatis $mod" OK $tserr + +# display +set tserr "$modlin +$mpre/$mod: + +module-whatis\t$mod +remove-property\tkey value +$modlin" +testouterr_cmd_re sh "display $mod" OK $tserr + +# help +set tserr "$modlin +Module Specific Help for $mpre/$mod: + +$warn_msgs: Unable to find ModulesHelp in $modfilere. +$modlin" +testouterr_cmd_re sh "help $mod" OK $tserr + +# test +set tserr "$modlin +Module Specific Test for $mpre/$mod: + +$warn_msgs: Unable to find ModulesTest in $modfilere. +$modlin" +testouterr_cmd_re sh "test $mod" OK $tserr + + +setenv_var TESTSUITE_LCOMPAT remprop2 + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + + +setenv_var TESTSUITE_LCOMPAT remprop3 + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + + +setenv_var TESTSUITE_LCOMPAT remprop4 + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + + +setenv_var TESTSUITE_LCOMPAT remproprc1 + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list ERR +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 3 : 9} +set tserr escre msg_moderr {invalid command name "remove-property"} {remove-property key value<EXM>} $mp/lcompat/.modulerc $ln { } +testouterr_cmd_re sh "load $mod" $ans $tserr + +set tserr $mp:\n$mod\n${mod}0\n${mod}1 +testouterr_cmd sh "avail -t $mod" OK $tserr + +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re sh "whatis $mod" OK $tserr + + +# +# Cleanup +# + +reset_test_env
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/512-extensions.exp
Added
@@ -0,0 +1,124 @@ +############################################################################## +# Modules Revision 3.0 +# Providing a flexible user environment +# +# File: modules.50-cmds/%M% +# Revision: %I% +# First Edition: 2021/11/26 +# Last Mod.: %U%, %G% +# +# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr +# +# Description: Testuite testsequence +# Command: load, unload, display, help, test, whatis, refresh, avail +# Modulefiles: lcompat +# Sub-Command: +# +# Comment: %C{ +# Test extensions modulefile command +# }C% +# +############################################################################## + +skip_if_quick_mode + +set mp $modpath.3 +set mpre $modpathre.3 +setenv_path_var MODULEPATH $mp + +set mod lcompat/1.2 +set modfile $mp/$mod +set modfilere $mpre/$mod + + +setenv_var TESTSUITE_LCOMPAT ext1 + +# load +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile + +# unload +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +# refresh +testouterr_cmd sh {refresh} OK {} + +unsetenv_loaded_module + +# whatis +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re sh "whatis $mod" OK $tserr + +# display +set tserr "$modlin +$mpre/$mod: + +module-whatis\t$mod +extensions\tmoda/1.0 modb/2.0 +$modlin" +testouterr_cmd_re sh "display $mod" OK $tserr + +# help +set tserr "$modlin +Module Specific Help for $mpre/$mod: + +$warn_msgs: Unable to find ModulesHelp in $modfilere. +$modlin" +testouterr_cmd_re sh "help $mod" OK $tserr + +# test +set tserr "$modlin +Module Specific Test for $mpre/$mod: + +$warn_msgs: Unable to find ModulesTest in $modfilere. +$modlin" +testouterr_cmd_re sh "test $mod" OK $tserr + + +setenv_var TESTSUITE_LCOMPAT ext2 + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + + +setenv_var TESTSUITE_LCOMPAT ext3 + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + + +setenv_var TESTSUITE_LCOMPAT extrc1 + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list ERR +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 3 : 12} +set tserr escre msg_moderr {invalid command name "extensions"} {extensions moda/1.0 modb/2.0<EXM>} $mp/lcompat/.modulerc $ln { } +testouterr_cmd_re sh "load $mod" $ans $tserr + +set tserr $mp:\n$mod +testouterr_cmd sh "avail -t $mod" OK $tserr + +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re sh "whatis $mod" OK $tserr + + +# +# Cleanup +# + +reset_test_env
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/513-prereq-any.exp
Added
@@ -0,0 +1,154 @@ +############################################################################## +# Modules Revision 3.0 +# Providing a flexible user environment +# +# File: modules.50-cmds/%M% +# Revision: %I% +# First Edition: 2021/11/27 +# Last Mod.: %U%, %G% +# +# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr +# +# Description: Testuite testsequence +# Command: load, unload, display, help, test, whatis, refresh, avail +# Modulefiles: lcompat +# Sub-Command: +# +# Comment: %C{ +# Test prereq-any modulefile command +# }C% +# +############################################################################## + +skip_if_quick_mode + +set mp $modpath.3 +set mpre $modpathre.3 +setenv_path_var MODULEPATH $mp + +set mod lcompat/1.3 +set modfile $mp/$mod +set modfilere $mpre/$mod + + +setenv_var TESTSUITE_LCOMPAT prany1 + +# load +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0|bar/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMTAG foo/1.0&auto-loaded +set tserr msg_top_load $mod {} foo/1.0 {} +testouterr_cmd sh "load --auto $mod" $ans $tserr + +set tserr msg_load $mod err_prereqor foo/1.0 bar/1.0 +testouterr_cmd sh "load --no-auto $mod" ERR $tserr + +setenv_loaded_module list foo/1.0 list $mp/foo/1.0 + +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0|bar/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +testouterr_cmd sh "load --auto $mod" $ans {} + +setenv_loaded_module list $mod list $modfile + +# unload +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +setenv_loaded_module list bar/1.0 $mod list $mp/bar/1.0 $modfile +setenv_path_var __MODULES_LMTAG bar/1.0&auto-loaded +setenv_path_var __MODULES_LMPREREQ $mod&foo/1.0|bar/1.0 + +set ans list +lappend ans list unset __MODULES_LMPREREQ +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list unset __MODULES_LMTAG +set tserr msg_top_unload $mod {} bar/1.0 {} +testouterr_cmd sh "unload --auto $mod" $ans $tserr + +# refresh +testouterr_cmd sh {refresh} OK {} + +unsetenv_loaded_module +unsetenv_path_var __MODULES_LMTAG +unsetenv_path_var __MODULES_LMPREREQ + +# whatis +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re sh "whatis $mod" OK $tserr + +# display +set tserr "$modlin +$mpre/$mod: + +module-whatis\t$mod +prereq-any\tfoo/1.0 bar/1.0 +$modlin" +testouterr_cmd_re sh "display $mod" OK $tserr + +# help +set tserr "$modlin +Module Specific Help for $mpre/$mod: + +$warn_msgs: Unable to find ModulesHelp in $modfilere. +$modlin" +testouterr_cmd_re sh "help $mod" OK $tserr + +# test +set tserr "$modlin +Module Specific Test for $mpre/$mod: + +$warn_msgs: Unable to find ModulesTest in $modfilere. +$modlin" +testouterr_cmd_re sh "test $mod" OK $tserr + + +setenv_var TESTSUITE_LCOMPAT prany2 + +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMTAG foo/1.0&auto-loaded +set tserr msg_top_load $mod {} foo/1.0 {} +testouterr_cmd sh "load --auto $mod" $ans $tserr + + +setenv_var TESTSUITE_LCOMPAT prany3 + +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 14} +set tserr escre msg_load $mod msg_moderr {wrong # args: should be "prereq ?--tag? ?taglist? modulefile ?...?"} {prereq-any<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + + +setenv_var TESTSUITE_LCOMPAT pranyrc1 + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list ERR +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 3 : 15} +set tserr escre msg_moderr {invalid command name "prereq-any"} {prereq-any foo/1.0 bar/1.0<EXM>} $mp/lcompat/.modulerc $ln { } +testouterr_cmd_re sh "load $mod" $ans $tserr + +set tserr $mp:\n$mod +testouterr_cmd sh "avail -t $mod" OK $tserr + +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re sh "whatis $mod" OK $tserr + + +# +# Cleanup +# + +reset_test_env
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/514-require-fullname.exp
Added
@@ -0,0 +1,269 @@ +############################################################################## +# Modules Revision 3.0 +# Providing a flexible user environment +# +# File: modules.50-cmds/%M% +# Revision: %I% +# First Edition: 2021/11/28 +# Last Mod.: %U%, %G% +# +# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr +# +# Description: Testuite testsequence +# Command: load, unload, display, help, test, whatis, refresh, avail +# Modulefiles: lcompat +# Sub-Command: +# +# Comment: %C{ +# Test require-fullname modulefile command +# }C% +# +############################################################################## + +skip_if_quick_mode + +set mp $modpath.3 +set mpre $modpathre.3 +setenv_path_var MODULEPATH $mp + +set mod lcompat/1.4 +set modfile $mp/$mod +set modfilere $mpre/$mod + +setenv_var MODULES_ADVANCED_VERSION_SPEC 1 +setenv_var MODULES_IMPLICIT_DEFAULT 1 + + +setenv_var TESTSUITE_LCOMPAT reqfull1 + +# load +set ans list +lappend ans list set __MODULES_LMALTNAME $mod&lcompat/sym&lcompat/default&lcompat&al|lcompat/al&as|lcompat/latest +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} +testouterr_cmd sh {load lcompat/al} $ans {} +testouterr_cmd sh {load lcompat/sym} $ans {} +testouterr_cmd sh {load lcompat/latest} $ans {} +testouterr_cmd sh {load lcompat@1.4:1.4} $ans {} + +set tserr msg_load $mod $err_reqfull +testouterr_cmd sh {load lcompat} ERR $tserr +testouterr_cmd sh {load lcompat/default} ERR $tserr + +# test with icase option set +testouterr_cmd sh {load -i lCompat/Al} $ans {} +testouterr_cmd sh {load -i Lcompat/sYm} $ans {} +testouterr_cmd sh {load -i lcoMPat/laTest} $ans {} +testouterr_cmd sh {load -i LCompat@1.4:1.4} $ans {} +testouterr_cmd sh {load -i lcompAT} ERR $tserr +testouterr_cmd sh {load -i lcomPat/DEfault} ERR $tserr + +# test with dependency load +setenv_var TESTSUITE_LCOMPAT_DEP reqfulldep1 +set ans list +lappend ans list set __MODULES_LMALTNAME $mod&lcompat/sym&lcompat/default&lcompat&al|lcompat/al&as|lcompat/latest +lappend ans list set __MODULES_LMPREREQ lcompatdep/1.4&$mod +lappend ans list set _LMFILES_ $modfile:$mp/lcompatdep/1.4 +lappend ans list set LOADEDMODULES $mod:lcompatdep/1.4 +lappend ans list set __MODULES_LMTAG $mod&auto-loaded +set tserr msg_top_load lcompatdep/1.4 {} $mod {} +testouterr_cmd sh {load --auto lcompatdep/1.4} $ans $tserr + +setenv_var TESTSUITE_LCOMPAT_DEP reqfulldep2 +set ans list +lappend ans list set __MODULES_LMALTNAME $mod&lcompat/sym&lcompat/default&lcompat&al|lcompat/al&as|lcompat/latest +lappend ans list set __MODULES_LMPREREQ lcompatdep/1.4&lcompat/al +lappend ans list set _LMFILES_ $modfile:$mp/lcompatdep/1.4 +lappend ans list set LOADEDMODULES $mod:lcompatdep/1.4 +lappend ans list set __MODULES_LMTAG $mod&auto-loaded +set tserr msg_top_load lcompatdep/1.4 {} $mod {} +testouterr_cmd sh {load --auto lcompatdep/1.4} $ans $tserr + +setenv_var TESTSUITE_LCOMPAT_DEP reqfulldep3 +set tserr msg_load $mod $err_reqfull\n\nmsg_load lcompatdep/1.4 err_reqlo lcompat +testouterr_cmd sh {load --auto lcompatdep/1.4} ERR $tserr + +setenv_var TESTSUITE_LCOMPAT_DEP reqfulldep4 +set tserr msg_load $mod $err_reqfull\n\nmsg_load lcompatdep/1.4 err_reqlo lcompat/default +testouterr_cmd sh {load --auto lcompatdep/1.4} ERR $tserr +unsetenv_var TESTSUITE_LCOMPAT_DEP + + +setenv_loaded_module list $mod list $modfile +setenv_path_var __MODULES_LMALTNAME $mod&lcompat/sym&lcompat/default&lcompat&al|lcompat/al&as|lcompat/latest + +# unload +set ans list +lappend ans list unset __MODULES_LMALTNAME +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +testouterr_cmd sh {unload lcompat/al} $ans {} +testouterr_cmd sh {unload lcompat/sym} $ans {} +testouterr_cmd sh {unload lcompat/default} $ans {} +testouterr_cmd sh {unload lcompat} $ans {} + +# test with icase option set +testouterr_cmd sh {unload -i lcompAT/Sym} $ans {} +testouterr_cmd sh {unload -i lcompat/dEFault} $ans {} +testouterr_cmd sh {unload -i lcompAt} $ans {} + +# refresh +testouterr_cmd sh {refresh} OK {} + +unsetenv_loaded_module +unsetenv_path_var __MODULES_LMALTNAME + +# whatis +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re sh "whatis $mod" OK $tserr + +# display +set tserr "$modlin +$mpre/$mod: + +module-whatis\t$mod +require-fullname\t +$modlin" +testouterr_cmd_re sh "display $mod" OK $tserr +testouterr_cmd_re sh "display lcompat" OK $tserr + +# help +set tserr "$modlin +Module Specific Help for $mpre/$mod: + +$warn_msgs: Unable to find ModulesHelp in $modfilere. +$modlin" +testouterr_cmd_re sh "help $mod" OK $tserr +testouterr_cmd_re sh "help lcompat" OK $tserr + +# test +set tserr "$modlin +Module Specific Test for $mpre/$mod: + +$warn_msgs: Unable to find ModulesTest in $modfilere. +$modlin" +testouterr_cmd_re sh "test $mod" OK $tserr +testouterr_cmd_re sh "test lcompat" OK $tserr + + +setenv_var TESTSUITE_LCOMPAT reqfull2 + +# test with implicit_default enabled +setenv_var MODULES_IMPLICIT_DEFAULT 1 + +set ans list +lappend ans list set __MODULES_LMALTNAME $mod&as|lcompat/default&as|lcompat/latest +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh {load lcompat@1.4:} $ans {} +set tserr msg_load $mod $err_reqfull +testouterr_cmd sh {load lcompat} ERR $tserr +testouterr_cmd sh {load lcompat@1.3:} ERR $tserr + +# test with extended_default enabled +setenv_var MODULES_EXTENDED_DEFAULT 1 + +testouterr_cmd sh {load lcompat@1} ERR $tserr +testouterr_cmd sh {load lcompat/1} ERR $tserr +testouterr_cmd sh {load -i lCOMpat@1} ERR $tserr +testouterr_cmd sh {load -i LCompat/1} ERR $tserr +testouterr_cmd sh {load lcompat@1.4} $ans {} +testouterr_cmd sh {load -i lcomPAt@1.4} $ans {} + +setenv_var MODULES_EXTENDED_DEFAULT 0 +# test with implicit_default disabled +setenv_var MODULES_IMPLICIT_DEFAULT 0 + +if {!is_config_locked implicit_default} { + set tserr $err_nodefault'lcompat' + testouterr_cmd sh {load lcompat} ERR $tserr + + set ans list + lappend ans list set _LMFILES_ $modfile + lappend ans list set LOADEDMODULES $mod + testouterr_cmd sh {load lcompat@1.4} $ans {} +} else { + testouterr_cmd sh {load lcompat} ERR $tserr + + set ans list + lappend ans list set __MODULES_LMALTNAME $mod&as|lcompat/default&as|lcompat/latest + lappend ans list set _LMFILES_ $modfile + lappend ans list set LOADEDMODULES $mod + testouterr_cmd sh {load lcompat@1.4} $ans {} +} + + +setenv_var MODULES_IMPLICIT_DEFAULT 1 + + +setenv_var TESTSUITE_LCOMPAT reqfull3 + +set ans list +lappend ans list set __MODULES_LMVARIANT lcompat/deep/1.4&foo|val2|0|2 +lappend ans list set __MODULES_LMALTNAME lcompat/deep/1.4&lcompat/deep/deepsym&lcompat/deep/default&lcompat/deep&al|lcompat/aldeep&as|lcompat/default&as|lcompat/latest&as|lcompat/deep/latest +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES lcompat/deep/1.4 +testouterr_cmd sh {load lcompat/deep/1.4} $ans {} +testouterr_cmd sh {load lcompat/aldeep} $ans {} +testouterr_cmd sh {load lcompat/deep/deepsym} $ans {} + +set tserr msg_load lcompat/deep/1.4 $err_reqfull +testouterr_cmd sh {load lcompat/deep} ERR $tserr +testouterr_cmd sh {load lcompat/deep/default} ERR $tserr + +# test with variant specified +set ans list +lappend ans list set __MODULES_LMVARIANT lcompat/deep/1.4&foo|val1|0|0 +lappend ans list set __MODULES_LMALTNAME lcompat/deep/1.4&lcompat/deep/deepsym&lcompat/deep/default&lcompat/deep&al|lcompat/aldeep&as|lcompat/default&as|lcompat/latest&as|lcompat/deep/latest +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES lcompat/deep/1.4 +testouterr_cmd sh {load lcompat/deep/1.4 foo=val1} $ans {} +testouterr_cmd sh {load lcompat/aldeep foo=val1} $ans {} + +set tserr msg_load lcompat/deep/1.4{foo=val1} $err_reqfull +testouterr_cmd sh {load lcompat/deep foo=val1} ERR $tserr + + +setenv_var TESTSUITE_LCOMPAT reqfull4 +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 15} +set tserr escre msg_load $mod msg_moderr {wrong # args: should be "require-fullname"} {require-fullname string<EXM>} $modfile $ln {} {} {} {} {invoked from within} +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_loaded_module list $mod list $modfile + +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd_re sh "unload $mod" $ans {} +testouterr_cmd_re sh "unload lcompat" $ans {} + +unsetenv_loaded_module + + +setenv_var TESTSUITE_LCOMPAT reqfullrc1 + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list ERR +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 3 : 30} +set tserr escre msg_moderr {invalid command name "require-fullname"} {require-fullname<EXM>} $mp/lcompat/.modulerc $ln { } +testouterr_cmd_re sh "load $mod" $ans $tserr + +set tserr $mp:\n$mod +testouterr_cmd sh "avail -t $mod" OK $tserr + +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re sh "whatis $mod" OK $tserr + + +# +# Cleanup +# + +reset_test_env
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/515-depends-on.exp
Added
@@ -0,0 +1,234 @@ +############################################################################## +# Modules Revision 3.0 +# Providing a flexible user environment +# +# File: modules.50-cmds/%M% +# Revision: %I% +# First Edition: 2021/12/02 +# Last Mod.: %U%, %G% +# +# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr +# +# Description: Testuite testsequence +# Command: load, unload, display, help, test, whatis, refresh, avail +# Modulefiles: lcompat +# Sub-Command: +# +# Comment: %C{ +# Test depends-on modulefile command +# }C% +# +############################################################################## + +skip_if_quick_mode + +set mp $modpath.3 +set mpre $modpathre.3 +setenv_path_var MODULEPATH $mp + +set mod lcompat/1.5 +set modfile $mp/$mod +set modfilere $mpre/$mod + + +setenv_var TESTSUITE_LCOMPAT depon1 + +# load +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMTAG foo/1.0&auto-loaded +set tserr msg_top_load $mod {} foo/1.0 {} +testouterr_cmd sh "load --auto $mod" $ans $tserr + +set tserr msg_load $mod err_prereq foo/1.0 +testouterr_cmd sh "load --no-auto $mod" ERR $tserr + +setenv_loaded_module list foo/1.0 list $mp/foo/1.0 + +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +testouterr_cmd sh "load --auto $mod" $ans {} + +setenv_loaded_module list $mod list $modfile + +# unload +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +setenv_loaded_module list foo/1.0 $mod list $mp/foo/1.0 $modfile +setenv_path_var __MODULES_LMTAG foo/1.0&auto-loaded +setenv_path_var __MODULES_LMPREREQ $mod&foo/1.0 + +set ans list +lappend ans list unset __MODULES_LMPREREQ +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list unset __MODULES_LMTAG +set tserr msg_top_unload $mod {} foo/1.0 {} +testouterr_cmd sh "unload --auto $mod" $ans $tserr + +# refresh +testouterr_cmd sh {refresh} OK {} + +unsetenv_loaded_module +unsetenv_path_var __MODULES_LMTAG +unsetenv_path_var __MODULES_LMPREREQ + +# whatis +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re sh "whatis $mod" OK $tserr + +# display +set tserr "$modlin +$mpre/$mod: + +module-whatis\t$mod +depends-on\tfoo/1.0 +$modlin" +testouterr_cmd_re sh "display $mod" OK $tserr + +# help +set tserr "$modlin +Module Specific Help for $mpre/$mod: + +$warn_msgs: Unable to find ModulesHelp in $modfilere. +$modlin" +testouterr_cmd_re sh "help $mod" OK $tserr + +# test +set tserr "$modlin +Module Specific Test for $mpre/$mod: + +$warn_msgs: Unable to find ModulesTest in $modfilere. +$modlin" +testouterr_cmd_re sh "test $mod" OK $tserr + + +setenv_var TESTSUITE_LCOMPAT depon2 + +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0&bar/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$mp/bar/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:bar/1.0:$mod +lappend ans list set __MODULES_LMTAG foo/1.0&auto-loaded:bar/1.0&auto-loaded +set tserr msg_top_load $mod {} {foo/1.0 bar/1.0} {} +testouterr_cmd sh "load --auto $mod" $ans $tserr + +set tserr msg_load $mod err_prereq foo/1.0 +testouterr_cmd sh "load --no-auto $mod" ERR $tserr + +set tserr "$modlin +$mpre/$mod: + +module-whatis\t$mod +depends-on\tfoo/1.0 bar/1.0 +$modlin" +testouterr_cmd_re sh "display $mod" OK $tserr + +setenv_loaded_module list foo/1.0 list $mp/foo/1.0 + +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0&bar/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$mp/bar/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:bar/1.0:$mod +lappend ans list set __MODULES_LMTAG bar/1.0&auto-loaded +set tserr msg_top_load $mod {} {bar/1.0} {} +testouterr_cmd sh "load --auto $mod" $ans $tserr + +setenv_loaded_module list bar/1.0 list $mp/bar/1.0 + +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0&bar/1.0 +lappend ans list set _LMFILES_ $mp/bar/1.0:$mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES bar/1.0:foo/1.0:$mod +lappend ans list set __MODULES_LMTAG foo/1.0&auto-loaded +set tserr msg_top_load $mod {} {foo/1.0} {} +testouterr_cmd sh "load --auto $mod" $ans $tserr + +setenv_loaded_module list foo/1.0 bar/1.0 $mod list $mp/foo/1.0 $mp/bar/1.0 $modfile +setenv_path_var __MODULES_LMTAG foo/1.0&auto-loaded bar/1.0&auto-loaded +setenv_path_var __MODULES_LMPREREQ $mod&foo/1.0&bar/1.0 + +set ans list +lappend ans list unset __MODULES_LMPREREQ +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list unset __MODULES_LMTAG +set tserr msg_top_unload $mod {} {bar/1.0 foo/1.0} {} +testouterr_cmd sh "unload --auto $mod" $ans $tserr + +unsetenv_loaded_module +unsetenv_path_var __MODULES_LMTAG +unsetenv_path_var __MODULES_LMPREREQ + + +if {!is_config_locked implicit_default} { + setenv_var TESTSUITE_LCOMPAT depon3 + setenv_var MODULES_ADVANCED_VERSION_SPEC 1 + setenv_var MODULES_EXTENDED_DEFAULT 1 + setenv_var MODULES_IMPLICIT_DEFAULT 1 + + set ans list + lappend ans list set __MODULES_LMPREREQ $mod&foo@1&bar@<1 + lappend ans list set _LMFILES_ $mp/foo/1.0:$mp/bar/1.0:$modfile + lappend ans list set LOADEDMODULES foo/1.0:bar/1.0:$mod + lappend ans list set __MODULES_LMTAG foo/1.0&auto-loaded:bar/1.0&auto-loaded + set tserr msg_top_load $mod {} {foo/1.0 bar/1.0} {} + testouterr_cmd sh "load --auto $mod" $ans $tserr + + setenv_var MODULES_EXTENDED_DEFAULT 0 + unsetenv_var MODULES_ADVANCED_VERSION_SPEC + unsetenv_var MODULES_IMPLICIT_DEFAULT +} + + +setenv_var TESTSUITE_LCOMPAT depon4 + +set tserr msg_load foo/0.err msg_moderr {invalid command name "foo"} foo $mp/foo/0.err 2\n\n +append tserr msg_load $mod err_reqlo foo/0.err +testouterr_cmd sh "load --auto $mod" ERR $tserr + + +setenv_var TESTSUITE_LCOMPAT depon5 + +set tserr msg_load $mod $err_path'unk/1.0' err_reqlo unk/1.0 +testouterr_cmd sh "load --auto $mod" ERR $tserr + + +setenv_var TESTSUITE_LCOMPAT depon6 + +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 23} +set tserr escre msg_load $mod msg_moderr {wrong # args: should be "prereq-all ?--tag? ?taglist? modulefile ?...?"} {depends-on<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + + +setenv_var TESTSUITE_LCOMPAT deponrc1 + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list ERR +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 3 : 33} +set tserr escre msg_moderr {invalid command name "depends-on"} {depends-on foo/1.0<EXM>} $mp/lcompat/.modulerc $ln { } +testouterr_cmd_re sh "load $mod" $ans $tserr + +set tserr $mp:\n$mod +testouterr_cmd sh "avail -t $mod" OK $tserr + +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re sh "whatis $mod" OK $tserr + + +# +# Cleanup +# + +reset_test_env
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/516-prereq-all.exp
Added
@@ -0,0 +1,234 @@ +############################################################################## +# Modules Revision 3.0 +# Providing a flexible user environment +# +# File: modules.50-cmds/%M% +# Revision: %I% +# First Edition: 2021/12/03 +# Last Mod.: %U%, %G% +# +# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr +# +# Description: Testuite testsequence +# Command: load, unload, display, help, test, whatis, refresh, avail +# Modulefiles: lcompat +# Sub-Command: +# +# Comment: %C{ +# Test prereq-all modulefile command +# }C% +# +############################################################################## + +skip_if_quick_mode + +set mp $modpath.3 +set mpre $modpathre.3 +setenv_path_var MODULEPATH $mp + +set mod lcompat/1.6 +set modfile $mp/$mod +set modfilere $mpre/$mod + + +setenv_var TESTSUITE_LCOMPAT prall1 + +# load +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMTAG foo/1.0&auto-loaded +set tserr msg_top_load $mod {} foo/1.0 {} +testouterr_cmd sh "load --auto $mod" $ans $tserr + +set tserr msg_load $mod err_prereq foo/1.0 +testouterr_cmd sh "load --no-auto $mod" ERR $tserr + +setenv_loaded_module list foo/1.0 list $mp/foo/1.0 + +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +testouterr_cmd sh "load --auto $mod" $ans {} + +setenv_loaded_module list $mod list $modfile + +# unload +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +setenv_loaded_module list foo/1.0 $mod list $mp/foo/1.0 $modfile +setenv_path_var __MODULES_LMTAG foo/1.0&auto-loaded +setenv_path_var __MODULES_LMPREREQ $mod&foo/1.0 + +set ans list +lappend ans list unset __MODULES_LMPREREQ +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list unset __MODULES_LMTAG +set tserr msg_top_unload $mod {} foo/1.0 {} +testouterr_cmd sh "unload --auto $mod" $ans $tserr + +# refresh +testouterr_cmd sh {refresh} OK {} + +unsetenv_loaded_module +unsetenv_path_var __MODULES_LMTAG +unsetenv_path_var __MODULES_LMPREREQ + +# whatis +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re sh "whatis $mod" OK $tserr + +# display +set tserr "$modlin +$mpre/$mod: + +module-whatis\t$mod +prereq-all\tfoo/1.0 +$modlin" +testouterr_cmd_re sh "display $mod" OK $tserr + +# help +set tserr "$modlin +Module Specific Help for $mpre/$mod: + +$warn_msgs: Unable to find ModulesHelp in $modfilere. +$modlin" +testouterr_cmd_re sh "help $mod" OK $tserr + +# test +set tserr "$modlin +Module Specific Test for $mpre/$mod: + +$warn_msgs: Unable to find ModulesTest in $modfilere. +$modlin" +testouterr_cmd_re sh "test $mod" OK $tserr + + +setenv_var TESTSUITE_LCOMPAT prall2 + +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0&bar/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$mp/bar/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:bar/1.0:$mod +lappend ans list set __MODULES_LMTAG foo/1.0&auto-loaded:bar/1.0&auto-loaded +set tserr msg_top_load $mod {} {foo/1.0 bar/1.0} {} +testouterr_cmd sh "load --auto $mod" $ans $tserr + +set tserr msg_load $mod err_prereq foo/1.0 +testouterr_cmd sh "load --no-auto $mod" ERR $tserr + +set tserr "$modlin +$mpre/$mod: + +module-whatis\t$mod +prereq-all\tfoo/1.0 bar/1.0 +$modlin" +testouterr_cmd_re sh "display $mod" OK $tserr + +setenv_loaded_module list foo/1.0 list $mp/foo/1.0 + +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0&bar/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$mp/bar/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:bar/1.0:$mod +lappend ans list set __MODULES_LMTAG bar/1.0&auto-loaded +set tserr msg_top_load $mod {} {bar/1.0} {} +testouterr_cmd sh "load --auto $mod" $ans $tserr + +setenv_loaded_module list bar/1.0 list $mp/bar/1.0 + +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0&bar/1.0 +lappend ans list set _LMFILES_ $mp/bar/1.0:$mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES bar/1.0:foo/1.0:$mod +lappend ans list set __MODULES_LMTAG foo/1.0&auto-loaded +set tserr msg_top_load $mod {} {foo/1.0} {} +testouterr_cmd sh "load --auto $mod" $ans $tserr + +setenv_loaded_module list foo/1.0 bar/1.0 $mod list $mp/foo/1.0 $mp/bar/1.0 $modfile +setenv_path_var __MODULES_LMTAG foo/1.0&auto-loaded bar/1.0&auto-loaded +setenv_path_var __MODULES_LMPREREQ $mod&foo/1.0&bar/1.0 + +set ans list +lappend ans list unset __MODULES_LMPREREQ +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list unset __MODULES_LMTAG +set tserr msg_top_unload $mod {} {bar/1.0 foo/1.0} {} +testouterr_cmd sh "unload --auto $mod" $ans $tserr + +unsetenv_loaded_module +unsetenv_path_var __MODULES_LMTAG +unsetenv_path_var __MODULES_LMPREREQ + + +if {!is_config_locked implicit_default} { + setenv_var TESTSUITE_LCOMPAT prall3 + setenv_var MODULES_ADVANCED_VERSION_SPEC 1 + setenv_var MODULES_EXTENDED_DEFAULT 1 + setenv_var MODULES_IMPLICIT_DEFAULT 1 + + set ans list + lappend ans list set __MODULES_LMPREREQ $mod&foo@1&bar@<1 + lappend ans list set _LMFILES_ $mp/foo/1.0:$mp/bar/1.0:$modfile + lappend ans list set LOADEDMODULES foo/1.0:bar/1.0:$mod + lappend ans list set __MODULES_LMTAG foo/1.0&auto-loaded:bar/1.0&auto-loaded + set tserr msg_top_load $mod {} {foo/1.0 bar/1.0} {} + testouterr_cmd sh "load --auto $mod" $ans $tserr + + setenv_var MODULES_EXTENDED_DEFAULT 0 + unsetenv_var MODULES_ADVANCED_VERSION_SPEC + unsetenv_var MODULES_IMPLICIT_DEFAULT +} + + +setenv_var TESTSUITE_LCOMPAT prall4 + +set tserr msg_load foo/0.err msg_moderr {invalid command name "foo"} foo $mp/foo/0.err 2\n\n +append tserr msg_load $mod err_reqlo foo/0.err +testouterr_cmd sh "load --auto $mod" ERR $tserr + + +setenv_var TESTSUITE_LCOMPAT prall5 + +set tserr msg_load $mod $err_path'unk/1.0' err_reqlo unk/1.0 +testouterr_cmd sh "load --auto $mod" ERR $tserr + + +setenv_var TESTSUITE_LCOMPAT prall6 + +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 23} +set tserr escre msg_load $mod msg_moderr {wrong # args: should be "prereq-all ?--tag? ?taglist? modulefile ?...?"} {prereq-all<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + + +setenv_var TESTSUITE_LCOMPAT prallrc1 + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list ERR +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 3 : 36} +set tserr escre msg_moderr {invalid command name "prereq-all"} {prereq-all foo/1.0<EXM>} $mp/lcompat/.modulerc $ln { } +testouterr_cmd_re sh "load $mod" $ans $tserr + +set tserr $mp:\n$mod +testouterr_cmd sh "avail -t $mod" OK $tserr + +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re sh "whatis $mod" OK $tserr + + +# +# Cleanup +# + +reset_test_env
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/517-always-load.exp
Added
@@ -0,0 +1,288 @@ +############################################################################## +# Modules Revision 3.0 +# Providing a flexible user environment +# +# File: modules.50-cmds/%M% +# Revision: %I% +# First Edition: 2021/12/16 +# Last Mod.: %U%, %G% +# +# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr +# +# Description: Testuite testsequence +# Command: load, unload, display, help, test, whatis, refresh, avail +# Modulefiles: lcompat +# Sub-Command: +# +# Comment: %C{ +# Test always-load modulefile command +# }C% +# +############################################################################## + +skip_if_quick_mode + +set mp $modpath.3 +set mpre $modpathre.3 +setenv_path_var MODULEPATH $mp + +set mod lcompat/1.7 +set modfile $mp/$mod +set modfilere $mpre/$mod + + +setenv_var TESTSUITE_LCOMPAT allo1 + +# load +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMTAG foo/1.0&keep-loaded&auto-loaded +set tserr msg_top_load $mod {} foo/1.0 {} +testouterr_cmd sh "load --auto $mod" $ans $tserr +testouterr_cmd sh "load --no-auto $mod" $ans $tserr + +setenv_loaded_module list foo/1.0 list $mp/foo/1.0 + +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +lappend ans list set __MODULES_LMTAG foo/1.0&keep-loaded +testouterr_cmd sh "load --auto $mod" $ans {} + +setenv_loaded_module list $mod list $modfile + +# unload +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +setenv_loaded_module list foo/1.0 $mod list $mp/foo/1.0 $modfile +setenv_path_var __MODULES_LMTAG foo/1.0&keep-loaded&auto-loaded +setenv_path_var __MODULES_LMPREREQ $mod&foo/1.0 + +set ans list +lappend ans list unset __MODULES_LMPREREQ +lappend ans list set _LMFILES_ $mp/foo/1.0 +lappend ans list set LOADEDMODULES foo/1.0 +set tserr msg_top_unload $mod {} foo/1.0 {} +testouterr_cmd sh "unload --auto $mod" $ans {} +testouterr_cmd sh "unload --no-auto $mod" $ans {} + +# refresh +testouterr_cmd sh {refresh} OK {} + +unsetenv_loaded_module +unsetenv_path_var __MODULES_LMTAG +unsetenv_path_var __MODULES_LMPREREQ + +# whatis +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re sh "whatis $mod" OK $tserr + +# display +set tserr "$modlin +$mpre/$mod: + +module-whatis\t$mod +always-load\tfoo/1.0 +$modlin" +testouterr_cmd_re sh "display $mod" OK $tserr + +# help +set tserr "$modlin +Module Specific Help for $mpre/$mod: + +$warn_msgs: Unable to find ModulesHelp in $modfilere. +$modlin" +testouterr_cmd_re sh "help $mod" OK $tserr + +# test +set tserr "$modlin +Module Specific Test for $mpre/$mod: + +$warn_msgs: Unable to find ModulesTest in $modfilere. +$modlin" +testouterr_cmd_re sh "test $mod" OK $tserr + + +setenv_var TESTSUITE_LCOMPAT allo2 + +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0&bar/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$mp/bar/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:bar/1.0:$mod +lappend ans list set __MODULES_LMTAG foo/1.0&keep-loaded&auto-loaded:bar/1.0&keep-loaded&auto-loaded +set tserr msg_top_load $mod {} {foo/1.0 bar/1.0} {} +testouterr_cmd sh "load --auto $mod" $ans $tserr +testouterr_cmd sh "load --no-auto $mod" $ans $tserr + +set tserr "$modlin +$mpre/$mod: + +module-whatis\t$mod +always-load\tfoo/1.0 bar/1.0 +$modlin" +testouterr_cmd_re sh "display $mod" OK $tserr + +setenv_loaded_module list foo/1.0 list $mp/foo/1.0 + +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0&bar/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$mp/bar/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:bar/1.0:$mod +lappend ans list set __MODULES_LMTAG foo/1.0&keep-loaded:bar/1.0&keep-loaded&auto-loaded +set tserr msg_top_load $mod {} {bar/1.0} {} +testouterr_cmd sh "load --auto $mod" $ans $tserr +testouterr_cmd sh "load --no-auto $mod" $ans $tserr + +setenv_loaded_module list bar/1.0 list $mp/bar/1.0 + +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0&bar/1.0 +lappend ans list set _LMFILES_ $mp/bar/1.0:$mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES bar/1.0:foo/1.0:$mod +lappend ans list set __MODULES_LMTAG foo/1.0&keep-loaded&auto-loaded:bar/1.0&keep-loaded +set tserr msg_top_load $mod {} {foo/1.0} {} +testouterr_cmd sh "load --auto $mod" $ans $tserr +testouterr_cmd sh "load --no-auto $mod" $ans $tserr + +setenv_loaded_module list foo/1.0 bar/1.0 $mod list $mp/foo/1.0 $mp/bar/1.0 $modfile +setenv_path_var __MODULES_LMTAG foo/1.0&keep-loaded&auto-loaded bar/1.0&keep-loaded&auto-loaded +setenv_path_var __MODULES_LMPREREQ $mod&foo/1.0&bar/1.0 + +set ans list +lappend ans list unset __MODULES_LMPREREQ +lappend ans list set _LMFILES_ $mp/foo/1.0:$mp/bar/1.0 +lappend ans list set LOADEDMODULES foo/1.0:bar/1.0 +testouterr_cmd sh "unload --auto $mod" $ans {} +testouterr_cmd sh "unload --no-auto $mod" $ans {} + +# second requirement loaded afterward, DepRe on depend module in auto mode +setenv_loaded_module list foo/1.0 $mod list $mp/foo/1.0 $modfile +setenv_path_var __MODULES_LMTAG foo/1.0&keep-loaded&auto-loaded +setenv_path_var __MODULES_LMPREREQ $mod&foo/1.0&bar/1.0 + +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0&bar/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$mp/bar/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:bar/1.0:$mod +lappend ans list set __MODULES_LMTAG foo/1.0&keep-loaded&auto-loaded:bar/1.0&keep-loaded +set tserr msg_top_load {bar/1.0 <kL>} {} {} $mod +testouterr_cmd sh "load --auto bar/1.0" $ans $tserr + +set ans list +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile:$mp/bar/1.0 +lappend ans list set LOADEDMODULES foo/1.0:$mod:bar/1.0 +testouterr_cmd sh "load --no-auto bar/1.0" $ans {} + +# first requirement loaded afterward, DepRe on depend module in auto mode +setenv_loaded_module list bar/1.0 $mod list $mp/bar/1.0 $modfile +setenv_path_var __MODULES_LMTAG bar/1.0&keep-loaded&auto-loaded +setenv_path_var __MODULES_LMPREREQ $mod&foo/1.0&bar/1.0 + +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo/1.0&bar/1.0 +lappend ans list set _LMFILES_ $mp/bar/1.0:$mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES bar/1.0:foo/1.0:$mod +lappend ans list set __MODULES_LMTAG bar/1.0&keep-loaded&auto-loaded:foo/1.0&keep-loaded +set tserr msg_top_load {foo/1.0 <kL>} {} {} $mod +testouterr_cmd sh "load --auto foo/1.0" $ans $tserr + +set ans list +lappend ans list set _LMFILES_ $mp/bar/1.0:$modfile:$mp/foo/1.0 +lappend ans list set LOADEDMODULES bar/1.0:$mod:foo/1.0 +testouterr_cmd sh "load --no-auto foo/1.0" $ans {} + +unsetenv_loaded_module +unsetenv_path_var __MODULES_LMTAG +unsetenv_path_var __MODULES_LMPREREQ + + +if {!is_config_locked implicit_default} { + setenv_var TESTSUITE_LCOMPAT allo3 + setenv_var MODULES_ADVANCED_VERSION_SPEC 1 + setenv_var MODULES_EXTENDED_DEFAULT 1 + setenv_var MODULES_IMPLICIT_DEFAULT 1 + + set ans list + lappend ans list set __MODULES_LMPREREQ $mod&foo@1&bar@<1 + lappend ans list set _LMFILES_ $mp/foo/1.0:$mp/bar/1.0:$modfile + lappend ans list set LOADEDMODULES foo/1.0:bar/1.0:$mod + lappend ans list set __MODULES_LMTAG foo/1.0&keep-loaded&auto-loaded:bar/1.0&keep-loaded&auto-loaded + set tserr msg_top_load $mod {} {foo/1.0 bar/1.0} {} + testouterr_cmd sh "load --auto $mod" $ans $tserr + + setenv_var MODULES_EXTENDED_DEFAULT 0 + unsetenv_var MODULES_ADVANCED_VERSION_SPEC + unsetenv_var MODULES_IMPLICIT_DEFAULT +} + + +setenv_var TESTSUITE_LCOMPAT allo4 + +set tserr msg_load foo/0.err msg_moderr {invalid command name "foo"} foo $mp/foo/0.err 2\n\n +append tserr msg_load $mod err_reqlo foo/0.err +testouterr_cmd sh "load --auto $mod" ERR $tserr + + +setenv_var TESTSUITE_LCOMPAT allo5 + +set tserr msg_load $mod $err_path'unk/1.0' err_reqlo unk/1.0 +testouterr_cmd sh "load --auto $mod" ERR $tserr + + +setenv_var TESTSUITE_LCOMPAT allo6 + +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 23} +set tserr escre msg_load $mod msg_moderr {wrong # args: should be "always-load ?--tag? ?taglist? modulefile ?...?"} {always-load<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + + +# second requirement loaded afterward, DepRe on depend module in auto mode +# requirements expressed as generic module names +setenv_var TESTSUITE_LCOMPAT allo7 +setenv_loaded_module list foo/1.0 $mod list $mp/foo/1.0 $modfile +setenv_path_var __MODULES_LMTAG foo/1.0&keep-loaded +setenv_path_var __MODULES_LMPREREQ $mod&foo&bar + +set ans list +lappend ans list set __MODULES_LMPREREQ $mod&foo&bar +lappend ans list set _LMFILES_ $mp/foo/1.0:$mp/bar/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:bar/1.0:$mod +lappend ans list set __MODULES_LMTAG foo/1.0&keep-loaded:bar/1.0&keep-loaded +set tserr msg_top_load {bar/1.0 <kL>} {} {} $mod +testouterr_cmd sh "load --auto bar/1.0" $ans $tserr + +unsetenv_loaded_module +unsetenv_path_var __MODULES_LMTAG +unsetenv_path_var __MODULES_LMPREREQ + + +setenv_var TESTSUITE_LCOMPAT allorc1 + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list ERR +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 3 : 39} +set tserr escre msg_moderr {invalid command name "always-load"} {always-load foo/1.0<EXM>} $mp/lcompat/.modulerc $ln { } +testouterr_cmd_re sh "load $mod" $ans $tserr + +set tserr $mp:\n$mod +testouterr_cmd sh "avail -t $mod" OK $tserr + +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re sh "whatis $mod" OK $tserr + + +# +# Cleanup +# + +reset_test_env
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/518-load-any.exp
Added
@@ -0,0 +1,578 @@ +############################################################################## +# Modules Revision 3.0 +# Providing a flexible user environment +# +# File: modules.50-cmds/%M% +# Revision: %I% +# First Edition: 2021/12/20 +# Last Mod.: %U%, %G% +# +# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr +# +# Description: Testuite testsequence +# Command: load-any +# Modulefiles: loadany +# Sub-Command: +# +# Comment: %C{ +# Test load-any sub-command +# }C% +# +############################################################################## + +set mp $modpath.3 +set mpre $modpathre.3 +setenv_path_var MODULEPATH $mp + +setenv_var MODULES_ADVANCED_VERSION_SPEC 0 + + +# +# test from command-line +# + +# regular load +set ans list +lappend ans list set _LMFILES_ $mp/loadany/1.0 +lappend ans list set LOADEDMODULES loadany/1.0 +testouterr_cmd sh {load-any loadany/1.0} $ans {} +testouterr_cmd sh {add-any loadany/1.0} $ans {} + +# regular then extra module to load +testouterr_cmd sh {add-any loadany/1.0 foo/1.0} $ans {} + +skip_if_quick_mode + +# unknown module +testouterr_cmd sh {load-any unk/1.0} ERR $err_nomodloaded +testouterr_cmd sh {add-any unk/1.0} ERR $err_nomodloaded +# verbose mode +testouterr_cmd sh {load-any -v unk/1.0} ERR $err_nomodloaded + +# unknown module then known one +testouterr_cmd sh {load-any unk/1.0 loadany/1.0} $ans {} +testouterr_cmd sh {load-any -v unk/1.0 loadany/1.0} $ans msg_load loadany/1.0 + +# already loaded +setenv_loaded_module list loadany/1.0 list $mp/loadany/1.0 +testouterr_cmd sh {load-any loadany/1.0} OK {} +testouterr_cmd sh {add-any -v loadany/1.0} OK {} + +# already loaded then other module +testouterr_cmd sh {load-any loadany/1.0 foo/1.0} OK {} + +# other module then already loaded module +set ans2 list +lappend ans2 list set _LMFILES_ $mp/loadany/1.0:$mp/foo/1.0 +lappend ans2 list set LOADEDMODULES loadany/1.0:foo/1.0 +testouterr_cmd sh {load-any foo/1.0 loadany/1.0} $ans2 {} + +unsetenv_loaded_module + +# ml +testouterr_cmd sh {ml load-any loadany/1.0 foo/1.0} $ans {} +testouterr_cmd sh {ml add-any loadany/1.0} $ans {} +testouterr_cmd sh {ml add-any unk/1.0} ERR $err_nomodloaded +testouterr_cmd sh {ml load-any -v unk/1.0 loadany/1.0} $ans msg_load loadany/1.0 + +# hard-hidden module +setenv_var TESTSUITE_LOADANY hide1 +testouterr_cmd sh {load-any loadany/1.0} ERR $err_nomodloaded +testouterr_cmd sh {add-any -v loadany/1.0} ERR $err_nomodloaded + +# forbidden module +setenv_var TESTSUITE_LOADANY forbid1 +testouterr_cmd sh {add-any loadany/1.0} ERR $err_nomodloaded +testouterr_cmd sh {load-any -v loadany/1.0} ERR $err_nomodloaded + +# break during evaluation +setenv_var TESTSUITE_LOADANY break1 +set tserr msg_load loadany/1.0 $err_evalabort +testouterr_cmd sh {add-any loadany/1.0} ERR $tserr +testouterr_cmd sh {ml add-any loadany/1.0} ERR $tserr + +# break then valid module +set ans3 list +lappend ans3 list set _LMFILES_ $mp/foo/1.0 +lappend ans3 list set LOADEDMODULES foo/1.0 +lappend ans3 list ERR +testouterr_cmd sh {add-any loadany/1.0 foo/1.0} $ans3 $tserr +testouterr_cmd sh {ml load-any loadany/1.0 foo/1.0} $ans3 $tserr + +# erroneous evaluation +setenv_var TESTSUITE_LOADANY bad1 +set ln expr {cmpversion $tclsh_version 8.5 < 1 ? {2} : {8}} +set tserr escre msg_load loadany/1.0 msg_moderr {invalid command name "unk"} {unk<EXM>} $mp/loadany/1.0 $ln +testouterr_cmd_re sh {add-any loadany/1.0} ERR $tserr +testouterr_cmd_re sh {ml load-any loadany/1.0} ERR $tserr + +# erroneous eval then valid module +testouterr_cmd_re sh {add-any loadany/1.0 foo/1.0} $ans3 $tserr +testouterr_cmd_re sh {ml add-any loadany/1.0 foo/1.0} $ans3 $tserr + +# load under load-any +setenv_var TESTSUITE_LOADANY subload1 +set tserr msg_load loadany/1.0 $err_path'unk/1.0' err_reqlo unk/1.0 +testouterr_cmd sh {load-any loadany/1.0} ERR $tserr + +# load under load-any then valid module +testouterr_cmd_re sh {add-any loadany/1.0 foo/1.0} $ans3 $tserr + +setenv_var TESTSUITE_LOADANY subload2 +set ans list +lappend ans list set __MODULES_LMPREREQ loadany/1.0&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$mp/loadany/1.0 +lappend ans list set LOADEDMODULES foo/1.0:loadany/1.0 +lappend ans list set __MODULES_LMTAG foo/1.0&auto-loaded +set tserr msg_top_load loadany/1.0 {} {foo/1.0} {} +testouterr_cmd_re sh {load-any loadany/1.0} $ans $tserr + +testouterr_cmd_re sh {load-any loadany/1.0 bar/1.0} $ans $tserr + + +# +# test from modulefile +# + +# test for both enabled and disabled auto_handling mode +foreach auto_handling {0 1} { +setenv_var MODULES_AUTO_HANDLING $auto_handling + +# regular load +setenv_var TESTSUITE_LOADANY regular1 +set ans list +lappend ans list set TS1 ok +lappend ans list set __MODULES_LMPREREQ loadany/2.0&loadany/1.0 +lappend ans list set _LMFILES_ $mp/loadany/1.0:$mp/loadany/2.0 +lappend ans list set LOADEDMODULES loadany/1.0:loadany/2.0 +lappend ans list set __MODULES_LMTAG loadany/1.0&auto-loaded +set tserr msg_top_load loadany/2.0 {} loadany/1.0 {} +testouterr_cmd_re sh {load loadany/2.0} $ans $tserr +testouterr_cmd_re sh {load-any loadany/2.0} $ans $tserr + +# already loaded +setenv_loaded_module list loadany/1.0 list $mp/loadany/1.0 +set ans list +lappend ans list set TS1 ok +lappend ans list set __MODULES_LMPREREQ loadany/2.0&loadany/1.0 +lappend ans list set _LMFILES_ $mp/loadany/1.0:$mp/loadany/2.0 +lappend ans list set LOADEDMODULES loadany/1.0:loadany/2.0 +testouterr_cmd_re sh {load loadany/2.0} $ans {} +testouterr_cmd_re sh {load-any loadany/2.0} $ans {} +unsetenv_loaded_module + + +# regular unload (autoloaded load-any) +setenv_loaded_module list loadany/1.0 loadany/2.0 list $mp/loadany/1.0 $mp/loadany/2.0 list loadany/1.0 +setenv_var __MODULES_LMPREREQ loadany/2.0&loadany/1.0 +if {$auto_handling} { + set ans list + lappend ans list unset TS1 + lappend ans list unset __MODULES_LMPREREQ + lappend ans list unset _LMFILES_ + lappend ans list unset LOADEDMODULES + lappend ans list unset __MODULES_LMTAG +} else { + set ans list + lappend ans list unset TS1 + lappend ans list unset __MODULES_LMPREREQ + lappend ans list unset _LMFILES_ + lappend ans list unset LOADEDMODULES + lappend ans list unset __MODULES_LMTAG +} +set tserr msg_top_unload loadany/2.0 {} loadany/1.0 {} +testouterr_cmd sh {unload loadany/2.0} $ans $tserr + +# regular unload (non-autoloaded load-any) +unsetenv_var __MODULES_LMTAG +set ans list +lappend ans list unset TS1 +lappend ans list unset __MODULES_LMPREREQ +lappend ans list set _LMFILES_ $mp/loadany/1.0 +lappend ans list set LOADEDMODULES loadany/1.0 +testouterr_cmd_re sh {unload loadany/2.0} $ans {} + +# regular unload (with load-anyed sub-module not loaded) +setenv_loaded_module list loadany/2.0 list $mp/loadany/2.0 +setenv_var __MODULES_LMPREREQ loadany/2.0&loadany/1.0 +set ans list +lappend ans list unset TS1 +lappend ans list unset __MODULES_LMPREREQ +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd_re sh {unload loadany/2.0} $ans {} +unsetenv_var __MODULES_LMPREREQ +unsetenv_loaded_module + +# unknown module +setenv_var TESTSUITE_LOADANY unk1 +set tserr msg_load loadany/2.0 err_reqlo unk/1.0 +testouterr_cmd sh {load loadany/2.0} ERR $tserr +testouterr_cmd sh {load-any loadany/2.0} ERR $tserr + +# unload with unknown module +setenv_loaded_module list loadany/2.0 list $mp/loadany/2.0 +set ans list +lappend ans list unset TS1 +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd_re sh {unload loadany/2.0} $ans {} +testouterr_cmd_re sh {unload -v loadany/2.0} $ans msg_unload loadany/2.0 +unsetenv_loaded_module + +# hard-hidden module +setenv_var TESTSUITE_LOADANY hide1 +set tserr msg_load loadany/2.0 err_reqlo loadany/1.0 +testouterr_cmd sh {load loadany/2.0} ERR $tserr + +# forbidden module +setenv_var TESTSUITE_LOADANY forbid1 +testouterr_cmd sh {load loadany/2.0} ERR $tserr + +# break during evaluation +setenv_var TESTSUITE_LOADANY break1 +set tserr msg_load loadany/1.0 $err_evalabort\n\nmsg_load loadany/2.0 err_reqlo loadany/1.0 +testouterr_cmd sh {load loadany/2.0} ERR $tserr +testouterr_cmd sh {load-any loadany/2.0} ERR $tserr + +# erroneous evaluation +setenv_var TESTSUITE_LOADANY bad1 +set ln expr {cmpversion $tclsh_version 8.5 < 1 ? {2} : {8}} +set tserr escre msg_load loadany/1.0 msg_moderr {invalid command name "unk"} {unk<EXM>} $mp/loadany/1.0 $ln\n\nmsg_load loadany/2.0 err_reqlo loadany/1.0 +testouterr_cmd_re sh {load loadany/2.0} ERR $tserr +testouterr_cmd_re sh {load-any loadany/2.0} ERR $tserr + +# load under load-any +setenv_var TESTSUITE_LOADANY subload1 +set tserr msg_load loadany/1.0 $err_path'unk/1.0' err_reqmis unk/1.0\n\nmsg_load loadany/2.0 err_reqlo unk/1.0 err_reqlo loadany/1.0 +testouterr_cmd sh {load loadany/2.0} ERR $tserr +testouterr_cmd sh {load-any loadany/2.0} ERR $tserr + +setenv_var TESTSUITE_LOADANY subload2 +set ans list +lappend ans list set TS1 ok +lappend ans list set __MODULES_LMPREREQ loadany/1.0&foo/1.0:loadany/2.0&loadany/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$mp/loadany/1.0:$mp/loadany/2.0 +lappend ans list set LOADEDMODULES foo/1.0:loadany/1.0:loadany/2.0 +lappend ans list set __MODULES_LMTAG foo/1.0&auto-loaded:loadany/1.0&auto-loaded +set tserr msg_top_load loadany/2.0 {} {foo/1.0 loadany/1.0} {} +testouterr_cmd_re sh {load loadany/2.0} $ans $tserr + +# load-any attempt within catch +setenv_var TESTSUITE_LOADANY catch1 +set ans list +lappend ans list set TS1 ok +lappend ans list set __MODULES_LMPREREQ loadany/2.0&unk/1.0 +lappend ans list set _LMFILES_ $mp/loadany/2.0 +lappend ans list set LOADEDMODULES loadany/2.0 +testouterr_cmd sh {load loadany/2.0} $ans {} + +setenv_var TESTSUITE_LOADANY catch2 +set ans list +lappend ans list set TS1 ok +lappend ans list set __MODULES_LMPREREQ loadany/2.0&loadany/1.0 +lappend ans list set _LMFILES_ $mp/loadany/1.0:$mp/loadany/2.0 +lappend ans list set LOADEDMODULES loadany/1.0:loadany/2.0 +lappend ans list set __MODULES_LMTAG loadany/1.0&auto-loaded +set tserr msg_top_load loadany/2.0 {} loadany/1.0 {} +testouterr_cmd_re sh {load loadany/2.0} $ans $tserr + +setenv_var TESTSUITE_LOADANY catch3 +set ans list +lappend ans list set TS1 ok +lappend ans list set __MODULES_LMPREREQ loadany/2.0&loadany/1.0 +lappend ans list set _LMFILES_ $mp/loadany/2.0 +lappend ans list set LOADEDMODULES loadany/2.0 +lappend ans list ERR +set tserr msg_load loadany/1.0 $err_evalabort +testouterr_cmd sh {load loadany/2.0} $ans $tserr + +setenv_var TESTSUITE_LOADANY catch4 +set ln expr {cmpversion $tclsh_version 8.5 < 1 ? {2} : {8}} +set tserr escre msg_load loadany/1.0 msg_moderr {invalid command name "unk"} {unk<EXM>} $mp/loadany/1.0 $ln +testouterr_cmd_re sh {load loadany/2.0} $ans $tserr + +# multiple argument passed to load-any +setenv_var TESTSUITE_LOADANY multi1 +set ans list +lappend ans list set TS1 ok +lappend ans list set __MODULES_LMPREREQ loadany/2.0&unk/1.0|loadany/1.0 +lappend ans list set _LMFILES_ $mp/loadany/1.0:$mp/loadany/2.0 +lappend ans list set LOADEDMODULES loadany/1.0:loadany/2.0 +lappend ans list set __MODULES_LMTAG loadany/1.0&auto-loaded +set tserr msg_top_load loadany/2.0 {} loadany/1.0 {} +testouterr_cmd_re sh {load loadany/2.0} $ans $tserr + +setenv_var TESTSUITE_LOADANY multi2 +set ans list +lappend ans list set TS1 ok +lappend ans list set __MODULES_LMPREREQ loadany/2.0&loadany/1.0|foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$mp/loadany/2.0 +lappend ans list set LOADEDMODULES foo/1.0:loadany/2.0 +lappend ans list set __MODULES_LMTAG foo/1.0&auto-loaded +lappend ans list ERR +# load issue with loadany/1.0 is hidden and next requirement (foo/1.0) is loaded +set tserr msg_top_load loadany/2.0 {} foo/1.0 {} +testouterr_cmd sh {load loadany/2.0} $ans $tserr + +setenv_var TESTSUITE_LOADANY multi3 +# load issue with loadany/1.0 is hidden and next requirement (foo/1.0) is loaded +testouterr_cmd sh {load loadany/2.0} $ans $tserr + + +setenv_loaded_module list loadany/1.0 list $mp/loadany/1.0 + +# test load-any over unknown modfile then already loaded module +setenv_var TESTSUITE_LOADANY multi1 +set ans list +lappend ans list set TS1 ok +lappend ans list set __MODULES_LMPREREQ loadany/2.0&unk/1.0|loadany/1.0 +lappend ans list set _LMFILES_ $mp/loadany/1.0:$mp/loadany/2.0 +lappend ans list set LOADEDMODULES loadany/1.0:loadany/2.0 +testouterr_cmd sh {load loadany/2.0} $ans {} + +# test load-any over already loaded module then valid module +setenv_var TESTSUITE_LOADANY multi4 +set ans list +lappend ans list set TS1 ok +lappend ans list set __MODULES_LMPREREQ loadany/2.0&loadany/1.0|foo/1.0 +lappend ans list set _LMFILES_ $mp/loadany/1.0:$mp/loadany/2.0 +lappend ans list set LOADEDMODULES loadany/1.0:loadany/2.0 +testouterr_cmd sh {load loadany/2.0} $ans {} + +setenv_loaded_module list foo/1.0 list $mp/foo/1.0 + +# test load-any over breaking modfile then already loaded module +setenv_var TESTSUITE_LOADANY multi2 +set ans list +lappend ans list set TS1 ok +lappend ans list set __MODULES_LMPREREQ loadany/2.0&loadany/1.0|foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$mp/loadany/2.0 +lappend ans list set LOADEDMODULES foo/1.0:loadany/2.0 +testouterr_cmd sh {load loadany/2.0} $ans {} + +# test load-any over erroneouds modfile then already loaded module +setenv_var TESTSUITE_LOADANY multi3 +testouterr_cmd sh {load loadany/2.0} $ans {} + +# test load-any over valid module then already loaded module +setenv_var TESTSUITE_LOADANY multi4 +testouterr_cmd sh {load loadany/2.0} $ans {} + + +# first module in list loaded +setenv_var TESTSUITE_LOADANY multi4 +setenv_loaded_module list loadany/1.0 loadany/2.0 list $mp/loadany/1.0 $mp/loadany/2.0 +setenv_var __MODULES_LMPREREQ loadany/2.0&loadany/1.0|foo/1.0 +setenv_var __MODULES_LMTAG loadany/1.0&auto-loaded +set ans list +lappend ans list unset TS1 +lappend ans list unset __MODULES_LMPREREQ +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list unset __MODULES_LMTAG +set tserr msg_top_unload loadany/2.0 {} {loadany/1.0} {} +testouterr_cmd sh {unload loadany/2.0} $ans $tserr + +setenv_loaded_module list loadany/1.0 loadany/2.0 bar/1.0 list $mp/loadany/1.0 $mp/loadany/2.0 $mp/bar/1.0 +setenv_var __MODULES_LMPREREQ loadany/2.0&loadany/1.0|foo/1.0:bar/1.0&loadany/1.0 +setenv_var __MODULES_LMTAG loadany/1.0&auto-loaded +set ans list +lappend ans list unset TS1 +lappend ans list set __MODULES_LMPREREQ bar/1.0&loadany/1.0 +lappend ans list set _LMFILES_ $mp/loadany/1.0:$mp/bar/1.0 +lappend ans list set LOADEDMODULES loadany/1.0:bar/1.0 +testouterr_cmd sh {unload loadany/2.0} $ans {} + +# second module in list loaded +setenv_loaded_module list foo/1.0 loadany/2.0 list $mp/foo/1.0 $mp/loadany/2.0 +setenv_var __MODULES_LMPREREQ loadany/2.0&loadany/1.0|foo/1.0 +setenv_var __MODULES_LMTAG foo/1.0&auto-loaded +set ans list +lappend ans list unset TS1 +lappend ans list unset __MODULES_LMPREREQ +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list unset __MODULES_LMTAG +set tserr msg_top_unload loadany/2.0 {} {foo/1.0} {} +testouterr_cmd sh {unload loadany/2.0} $ans $tserr + +setenv_loaded_module list foo/1.0 loadany/2.0 bar/1.0 list $mp/foo/1.0 $mp/loadany/2.0 $mp/bar/1.0 +setenv_var __MODULES_LMPREREQ loadany/2.0&loadany/1.0|foo/1.0:bar/1.0&foo/1.0 +setenv_var __MODULES_LMTAG foo/1.0&auto-loaded +set ans list +lappend ans list unset TS1 +lappend ans list set __MODULES_LMPREREQ bar/1.0&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$mp/bar/1.0 +lappend ans list set LOADEDMODULES foo/1.0:bar/1.0 +testouterr_cmd sh {unload loadany/2.0} $ans {} + +# both module in list loaded +setenv_loaded_module list loadany/1.0 foo/1.0 loadany/2.0 list $mp/loadany/1.0 $mp/foo/1.0 $mp/loadany/2.0 +setenv_var __MODULES_LMPREREQ loadany/2.0&loadany/1.0|foo/1.0 +setenv_var __MODULES_LMTAG loadany/1.0&auto-loaded:foo/1.0&auto-loaded +set ans list +lappend ans list unset TS1 +lappend ans list unset __MODULES_LMPREREQ +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list unset __MODULES_LMTAG +set tserr msg_top_unload loadany/2.0 {} {foo/1.0 loadany/1.0} {} +testouterr_cmd sh {unload loadany/2.0} $ans $tserr + +setenv_loaded_module list loadany/1.0 foo/1.0 loadany/2.0 bar/1.0 list $mp/loadany/1.0 $mp/foo/1.0 $mp/loadany/2.0 $mp/bar/1.0 +setenv_var __MODULES_LMPREREQ loadany/2.0&loadany/1.0|foo/1.0:bar/1.0&foo/1.0 +setenv_var __MODULES_LMTAG loadany/1.0&auto-loaded:foo/1.0&auto-loaded +set ans list +lappend ans list unset TS1 +lappend ans list set __MODULES_LMPREREQ bar/1.0&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$mp/bar/1.0 +lappend ans list set LOADEDMODULES foo/1.0:bar/1.0 +lappend ans list set __MODULES_LMTAG foo/1.0&auto-loaded +set tserr msg_top_unload loadany/2.0 {} {loadany/1.0} {} +testouterr_cmd sh {unload loadany/2.0} $ans $tserr + +setenv_var __MODULES_LMTAG foo/1.0&auto-loaded +set ans list +lappend ans list unset TS1 +lappend ans list set __MODULES_LMPREREQ bar/1.0&foo/1.0 +lappend ans list set _LMFILES_ $mp/loadany/1.0:$mp/foo/1.0:$mp/bar/1.0 +lappend ans list set LOADEDMODULES loadany/1.0:foo/1.0:bar/1.0 +testouterr_cmd sh {unload loadany/2.0} $ans {} + +unsetenv_loaded_module +unsetenv_var __MODULES_LMPREREQ +unsetenv_var __MODULES_LMTAG + +} + + +# +# test from sourced modulefile +# + +# regular load +setenv_var TESTSUITE_LOADANY regular1 +set ans list +lappend ans list set TS1 ok +lappend ans list set _LMFILES_ $mp/loadany/1.0 +lappend ans list set LOADEDMODULES loadany/1.0 +set tserr msg_load loadany/1.0 +testouterr_cmd_re sh "source $mp/loadany/2.0" $ans $tserr + +# already loaded +setenv_loaded_module list loadany/1.0 list $mp/loadany/1.0 +set ans list +lappend ans list set TS1 ok +testouterr_cmd_re sh "source $mp/loadany/2.0" $ans {} +unsetenv_loaded_module + +# unknown module +setenv_var TESTSUITE_LOADANY unk1 +set ln expr {cmpversion $tclsh_version 8.5 < 1 ? {2} : {5}} +set tserr escre msg_moderr $msg_nomodloaded {module load-any unk/1.0<EXM>} $mp/loadany/2.0 $ln { } +testouterr_cmd_re sh "source $mp/loadany/2.0" ERR $tserr + +# hard-hidden module +setenv_var TESTSUITE_LOADANY hide1 +set ln expr {cmpversion $tclsh_version 8.5 < 1 ? {2} : {11}} +set tserr escre msg_moderr $msg_nomodloaded {module load-any loadany/1.0<EXM>} $mp/loadany/2.0 $ln { } +testouterr_cmd_re sh "source $mp/loadany/2.0" ERR $tserr + +# forbidden module +setenv_var TESTSUITE_LOADANY forbid1 +testouterr_cmd_re sh "source $mp/loadany/2.0" ERR $tserr + +# break during evaluation +setenv_var TESTSUITE_LOADANY break1 +set tserr msg_load loadany/1.0 $err_evalabort +testouterr_cmd sh "source $mp/loadany/2.0" ERR $tserr + +# erroneous evaluation +setenv_var TESTSUITE_LOADANY bad1 +set ln expr {cmpversion $tclsh_version 8.5 < 1 ? {2} : {8}} +set tserr escre msg_load loadany/1.0 msg_moderr {invalid command name "unk"} {unk<EXM>} $mp/loadany/1.0 $ln +testouterr_cmd_re sh "source $mp/loadany/2.0" ERR $tserr + +# load under load-any +setenv_var TESTSUITE_LOADANY subload1 +set tserr msg_load loadany/1.0 $err_path'unk/1.0' err_reqlo unk/1.0 +testouterr_cmd sh "source $mp/loadany/2.0" ERR $tserr + +setenv_var TESTSUITE_LOADANY subload2 +set ans list +lappend ans list set TS1 ok +lappend ans list set __MODULES_LMPREREQ loadany/1.0&foo/1.0 +lappend ans list set _LMFILES_ $mp/foo/1.0:$mp/loadany/1.0 +lappend ans list set LOADEDMODULES foo/1.0:loadany/1.0 +lappend ans list set __MODULES_LMTAG foo/1.0&auto-loaded +set tserr msg_top_load loadany/1.0 {} {foo/1.0} {} +testouterr_cmd_re sh "source $mp/loadany/2.0" $ans $tserr + +# load-any attempt within catch +setenv_var TESTSUITE_LOADANY catch1 +set ans list +lappend ans list set TS1 ok +testouterr_cmd sh "source $mp/loadany/2.0" $ans {} + +setenv_var TESTSUITE_LOADANY catch2 +set ans list +lappend ans list set TS1 ok +lappend ans list set _LMFILES_ $mp/loadany/1.0 +lappend ans list set LOADEDMODULES loadany/1.0 +set tserr msg_load loadany/1.0 +testouterr_cmd_re sh "source $mp/loadany/2.0" $ans $tserr + +setenv_var TESTSUITE_LOADANY catch3 +set ans list +lappend ans list set TS1 ok +lappend ans list ERR +set tserr msg_load loadany/1.0 $err_evalabort +testouterr_cmd sh "source $mp/loadany/2.0" $ans $tserr + +setenv_var TESTSUITE_LOADANY catch4 +set ln expr {cmpversion $tclsh_version 8.5 < 1 ? {2} : {8}} +set tserr escre msg_load loadany/1.0 msg_moderr {invalid command name "unk"} {unk<EXM>} $mp/loadany/1.0 $ln +testouterr_cmd_re sh "source $mp/loadany/2.0" $ans $tserr + +# multiple argument passed to load-any +setenv_var TESTSUITE_LOADANY multi1 +set ans list +lappend ans list set TS1 ok +lappend ans list set _LMFILES_ $mp/loadany/1.0 +lappend ans list set LOADEDMODULES loadany/1.0 +set tserr msg_load loadany/1.0 +testouterr_cmd_re sh "source $mp/loadany/2.0" $ans $tserr + +setenv_var TESTSUITE_LOADANY multi2 +set ans list +lappend ans list set _LMFILES_ $mp/foo/1.0 +lappend ans list set LOADEDMODULES foo/1.0 +lappend ans list ERR +set tserr msg_load loadany/1.0 $err_evalabort\n\nmsg_load foo/1.0 +testouterr_cmd sh "source $mp/loadany/2.0" $ans $tserr + +setenv_loaded_module list loadany/1.0 list $mp/loadany/1.0 + +# test load-any over unknown modfile then already loaded module +setenv_var TESTSUITE_LOADANY multi1 +set ans list +lappend ans list set TS1 ok +testouterr_cmd sh "source $mp/loadany/2.0" $ans {} + +setenv_loaded_module list foo/1.0 list $mp/foo/1.0 + +# test load-any over breaking modfile then already loaded module +setenv_var TESTSUITE_LOADANY multi3 +set ln expr {cmpversion $tclsh_version 8.5 < 1 ? {2} : {8}} +set tserr escre msg_load loadany/1.0 msg_moderr {invalid command name "unk"} {unk<EXM>} $mp/loadany/1.0 $ln +testouterr_cmd_re sh "source $mp/loadany/2.0" ERR $tserr + +unsetenv_loaded_module + + +# +# Cleanup +# + +reset_test_env
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/519-family.exp
Added
@@ -0,0 +1,253 @@ +############################################################################## +# Modules Revision 3.0 +# Providing a flexible user environment +# +# File: modules.50-cmds/%M% +# Revision: %I% +# First Edition: 2022/01/10 +# Last Mod.: %U%, %G% +# +# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr +# +# Description: Testuite testsequence +# Command: load, unload, display, help, test, whatis, refresh, avail +# Modulefiles: lcompat +# Sub-Command: +# +# Comment: %C{ +# Test family modulefile command +# }C% +# +############################################################################## + +set mp $modpath.3 +set mpre $modpathre.3 +setenv_path_var MODULEPATH $mp + +set mod lcompat/1.8 +set modname lcompat +set modfile $mp/$mod +set modfilere $mpre/$mod + +set flatmod flatlcompat +set flatmodfile $mp/$flatmod + +set deepmod $modname/1.9/1.9 +set deepmodname $modname/1.9 +set deepmodfile $mp/$deepmod + + +setenv_var TESTSUITE_LCOMPAT family1 + +# load +set ans list +lappend ans list set LMOD_FAMILY_FAM $modname +lappend ans list set __MODULES_LMALTNAME $mod&al|fam +lappend ans list set __MODULES_LMCONFLICT $mod&fam +lappend ans list set MODULES_FAMILY_FAM $modname +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "load $mod" $ans {} + +set tserr $err_path'fam' +testouterr_cmd sh {load fam} ERR $tserr + +skip_if_quick_mode + +# unload +setenv_loaded_module list $mod list $modfile +setenv_path_var __MODULES_LMALTNAME $mod&al|fam +setenv_path_var __MODULES_LMCONFLICT $mod&fam +setenv_var LMOD_FAMILY_FAM $mod +setenv_var MODULES_FAMILY_FAM $mod + +set ans list +lappend ans list unset LMOD_FAMILY_FAM +lappend ans list unset __MODULES_LMALTNAME +lappend ans list unset __MODULES_LMCONFLICT +lappend ans list unset MODULES_FAMILY_FAM +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} +testouterr_cmd sh "unload fam" $ans {} + +# refresh +testouterr_cmd sh {refresh} OK {} + +unsetenv_loaded_module +unsetenv_path_var __MODULES_LMALTNAME +unsetenv_path_var __MODULES_LMCONFLICT +unsetenv_var LMOD_FAMILY_FAM +unsetenv_var MODULES_FAMILY_FAM + +# test flat module name +set ans list +lappend ans list set LMOD_FAMILY_FAM $flatmod +lappend ans list set __MODULES_LMALTNAME $flatmod&al|fam +lappend ans list set __MODULES_LMCONFLICT $flatmod&fam +lappend ans list set MODULES_FAMILY_FAM $flatmod +lappend ans list set _LMFILES_ $flatmodfile +lappend ans list set LOADEDMODULES $flatmod +testouterr_cmd sh "load $flatmod" $ans {} + +setenv_loaded_module list $flatmod list $flatmodfile +setenv_path_var __MODULES_LMALTNAME $flatmod&al|fam +setenv_path_var __MODULES_LMCONFLICT $flatmod&fam +setenv_var LMOD_FAMILY_FAM $flatmod +setenv_var MODULES_FAMILY_FAM $flatmod + +set ans list +lappend ans list unset LMOD_FAMILY_FAM +lappend ans list unset __MODULES_LMALTNAME +lappend ans list unset __MODULES_LMCONFLICT +lappend ans list unset MODULES_FAMILY_FAM +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $flatmod" $ans {} +testouterr_cmd sh "unload fam" $ans {} + +unsetenv_loaded_module +unsetenv_path_var __MODULES_LMALTNAME +unsetenv_path_var __MODULES_LMCONFLICT +unsetenv_var LMOD_FAMILY_FAM +unsetenv_var MODULES_FAMILY_FAM + +# test deep module name +set ans list +lappend ans list set LMOD_FAMILY_FAM $deepmodname +lappend ans list set __MODULES_LMALTNAME $deepmod&al|fam +lappend ans list set __MODULES_LMCONFLICT $deepmod&fam +lappend ans list set MODULES_FAMILY_FAM $deepmodname +lappend ans list set _LMFILES_ $deepmodfile +lappend ans list set LOADEDMODULES $deepmod +testouterr_cmd sh "load $deepmod" $ans {} + +setenv_loaded_module list $deepmod list $deepmodfile +setenv_path_var __MODULES_LMALTNAME $deepmod&al|fam +setenv_path_var __MODULES_LMCONFLICT $deepmod&fam +setenv_var LMOD_FAMILY_FAM $deepmod +setenv_var MODULES_FAMILY_FAM $deepmod + +set ans list +lappend ans list unset LMOD_FAMILY_FAM +lappend ans list unset __MODULES_LMALTNAME +lappend ans list unset __MODULES_LMCONFLICT +lappend ans list unset MODULES_FAMILY_FAM +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $deepmod" $ans {} +testouterr_cmd sh "unload fam" $ans {} + +unsetenv_loaded_module +unsetenv_path_var __MODULES_LMALTNAME +unsetenv_path_var __MODULES_LMCONFLICT +unsetenv_var LMOD_FAMILY_FAM +unsetenv_var MODULES_FAMILY_FAM + +# whatis +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re sh "whatis $mod" OK $tserr + +# display +set tserr "$modlin +$mpre/$mod: + +module-whatis\t$mod +family\t\tfam +$modlin" +testouterr_cmd_re sh "display $mod" OK $tserr + +# help +set tserr "$modlin +Module Specific Help for $mpre/$mod: + +$warn_msgs: Unable to find ModulesHelp in $modfilere. +$modlin" +testouterr_cmd_re sh "help $mod" OK $tserr + +# test +set tserr "$modlin +Module Specific Test for $mpre/$mod: + +$warn_msgs: Unable to find ModulesTest in $modfilere. +$modlin" +testouterr_cmd_re sh "test $mod" OK $tserr + + +setenv_var TESTSUITE_LCOMPAT family2 +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 11} +set tserr escre msg_load $mod msg_moderr {Invalid family name ''} {family {}<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_loaded_module list $mod list $modfile + +set tserr escre msg_unload $mod msg_moderr {Invalid family name ''} {family {}<EXM>} $modfile $ln +testouterr_cmd_re sh "unload $mod" ERR $tserr + +unsetenv_loaded_module + + +setenv_var TESTSUITE_LCOMPAT family3 +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 14} +set tserr escre msg_load $mod msg_moderr {Invalid family name 'b+d'} {family b+d<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_loaded_module list $mod list $modfile + +set tserr escre msg_unload $mod msg_moderr {Invalid family name 'b+d'} {family b+d<EXM>} $modfile $ln +testouterr_cmd_re sh "unload $mod" ERR $tserr + +unsetenv_loaded_module + + +setenv_var TESTSUITE_LCOMPAT family4 +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 17} +set tserr escre msg_load $mod msg_moderr {Invalid family name 'bad/name'} {family bad/name<EXM>} $modfile $ln +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_loaded_module list $mod list $modfile + +set tserr escre msg_unload $mod msg_moderr {Invalid family name 'bad/name'} {family bad/name<EXM>} $modfile $ln +testouterr_cmd_re sh "unload $mod" ERR $tserr + +unsetenv_loaded_module + + +setenv_var TESTSUITE_LCOMPAT family5 +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 20} +set tserr escre msg_load $mod msg_moderr {wrong # args: should be "family name"} {family<EXM>} $modfile $ln {} {} {} {} {invoked from within} +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_loaded_module list $mod list $modfile + +set tserr escre msg_unload $mod msg_moderr {wrong # args: should be "family name"} {family<EXM>} $modfile $ln {} {} {} {} {invoked from within} +testouterr_cmd_re sh "unload $mod" ERR $tserr +testouterr_cmd_re sh "unload lcompat" ERR $tserr + +unsetenv_loaded_module + + +setenv_var TESTSUITE_LCOMPAT familyrc1 + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list ERR +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 3 : 42} +set tserr escre msg_moderr {invalid command name "family"} {family fam<EXM>} $mp/lcompat/.modulerc $ln { } +testouterr_cmd_re sh "load $mod" $ans $tserr + +set tserr $mp:\n$mod +testouterr_cmd sh "avail -t $mod" OK $tserr + +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re sh "whatis $mod" OK $tserr + + +# +# Cleanup +# + +reset_test_env
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/520-pushenv.exp
Added
@@ -0,0 +1,960 @@ +############################################################################## +# Modules Revision 3.0 +# Providing a flexible user environment +# +# File: modules.50-cmds/%M% +# Revision: %I% +# First Edition: 2022/03/16 +# Last Mod.: %U%, %G% +# +# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr +# +# Description: Testuite testsequence +# Command: load, unload, display, help, test, whatis, refresh, avail +# Modulefiles: lcompat +# Sub-Command: +# +# Comment: %C{ +# Test pushenv modulefile command +# }C% +# +############################################################################## + +set mp $modpath.3 +set mpre $modpathre.3 +setenv_path_var MODULEPATH $mp + +set mod lcompat/1.10 +set modname lcompat +set modfile $mp/$mod +set modfilere $mpre/$mod + +set flatmod flatlcompat +set flatmodfile $mp/$flatmod + +set mod2 $modname/1.11 +set modfile2 $mp/$mod2 + +setenv_var TESTSUITE_LCOMPAT pushenv1 + +# load +set ans list +lappend ans list set FOO val1 +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set __MODULES_PUSHENV_FOO $mod&val1 +testouterr_cmd sh "load $mod" $ans {} + +setenv_var FOO foo + +set ans list +lappend ans list set FOO val1 +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set __MODULES_PUSHENV_FOO $mod&val1:&foo +testouterr_cmd sh "load $mod" $ans {} + +setenv_var __MODULES_PUSHENV_FOO foo&foo + +set ans list +lappend ans list set FOO val1 +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set __MODULES_PUSHENV_FOO $mod&val1:foo&foo +testouterr_cmd sh "load $mod" $ans {} + +# unload +setenv_loaded_module list $mod list $modfile +setenv_var __MODULES_PUSHENV_FOO $mod&val1 +setenv_var FOO val1 + +set ans list +lappend ans list unset FOO +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list unset __MODULES_PUSHENV_FOO +testouterr_cmd sh "unload $mod" $ans {} + +setenv_var __MODULES_PUSHENV_FOO $mod&val1:&foo + +set ans list +lappend ans list set FOO foo +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list unset __MODULES_PUSHENV_FOO +testouterr_cmd sh "unload $mod" $ans {} + +setenv_var __MODULES_PUSHENV_FOO $mod&val1:foo&foo + +set ans list +lappend ans list set FOO foo +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list set __MODULES_PUSHENV_FOO foo&foo +testouterr_cmd sh "unload $mod" $ans {} + +setenv_var __MODULES_PUSHENV_FOO $mod&val1 + +skip_if_quick_mode + +# a different value found in persistency environment variable +setenv_var __MODULES_PUSHENV_FOO $mod&val2 +setenv_var FOO val2 +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +# no persistency environment variable set +unsetenv_var __MODULES_PUSHENV_FOO +setenv_var FOO val1 +set ans list +lappend ans list unset FOO +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +# refresh +testouterr_cmd sh {refresh} OK {} + +unsetenv_loaded_module +unsetenv_path_var __MODULES_PUSHENV_FOO +unsetenv_var FOO + +# whatis +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re sh "whatis $mod" OK $tserr + +# whatis when loaded +setenv_loaded_module list $mod list $modfile +setenv_var __MODULES_PUSHENV_FOO $mod&val1 +setenv_var FOO val1 +testouterr_cmd_re sh "whatis $mod" OK $tserr + +unsetenv_loaded_module +unsetenv_path_var __MODULES_PUSHENV_FOO +unsetenv_var FOO + +# display +set tserr "$modlin +$mpre/$mod: + +module-whatis\t$mod +pushenv\t\tFOO val1 +$modlin" +testouterr_cmd_re sh "display $mod" OK $tserr + +# help +set tserr "$modlin +Module Specific Help for $mpre/$mod: + +$warn_msgs: Unable to find ModulesHelp in $modfilere. +$modlin" +testouterr_cmd_re sh "help $mod" OK $tserr + +# test +set tserr "$modlin +Module Specific Test for $mpre/$mod: + +$warn_msgs: Unable to find ModulesTest in $modfilere. +$modlin" +testouterr_cmd_re sh "test $mod" OK $tserr + + +# multiple module load targeting same envvar +setenv_var TESTSUITE_LCOMPAT pushenv1 +set ans list +lappend ans list set FOO val1 +lappend ans list set _LMFILES_ $flatmodfile:$modfile +lappend ans list set LOADEDMODULES $flatmod:$mod +lappend ans list set __MODULES_PUSHENV_FOO $mod&val1:$flatmod&bar +testouterr_cmd sh "load $flatmod $mod" $ans {} + +set ans list +lappend ans list set FOO bar +lappend ans list set _LMFILES_ $modfile:$flatmodfile +lappend ans list set LOADEDMODULES $mod:$flatmod +lappend ans list set __MODULES_PUSHENV_FOO $flatmod&bar:$mod&val1 +testouterr_cmd sh "load $mod $flatmod" $ans {} + +setenv_var FOO foo + +set ans list +lappend ans list set FOO bar +lappend ans list set _LMFILES_ $modfile:$flatmodfile +lappend ans list set LOADEDMODULES $mod:$flatmod +lappend ans list set __MODULES_PUSHENV_FOO $flatmod&bar:$mod&val1:&foo +testouterr_cmd sh "load $mod $flatmod" $ans {} + +setenv_loaded_module list $mod $flatmod list $modfile $flatmodfile +setenv_var __MODULES_PUSHENV_FOO $mod&val1:$flatmod&bar +setenv_var FOO val1 + +set ans list +lappend ans list set FOO bar +lappend ans list set _LMFILES_ $flatmodfile +lappend ans list set LOADEDMODULES $flatmod +lappend ans list set __MODULES_PUSHENV_FOO $flatmod&bar +testouterr_cmd sh "unload $mod" $ans {} + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set __MODULES_PUSHENV_FOO $mod&val1 +testouterr_cmd sh "unload $flatmod" $ans {} + +setenv_var __MODULES_PUSHENV_FOO $mod&val1:$flatmod&bar:&foo + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set __MODULES_PUSHENV_FOO $mod&val1:&foo +testouterr_cmd sh "unload $flatmod" $ans {} + +unsetenv_loaded_module +unsetenv_var __MODULES_PUSHENV_FOO +unsetenv_var FOO + + +# small caps and use of '&' char in pushed value +setenv_var TESTSUITE_LCOMPAT pushenv5 + +set ans list +lappend ans list set foO &al +lappend ans list set var v&l +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set __MODULES_PUSHENV_foO $mod&&al +lappend ans list set __MODULES_PUSHENV_var $mod&v&l +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_var __MODULES_PUSHENV_var $mod&v&l:&&oo +setenv_var __MODULES_PUSHENV_foO $mod&&al +setenv_var var v&l +setenv_var foO &al + +set ans list +lappend ans list unset foO +lappend ans list set var &oo +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list unset __MODULES_PUSHENV_foO +lappend ans list unset __MODULES_PUSHENV_var +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module +unsetenv_var __MODULES_PUSHENV_var +unsetenv_var __MODULES_PUSHENV_foO +unsetenv_var var +unsetenv_var foO + + +# empty string pushed value +setenv_var TESTSUITE_LCOMPAT pushenv6 + +setenv_var BAR {} + +set ans list +lappend ans list set FOO {} +lappend ans list set BAR val +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list set __MODULES_PUSHENV_FOO $mod& +lappend ans list set __MODULES_PUSHENV_BAR $mod&val:& +testouterr_cmd sh "load $mod" $ans {} + +setenv_loaded_module list $mod list $modfile +setenv_var __MODULES_PUSHENV_BAR $mod&val:& +setenv_var __MODULES_PUSHENV_FOO $mod& +setenv_var BAR val +setenv_var FOO {} + +set ans list +lappend ans list unset FOO +lappend ans list set BAR {} +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list unset __MODULES_PUSHENV_FOO +lappend ans list unset __MODULES_PUSHENV_BAR +testouterr_cmd sh "unload $mod" $ans {} + + +# missing stack definition in env +unsetenv_var __MODULES_PUSHENV_BAR +unsetenv_var __MODULES_PUSHENV_FOO + +set ans list +lappend ans list unset FOO +lappend ans list unset BAR +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + + +# missing variable definition in env +setenv_var __MODULES_PUSHENV_BAR $mod&val:& +setenv_var __MODULES_PUSHENV_FOO $mod& +unsetenv_var BAR +unsetenv_var FOO + +set ans list +lappend ans list unset FOO +lappend ans list set BAR {} +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +lappend ans list unset __MODULES_PUSHENV_FOO +lappend ans list unset __MODULES_PUSHENV_BAR +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module +unsetenv_var __MODULES_PUSHENV_BAR +unsetenv_var __MODULES_PUSHENV_FOO + + +# same env var pushed multiple times by same modulefile +# with same value pushed multiple times +setenv_var TESTSUITE_LCOMPAT pushenv7 +setenv_loaded_module list $flatmod list $flatmodfile +setenv_var __MODULES_PUSHENV_FOO $flatmod&bar +setenv_var FOO bar + +set ans list +lappend ans list set FOO val2 +lappend ans list set _LMFILES_ $flatmodfile:$modfile +lappend ans list set LOADEDMODULES $flatmod:$mod +lappend ans list set __MODULES_PUSHENV_FOO $mod&val2:$mod&val1:$mod&:$mod&val1:$flatmod&bar +set tserr "val1-val1\n-\nval1-val1\nval2-val2" +testouterr_cmd sh "load $mod" $ans $tserr + +setenv_loaded_module list $flatmod $mod list $flatmodfile $modfile +setenv_var __MODULES_PUSHENV_FOO $mod&val2:$mod&val1:$mod&:$mod&val1:$flatmod&bar +setenv_var FOO val2 + +set ans list +lappend ans list set FOO bar +lappend ans list set _LMFILES_ $flatmodfile +lappend ans list set LOADEDMODULES $flatmod +lappend ans list set __MODULES_PUSHENV_FOO $flatmod&bar +# popped value is consistent at the end of the evaluation +# when checked during modulefile evaluation lastly defined value remains so it is +# not advised to use a pushenv value directly as path element in path variable +set tserr "val2-val2\nval2-val2\nval2-val2\nbar-bar" +testouterr_cmd sh "unload $mod" $ans $tserr + +unsetenv_loaded_module +unsetenv_var __MODULES_PUSHENV_FOO +unsetenv_var FOO + + +# same value set by different loaded modules +setenv_var TESTSUITE_LCOMPAT pushenv1 + +# same value defined by loaded module #1 and 3 +set ans list +lappend ans list set FOO val1 +lappend ans list set _LMFILES_ $modfile:$flatmodfile:$modfile2 +lappend ans list set LOADEDMODULES $mod:$flatmod:$mod2 +lappend ans list set __MODULES_PUSHENV_FOO $mod2&val1:$flatmod&bar:$mod&val1 +testouterr_cmd sh "load $mod $flatmod $mod2" $ans {} + +setenv_loaded_module list $mod $flatmod $mod2 list $modfile $flatmodfile $modfile2 +setenv_var __MODULES_PUSHENV_FOO $mod2&val1:$flatmod&bar:$mod&val1 +setenv_var FOO val1 + +# unload loaded module #1 +set ans list +lappend ans list set _LMFILES_ $flatmodfile:$modfile2 +lappend ans list set LOADEDMODULES $flatmod:$mod2 +lappend ans list set __MODULES_PUSHENV_FOO $mod2&val1:$flatmod&bar +testouterr_cmd sh "unload $mod" $ans {} + +# unload loaded module #3 +set ans list +lappend ans list set FOO bar +lappend ans list set _LMFILES_ $modfile:$flatmodfile +lappend ans list set LOADEDMODULES $mod:$flatmod +lappend ans list set __MODULES_PUSHENV_FOO $flatmod&bar:$mod&val1 +testouterr_cmd sh "unload $mod2" $ans {} + +unsetenv_loaded_module +unsetenv_var __MODULES_PUSHENV_FOO +unsetenv_var FOO + +# same value defined by loaded module #2 and 3 +set ans list +lappend ans list set FOO val1 +lappend ans list set _LMFILES_ $flatmodfile:$modfile:$modfile2 +lappend ans list set LOADEDMODULES $flatmod:$mod:$mod2 +lappend ans list set __MODULES_PUSHENV_FOO $mod2&val1:$mod&val1:$flatmod&bar +testouterr_cmd sh "load $flatmod $mod $mod2" $ans {} + +setenv_loaded_module list $flatmod $mod $mod2 list $flatmodfile $modfile $modfile2 +setenv_var __MODULES_PUSHENV_FOO $mod2&val1:$mod&val1:$flatmod&bar +setenv_var FOO val1 + +# unload loaded module #2 +set ans list +lappend ans list set _LMFILES_ $flatmodfile:$modfile2 +lappend ans list set LOADEDMODULES $flatmod:$mod2 +lappend ans list set __MODULES_PUSHENV_FOO $mod2&val1:$flatmod&bar +testouterr_cmd sh "unload $mod" $ans {} + +# unload loaded module #3 +set ans list +lappend ans list set _LMFILES_ $flatmodfile:$modfile +lappend ans list set LOADEDMODULES $flatmod:$mod +lappend ans list set __MODULES_PUSHENV_FOO $mod&val1:$flatmod&bar +testouterr_cmd sh "unload $mod2" $ans {} + +unsetenv_loaded_module +unsetenv_var __MODULES_PUSHENV_FOO +unsetenv_var FOO + + +# inconsistent combination +# pushenv command only set for load or unload mode +setenv_var TESTSUITE_LCOMPAT pushenv8 + +setenv_loaded_module list $mod list $modfile +setenv_var __MODULES_PUSHENV_FOO $mod&val1 +setenv_var FOO val1 + +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +setenv_var TESTSUITE_LCOMPAT pushenv9 +unsetenv_var __MODULES_PUSHENV_FOO +unsetenv_var FOO + +set ans list +lappend ans list unset FOO +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd sh "unload $mod" $ans {} + +unsetenv_loaded_module + + +# inconsistent combination +# mixed append-path/pushenv definition for same env variable +setenv_var TESTSUITE_LCOMPAT pushenv10 + +# append-path then pushenv, no preset value +set ans list +lappend ans list set FOO bar +lappend ans list set __MODULES_PUSHENV_FOO $mod&bar:&/path/to/val1 +lappend ans list set _LMFILES_ $modfile2:$modfile +lappend ans list set LOADEDMODULES $mod2:$mod +testouterr_cmd sh "load $mod2 $mod" $ans {} + +setenv_loaded_module list $mod2 $mod list $modfile2 $modfile +setenv_var __MODULES_PUSHENV_FOO $mod&bar:&/path/to/val1 +setenv_var FOO bar + +set ans list +lappend ans list set FOO /path/to/val1 +lappend ans list set _LMFILES_ $modfile2 +lappend ans list set LOADEDMODULES $mod2 +lappend ans list unset __MODULES_PUSHENV_FOO +testouterr_cmd sh "unload $mod" $ans {} + +set ans list +lappend ans list set FOO bar +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list unset __MODULES_PUSHENV_FOO +# due to the inconsistent mix, pushenv stack is withdrawn whereas $mod +# is still loaded +testouterr_cmd sh "unload $mod2" $ans {} + +unsetenv_loaded_module +unsetenv_var __MODULES_PUSHENV_FOO + +# append-path then pushenv, preset value (duplicate path elt) +setenv_var FOO /path/to/val1 +set ans list +lappend ans list unset __MODULES_SHARE_FOO +lappend ans list set FOO bar +lappend ans list set __MODULES_PUSHENV_FOO $mod&bar:&/path/to/val1 +lappend ans list set _LMFILES_ $modfile2:$modfile +lappend ans list set LOADEDMODULES $mod2:$mod +testouterr_cmd sh "load $mod2 $mod" $ans {} + +setenv_loaded_module list $mod2 $mod list $modfile2 $modfile +setenv_var __MODULES_PUSHENV_FOO $mod&bar:&/path/to/val1 +setenv_var FOO bar + +set ans list +lappend ans list set FOO /path/to/val1 +lappend ans list set _LMFILES_ $modfile2 +lappend ans list set LOADEDMODULES $mod2 +lappend ans list unset __MODULES_PUSHENV_FOO +testouterr_cmd sh "unload $mod" $ans {} + +set ans list +lappend ans list set FOO bar +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list unset __MODULES_PUSHENV_FOO +# due to the inconsistent mix, pushenv stack is withdrawn whereas $mod +# is still loaded +testouterr_cmd sh "unload $mod2" $ans {} + +unsetenv_loaded_module +unsetenv_var __MODULES_PUSHENV_FOO +unsetenv_var FOO + +# pushenv then append-path, no preset value +set ans list +lappend ans list set FOO bar:/path/to/val1 +lappend ans list set _LMFILES_ $modfile:$modfile2 +lappend ans list set LOADEDMODULES $mod:$mod2 +lappend ans list unset __MODULES_PUSHENV_FOO +testouterr_cmd sh "load $mod $mod2" $ans {} + +setenv_loaded_module list $mod $mod2 list $modfile $modfile2 +setenv_var FOO bar:/path/to/val1 + +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile2 +lappend ans list set LOADEDMODULES $mod2 +# due to the inconsistent mix, pushenv in unload mode purely unset variable +testouterr_cmd sh "unload $mod" $ans {} + +set ans list +lappend ans list set FOO bar +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "unload $mod2" $ans {} + +unsetenv_loaded_module + +# pushenv then append-path, preset value (duplicate path elt) +setenv_var FOO /path/to/val1 +set ans list +lappend ans list set FOO bar:/path/to/val1 +lappend ans list set _LMFILES_ $modfile:$modfile2 +lappend ans list set LOADEDMODULES $mod:$mod2 +lappend ans list unset __MODULES_PUSHENV_FOO +testouterr_cmd sh "load $mod $mod2" $ans {} + +setenv_loaded_module list $mod $mod2 list $modfile $modfile2 +setenv_var FOO bar:/path/to/val1 + +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile2 +lappend ans list set LOADEDMODULES $mod2 +# due to the inconsistent mix, pushenv in unload mode purely unset variable +testouterr_cmd sh "unload $mod" $ans {} + +set ans list +lappend ans list set FOO bar +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "unload $mod2" $ans {} + +unsetenv_var FOO +unsetenv_loaded_module + + +# inconsistent combination +# mixed setenv/pushenv definition for same env variable +setenv_var TESTSUITE_LCOMPAT pushenv11 + +# setenv then pushenv, no preset value +set ans list +lappend ans list set FOO bar +lappend ans list set __MODULES_PUSHENV_FOO $mod&bar:&foo +lappend ans list set _LMFILES_ $modfile2:$modfile +lappend ans list set LOADEDMODULES $mod2:$mod +testouterr_cmd sh "load $mod2 $mod" $ans {} + +setenv_loaded_module list $mod2 $mod list $modfile2 $modfile +setenv_var __MODULES_PUSHENV_FOO $mod&bar:&foo +setenv_var FOO bar + +set ans list +lappend ans list set FOO foo +lappend ans list set _LMFILES_ $modfile2 +lappend ans list set LOADEDMODULES $mod2 +lappend ans list unset __MODULES_PUSHENV_FOO +testouterr_cmd sh "unload $mod" $ans {} + +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list unset __MODULES_PUSHENV_FOO +testouterr_cmd sh "unload $mod2" $ans {} + +unsetenv_loaded_module +unsetenv_var __MODULES_PUSHENV_FOO + +# setenv then pushenv, preset value +setenv_var FOO val1 +set ans list +lappend ans list set FOO bar +lappend ans list set __MODULES_PUSHENV_FOO $mod&bar:&foo +lappend ans list set _LMFILES_ $modfile2:$modfile +lappend ans list set LOADEDMODULES $mod2:$mod +testouterr_cmd sh "load $mod2 $mod" $ans {} + +setenv_loaded_module list $mod2 $mod list $modfile2 $modfile +setenv_var __MODULES_PUSHENV_FOO $mod&bar:&foo +setenv_var FOO bar + +set ans list +lappend ans list set FOO foo +lappend ans list set _LMFILES_ $modfile2 +lappend ans list set LOADEDMODULES $mod2 +lappend ans list unset __MODULES_PUSHENV_FOO +testouterr_cmd sh "unload $mod" $ans {} + +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list unset __MODULES_PUSHENV_FOO +testouterr_cmd sh "unload $mod2" $ans {} + +unsetenv_loaded_module +unsetenv_var __MODULES_PUSHENV_FOO +unsetenv_var FOO + +# pushenv then setenv, no preset value +set ans list +lappend ans list set FOO foo +lappend ans list set _LMFILES_ $modfile:$modfile2 +lappend ans list set LOADEDMODULES $mod:$mod2 +lappend ans list unset __MODULES_PUSHENV_FOO +testouterr_cmd sh "load $mod $mod2" $ans {} + +setenv_loaded_module list $mod $mod2 list $modfile $modfile2 +setenv_var FOO foo + +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile2 +lappend ans list set LOADEDMODULES $mod2 +testouterr_cmd sh "unload $mod" $ans {} + +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "unload $mod2" $ans {} + +unsetenv_loaded_module + +# pushenv then setenv, preset value +setenv_var FOO val1 +set ans list +lappend ans list set FOO foo +lappend ans list set _LMFILES_ $modfile:$modfile2 +lappend ans list set LOADEDMODULES $mod:$mod2 +lappend ans list unset __MODULES_PUSHENV_FOO +testouterr_cmd sh "load $mod $mod2" $ans {} + +setenv_loaded_module list $mod $mod2 list $modfile $modfile2 +setenv_var FOO foo + +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile2 +lappend ans list set LOADEDMODULES $mod2 +testouterr_cmd sh "unload $mod" $ans {} + +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "unload $mod2" $ans {} + +unsetenv_var FOO +unsetenv_loaded_module + + +# inconsistent combination +# mixed remove-path/pushenv definition for same env variable +setenv_var TESTSUITE_LCOMPAT pushenv12 + +# remove-path then pushenv, no preset value +set ans list +lappend ans list set FOO bar +# after remove-path, env variable is found set to an empty value +# during the evaluation of $mod +lappend ans list set __MODULES_PUSHENV_FOO $mod&bar:& +lappend ans list set _LMFILES_ $modfile2:$modfile +lappend ans list set LOADEDMODULES $mod2:$mod +testouterr_cmd sh "load $mod2 $mod" $ans {} + +setenv_loaded_module list $mod2 $mod list $modfile2 $modfile +setenv_var __MODULES_PUSHENV_FOO $mod&bar:& +setenv_var FOO bar + +set ans list +lappend ans list set FOO {} +lappend ans list set _LMFILES_ $modfile2 +lappend ans list set LOADEDMODULES $mod2 +lappend ans list unset __MODULES_PUSHENV_FOO +testouterr_cmd sh "unload $mod" $ans {} + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list unset __MODULES_PUSHENV_FOO +testouterr_cmd sh "unload $mod2" $ans {} + +unsetenv_loaded_module +unsetenv_var __MODULES_PUSHENV_FOO + +# remove-path then pushenv, preset value (duplicate path elt) +setenv_var FOO /path/to/val1 +set ans list +lappend ans list set FOO bar +# after remove-path, env variable is found set to an empty value +# during the evaluation of $mod +lappend ans list set __MODULES_PUSHENV_FOO $mod&bar:& +lappend ans list set _LMFILES_ $modfile2:$modfile +lappend ans list set LOADEDMODULES $mod2:$mod +testouterr_cmd sh "load $mod2 $mod" $ans {} + +setenv_loaded_module list $mod2 $mod list $modfile2 $modfile +setenv_var __MODULES_PUSHENV_FOO $mod&bar:& +setenv_var FOO bar + +set ans list +lappend ans list set FOO {} +lappend ans list set _LMFILES_ $modfile2 +lappend ans list set LOADEDMODULES $mod2 +lappend ans list unset __MODULES_PUSHENV_FOO +testouterr_cmd sh "unload $mod" $ans {} + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list unset __MODULES_PUSHENV_FOO +testouterr_cmd sh "unload $mod2" $ans {} + +unsetenv_loaded_module +unsetenv_var __MODULES_PUSHENV_FOO +unsetenv_var FOO + +# pushenv then remove-path, no preset value +set ans list +lappend ans list set FOO bar +lappend ans list set _LMFILES_ $modfile:$modfile2 +lappend ans list set LOADEDMODULES $mod:$mod2 +lappend ans list unset __MODULES_PUSHENV_FOO +testouterr_cmd sh "load $mod $mod2" $ans {} + +setenv_loaded_module list $mod $mod2 list $modfile $modfile2 +setenv_var FOO bar + +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile2 +lappend ans list set LOADEDMODULES $mod2 +testouterr_cmd sh "unload $mod" $ans {} + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "unload $mod2" $ans {} + +unsetenv_loaded_module + +# pushenv then remove-path, preset value (duplicate path elt) +setenv_var FOO /path/to/val1 +set ans list +lappend ans list set FOO bar +lappend ans list set _LMFILES_ $modfile:$modfile2 +lappend ans list set LOADEDMODULES $mod:$mod2 +lappend ans list unset __MODULES_PUSHENV_FOO +testouterr_cmd sh "load $mod $mod2" $ans {} + +setenv_loaded_module list $mod $mod2 list $modfile $modfile2 +setenv_var FOO bar + +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile2 +lappend ans list set LOADEDMODULES $mod2 +testouterr_cmd sh "unload $mod" $ans {} + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "unload $mod2" $ans {} + +unsetenv_var FOO +unsetenv_loaded_module + + +# inconsistent combination +# mixed unsetenv/pushenv definition for same env variable +setenv_var TESTSUITE_LCOMPAT pushenv13 + +# unsetenv then pushenv, no preset value +set ans list +lappend ans list set FOO bar +# after unsetenv, env variable is found set to an empty value +# during the evaluation of $mod +lappend ans list set __MODULES_PUSHENV_FOO $mod&bar:& +lappend ans list set _LMFILES_ $modfile2:$modfile +lappend ans list set LOADEDMODULES $mod2:$mod +testouterr_cmd sh "load $mod2 $mod" $ans {} + +setenv_loaded_module list $mod2 $mod list $modfile2 $modfile +setenv_var __MODULES_PUSHENV_FOO $mod&bar:& +setenv_var FOO bar + +set ans list +lappend ans list set FOO {} +lappend ans list set _LMFILES_ $modfile2 +lappend ans list set LOADEDMODULES $mod2 +lappend ans list unset __MODULES_PUSHENV_FOO +testouterr_cmd sh "unload $mod" $ans {} + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "unload $mod2" $ans {} + +unsetenv_loaded_module +unsetenv_var __MODULES_PUSHENV_FOO + +# unsetenv then pushenv, preset value +setenv_var FOO val1 +set ans list +lappend ans list set FOO bar +# after unsetenv, env variable is found set to an empty value +# during the evaluation of $mod +lappend ans list set __MODULES_PUSHENV_FOO $mod&bar:& +lappend ans list set _LMFILES_ $modfile2:$modfile +lappend ans list set LOADEDMODULES $mod2:$mod +testouterr_cmd sh "load $mod2 $mod" $ans {} + +setenv_loaded_module list $mod2 $mod list $modfile2 $modfile +setenv_var __MODULES_PUSHENV_FOO $mod&bar:& +setenv_var FOO bar + +set ans list +lappend ans list set FOO {} +lappend ans list set _LMFILES_ $modfile2 +lappend ans list set LOADEDMODULES $mod2 +lappend ans list unset __MODULES_PUSHENV_FOO +testouterr_cmd sh "unload $mod" $ans {} + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "unload $mod2" $ans {} + +unsetenv_loaded_module +unsetenv_var __MODULES_PUSHENV_FOO +unsetenv_var FOO + +# pushenv then unsetenv, no preset value +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile:$modfile2 +lappend ans list set LOADEDMODULES $mod:$mod2 +lappend ans list unset __MODULES_PUSHENV_FOO +testouterr_cmd sh "load $mod $mod2" $ans {} + +setenv_loaded_module list $mod $mod2 list $modfile $modfile2 + +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile2 +lappend ans list set LOADEDMODULES $mod2 +testouterr_cmd sh "unload $mod" $ans {} + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "unload $mod2" $ans {} + +unsetenv_loaded_module + +# pushenv then unsetenv, preset value +setenv_var FOO val1 +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile:$modfile2 +lappend ans list set LOADEDMODULES $mod:$mod2 +lappend ans list unset __MODULES_PUSHENV_FOO +testouterr_cmd sh "load $mod $mod2" $ans {} + +setenv_loaded_module list $mod $mod2 list $modfile $modfile2 +unsetenv_var FOO + +set ans list +lappend ans list unset FOO +lappend ans list set _LMFILES_ $modfile2 +lappend ans list set LOADEDMODULES $mod2 +testouterr_cmd sh "unload $mod" $ans {} + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +testouterr_cmd sh "unload $mod2" $ans {} + +unsetenv_var FOO +unsetenv_loaded_module + + +# bad specifications +setenv_var TESTSUITE_LCOMPAT pushenv2 +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 11} +set tserr escre msg_load $mod msg_moderr {wrong # args: should be "pushenv var val"} {pushenv FOO val val<EXM>} $modfile $ln {} {} {} {} {invoked from within} +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_loaded_module list $mod list $modfile + +set procname expr {cmpversion $tclsh_version 8.6 == -1 ? {pushenv} : {pushenv-un}} +set tserr escre msg_unload $mod msg_moderr "wrong # args: should be \"$procname var val\"" {pushenv FOO val val<EXM>} $modfile $ln {} {} {} {} {invoked from within} +testouterr_cmd_re sh "unload $mod" ERR $tserr + +unsetenv_loaded_module + +setenv_var TESTSUITE_LCOMPAT pushenv3 +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 14} +set tserr escre msg_load $mod msg_moderr {wrong # args: should be "pushenv var val"} {pushenv FOO<EXM>} $modfile $ln {} {} {} {} {invoked from within} +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_var TESTSUITE_LCOMPAT pushenv4 +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 17} +set tserr escre msg_load $mod msg_moderr {wrong # args: should be "pushenv var val"} {pushenv<EXM>} $modfile $ln {} {} {} {} {invoked from within} +testouterr_cmd_re sh "load $mod" ERR $tserr + +setenv_var TESTSUITE_LCOMPAT pushenvrc1 + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list ERR +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 3 : 45} +set tserr escre msg_moderr {invalid command name "pushenv"} {pushenv FOO val1<EXM>} $mp/lcompat/.modulerc $ln { } +testouterr_cmd_re sh "load $mod" $ans $tserr + +set tserr $mp:\n$mod +testouterr_cmd sh "avail -t $mod" OK $tserr + +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re sh "whatis $mod" OK $tserr + + +# +# Cleanup +# + +reset_test_env
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/530-module-list.exp
Added
@@ -0,0 +1,252 @@ +############################################################################## +# Modules Revision 3.0 +# Providing a flexible user environment +# +# File: modules.50-cmds/%M% +# Revision: %I% +# First Edition: 2022/01/22 +# Last Mod.: %U%, %G% +# +# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr +# +# Description: Testuite testsequence +# Command: load, unload +# Modulefiles: list, foo, bar +# Sub-Command: +# +# Comment: %C{ +# Test 'module list' modulefile command +# }C% +# +############################################################################## + +skip_if_quick_mode + +set mp $modpath.3 +set mpre $modpathre.3 +setenv_path_var MODULEPATH $mp + +set mod list/1.0 +set modname list +set modfile $mp/$mod +set modfilere $mpre/$mod + + +setenv_var TESTSUITE_MODULE_LIST list1 + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +set tserr $no_loaded +testouterr_cmd sh "load $mod" $ans $tserr + +setenv_loaded_module list foo/1.0 list $mp/foo/1.0 + +set ans list +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +set tserr "$cur_loaded\n 1) foo/1.0 " +testouterr_cmd sh "load $mod" $ans $tserr + +setenv_loaded_module list foo/1.0 bar/1.0 list $mp/foo/1.0 $mp/bar/1.0 + +set ans list +lappend ans list set _LMFILES_ $mp/foo/1.0:$mp/bar/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:bar/1.0:$mod +set tserr "$cur_loaded\n 1) foo/1.0 2) bar/1.0 " +testouterr_cmd sh "load $mod" $ans $tserr + +setenv_loaded_module list foo/1.0 bar/1.0 $mod list $mp/foo/1.0 $mp/bar/1.0 $modfile + +set ans list +lappend ans list set _LMFILES_ $mp/foo/1.0:$mp/bar/1.0 +lappend ans list set LOADEDMODULES foo/1.0:bar/1.0 +set tserr "$cur_loaded\n 1) foo/1.0 2) bar/1.0 3) $mod " +testouterr_cmd sh "unload $mod" $ans $tserr + +unsetenv_loaded_module + + +setenv_var TESTSUITE_MODULE_LIST list2 + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +set tserr $no_loaded +testouterr_cmd sh "load $mod" $ans $tserr + +setenv_loaded_module list foo/1.0 list $mp/foo/1.0 + +set ans list +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +set tserr "$cur_matchingloaded\n 1) foo/1.0 " +testouterr_cmd sh "load $mod" $ans $tserr + +setenv_loaded_module list bar/1.0 list $mp/bar/1.0 + +set ans list +lappend ans list set _LMFILES_ $mp/bar/1.0:$modfile +lappend ans list set LOADEDMODULES bar/1.0:$mod +set tserr "$no_matchingloaded" +testouterr_cmd sh "load $mod" $ans $tserr + +setenv_loaded_module list foo/1.0 bar/1.0 list $mp/foo/1.0 $mp/bar/1.0 + +set ans list +lappend ans list set _LMFILES_ $mp/foo/1.0:$mp/bar/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:bar/1.0:$mod +set tserr "$cur_matchingloaded\n 1) foo/1.0 " +testouterr_cmd sh "load $mod" $ans $tserr + +setenv_loaded_module list foo/1.0 bar/1.0 $mod list $mp/foo/1.0 $mp/bar/1.0 $modfile + +set ans list +lappend ans list set _LMFILES_ $mp/foo/1.0:$mp/bar/1.0 +lappend ans list set LOADEDMODULES foo/1.0:bar/1.0 +set tserr "$cur_matchingloaded\n 1) foo/1.0 " +testouterr_cmd sh "unload $mod" $ans $tserr + +unsetenv_loaded_module + + +setenv_var MODULES_ADVANCED_VERSION_SPEC 1 +setenv_var TESTSUITE_MODULE_LIST list3 + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +set tserr $no_loaded +testouterr_cmd sh "load $mod" $ans $tserr + +setenv_loaded_module list foo/1.0 list $mp/foo/1.0 + +set ans list +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +set tserr "$cur_matchingloaded\n 1) foo/1.0 " +testouterr_cmd sh "load $mod" $ans $tserr + +setenv_loaded_module list bar/1.0 list $mp/bar/1.0 + +set ans list +lappend ans list set _LMFILES_ $mp/bar/1.0:$modfile +lappend ans list set LOADEDMODULES bar/1.0:$mod +set tserr "$no_matchingloaded" +testouterr_cmd sh "load $mod" $ans $tserr + +setenv_loaded_module list foo/1.0 bar/1.0 list $mp/foo/1.0 $mp/bar/1.0 + +set ans list +lappend ans list set _LMFILES_ $mp/foo/1.0:$mp/bar/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:bar/1.0:$mod +set tserr "$cur_matchingloaded\n 1) foo/1.0 " +testouterr_cmd sh "load $mod" $ans $tserr + +setenv_loaded_module list foo/1.0 bar/1.0 $mod list $mp/foo/1.0 $mp/bar/1.0 $modfile + +set ans list +lappend ans list set _LMFILES_ $mp/foo/1.0:$mp/bar/1.0 +lappend ans list set LOADEDMODULES foo/1.0:bar/1.0 +set tserr "$cur_matchingloaded\n 1) foo/1.0 " +testouterr_cmd sh "unload $mod" $ans $tserr + +unsetenv_loaded_module +unsetenv_var MODULES_ADVANCED_VERSION_SPEC + + +setenv_var TESTSUITE_MODULE_LIST list4 + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +set tserr $no_loaded +testouterr_cmd sh "load $mod" $ans $tserr + +setenv_loaded_module list foo/1.0 list $mp/foo/1.0 + +set ans list +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +set tserr "$cur_matchingloaded\n 1) foo/1.0 " +testouterr_cmd sh "load $mod" $ans $tserr + +setenv_loaded_module list bar/1.0 list $mp/bar/1.0 + +set ans list +lappend ans list set _LMFILES_ $mp/bar/1.0:$modfile +lappend ans list set LOADEDMODULES bar/1.0:$mod +set tserr "$cur_matchingloaded\n 1) bar/1.0 " +testouterr_cmd sh "load $mod" $ans $tserr + +setenv_loaded_module list foo/1.0 bar/1.0 list $mp/foo/1.0 $mp/bar/1.0 + +set ans list +lappend ans list set _LMFILES_ $mp/foo/1.0:$mp/bar/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:bar/1.0:$mod +set tserr "$cur_matchingloaded\n 1) foo/1.0 2) bar/1.0 " +testouterr_cmd sh "load $mod" $ans $tserr + +setenv_loaded_module list foo/1.0 bar/1.0 $mod list $mp/foo/1.0 $mp/bar/1.0 $modfile + +set ans list +lappend ans list set _LMFILES_ $mp/foo/1.0:$mp/bar/1.0 +lappend ans list set LOADEDMODULES foo/1.0:bar/1.0 +set tserr "$cur_matchingloaded\n 1) foo/1.0 2) bar/1.0 " +testouterr_cmd sh "unload $mod" $ans $tserr + +unsetenv_loaded_module + + +setenv_var TESTSUITE_MODULE_LIST list5 + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +set tserr $no_loaded +testouterr_cmd sh "load $mod" $ans $tserr + +setenv_path_var __MODULES_LMALTNAME foo/1.0&al|alfoo +setenv_loaded_module list foo/1.0 list $mp/foo/1.0 + +set ans list +lappend ans list set _LMFILES_ $mp/foo/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:$mod +set tserr "$cur_matchingloaded\n 1) foo/1.0 " +testouterr_cmd sh "load $mod" $ans $tserr + +unsetenv_path_var __MODULES_LMALTNAME +setenv_loaded_module list bar/1.0 list $mp/bar/1.0 + +set ans list +lappend ans list set _LMFILES_ $mp/bar/1.0:$modfile +lappend ans list set LOADEDMODULES bar/1.0:$mod +set tserr "$cur_matchingloaded\n 1) bar/1.0 " +testouterr_cmd sh "load $mod" $ans $tserr + +setenv_path_var __MODULES_LMALTNAME foo/1.0&al|alfoo +setenv_loaded_module list foo/1.0 bar/1.0 list $mp/foo/1.0 $mp/bar/1.0 + +set ans list +lappend ans list set _LMFILES_ $mp/foo/1.0:$mp/bar/1.0:$modfile +lappend ans list set LOADEDMODULES foo/1.0:bar/1.0:$mod +set tserr "$cur_matchingloaded\n 1) foo/1.0 2) bar/1.0 " +testouterr_cmd sh "load $mod" $ans $tserr + +setenv_loaded_module list foo/1.0 bar/1.0 $mod list $mp/foo/1.0 $mp/bar/1.0 $modfile + +set ans list +lappend ans list set _LMFILES_ $mp/foo/1.0:$mp/bar/1.0 +lappend ans list set LOADEDMODULES foo/1.0:bar/1.0 +set tserr "$cur_matchingloaded\n 1) foo/1.0 2) bar/1.0 " +testouterr_cmd sh "unload $mod" $ans $tserr + +unsetenv_path_var __MODULES_LMALTNAME +unsetenv_loaded_module + + +# +# Cleanup +# + +reset_test_env
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/540-complete.exp
Added
@@ -0,0 +1,314 @@ +############################################################################## +# Modules Revision 3.0 +# Providing a flexible user environment +# +# File: modules.50-cmds/%M% +# Revision: %I% +# First Edition: 2022/01/31 +# Last Mod.: %U%, %G% +# +# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr +# +# Description: Testuite testsequence +# Command: load, unload, display, help, test, whatis, refresh, avail +# Modulefiles: complete +# Sub-Command: +# +# Comment: %C{ +# Test complete modulefile command +# }C% +# +############################################################################## + +set mp $modpath.3 +set mpre $modpathre.3 +setenv_path_var MODULEPATH $mp + +set mod complete/1.0 +set modname complete +set modfile $mp/$mod +set modfilere $mpre/$mod + + +# +# bad specifications +# + +setenv_var TESTSUITE_COMPLETE compbad1 + +# load +set tserr escre msg_load $mod msg_moderr {wrong # args: should be "complete shell name body"} {complete<EXM>} $modfile 5 {} {} {} {} {invoked from within} +testouterr_cmd_re bash "load $mod" ERR $tserr + +setenv_loaded_module list $mod list $modfile + +# unload +set tserr escre msg_unload $mod msg_moderr {wrong # args: should be "complete shell name body"} {complete<EXM>} $modfile 5 {} {} {} {} {invoked from within} +testouterr_cmd_re bash "unload $mod" ERR $tserr + +# refresh +set tserr escre msg_refresh $mod msg_moderr {wrong # args: should be "complete shell name body"} {complete<EXM>} $modfile 5 {} {} {} {} {invoked from within} +testouterr_cmd_re bash "refresh" ERR $tserr + +unsetenv_loaded_module + +# whatis +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re bash "whatis $mod" OK $tserr + +# display +set tserr "$modlin +$mpre/$mod: + +module-whatis\t$mod +complete\t +$modlin" +testouterr_cmd_re bash "display $mod" OK $tserr + +# help +set tserr "$modlin +Module Specific Help for $mpre/$mod: + +$warn_msgs: Unable to find ModulesHelp in $modfilere. +$modlin" +testouterr_cmd_re bash "help $mod" OK $tserr + +# test +set tserr "$modlin +Module Specific Test for $mpre/$mod: + +$warn_msgs: Unable to find ModulesTest in $modfilere. +$modlin" +testouterr_cmd_re bash "test $mod" OK $tserr + + +setenv_var TESTSUITE_COMPLETE compbad2 +set tserr escre msg_load $mod msg_moderr {wrong # args: should be "complete shell name body"} {complete bash<EXM>} $modfile 5 {} {} {} {} {invoked from within} +testouterr_cmd_re bash "load $mod" ERR $tserr + +setenv_loaded_module list $mod list $modfile +set tserr escre msg_unload $mod msg_moderr {wrong # args: should be "complete shell name body"} {complete bash<EXM>} $modfile 5 {} {} {} {} {invoked from within} +testouterr_cmd_re bash "unload $mod" ERR $tserr +unsetenv_loaded_module + + +setenv_var TESTSUITE_COMPLETE compbad3 +set tserr escre msg_load $mod msg_moderr {wrong # args: should be "complete shell name body"} {complete bash cmd<EXM>} $modfile 5 {} {} {} {} {invoked from within} +testouterr_cmd_re bash "load $mod" ERR $tserr + +setenv_loaded_module list $mod list $modfile +set tserr escre msg_unload $mod msg_moderr {wrong # args: should be "complete shell name body"} {complete bash cmd<EXM>} $modfile 5 {} {} {} {} {invoked from within} +testouterr_cmd_re bash "unload $mod" ERR $tserr +unsetenv_loaded_module + +setenv_var TESTSUITE_COMPLETE compbad4 +set tserr escre msg_load $mod msg_moderr {Invalid command name ''} {complete bash {} {-o default -F _cmd}<EXM>} $modfile 5 +testouterr_cmd_re bash "load $mod" ERR $tserr + +setenv_loaded_module list $mod list $modfile +set tserr escre msg_unload $mod msg_moderr {Invalid command name ''} {complete bash {} {-o default -F _cmd}<EXM>} $modfile 5 +testouterr_cmd_re bash "unload $mod" ERR $tserr +unsetenv_loaded_module + + +# +# regular specifications +# + +setenv_var TESTSUITE_COMPLETE comp1 + +# load +foreach shell $supported_shells { + set ans list + lappend ans list set _LMFILES_ $modfile + lappend ans list set LOADEDMODULES $mod + switch -- $shell { + bash { + lappend ans list out {complete -o default -F _cmd cmd;} + } + tcsh { + lappend ans list out {complete cmd some arg list for tcsh;} + } + fish { + lappend ans list out {complete -e -c cmd;} + lappend ans list out {complete -c cmd some arg list for fish;} + lappend ans list out {complete -c cmd other arg list for fish;} + } + } + testouterr_cmd $shell "load $mod" $ans {} +} + +setenv_loaded_module list $mod list $modfile + +# unload +foreach shell $supported_shells { + set ans list + lappend ans list unset _LMFILES_ + lappend ans list unset LOADEDMODULES + switch -- $shell { + bash { + lappend ans list out {complete -r cmd;} + } + tcsh { + lappend ans list out {uncomplete cmd;} + } + fish { + lappend ans list out {complete -e -c cmd;} + } + } + testouterr_cmd $shell "unload $mod" $ans {} +} + +# refresh +foreach shell $supported_shells { + switch -- $shell { + bash { + set ans list + lappend ans list out {complete -o default -F _cmd cmd;} + } + tcsh { + set ans list + lappend ans list out {complete cmd some arg list for tcsh;} + } + fish { + set ans list + lappend ans list out {complete -e -c cmd;} + lappend ans list out {complete -c cmd some arg list for fish;} + lappend ans list out {complete -c cmd other arg list for fish;} + } + default { + set ans list list OK nop + } + } + testouterr_cmd $shell "refresh" $ans {} +} + + +unsetenv_loaded_module + +# whatis +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re bash "whatis $mod" OK $tserr +testouterr_cmd_re sh "whatis $mod" OK $tserr + +# display +set tserr "$modlin +$mpre/$mod: + +module-whatis\t$mod +complete\tbash cmd {-o default -F _cmd} +complete\ttcsh cmd {some arg list for tcsh} +complete\tfish cmd {some arg list for fish} +complete\tfish cmd {other arg list for fish} +complete\tzsh cmd {some arg list for zsh} +complete\tunksh cmd {some arg list for unksh} +$modlin" +testouterr_cmd_re bash "display $mod" OK $tserr +testouterr_cmd_re sh "display $mod" OK $tserr + +# help +set tserr "$modlin +Module Specific Help for $mpre/$mod: + +$warn_msgs: Unable to find ModulesHelp in $modfilere. +$modlin" +testouterr_cmd_re bash "help $mod" OK $tserr +testouterr_cmd_re sh "help $mod" OK $tserr + +# test +set tserr "$modlin +Module Specific Test for $mpre/$mod: + +$warn_msgs: Unable to find ModulesTest in $modfilere. +$modlin" +testouterr_cmd_re bash "test $mod" OK $tserr +testouterr_cmd_re sh "test $mod" OK $tserr + + +setenv_var TESTSUITE_COMPLETE comp2 +foreach shell $supported_shells { + set ans list + lappend ans list set _LMFILES_ $modfile + lappend ans list set LOADEDMODULES $mod + switch -- $shell { + bash { + lappend ans list out {complete some arg list for shell cmd;} + lappend ans list out {complete other arg list for shell cmd;} + } + tcsh { + lappend ans list out {complete cmd some arg list for shell;} + lappend ans list out {complete cmd other arg list for shell;} + } + fish { + lappend ans list out {complete -e -c cmd;} + lappend ans list out {complete -c cmd some arg list for shell;} + lappend ans list out {complete -c cmd other arg list for shell;} + } + } + testouterr_cmd $shell "load $mod" $ans {} +} + + +# +# break/restore evaluations +# + +setenv_var TESTSUITE_COMPLETE compbreak1 +set ans list +lappend ans list set _LMFILES_ $mp/$modname/1.2 +lappend ans list set LOADEDMODULES $modname/1.2 +lappend ans list out {complete -o default -F _othercmd othercmd;} +lappend ans list ERR +set tserr msg_load $mod $err_evalabort +testouterr_cmd_re bash "load $mod $modname/1.2" $ans $tserr + +setenv_var TESTSUITE_COMPLETE compbreak2 +set ans list +lappend ans list set _LMFILES_ $mp/$modname/1.2 +lappend ans list set LOADEDMODULES $modname/1.2 +lappend ans list ERR +set tserr msg_load $mod $err_evalabort +testouterr_cmd_re bash "load $mod $modname/1.2" $ans $tserr + + +# +# combined evaluations +# + +setenv_var TESTSUITE_COMPLETE compcomb1 +set ans list +lappend ans list set _LMFILES_ $modfile:$mp/$modname/1.2 +lappend ans list set LOADEDMODULES $mod:$modname/1.2 +lappend ans list out {complete -r cmd;} +testouterr_cmd_re bash "load $mod $modname/1.2" $ans {} + + +# +# usage attempt from modulerc +# + +setenv_var TESTSUITE_COMPLETE comprc1 + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list ERR +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 3 : 6} +set tserr escre msg_moderr {invalid command name "complete"} {complete bash cmd {-o default -F _cmd}<EXM>} $mp/complete/.modulerc $ln { } +testouterr_cmd_re bash "load $mod" $ans $tserr + +set tserr $mp:\n$mod +testouterr_cmd bash "avail -t $mod" OK $tserr + +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re bash "whatis $mod" OK $tserr + + +# +# Cleanup +# + +reset_test_env
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.50-cmds/541-uncomplete.exp
Added
@@ -0,0 +1,194 @@ +############################################################################## +# Modules Revision 3.0 +# Providing a flexible user environment +# +# File: modules.50-cmds/%M% +# Revision: %I% +# First Edition: 2022/01/31 +# Last Mod.: %U%, %G% +# +# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr +# +# Description: Testuite testsequence +# Command: load, unload, display, help, test, whatis, refresh, avail +# Modulefiles: complete +# Sub-Command: +# +# Comment: %C{ +# Test uncomplete modulefile command +# }C% +# +############################################################################## + +set mp $modpath.3 +set mpre $modpathre.3 +setenv_path_var MODULEPATH $mp + +set mod complete/1.1 +set modname complete +set modfile $mp/$mod +set modfilere $mpre/$mod + + +# +# bad specifications +# + +setenv_var TESTSUITE_COMPLETE uncompbad1 + +# load +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 8} +set tserr escre msg_load $mod msg_moderr {wrong # args: should be "uncomplete name"} {uncomplete<EXM>} $modfile $ln {} {} {} {} {invoked from within} +testouterr_cmd_re bash "load $mod" ERR $tserr + +setenv_loaded_module list $mod list $modfile + +# unload +set ans list +lappend ans list unset _LMFILES_ +lappend ans list unset LOADEDMODULES +testouterr_cmd_re bash "unload $mod" $ans {} + +# refresh +testouterr_cmd_re bash "refresh" OK {} + +unsetenv_loaded_module + +# whatis +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re bash "whatis $mod" OK $tserr + +# display +set tserr "$modlin +$mpre/$mod: + +module-whatis\t$mod +uncomplete\t +$modlin" +testouterr_cmd_re bash "display $mod" OK $tserr + +# help +set tserr "$modlin +Module Specific Help for $mpre/$mod: + +$warn_msgs: Unable to find ModulesHelp in $modfilere. +$modlin" +testouterr_cmd_re bash "help $mod" OK $tserr + +# test +set tserr "$modlin +Module Specific Test for $mpre/$mod: + +$warn_msgs: Unable to find ModulesTest in $modfilere. +$modlin" +testouterr_cmd_re bash "test $mod" OK $tserr + + +setenv_var TESTSUITE_COMPLETE uncompbad2 +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 11} +set tserr escre msg_load $mod msg_moderr {wrong # args: should be "uncomplete name"} {uncomplete cmd cmd<EXM>} $modfile $ln {} {} {} {} {invoked from within} +testouterr_cmd_re bash "load $mod" ERR $tserr + +setenv_loaded_module list $mod list $modfile +testouterr_cmd_re bash "unload $mod" $ans {} +unsetenv_loaded_module + + +setenv_var TESTSUITE_COMPLETE uncompbad3 +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 5 : 14} +set tserr escre msg_load $mod msg_moderr {Invalid command name ''} {uncomplete {}<EXM>} $modfile $ln +testouterr_cmd_re bash "load $mod" ERR $tserr + +setenv_loaded_module list $mod list $modfile +testouterr_cmd_re bash "unload $mod" $ans {} +unsetenv_loaded_module + + +# +# break/restore evaluations +# + +setenv_var TESTSUITE_COMPLETE uncompbreak1 +set ans list +lappend ans list set _LMFILES_ $mp/$modname/1.2 +lappend ans list set LOADEDMODULES $modname/1.2 +lappend ans list out {complete -r othercmd;} +lappend ans list ERR +set tserr msg_load $mod $err_evalabort +testouterr_cmd_re bash "load $mod $modname/1.2" $ans $tserr + +setenv_var TESTSUITE_COMPLETE uncompbreak2 +set ans list +lappend ans list set _LMFILES_ $mp/$modname/1.2 +lappend ans list set LOADEDMODULES $modname/1.2 +lappend ans list ERR +set tserr msg_load $mod $err_evalabort +testouterr_cmd_re bash "load $mod $modname/1.2" $ans $tserr + + +# +# combined evaluations +# + +setenv_var TESTSUITE_COMPLETE uncompcomb1 +set ans list +lappend ans list set _LMFILES_ $modfile:$mp/$modname/1.2 +lappend ans list set LOADEDMODULES $mod:$modname/1.2 +lappend ans list out {complete -o default -F _cmd cmd;} +testouterr_cmd_re bash "load $mod $modname/1.2" $ans {} + + +# +# regular specifications +# + +setenv_var TESTSUITE_COMPLETE uncomp1 +foreach shell $supported_shells { + set ans list + lappend ans list set _LMFILES_ $modfile + lappend ans list set LOADEDMODULES $mod + switch -- $shell { + bash { + lappend ans list out {complete -r cmd;} + lappend ans list out {complete -r othercmd;} + } + tcsh { + lappend ans list out {uncomplete cmd;} + lappend ans list out {uncomplete othercmd;} + } + fish { + lappend ans list out {complete -e -c cmd;} + lappend ans list out {complete -e -c othercmd;} + } + } + testouterr_cmd $shell "load $mod" $ans {} +} + +# +# usage attempt from modulerc +# + +setenv_var TESTSUITE_COMPLETE uncomprc1 + +set ans list +lappend ans list set _LMFILES_ $modfile +lappend ans list set LOADEDMODULES $mod +lappend ans list ERR +set ln expr {cmpversion $tclsh_version 8.6 == -1 ? 3 : 9} +set tserr escre msg_moderr {invalid command name "uncomplete"} {uncomplete cmd<EXM>} $mp/complete/.modulerc $ln { } +testouterr_cmd_re bash "load $mod" $ans $tserr + +set tserr $mp:\n$mod +testouterr_cmd bash "avail -t $mod" OK $tserr + +set tserr "$modlin $mpre $modlin +\\s*$mod: $mod" +testouterr_cmd_re bash "whatis $mod" OK $tserr + + +# +# Cleanup +# + +reset_test_env
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.61-coll/010-init_ts.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.61-coll/010-init_ts.exp
Changed
@@ -36,6 +36,8 @@ set nohomeerrmsg "$error_msgs: HOME not defined" +set headercompattag "#%Module5.1\n" + set collemptytarget "emptytarget" set colltarget "target" set coll1 "coll1" @@ -162,6 +164,59 @@ set coll36f coll36.$colltarget set coll36fp $hometestdotmod/$coll36f set coll36fpre escre $coll36fp +set coll37 coll37 +set coll37f coll37.$colltarget +set coll37fp $hometestdotmod/$coll37f +set coll37fpre escre $coll37fp +set coll37pin coll37pin +set coll37pinf coll37pin.$colltarget +set coll37pinfp $hometestdotmod/$coll37pinf +set coll38 coll38 +set coll38f coll38.$colltarget +set coll38fp $hometestdotmod/$coll38f +set coll38fpre escre $coll38fp +set coll38pin coll38pin +set coll38pinf coll38pin.$colltarget +set coll38pinfp $hometestdotmod/$coll38pinf +set coll39 coll39 +set coll39fp $homewithcoll/$coll39 +set coll39fpre escre $coll39fp +set coll40 coll40 +set coll40fp $homewithcoll/$coll40 +set coll40fpre escre $coll40fp +set coll41 coll41 +set coll41fp $homewithcoll/$coll41 +set coll41fpre escre $coll41fp +set coll42 coll42 +set coll42fp $homewithcoll/$coll42 +set coll42fpre escre $coll42fp +set coll43 coll43 +set coll43fp $homewithcoll/$coll43 +set coll43fpre escre $coll43fp +set coll44 coll44 +set coll44f coll44.$colltarget +set coll44fp $hometestdotmod/$coll44f +set coll44fpre escre $coll44fp +set coll44pin coll44pin +set coll44pinf coll44pin.$colltarget +set coll44pinfp $hometestdotmod/$coll44pinf +set coll45 coll45 +set coll45fp $homewithcoll/$coll45 +set coll45fpre escre $coll45fp +set coll46 coll46 +set coll46fp $homewithcoll/$coll46 +set coll46fpre escre $coll46fp +set coll47 coll47 +set coll47f coll47.$colltarget +set coll47fp $hometestdotmod/$coll47f +set coll47fpre escre $coll47fp +set coll48 coll48 +set coll48f coll48 +set coll48fp $homewithcolldotmod/$coll48f +set coll48fpre escre $coll48fp +set coll49 coll49 +set coll49fp $homewithcoll/$coll49 +set coll49fpre escre $coll49fp set cdmodpath1 "$modpath" set cdmodpath1re "$modpathre" @@ -340,6 +395,94 @@ set c36modpath1re escre $c36modpath1 set c36mod1 {variant/1.0} set c36mod1vr list {foo=val1} +set c37modpath1 $modpath.3 +set c37modpath1re escre $c37modpath1 +set c37mod1 {variant/3.0} +set c37mod1extratag list foo +set c37mod1tag list foo auto-loaded +set c37mod1vr list {bar=val1} +set c37mod2 {tag/8.0} +set c37mod2extratag list foo +set c37mod2tag list foo bar +set c38modpath1 $modpath.3 +set c38modpath1re escre $c38modpath1 +set c38mod1 {variant/3.0} +set c38mod1extratag list foo +set c38mod1tag list foo auto-loaded +set c38mod1vr list {bar=val1} +set c38mod2 {tag/8.0} +set c38mod2extratag list foo +set c38mod2tag list bar foo +set c39modpath1 $modpath.3 +set c39modpath1re escre $c39modpath1 +set c39mod1 {tag/8.0} +set c39mod1extratag list foo bar +set c39mod1tag list foo bar +set c39mod2 {foo/1.0} +set c39mod2extratag list foo bar +set c39mod2tag list foo bar +set c40modpath1 $modpath.3 +set c40modpath1re escre $c40modpath1 +set c40mod1 {tag/8.0} +set c40mod1extratag list bar +set c40mod1tag list bar +set c40mod2 {foo/1.0} +set c41modpath1 $modpath.3 +set c41modpath1re escre $c41modpath1 +set c41mod1 {foo/1.0} +set c41mod1extratag list bar +set c41mod1tag list bar +set c42modpath1 $modpath.3 +set c42modpath1re escre $c42modpath1 +set c42mod1 {foo/1.0} +set c43modpath1 $modpath.3 +set c43modpath1re escre $c43modpath1 +set c43mod1 {tag/8.0} +set c43mod1extratag list bar +set c43mod1tag list bar +set c43mod2 {foo/1.0} +set c44modpath1 $modpath.3 +set c44modpath1re escre $c44modpath1 +set c44mod1 {foo/1.0} +set c44mod1extratag list foo +set c44mod1tag list foo auto-loaded keep-loaded +set c44mod2 {tag/8.0} +set c44mod2extratag list bar foo +set c44mod2tag list bar foo +set c44mod3 {bar/1.0} +set c45modpath1 $modpath.3 +set c45modpath1re escre $c45modpath1 +set c45mod1 {foo/1.0} +set c45mod1extratag list foo nearly-forbidden +set c45mod1tag list foo auto-loaded keep-loaded nearly-forbidden +set c45mod2 {tag/8.0} +set c45mod2extratag list bar foo +set c45mod2tag list bar foo +set c45mod3 {bar/1.0} +set c46modpath1 $modpath.3 +set c46modpath1re escre $c46modpath1 +set c46mod1 {foo/1.0} +set c46mod1extratag list foo forbidden +set c46mod1tag list foo auto-loaded keep-loaded forbidden +set c46mod2 {tag/8.0} +set c46mod2extratag list bar foo +set c46mod2tag list bar foo +set c46mod3 {bar/1.0} +set c47modpath1 $modpath.3 +set c47modpath1re escre $c47modpath1 +set c47mod1 {tag/8.0} +set c47mod1extratag list foo +set c47mod1tag list foo nearly-forbidden +set c49modpath1 $modpath.3 +set c49modpath1re escre $c49modpath1 +set c49mod1 {variant/3.0} +set c49mod2 {tag/8.0} +set c49mod2extratag list foo +set c49mod2tag list foo keep-loaded +set c49mod3 {foo/1.0} +set c49mod3extratag list bar +set c49mod3tag list auto-loaded bar keep-loaded +set c49mod4 {keep/1.0} set cdlmf "$cdmodpath1/$cdmod1:$cdmodpath1/$cdmod2:$cdmodpath1/$cdmod3:$cdmodpath1/$cdmod4:$cdmodpath1/$cdmod5" set cdlm "$cdmod1:$cdmod2:$cdmod3:$cdmod4:$cdmod5" @@ -387,11 +530,13 @@ set c9modpath "$c9modpath1" set c9lmf "$c9modpath1/$c9mod1:$c9modpath1/$c9mod2:$c9modpath1/$c9mod3" set c9lm "$c9mod1:$c9mod2:$c9mod3" -set c9lmnua "$c9mod2&auto-loaded" +set c9lmnua $c9mod2 +set c9lmtag $c9mod2&auto-loaded set c11modpath $c11modpath1 set c11lmf $c11modpath1/$c11mod1:$c11modpath1/$c11mod2 set c11lm $c11mod1:$c11mod2 -set c11lmnua $c11mod1&auto-loaded +set c11lmnua $c11mod1 +set c11lmtag $c11mod1&auto-loaded set c12modpath $c12modpath1 set c12lmf $c12modpath1/$c12mod1:$c12modpath1/$c12mod2 set c12lm $c12mod1:$c12mod2 @@ -446,26 +591,30 @@ set c22modpath "$c22modpath1" set c23lmf "$c23modpath1/$c23mod1:$c23modpath1/$c23mod2:$c23modpath1/$c23mod3" set c23lm "$c23mod1:$c23mod2:$c23mod3" -set c23lmnua "$c23mod1&auto-loaded:$c23mod2&auto-loaded" +set c23lmnua $c23mod1:$c23mod2 +set c23lmtag $c23mod1&auto-loaded:$c23mod2&auto-loaded set c23lmalt $c23mod3&as|variant/default&as|variant/latest set c23lmvr "$c23mod1&bar ||0|1&fo o|v?l1 |0|0:$c23mod3&b*r| val1|0|0" set c23modpath "$c23modpath1" set c24lmf "$c24modpath1/$c24mod1:$c24modpath1/$c24mod2:$c24modpath1/$c24mod3" set c24lm "$c24mod1:$c24mod2:$c24mod3" set c24lmalt $c24mod3&as|variant/default&as|variant/latest -set c24lmnua "$c24mod1&auto-loaded:$c24mod2&auto-loaded" +set c24lmnua $c24mod1:$c24mod2 +set c24lmtag $c24mod1&auto-loaded:$c24mod2&auto-loaded set c24lmvr "$c24mod1&bar ||0|1&fo o|v?l1 |0|0:$c24mod3&b*r| val1|0|0" set c24modpath "$c24modpath1" set c25lmf "$c25modpath1/$c25mod1:$c25modpath1/$c25mod2:$c25modpath1/$c25mod3" set c25lm "$c25mod1:$c25mod2:$c25mod3" set c25lmalt $c25mod3&as|variant/default&as|variant/latest -set c25lmnua "$c25mod1&auto-loaded:$c25mod2&auto-loaded" +set c25lmnua $c25mod1:$c25mod2 +set c25lmtag $c25mod1&auto-loaded:$c25mod2&auto-loaded set c25lmvr "$c25mod1&bar ||0|1&fo o|v?l1 |0|0:$c25mod3&b*r| val1|0|0" set c25modpath "$c25modpath1" set c26lmf "$c26modpath1/$c26mod1:$c26modpath1/$c26mod2:$c26modpath1/$c26mod3" set c26lm "$c26mod1:$c26mod2:$c26mod3" set c26lmalt $c26mod3&as|variant/default&as|variant/latest -set c26lmnua "$c26mod1&auto-loaded:$c26mod2&auto-loaded" +set c26lmnua $c26mod1:$c26mod2 +set c26lmtag $c26mod1&auto-loaded:$c26mod2&auto-loaded set c26lmvr "$c26mod1&bar ||0|1&fo o|v?l1 |0|0:$c26mod3&b*r| val1|0|1" set c26modpath "$c26modpath1" set c30lmf "$c30modpath1/$c30mod1:$c30modpath1/$c30mod2:$c30modpath1/$c30mod3" @@ -497,6 +646,64 @@ set c36lm "$c36mod1" set c36lmvr "$c36mod1&foo|val1|0|0" set c36modpath "$c36modpath1" +set c37lmf $c37modpath1/$c37mod1:$c37modpath1/$c37mod2 +set c37lm $c37mod1:$c37mod2 +set c37lmvr $c37mod1&bar|val1|0|0 +set c37lmextratag $c37mod1&join $c37mod1extratag &:$c37mod2&join $c37mod2extratag & +set c37lmtag $c37mod1&join $c37mod1tag &:$c37mod2&join $c37mod2tag & +set c37modpath $c37modpath1 +set c38lmf $c38modpath1/$c38mod1:$c38modpath1/$c38mod2 +set c38lm $c38mod1:$c38mod2 +set c38lmvr $c38mod1&bar|val1|0|0 +set c38lmextratag $c38mod1&join $c38mod1extratag &:$c38mod2&join $c38mod2extratag & +set c38lmtag $c38mod1&join $c38mod1tag &:$c38mod2&join $c38mod2tag & +set c38modpath $c38modpath1 +set c39lmf $c39modpath1/$c39mod1:$c39modpath1/$c39mod2 +set c39lm $c39mod1:$c39mod2 +set c39lmextratag $c39mod1&join $c39mod1extratag &:$c39mod2&join $c39mod2extratag & +set c39lmtag $c39mod1&join $c39mod1tag &:$c39mod2&join $c39mod2tag & +set c39modpath $c39modpath1 +set c40lmf $c40modpath1/$c40mod1:$c40modpath1/$c40mod2 +set c40lm $c40mod1:$c40mod2 +set c40lmextratag $c40mod1&join $c40mod1extratag & +set c40lmtag $c40mod1&join $c40mod1tag & +set c40modpath $c40modpath1 +set c41lmf $c41modpath1/$c41mod1 +set c41lm $c41mod1 +set c41lmextratag $c41mod1&join $c41mod1extratag & +set c41lmtag $c41mod1&join $c41mod1tag & +set c41modpath $c41modpath1 +set c42lmf $c42modpath1/$c42mod1 +set c42lm $c42mod1 +set c42modpath $c42modpath1 +set c43lmf $c43modpath1/$c43mod1:$c43modpath1/$c43mod2 +set c43lm $c43mod1:$c43mod2 +set c43lmextratag $c43mod1&join $c43mod1extratag & +set c43lmtag $c43mod1&join $c43mod1tag & +set c44lmf $c44modpath1/$c44mod1:$c44modpath1/$c44mod2:$c44modpath1/$c44mod3 +set c44lm $c44mod1:$c44mod2:$c44mod3 +set c44lmextratag $c44mod1&join $c44mod1extratag &:$c44mod2&join $c44mod2extratag & +set c44lmtag $c44mod1&join $c44mod1tag &:$c44mod2&join $c44mod2tag & +set c44modpath $c44modpath1 +set c45lmf $c45modpath1/$c45mod1:$c45modpath1/$c45mod2:$c45modpath1/$c45mod3 +set c45lm $c45mod1:$c45mod2:$c45mod3 +set c45lmextratag $c45mod1&join $c45mod1extratag &:$c45mod2&join $c45mod2extratag & +set c45lmtag $c45mod1&join $c45mod1tag &:$c45mod2&join $c45mod2tag & +set c45modpath $c45modpath1 +set c46lmf $c46modpath1/$c46mod3 +set c46lm $c46mod3 +set c46modpath $c46modpath1 +set c47lmf $c47modpath1/$c47mod1 +set c47lm $c47mod1 +set c47lmextratag $c47mod1&join $c47mod1extratag & +set c47lmtag $c47mod1&join $c47mod1tag & +set c47modpath $c47modpath1 +set c49lmf $c49modpath1/$c49mod1:$c49modpath1/$c49mod2:$c49modpath1/$c49mod3:$c49modpath1/$c49mod4 +set c49lm $c49mod1:$c49mod2:$c49mod3:$c49mod4 +set c49lmvr $c49mod1&bar|val2|0|0:$c49mod2&bar|0|1|0&foo|1|1|0 +set c49lmextratag $c49mod2&join $c49mod2extratag &:$c49mod3&join $c49mod3extratag & +set c49lmtag $c49mod2&join $c49mod2tag &:$c49mod3&join $c49mod3tag & +set c49modpath $c49modpath1 set mlu "module use --append" set mll "module load" @@ -514,8 +721,8 @@ set c7cont "$mll $c7mod1\n$mll $c7mod2\n$mll $c7mod3\n" set c7contre "$mll $c7mod1rel\n$mll $c7mod2rel\n$mll $c7mod3rel\n" set c8cont "$mlu $c8modpath1\n$mll $c8mod1\n$mll $c8mod2\n$mll $c8mod3\n" -set c9cont "$mlu $c9modpath1\n$mll $c9mod1\n$mll --notuasked $c9mod2\n$mll $c9mod3\n" -set c11cont "$mlu $c11modpath1\n$mll --notuasked $c11mod1\n$mll $c11mod2\n" +set c9cont "$mlu $c9modpath1\n$mll $c9mod1\n$mll --tag=auto-loaded $c9mod2\n$mll $c9mod3\n" +set c11cont "$mlu $c11modpath1\n$mll --tag=auto-loaded $c11mod1\n$mll $c11mod2\n" set c15cont "$mlu {$c15modpath1}\n$mll {$c15mod1}\n$mll $c15mod2\n$mll {$c15mod3}\n" set c15contre "$mlu {$c15modpath1re}\n$mll {$c15mod1}\n$mll $c15mod2\n$mll {$c15mod3}\n" set c16cont "$mlu {$c16modpath1}\n$mll {$c16mod1}\n$mll {$c16mod2}\n$mll $c16mod3\n$mll $c16mod4\n$mll {$c16mod4}\n" @@ -531,13 +738,13 @@ set c20cont "$mlu $c20modpath1\n$mll $c20mod1 $c20mod1vr\n$mll $c20mod2\n$mll {$c20mod3} $c20mod3vr\n" set c21cont "$mlu $c21modpath1\n$mll $c21mod1 $c21mod1vr\n$mll $c21mod2\n$mll variant $c21mod3vr\n" set c22cont "$mlu $c22modpath1\n$mll $c22mod1 $c22mod1vr\n$mll $c22mod2\n$mll variant\n" -set c23cont "$mlu $c23modpath1\n$mll --notuasked $c23mod1 $c23mod1vr\n$mll --notuasked $c23mod2\n$mll variant $c23mod3vr\n" -set c24cont "$mlu $c24modpath1\n$mll --notuasked $c24mod1 $c24mod1vr\n$mll --notuasked $c24mod2\n$mll {$c24mod3} $c24mod3vr\n" -set c25cont "$mlu $c25modpath1\n$mll --notuasked $c25mod1 $c25mod1vr\n$mll --notuasked $c25mod2\n$mll {$c25mod3} $c25mod3vr\n" +set c23cont "$mlu $c23modpath1\n$mll --tag=auto-loaded $c23mod1 $c23mod1vr\n$mll --tag=auto-loaded $c23mod2\n$mll variant $c23mod3vr\n" +set c24cont "$mlu $c24modpath1\n$mll --tag=auto-loaded $c24mod1 $c24mod1vr\n$mll --tag=auto-loaded $c24mod2\n$mll {$c24mod3} $c24mod3vr\n" +set c25cont "$mlu $c25modpath1\n$mll --tag=auto-loaded $c25mod1 $c25mod1vr\n$mll --tag=auto-loaded $c25mod2\n$mll {$c25mod3} $c25mod3vr\n" set c25contre escre $c25cont -set c26cont "$mlu $c26modpath1\n$mll --notuasked $c26mod1 $c26mod1vr\n$mll --notuasked $c26mod2\n$mll {$c26mod3} $c26mod3vr\n" +set c26cont "$mlu $c26modpath1\n$mll --tag=auto-loaded $c26mod1 $c26mod1vr\n$mll --tag=auto-loaded $c26mod2\n$mll {$c26mod3} $c26mod3vr\n" set c26contre escre $c26cont -set c26contnoavs "$mlu $c26modpath1\n$mll --notuasked $c26mod1\n$mll --notuasked {bar =}\n$mll --notuasked {fo o=v?l1 }\n$mll --notuasked $c26mod2\n$mll {$c26mod3}\n$mll $c26mod3vr\n" +set c26contnoavs "$mlu $c26modpath1\n$mll --tag=auto-loaded $c26mod1\n$mll --tag=auto-loaded {bar =}\n$mll --tag=auto-loaded {fo o=v?l1 }\n$mll --tag=auto-loaded $c26mod2\n$mll {$c26mod3}\n$mll $c26mod3vr\n" set c26contnoavsre escre $c26contnoavs set c29cont "$mlu $c26modpath1\n$mll $c26mod1 unk=val\n$mll $c26mod2\n" set c29contre escre $c29cont @@ -545,6 +752,27 @@ set c35cont "$mlu $c35modpath1\n$mll $c35mod1 $c35mod1vr\n$mll $c35mod2 $c35mod2vr\n" set c36cont "$mlu $c35modpath1\n$mll $c36mod1 $c36mod1vr\n" set c36contre escre $c36cont +set c37cont "$mlu $c37modpath1\n$mll --tag=join $c37mod1tag : $c37mod1 $c37mod1vr\n$mll --tag=join $c37mod2extratag : $c37mod2\n" +set c37contre escre $c37cont +set c37pincont "$mlu $c37modpath1\n$mll --tag=join $c37mod1tag : $c37mod1 $c37mod1vr\n$mll --tag=join $c37mod2tag : $c37mod2\n" +set c38cont "$mlu $c38modpath1\n$mll --tag=join $c38mod1tag : $c38mod1 $c38mod1vr\n$mll --tag=join $c38mod2extratag : $c38mod2\n" +set c38contre escre $c38cont +set c38pincont "$mlu $c38modpath1\n$mll --tag=join $c38mod1tag : $c38mod1 $c38mod1vr\n$mll --tag=join $c38mod2tag : $c38mod2\n" +set c39cont "$mlu $c39modpath1\n$mll --tag=join $c39mod1tag : $c39mod1\n$mll --tag=join $c39mod2tag : $c39mod2\n" +set c39contre escre $c39cont +set c40cont "$mlu $c40modpath1\n$mll $c40mod1\n$mll $c40mod2\n" +set c40contre escre $c40cont +set c41cont "$mlu $c41modpath1\n$mll --tag=join $c41mod1tag : $c41mod1\n" +set c41contre escre $c41cont +set c42cont "$mlu $c42modpath1\n$mll $c42mod1\n" +set c42contre escre $c42cont +set c43cont "$mlu $c43modpath1\n$mll --tag\n$mll $c43mod1\n$mll $c43mod2\n" +set c43contre escre $c43cont +set c44cont "$mlu $c44modpath1\n$mll --tag=join $c44mod1tag : $c44mod1\n$mll --tag=join $c44mod2extratag : $c44mod2\n$mll $c44mod3\n" +set c44contre escre $c44cont +set c44pincont "$mlu $c44modpath1\n$mll --tag=join $c44mod1tag : $c44mod1\n$mll --tag=join $c44mod2tag : $c44mod2\n$mll $c44mod3\n" +set c47cont "$mlu $c47modpath1\n$mll --tag=join $c47mod1extratag : $c47mod1\n" +set c47contre escre $c47cont # generate modulefiles that cannot be recorded in git repository create_endspace_test_modulefiles
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.61-coll/020-savelist.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.61-coll/020-savelist.exp
Changed
@@ -57,7 +57,7 @@ # set a specific width for test if {!info exists term_cols} { - # skip tests if current terminal witdh is unknown + # skip tests if current terminal width is unknown send_user "\tskipping terminal width-specific tests\n" } elseif {catch {exec stty cols 80} || getTtyCols ne 80} { send_user "\tskipping terminal width-specific tests, cannot set width\n" @@ -69,6 +69,15 @@ testouterr_cmd_re "sh" "savelist --long" "OK" "$header_long\n$header_coll\n$coll_list_long" testouterr_cmd_re "sh" "savelist -t --long" "OK" "$header_long\n$header_coll\n$coll_list_long" +# test effect of mcookie configuration +setenv_var MODULES_MCOOKIE_CHECK eval +testouterr_cmd sh "savelist --terse" OK "$header_coll\n$coll_list" +setenv_var MODULES_MCOOKIE_CHECK always + +setenv_var MODULES_MCOOKIE_VERSION_CHECK 0 +testouterr_cmd sh "savelist --terse" OK "$header_coll\n$coll_list" +setenv_var MODULES_MCOOKIE_VERSION_CHECK 1 + # restore terminal width exec stty cols $term_cols
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.61-coll/030-save.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.61-coll/030-save.exp
Changed
@@ -221,7 +221,7 @@ setenv_loaded_module split $c9lm ":" split $c9lmf ":" split $c9lmnua ":" # test only sh shell as this test does not produce shell output -testoutfile_cmd "sh" "save $coll9" "OK" "$hometestdotmod/$coll9f" "$c9cont" +testoutfile_cmd sh "save $coll9" OK $hometestdotmod/$coll9f $headercompattag$c9cont # @@ -235,7 +235,7 @@ setenv_var __MODULES_LMPREREQ $c11mod2&$c11mod1 # test only sh shell as this test does not produce shell output -testoutfile_cmd sh "save $coll11" OK $hometestdotmod/$coll11f $c11cont +testoutfile_cmd sh "save $coll11" OK $hometestdotmod/$coll11f $headercompattag$c11cont # @@ -341,14 +341,14 @@ setenv_var __MODULES_LMVARIANT $c23lmvr setenv_var __MODULES_LMALTNAME $c23lmalt setenv_loaded_module split $c23lm : split $c23lmf : split $c23lmnua : -testoutfile_cmd sh "save $coll23" OK $hometestdotmod/$coll23f $c23cont +testoutfile_cmd sh "save $coll23" OK $hometestdotmod/$coll23f $headercompattag$c23cont setenv_var MODULES_COLLECTION_PIN_VERSION 1 setenv_var __MODULES_LMALTNAME $c24lmalt eval setenv_path_var MODULEPATH split $c24modpath : setenv_var __MODULES_LMVARIANT $c24lmvr setenv_loaded_module split $c24lm : split $c24lmf : split $c24lmnua : -testoutfile_cmd sh "save $coll24" OK $hometestdotmod/$coll24f $c24cont +testoutfile_cmd sh "save $coll24" OK $hometestdotmod/$coll24f $headercompattag$c24cont # test with boolean variant unsetenv_var __MODULES_LMALTNAME @@ -380,7 +380,7 @@ setenv_var __MODULES_LMALTNAME $c25lmalt setenv_var __MODULES_LMVARIANT $c25lmvr setenv_loaded_module split $c25lm : split $c25lmf : split $c25lmnua : -testoutfile_cmd sh "save $coll25" OK $hometestdotmod/$coll25f $c25cont +testoutfile_cmd sh "save $coll25" OK $hometestdotmod/$coll25f $headercompattag$c25cont unsetenv_var __MODULES_LMALTNAME unsetenv_loaded_module @@ -391,6 +391,74 @@ # +# tag tests +# + +# ensure advanced_version_spec is enabled to record variant +setenv_var MODULES_ADVANCED_VERSION_SPEC 1 + +setenv_var TESTSUITE_TAG_OPT colltag1 + +setenv_path_var MODULEPATH {*}split $c37modpath : +setenv_var __MODULES_LMVARIANT $c37lmvr +setenv_loaded_module split $c37lm : split $c37lmf : +setenv_var __MODULES_LMTAG $c37lmtag +setenv_var __MODULES_LMEXTRATAG $c37lmextratag +testoutfile_cmd sh "save $coll37" OK $hometestdotmod/$coll37f $headercompattag$c37cont + +setenv_var MODULES_COLLECTION_PIN_TAG 1 +testoutfile_cmd sh "save $coll37pin" OK $hometestdotmod/$coll37pinf $headercompattag$c37pincont + +setenv_var MODULES_COLLECTION_PIN_TAG 0 + +setenv_path_var MODULEPATH {*}split $c38modpath : +setenv_var __MODULES_LMVARIANT $c38lmvr +setenv_loaded_module split $c38lm : split $c38lmf : +setenv_var __MODULES_LMTAG $c38lmtag +setenv_var __MODULES_LMEXTRATAG $c38lmextratag +testoutfile_cmd sh "save $coll38" OK $hometestdotmod/$coll38f $headercompattag$c38cont + +setenv_var MODULES_COLLECTION_PIN_TAG 1 +testoutfile_cmd sh "save $coll38pin" OK $hometestdotmod/$coll38pinf $headercompattag$c38pincont + +unsetenv_var MODULES_COLLECTION_PIN_TAG + +setenv_var TESTSUITE_TAG_OPT colltag3 + +# test tag defined by module-tag also set with --tag option +# test keep-loaded tag that should not be recorded in extra tag list +# test empty entry in __MODULES_LMEXTRATAG +setenv_path_var MODULEPATH {*}split $c44modpath : +unsetenv_var __MODULES_LMVARIANT +setenv_loaded_module split $c44lm : split $c44lmf : +setenv_var __MODULES_LMTAG $c44lmtag +setenv_var __MODULES_LMEXTRATAG $c44mod1&join $c44mod1extratag &:$c44mod2&join $c44mod2extratag &:$c44mod3 +testoutfile_cmd sh "save $coll44" OK $hometestdotmod/$coll44f $headercompattag$c44cont + +setenv_var MODULES_COLLECTION_PIN_TAG 1 +testoutfile_cmd sh "save $coll44pin" OK $hometestdotmod/$coll44pinf $headercompattag$c44pincont + +# test nearly-forbidden tag is not saved in collection even +# with collection_pin_tag config option enabled +setenv_path_var MODULEPATH {*}split $c47modpath : +setenv_loaded_module split $c47lm : split $c47lmf : +setenv_var __MODULES_LMTAG $c47lmtag +setenv_var __MODULES_LMEXTRATAG $c47lmextratag +testoutfile_cmd sh "save $coll47" OK $hometestdotmod/$coll47f $headercompattag$c47cont + +setenv_var MODULES_COLLECTION_PIN_TAG 1 +testoutfile_cmd sh "save $coll47" OK $hometestdotmod/$coll47f $headercompattag$c47cont + +unsetenv_var MODULES_COLLECTION_PIN_TAG +unsetenv_var TESTSUITE_TAG_OPT +unsetenv_loaded_module +unsetenv_var __MODULES_LMVARIANT +unsetenv_var __MODULES_LMTAG +unsetenv_var __MODULES_LMEXTRATAG +unsetenv_var MODULES_ADVANCED_VERSION_SPEC + + +# # test unsetting HOME #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.61-coll/040-restore.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.61-coll/040-restore.exp
Changed
@@ -34,10 +34,11 @@ set badcontfperrmsg "$error_msgs: $badcontfp is not a valid collection" set c7errmsg "Loading $modpathre.path3/dcross/dir1/3.0\nLoading $modpathre.path2/cross/6.0\nLoading $modpathre.path1/novercross" set c8errmsg $c7errmsg -set c9errmsg "load $c9mod1\nLoading $c9mod1\nload $c9mod2\nLoading $c9mod2\nload $c9mod3\nLoading $c9mod3" -set c10errmsg $c9errmsg -set c9errmsg2 "unload $c9mod3\nUnloading $c9mod3\nunload $c9mod2\nUnloading $c9mod2\nload $c9mod2\nLoading $c9mod2\nload $c9mod3\nLoading $c9mod3" -set c11errmsg "load $c11mod1\nLoading $c11mod1\nload $c11mod2\nLoading $c11mod2" +set c9errmsg "load $c9mod1\nLoading $c9mod1\nload $c9mod2\nLoading $c9mod2 <aL>\nload $c9mod3\nLoading $c9mod3" +set c10errmsg "$error_msgs: $msg_nomodnameinarg '--notuasked'" +set c10errmsgb "load $c9mod1\nLoading $c9mod1\n$err_path'--notuasked'\nload $c9mod2\nLoading $c9mod2 <aL>\nload $c9mod3\nLoading $c9mod3" +set c9errmsg2 "unload $c9mod3\nUnloading $c9mod3\nunload $c9mod2\nUnloading $c9mod2\nload $c9mod2\nLoading $c9mod2 <aL>\nload $c9mod3\nLoading $c9mod3" +set c11errmsg "load $c11mod1\nLoading $c11mod1 <aL>\nload $c11mod2\nLoading $c11mod2" set c12errmsg "unload $c9mod3\nUnloading $c9mod3\nunload $c9mod2\nUnloading $c9mod2\nunload $c9mod1\nUnloading $c9mod1\nload f4\nLoading f4\nload f5\nLoading f5\n\nmsg_load f6 err_conlo f5\n\nmsg_load f7 err_reqmis f6" set c13errmsg $cderrmsg set c14errmsg "unload m2\nUnloading m2\nload m3\nLoading m3" @@ -47,7 +48,7 @@ set c19errmsg escre "Loading $c19mod1{join $c19mod1vr :}\nLoading $c19mod2\nLoading '$c19mod3'{join $c19mod3vr :}" set c20errmsg escre "Loading $c20mod1{join $c20mod1vr :}\nLoading $c20mod2\nLoading '$c20mod3'{join $c20mod3vr :}" set c22errmsg escre "Loading $c22mod1{bar =:join $c22mod1vr :}\nLoading $c22mod2\nLoading '$c22mod3'{b*r= val1}" -set c26errmsg escre "Loading $c26mod1{join $c26mod1vr :}\nLoading $c26mod2\nLoading '$c26mod3'{join $c20mod3vr :}" +set c26errmsg escre "Loading $c26mod1{join $c26mod1vr :} <aL>\nLoading $c26mod2 <aL>\nLoading '$c26mod3'{join $c20mod3vr :}" # set HOME to location containing collections if { $verbose > 0 } { @@ -78,6 +79,23 @@ # +# test restoring collection requiring an upcoming version of Modules +# test effect of mcookie configuration with this collection +# + +testouterr_cmd sh "restore $coll48" ERR collerr_minverreqns $coll48fp 99 +testouterr_cmd sh "restore $coll48fp" ERR collerr_minverreqns $coll48fp 99 + +setenv_var MODULES_MCOOKIE_CHECK eval +testouterr_cmd sh "restore $coll48" ERR collerr_minverreqns $coll48fp 99 +setenv_var MODULES_MCOOKIE_CHECK always + +setenv_var MODULES_MCOOKIE_VERSION_CHECK 0 +testouterr_cmd sh "restore $coll48" ERR collerr_minverreqns $coll48fp 99 +setenv_var MODULES_MCOOKIE_VERSION_CHECK 1 + + +# # test restoring default collection # @@ -197,7 +215,7 @@ # -# test restoring collection not mentionning module to load +# test restoring collection not mentioning module to load # when MODULES_COLLECTION_TARGET set # @@ -338,7 +356,7 @@ set ans list lappend ans list set _LMFILES_ $c9lmf lappend ans list set LOADEDMODULES $c9lm -lappend ans list set __MODULES_LMTAG $c9lmnua +lappend ans list set __MODULES_LMTAG $c9lmtag lappend ans list set MODULEPATH $c9modpath testouterr_cmd_re "sh" "restore $coll9fp" $ans $c9errmsg @@ -351,10 +369,15 @@ set ans list lappend ans list set _LMFILES_ $c9lmf lappend ans list set LOADEDMODULES $c9lm -lappend ans list set __MODULES_LMTAG $c9lmnua +lappend ans list set __MODULES_LMTAG $c9lmtag lappend ans list set MODULEPATH $c9modpath +lappend ans list ERR -testouterr_cmd_re "sh" "restore $coll10fp" $ans $c10errmsg +setenv_var MODULES_ADVANCED_VERSION_SPEC 1 +testouterr_cmd_re "sh" "restore $coll10fp" ERR $c10errmsg +setenv_var MODULES_ADVANCED_VERSION_SPEC 0 +testouterr_cmd_re "sh" "restore $coll10fp" $ans $c10errmsgb +unsetenv_var MODULES_ADVANCED_VERSION_SPEC # @@ -368,7 +391,7 @@ set ans list lappend ans list set _LMFILES_ $c9lmf lappend ans list set LOADEDMODULES $c9lm -lappend ans list set __MODULES_LMTAG $c9lmnua +lappend ans list set __MODULES_LMTAG $c9lmtag testouterr_cmd_re "sh" "restore $coll9fp" $ans $c9errmsg2 @@ -396,7 +419,7 @@ lappend ans list set __MODULES_LMPREREQ $c11mod2&$c11mod1 lappend ans list set _LMFILES_ $c11lmf lappend ans list set LOADEDMODULES $c11lm -lappend ans list set __MODULES_LMTAG $c11lmnua +lappend ans list set __MODULES_LMTAG $c11lmtag testouterr_cmd_re sh "restore $coll11fp" $ans $c11errmsg @@ -611,7 +634,7 @@ lappend ans list set __MODULES_LMALTNAME $c26lmalt lappend ans list set _LMFILES_ $c26lmf lappend ans list set LOADEDMODULES $c26lm -lappend ans list set __MODULES_LMTAG $c26lmnua +lappend ans list set __MODULES_LMTAG $c26lmtag lappend ans list set MODULEPATH $c26modpath testouterr_cmd_re sh "restore $coll26fp" $ans $c26errmsg @@ -646,7 +669,7 @@ $err_path'{bar =}' $err_path'{fo o=v\\?l1 }' -Loading foo/1.0 +Loading foo/1.0 <aL> Loading 'variant/w s'{b\\*r= val1} $err_path'{b\\*r= val1}'" @@ -847,7 +870,7 @@ lappend ans list set _LMFILES_ $c32lmf lappend ans list set LOADEDMODULES $c32lm lappend ans list set __MODULES_LMTAG $c32mod1tag -set tserr msg_unload variant/8.0{bar=2:foo=val1}\n +set tserr msg_unload {variant/8.0{bar=2:foo=val1} <sS>}\n append tserr msg_load '$c32mod1'{join $c32mod1vr :}\nmsg_load $c32mod2 testouterr_cmd_re sh "restore $coll32fp" $ans $tserr @@ -857,19 +880,20 @@ setenv_loaded_module list variant/8.0 list $c33modpath1/variant/8.0 setenv_var __MODULES_LMVARIANT "variant/8.0&foo|val1|0|0&bar|2|0|1" setenv_var __MODULES_LMTAG variant/8.0&super-sticky -# CORNER CASE: stickyness swap do not know that default value of variant bar matches sticky rule +# CORNER CASE: stickiness swap do not know that default value of variant bar matches sticky rule set ans list lappend ans list set __MODULES_LMVARIANT variant/8.0&foo|val1|0|0&bar|2|0|1:$c33lmvr lappend ans list set _LMFILES_ $c33modpath1/variant/8.0:$c33lmf lappend ans list set LOADEDMODULES variant/8.0:$c33lm lappend ans list set __MODULES_LMTAG variant/8.0&super-sticky:$c33mod1tag lappend ans list ERR -set tserr msg_unload variant/8.0{bar=2:foo=val1} $err_superstickyunload\n\n +set tserr msg_unload {variant/8.0{bar=2:foo=val1} <sS>} $err_superstickyunload\n\n append tserr msg_load '$c33mod1'{join $c33mod1vr :}\nmsg_load $c33mod2 testouterr_cmd_re sh "restore $coll33fp" $ans $tserr unsetenv_var MODULES_COLLECTION_PIN_VERSION unsetenv_var __MODULES_LMTAG +unsetenv_var __MODULES_LMEXTRATAG unsetenv_var TESTSUITE_VARIANT_TAG # restore collection with boolean variants @@ -925,6 +949,391 @@ # +# tag tests +# + +# ensure advanced_version_spec is enabled to record variant +setenv_var MODULES_ADVANCED_VERSION_SPEC 1 + +setenv_var TESTSUITE_TAG_OPT colltag1 + +set ans list +lappend ans list set __MODULES_LMVARIANT $c37lmvr +lappend ans list set __MODULES_LMPREREQ $c37mod2&variant@3.0\ bar=val1 +lappend ans list set _LMFILES_ $c37lmf +lappend ans list set LOADEDMODULES $c37lm +lappend ans list set __MODULES_LMEXTRATAG $c37lmextratag +lappend ans list set __MODULES_LMTAG $c37lmtag +set tserr msg_load {variant/3.0{bar=val1} <aL:foo>}\nmsg_load {tag/8.0 <bar:foo>} +testouterr_cmd_re sh "restore $coll37fp" $ans $tserr + +setenv_var MODULES_COLLECTION_PIN_TAG 1 +set ans list +lappend ans list set __MODULES_LMVARIANT $c37lmvr +lappend ans list set __MODULES_LMPREREQ $c37mod2&variant@3.0\ bar=val1 +lappend ans list set _LMFILES_ $c37lmf +lappend ans list set LOADEDMODULES $c37lm +# when restoring collection saved with tags pinned, all these tags are +# set in the extra tags when collection is restored +lappend ans list set __MODULES_LMEXTRATAG $c37mod1&join $c37mod1extratag &:$c37mod2&join $c37mod2tag & +lappend ans list set __MODULES_LMTAG $c37lmtag +testouterr_cmd_re sh "restore $coll37pinfp" $ans $tserr +unsetenv_var MODULES_COLLECTION_PIN_TAG + +setenv_var __MODULES_LMVARIANT $c37lmvr +setenv_loaded_module list $c37mod1 list $c37modpath1/$c37mod1 +set ans list +lappend ans list set __MODULES_LMVARIANT $c37lmvr +lappend ans list set __MODULES_LMPREREQ $c37mod2&variant@3.0\ bar=val1 +lappend ans list set _LMFILES_ $c37lmf +lappend ans list set LOADEDMODULES $c37lm +lappend ans list set __MODULES_LMEXTRATAG $c37lmextratag +lappend ans list set __MODULES_LMTAG $c37lmtag +set tserr msg_unload variant/3.0{bar=val1}\nmsg_load {variant/3.0{bar=val1} <aL:foo>}\nmsg_load {tag/8.0 <bar:foo>} +testouterr_cmd_re sh "restore $coll37fp" $ans $tserr + +setenv_var __MODULES_LMTAG $c37mod1&auto-loaded +set ans list +lappend ans list set __MODULES_LMPREREQ $c37mod2&variant@3.0\ bar=val1 +lappend ans list set _LMFILES_ $c37lmf +lappend ans list set LOADEDMODULES $c37lm +lappend ans list set __MODULES_LMEXTRATAG $c37lmextratag +lappend ans list set __MODULES_LMTAG $c37mod1&auto-loaded&foo:$c37mod2&join $c37mod2tag & +set tserr msg_tag {variant/3.0{bar=val1} <aL:foo>}\nmsg_load {tag/8.0 <bar:foo>} +testouterr_cmd_re sh "restore $coll37fp" $ans $tserr + +setenv_var __MODULES_LMTAG $c37mod1&foo +setenv_var __MODULES_LMEXTRATAG $c37mod1&foo +set ans list +lappend ans list set __MODULES_LMVARIANT $c37lmvr +lappend ans list set __MODULES_LMPREREQ $c37mod2&variant@3.0\ bar=val1 +lappend ans list set _LMFILES_ $c37lmf +lappend ans list set LOADEDMODULES $c37lm +lappend ans list set __MODULES_LMEXTRATAG $c37lmextratag +lappend ans list set __MODULES_LMTAG $c37lmtag +set tserr msg_unload {variant/3.0{bar=val1} <foo>}\nmsg_load {variant/3.0{bar=val1} <aL:foo>}\nmsg_load {tag/8.0 <bar:foo>} +testouterr_cmd_re sh "restore $coll37fp" $ans $tserr + +setenv_var __MODULES_LMTAG $c37mod1&bar +setenv_var __MODULES_LMEXTRATAG $c37mod1&bar +set ans list +lappend ans list set __MODULES_LMVARIANT $c37lmvr +lappend ans list set __MODULES_LMPREREQ $c37mod2&variant@3.0\ bar=val1 +lappend ans list set _LMFILES_ $c37lmf +lappend ans list set LOADEDMODULES $c37lm +lappend ans list set __MODULES_LMEXTRATAG $c37lmextratag +lappend ans list set __MODULES_LMTAG $c37lmtag +set tserr msg_unload {variant/3.0{bar=val1} <bar>}\nmsg_load {variant/3.0{bar=val1} <aL:foo>}\nmsg_load {tag/8.0 <bar:foo>} +testouterr_cmd_re sh "restore $coll37fp" $ans $tserr + +setenv_var __MODULES_LMTAG $c37mod1&bar&foo&auto-loaded +setenv_var __MODULES_LMEXTRATAG $c37mod1&bar&foo +set ans list +lappend ans list set __MODULES_LMPREREQ $c37mod2&variant@3.0\ bar=val1 +lappend ans list set _LMFILES_ $c37lmf +lappend ans list set LOADEDMODULES $c37lm +lappend ans list set __MODULES_LMEXTRATAG $c37lmextratag +lappend ans list set __MODULES_LMTAG $c37lmtag +set tserr msg_tag {variant/3.0{bar=val1} <aL:foo>}\nmsg_load {tag/8.0 <bar:foo>} +testouterr_cmd_re sh "restore $coll37fp" $ans $tserr + +setenv_loaded_module list foo/1.0 $c37mod1 list $c37modpath1/foo/1.0 $c37modpath1/$c37mod1 +setenv_var __MODULES_LMTAG $c37mod1&join $c37mod1tag & +setenv_var __MODULES_LMEXTRATAG $c37mod1&join $c37mod1extratag & +set ans list +lappend ans list set __MODULES_LMVARIANT $c37lmvr +lappend ans list set __MODULES_LMPREREQ $c37mod2&variant@3.0\ bar=val1 +lappend ans list set _LMFILES_ $c37lmf +lappend ans list set LOADEDMODULES $c37lm +lappend ans list set __MODULES_LMEXTRATAG $c37lmextratag +lappend ans list set __MODULES_LMTAG $c37lmtag +set tserr msg_unload {variant/3.0{bar=val1} <aL:foo>}\nmsg_unload foo/1.0\nmsg_load {variant/3.0{bar=val1} <aL:foo>}\nmsg_load {tag/8.0 <bar:foo>} +testouterr_cmd_re sh "restore $coll37fp" $ans $tserr + +# set 2nd module auto-loaded in env, not auto-loaded in collection +setenv_var __MODULES_LMVARIANT $c37lmvr +setenv_loaded_module list $c37mod1 $c37mod2 list $c37modpath1/$c37mod1 $c37modpath1/$c37mod2 +setenv_var __MODULES_LMTAG $c37mod1&join $c37mod1tag &:$c37mod2&auto-loaded +setenv_var __MODULES_LMEXTRATAG $c37mod1&join $c37mod1extratag & +set ans list +lappend ans list set __MODULES_LMPREREQ $c37mod2&variant@3.0\ bar=val1 +lappend ans list set _LMFILES_ $c37lmf +lappend ans list set LOADEDMODULES $c37lm +lappend ans list set __MODULES_LMEXTRATAG $c37lmextratag +lappend ans list set __MODULES_LMTAG $c37lmtag +# unsetting auto-loaded tag makes module to get unloaded then loaded +set tserr msg_unload {tag/8.0 <aL>}\nmsg_load {tag/8.0 <bar:foo>} +testouterr_cmd_re sh "restore $coll37fp" $ans $tserr + +# set modules keep-loaded in env, not keep-loaded in collection +setenv_var __MODULES_LMVARIANT $c37lmvr +setenv_loaded_module list $c37mod1 $c37mod2 list $c37modpath1/$c37mod1 $c37modpath1/$c37mod2 +setenv_var __MODULES_LMTAG $c37mod1&join $c37mod1tag &&keep-loaded:$c37mod2&keep-loaded +setenv_var __MODULES_LMEXTRATAG $c37mod1&join $c37mod1extratag & +# keep-loaded tag found in env is preserved even if not in collection +set ans list +lappend ans list set __MODULES_LMEXTRATAG $c37lmextratag +lappend ans list set __MODULES_LMTAG $c37mod1&join $c37mod1tag &&keep-loaded:$c37mod2&keep-loaded&foo +set tserr msg_tag {tag/8.0 <foo:kL>} +testouterr_cmd_re sh "restore $coll37fp" $ans $tserr + +unsetenv_loaded_module +unsetenv_var __MODULES_LMTAG +unsetenv_var __MODULES_LMEXTRATAG +unsetenv_var __MODULES_LMVARIANT + +set ans list +lappend ans list set __MODULES_LMVARIANT $c38lmvr +lappend ans list set __MODULES_LMPREREQ $c38mod2&variant@3.0\ bar=val1 +lappend ans list set _LMFILES_ $c38lmf +lappend ans list set LOADEDMODULES $c38lm +lappend ans list set __MODULES_LMEXTRATAG $c38lmextratag +lappend ans list set __MODULES_LMTAG $c38mod1&join $c38mod1tag &:$c38mod2&foo&bar +set tserr msg_load {variant/3.0{bar=val1} <aL:foo>}\nmsg_load {tag/8.0 <bar:foo>} +testouterr_cmd_re sh "restore $coll38fp" $ans $tserr + +setenv_var MODULES_COLLECTION_PIN_TAG 1 +set ans list +lappend ans list set __MODULES_LMVARIANT $c38lmvr +lappend ans list set __MODULES_LMPREREQ $c38mod2&variant@3.0\ bar=val1 +lappend ans list set _LMFILES_ $c38lmf +lappend ans list set LOADEDMODULES $c38lm +# when restoring collection saved with tags pinned, all these tags are +# set in the extra tags when collection is restored +lappend ans list set __MODULES_LMEXTRATAG $c38mod1&join $c38mod1extratag &:$c38mod2&join $c38mod2tag & +lappend ans list set __MODULES_LMTAG $c38lmtag +set tserr msg_load {variant/3.0{bar=val1} <aL:foo>}\nmsg_load {tag/8.0 <bar:foo>} +testouterr_cmd_re sh "restore $coll38pinfp" $ans $tserr +unsetenv_var MODULES_COLLECTION_PIN_TAG + +unsetenv_var MODULES_ADVANCED_VERSION_SPEC + +setenv_var TESTSUITE_TAG_OPT colltag2 + +set ans list +lappend ans list set _LMFILES_ $c39lmf +lappend ans list set LOADEDMODULES $c39lm +lappend ans list set __MODULES_LMEXTRATAG $c39lmextratag +lappend ans list set __MODULES_LMTAG $c39lmtag +set tserr msg_load {tag/8.0 <bar:foo>}\nmsg_load {foo/1.0 <bar:foo>} +testouterr_cmd_re sh "restore $coll39fp" $ans $tserr + +set ans list +lappend ans list set _LMFILES_ $c40lmf +lappend ans list set LOADEDMODULES $c40lm +lappend ans list set __MODULES_LMTAG $c40lmtag +set tserr msg_load {tag/8.0 <bar>}\nmsg_load foo/1.0 +testouterr_cmd_re sh "restore $coll40fp" $ans $tserr + +set ans list +lappend ans list set _LMFILES_ $c41lmf +lappend ans list set LOADEDMODULES $c41lm +lappend ans list set __MODULES_LMEXTRATAG $c41lmextratag +lappend ans list set __MODULES_LMTAG $c41lmtag +set tserr msg_load {foo/1.0 <bar>} +testouterr_cmd_re sh "restore $coll41fp" $ans $tserr + +set ans list +lappend ans list set _LMFILES_ $c42lmf +lappend ans list set LOADEDMODULES $c42lm +set tserr msg_load foo/1.0 +testouterr_cmd_re sh "restore $coll42fp" $ans $tserr + +# test collection restore when magic cookie check is set only for evaluation +setenv_var MODULES_COOKIE_CHECK eval +testouterr_cmd_re sh "restore $coll42fp" $ans $tserr +setenv_var MODULES_COOKIE_CHECK always + +setenv_var MODULES_ADVANCED_VERSION_SPEC 1 + +set tserr "$error_msgs: $msg_nomodnameinarg '--tag'" +testouterr_cmd_re sh "restore $coll43fp" ERR $tserr +setenv_var MODULES_ADVANCED_VERSION_SPEC 0 +set ans list +lappend ans list set _LMFILES_ $c43lmf +lappend ans list set LOADEDMODULES $c43lm +lappend ans list set __MODULES_LMTAG $c43lmtag +lappend ans list ERR +set tserr $err_path'--tag'\nmsg_load {tag/8.0 <bar>}\nmsg_load foo/1.0 +testouterr_cmd_re sh "restore $coll43fp" $ans $tserr +unsetenv_var MODULES_ADVANCED_VERSION_SPEC + +setenv_var TESTSUITE_TAG_OPT colltag3 + +set ans list +lappend ans list set __MODULES_LMPREREQ $c44mod2&$c44mod1 +lappend ans list set _LMFILES_ $c44lmf +lappend ans list set LOADEDMODULES $c44lm +lappend ans list set __MODULES_LMEXTRATAG $c44lmextratag +lappend ans list set __MODULES_LMTAG $c44lmtag +set tserr msg_load "$c44mod1 <aL:foo:kL>"\nmsg_load "$c44mod2 <bar:foo>"\nmsg_load $c44mod3 +testouterr_cmd_re sh "restore $coll44fp" $ans $tserr + +setenv_var MODULES_COLLECTION_PIN_TAG 1 +set ans list +lappend ans list set __MODULES_LMPREREQ $c44mod2&$c44mod1 +lappend ans list set _LMFILES_ $c44lmf +lappend ans list set LOADEDMODULES $c44lm +lappend ans list set __MODULES_LMEXTRATAG $c44lmextratag +lappend ans list set __MODULES_LMTAG $c44lmtag +set tserr msg_load "$c44mod1 <aL:foo:kL>"\nmsg_load "$c44mod2 <bar:foo>"\nmsg_load $c44mod3 +testouterr_cmd_re sh "restore $coll44pinfp" $ans $tserr +unsetenv_var MODULES_COLLECTION_PIN_TAG + + +set ans list +lappend ans list set __MODULES_LMPREREQ $c45mod2&$c45mod1 +lappend ans list set _LMFILES_ $c45lmf +lappend ans list set LOADEDMODULES $c45lm +lappend ans list set __MODULES_LMEXTRATAG $c45lmextratag +lappend ans list set __MODULES_LMTAG $c45lmtag +set tserr msg_load "$c45mod1 <aL:foo:kL:nF>" err_accessnearlydenied {}\n\nmsg_load "$c45mod2 <bar:foo>"\nmsg_load $c45mod3 +testouterr_cmd_re sh "restore $coll45fp" $ans $tserr + +setenv_var MODULES_COLLECTION_PIN_TAG 1 +testouterr_cmd_re sh "restore $coll45fp" $ans $tserr +unsetenv_var MODULES_COLLECTION_PIN_TAG + +set ans list +lappend ans list set _LMFILES_ $c46lmf +lappend ans list set LOADEDMODULES $c46lm +lappend ans list ERR +set tserr msg_load $c46mod1 err_accessdenied $c46mod1\n\nmsg_load $c46mod2 err_reqmis $c46mod1\n\nmsg_load $c46mod3 +testouterr_cmd_re sh "restore $coll46fp" $ans $tserr + +setenv_var MODULES_COLLECTION_PIN_TAG 1 +testouterr_cmd_re sh "restore $coll46fp" $ans $tserr +unsetenv_var MODULES_COLLECTION_PIN_TAG + +unsetenv_var TESTSUITE_TAG_OPT + + +# test tags set in collection but not in current env or opposite situation +# for simple or variant modules +setenv_var TESTSUITE_TAG_OPT coll49 +setenv_var TESTSUITE_KEEP_LOADED coll49 +setenv_var MODULES_ADVANCED_VERSION_SPEC 1 + +setenv_var __MODULES_LMVARIANT $c49lmvr +setenv_var __MODULES_LMPREREQ $c49mod4&$c49mod3 +setenv_loaded_module list $c49mod1 $c49mod2 $c49mod3 $c49mod4 list $c49modpath1/$c49mod1 $c49modpath1/$c49mod2 $c49modpath1/$c49mod3 $c49modpath1/$c49mod4 list $c49mod3 + +set ans list +lappend ans list set __MODULES_LMEXTRATAG $c49lmextratag +lappend ans list set __MODULES_LMTAG $c49lmtag +set tserr msg_tag {tag/8.0{-bar:+foo} <foo:kL>}\nmsg_tag {foo/1.0 <aL:bar:kL>} +testouterr_cmd sh "restore $coll49fp" $ans $tserr + +setenv_var __MODULES_LMTAG $c49mod1&bar&foo:$c49mod3&auto-loaded:$c49mod4&bar&foo +setenv_var __MODULES_LMEXTRATAG $c49mod1&bar&foo:$c49mod4&bar&foo +# message with no tag for 1st and 4th module, as their extra tag from env are removed +set tserr msg_tag variant/3.0{bar=val2}\nmsg_tag {tag/8.0{-bar:+foo} <foo:kL>}\nmsg_tag {foo/1.0 <aL:bar:kL>}\nmsg_tag keep/1.0 +testouterr_cmd sh "restore $coll49fp" $ans $tserr + +setenv_var __MODULES_LMTAG $c49mod1&bar&foo:$c49mod3&auto-loaded:$c49mod4&foo +setenv_var __MODULES_LMEXTRATAG $c49mod1&bar +set ans list +lappend ans list set __MODULES_LMEXTRATAG $c49lmextratag +# foo tag is kept of 1st and 4th module as not set extra +lappend ans list set __MODULES_LMTAG $c49mod4&foo:$c49mod1&foo:$c49lmtag +set tserr msg_tag {variant/3.0{bar=val2} <foo>}\nmsg_tag {tag/8.0{-bar:+foo} <foo:kL>}\nmsg_tag {foo/1.0 <aL:bar:kL>} +testouterr_cmd sh "restore $coll49fp" $ans $tserr + +setenv_var __MODULES_LMTAG $c49mod1&bar&foo:$c49mod3&auto-loaded&bar&keep-loaded:$c49mod4&bar&foo +setenv_var __MODULES_LMEXTRATAG $c49mod1&bar&foo:$c49mod3&bar:$c49mod4&bar&foo +set ans list +lappend ans list set __MODULES_LMEXTRATAG $c49mod3&join $c49mod3extratag &:$c49mod2&join $c49mod2extratag & +lappend ans list set __MODULES_LMTAG $c49mod3&join $c49mod3tag &:$c49mod2&join $c49mod2tag & +set tserr msg_tag variant/3.0{bar=val2}\nmsg_tag {tag/8.0{-bar:+foo} <foo:kL>}\nmsg_tag keep/1.0 +testouterr_cmd sh "restore $coll49fp" $ans $tserr + +setenv_var __MODULES_LMTAG $c49mod2&bar&foo:$c49mod3&auto-loaded&bar&foo +setenv_var __MODULES_LMEXTRATAG $c49mod2&bar +set ans list +# all tags are restored non extra, as loaded environment defines foo for 2nd +# and 4th module is set non-extra +lappend ans list unset __MODULES_LMEXTRATAG +lappend ans list set __MODULES_LMTAG $c49mod2&join $c49mod2tag &:$c49mod3&auto-loaded&bar&foo&keep-loaded +set tserr msg_tag {tag/8.0{-bar:+foo} <foo:kL>}\nmsg_tag {foo/1.0 <aL:bar:foo:kL>} +testouterr_cmd sh "restore $coll49fp" $ans $tserr + +setenv_var __MODULES_LMTAG $c49mod2&bar&foo:$c49mod3&auto-loaded&bar&foo +setenv_var __MODULES_LMEXTRATAG $c49mod2&bar&foo +set ans list +lappend ans list set __MODULES_LMEXTRATAG $c49mod2&foo +lappend ans list set __MODULES_LMTAG $c49mod2&join $c49mod2tag &:$c49mod3&auto-loaded&bar&foo&keep-loaded +set tserr msg_tag {tag/8.0{-bar:+foo} <foo:kL>}\nmsg_tag {foo/1.0 <aL:bar:foo:kL>} +testouterr_cmd sh "restore $coll49fp" $ans $tserr + +# 2nd module is set auto-loaded in env, not in collection +# and 3rd module is not set auto-loaded in env, whereas it is in collection +setenv_var __MODULES_LMTAG $c49mod2&auto-loaded&foo&keep-loaded:$c49mod3&bar&keep-loaded +setenv_var __MODULES_LMEXTRATAG $c49mod2&foo:$c49mod3&bar +set ans list +lappend ans list set __MODULES_LMVARIANT $c49lmvr +lappend ans list set __MODULES_LMPREREQ $c49mod4&$c49mod3 +lappend ans list set _LMFILES_ $c49lmf +lappend ans list set LOADEDMODULES $c49lm +lappend ans list set __MODULES_LMEXTRATAG $c49lmextratag +lappend ans list set __MODULES_LMTAG $c49mod2&join $c49mod2tag &:$c49mod3&bar&auto-loaded&keep-loaded +set tserr msg_unload $c49mod4\nmsg_unload "$c49mod3 <bar:kL>"\nmsg_unload "$c49mod2{-bar:+foo} <aL:foo:kL>"\nmsg_load "$c49mod2{-bar:+foo} <foo:kL>"\nmsg_load "$c49mod3 <aL:bar:kL>"\nmsg_load $c49mod4 +testouterr_cmd sh "restore $coll49fp" $ans $tserr + +# restore module tagged hidden-loaded in env: 3rd module is auto-loaded, 2nd is not +# 4th module is hidden-loaded as extra tag, so it will be removed +# see messages in normal, verbose and verbose2 mode +setenv_var __MODULES_LMTAG $c49mod2&hidden-loaded:$c49mod3&auto-loaded&hidden-loaded:$c49mod4&hidden-loaded +setenv_var __MODULES_LMEXTRATAG $c49mod4&hidden-loaded +set ans list +lappend ans list set __MODULES_LMEXTRATAG $c49lmextratag +lappend ans list set __MODULES_LMTAG $c49mod2&hidden-loaded&foo&keep-loaded:$c49mod3&auto-loaded&hidden-loaded&bar&keep-loaded +set tserr msg_tag "$c49mod2{-bar:+foo} <foo:H:kL>"\nmsg_tag $c49mod4 +testouterr_cmd sh "restore $coll49fp" $ans $tserr +testouterr_cmd sh "restore -v $coll49fp" $ans $tserr +set tserr msg_tag "$c49mod2{-bar:+foo} <foo:H:kL>"\nmsg_tag "$c49mod3 <aL:bar:H:kL>"\nmsg_tag $c49mod4 +testouterr_cmd sh "restore -vv $coll49fp" $ans $tserr + + +# keep-loaded tag defined by module-tag in modulerc +setenv_var TESTSUITE_TAG_OPT coll49keep +setenv_var TESTSUITE_KEEP_LOADED coll49keep +setenv_var __MODULES_LMTAG $c49mod1&bar&foo:$c49mod3&auto-loaded&keep-loaded:$c49mod4&bar&foo +setenv_var __MODULES_LMEXTRATAG $c49mod1&bar&foo:$c49mod4&bar&foo +set ans list +lappend ans list set __MODULES_LMEXTRATAG $c49lmextratag +lappend ans list set __MODULES_LMTAG $c49mod2&join $c49mod2tag &:$c49mod3&auto-loaded&keep-loaded&bar +set tserr msg_tag variant/3.0{bar=val2}\nmsg_tag {tag/8.0{-bar:+foo} <foo:kL>}\nmsg_tag {foo/1.0 <aL:bar:kL>}\nmsg_tag keep/1.0 +testouterr_cmd sh "restore $coll49fp" $ans $tserr + +unsetenv_var __MODULES_LMPREREQ +setenv_loaded_module list $c49mod1 $c49mod2 list $c49modpath1/$c49mod1 $c49modpath1/$c49mod2 +setenv_var __MODULES_LMTAG $c49mod2&join $c49mod2tag & +setenv_var __MODULES_LMEXTRATAG $c49mod2&join $c49mod2extratag & +set ans list +lappend ans list set __MODULES_LMPREREQ $c49mod4&$c49mod3 +lappend ans list set _LMFILES_ $c49lmf +lappend ans list set LOADEDMODULES $c49lm +lappend ans list set __MODULES_LMEXTRATAG $c49lmextratag +lappend ans list set __MODULES_LMTAG $c49mod2&join $c49mod2tag &:$c49mod3&bar&auto-loaded&keep-loaded +set tserr msg_load "$c49mod3 <aL:bar:kL>"\nmsg_load $c49mod4 +testouterr_cmd sh "restore $coll49fp" $ans $tserr + +# module-forbid defined in modulerc for 3rd collection module +setenv_var TESTSUITE_TAG_OPT coll49forb +setenv_var TESTSUITE_KEEP_LOADED coll49forb +set tserr err_accessdenied $c49mod3\n\nmsg_load $c49mod4 err_accessdenied $c49mod3 err_reqlo $c49mod3 +testouterr_cmd sh "restore $coll49fp" ERR $tserr + +unsetenv_var TESTSUITE_TAG_OPT +unsetenv_var TESTSUITE_KEEP_LOADED +unsetenv_var MODULES_ADVANCED_VERSION_SPEC +unsetenv_loaded_module +unsetenv_var __MODULES_LMTAG +unsetenv_var __MODULES_LMEXTRATAG +unsetenv_var __MODULES_LMVARIANT + + +# # Cleanup #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.61-coll/050-saverm.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.61-coll/050-saverm.exp
Changed
@@ -27,6 +27,7 @@ set rmcderrmsg "couldn't open \"$hometestdotmod/default\": no such file or directory" set rmc1errmsg "couldn't open \"$hometestdotmod/$coll1\": no such file or directory" set rmc4ferrmsg "couldn't open \"$hometestdotmod/$coll4f\": no such file or directory" +set rmc48errmsg "couldn't open \"$hometestdotmod/$coll48\": no such file or directory" # # test removing nonexistent collection @@ -69,6 +70,25 @@ # +# test removing collection requiring an upcoming version of Modules +# test effect of mcookie configuration with this collection +# + +file copy $coll48fp $hometestdotmod/$coll48 +testoutfile_cmd sh "saverm $coll48" OK $hometestdotmod/$coll48 $rmc48errmsg + +file copy $coll48fp $hometestdotmod/$coll48 +setenv_var MODULES_MCOOKIE_CHECK eval +testoutfile_cmd sh "saverm $coll48" OK $hometestdotmod/$coll48 $rmc48errmsg +setenv_var MODULES_MCOOKIE_CHECK always + +file copy $coll48fp $hometestdotmod/$coll48 +setenv_var MODULES_MCOOKIE_VERSION_CHECK 0 +testoutfile_cmd sh "saverm $coll48" OK $hometestdotmod/$coll48 $rmc48errmsg +setenv_var MODULES_MCOOKIE_VERSION_CHECK 1 + + +# # test removing named collection when MODULES_COLLECTION_TARGET is set #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.61-coll/060-saveshow.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.61-coll/060-saveshow.exp
Changed
@@ -56,6 +56,23 @@ # +# test showing collection requiring an upcoming version of Modules +# test effect of mcookie configuration with this collection +# + +testouterr_cmd sh "saveshow $coll48" ERR collerr_minverreqns $coll48fp 99 +testouterr_cmd sh "saveshow $coll48fp" ERR collerr_minverreqns $coll48fp 99 + +setenv_var MODULES_MCOOKIE_CHECK eval +testouterr_cmd sh "saveshow $coll48" ERR collerr_minverreqns $coll48fp 99 +setenv_var MODULES_MCOOKIE_CHECK always + +setenv_var MODULES_MCOOKIE_VERSION_CHECK 0 +testouterr_cmd sh "saveshow $coll48" ERR collerr_minverreqns $coll48fp 99 +setenv_var MODULES_MCOOKIE_VERSION_CHECK 1 + + +# # test showing default collection # @@ -89,7 +106,7 @@ # -# test showing collection not mentionning module to load +# test showing collection not mentioning module to load # when MODULES_COLLECTION_TARGET is set # @@ -185,6 +202,35 @@ # +# tag tests +# + +# ensure advanced_version_spec is enabled to record variant +setenv_var MODULES_ADVANCED_VERSION_SPEC 1 + +setenv_var TESTSUITE_TAG_OPT colltag1 +testouterr_cmd_re sh "saveshow $coll37fp" OK "$modlin\n$coll37fpre:\n\n$c37contre\n$modlin" +testouterr_cmd_re sh "saveshow $coll38fp" OK "$modlin\n$coll38fpre:\n\n$c38contre\n$modlin" + +unsetenv_var MODULES_ADVANCED_VERSION_SPEC + +setenv_var TESTSUITE_TAG_OPT colltag2 +testouterr_cmd_re sh "saveshow $coll39fp" OK "$modlin\n$coll39fpre:\n\n$c39contre\n$modlin" +testouterr_cmd_re sh "saveshow $coll40fp" OK "$modlin\n$coll40fpre:\n\n$c40contre\n$modlin" +testouterr_cmd_re sh "saveshow $coll41fp" OK "$modlin\n$coll41fpre:\n\n$c41contre\n$modlin" +testouterr_cmd_re sh "saveshow $coll42fp" OK "$modlin\n$coll42fpre:\n\n$c42contre\n$modlin" + +setenv_var MODULES_ADVANCED_VERSION_SPEC 1 +set tserr "$error_msgs: $msg_nomodnameinarg '--tag'" +testouterr_cmd_re sh "saveshow $coll43fp" ERR $tserr +setenv_var MODULES_ADVANCED_VERSION_SPEC 0 +testouterr_cmd_re sh "saveshow $coll43fp" OK "$modlin\n$coll43fpre:\n\n$c43contre\n$modlin" +unsetenv_var MODULES_ADVANCED_VERSION_SPEC + +unsetenv_var TESTSUITE_TAG_OPT + + +# # test unsetting HOME #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.61-coll/080-access-coll.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.61-coll/080-access-coll.exp
Changed
@@ -40,6 +40,7 @@ set header_coll "Named collection list:" set coll_list "$coll1\n${coll1}.save\n$coll2\n$coll3\n$coll4f\n$coll6f\n$colld\ninfocmd\ninfocmdexp" +set coll_list_nocoll1 "${coll1}.save\n$coll2\n$coll3\n$coll4f\n$coll6f\n$colld\ninfocmd\ninfocmdexp" if {$install_implicitdefault eq {y}} { lappend ans list unset mload @@ -93,9 +94,9 @@ change_file_perms $coll1fp $hide_perms -testouterr_cmd "sh" "savelist -t" "OK" "$header_coll\n$coll_list" -testouterr_cmd "sh" "saveshow $coll1" "ERR" "$read_msg\n$perm_msg" -testouterr_cmd "sh" "restore $coll1" "ERR" "$read_msg\n$perm_msg" +testouterr_cmd "sh" "savelist -t" "OK" "$header_coll\n$coll_list_nocoll1" +testouterr_cmd "sh" "saveshow $coll1" "ERR" err_permdenied $coll1fp +testouterr_cmd "sh" "restore $coll1" "ERR" err_permdenied $coll1fp testouterr_cmd "sh" "save $coll1" "OK" "" testoutfile_cmd "sh" "saverm $coll1" "OK" "$coll1fp" "$rmc1errmsg"
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.61-coll/999-cleanup.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.61-coll/999-cleanup.exp
Changed
@@ -91,6 +91,28 @@ unset c34cont unset c35cont unset c36cont +unset c36contre +unset c37cont +unset c37contre +unset c37pincont +unset c38cont +unset c38contre +unset c38pincont +unset c39cont +unset c39contre +unset c40cont +unset c40contre +unset c41cont +unset c41contre +unset c42cont +unset c42contre +unset c43cont +unset c43contre +unset c44cont +unset c44contre +unset c44pincont +unset c47cont +unset c47contre unset cdlmf unset cdlm @@ -126,10 +148,12 @@ unset c9lmf unset c9lm unset c9lmnua +unset c9lmtag unset c9modpath unset c11lmf unset c11lm unset c11lmnua +unset c11lmtag unset c11modpath unset c12lmf unset c12lm @@ -183,24 +207,28 @@ unset c23lm unset c23lmalt unset c23lmnua +unset c23lmtag unset c23lmvr unset c23modpath unset c24lmf unset c24lm unset c24lmalt unset c24lmnua +unset c24lmtag unset c24lmvr unset c24modpath unset c25lmf unset c25lm unset c25lmalt unset c25lmnua +unset c25lmtag unset c25lmvr unset c25modpath unset c26lmf unset c26lm unset c26lmalt unset c26lmnua +unset c26lmtag unset c26lmvr unset c26modpath unset c30lmf @@ -232,6 +260,64 @@ unset c36lm unset c36lmvr unset c36modpath +unset c37lmf +unset c37lm +unset c37lmvr +unset c37lmextratag +unset c37lmtag +unset c37modpath +unset c38lmf +unset c38lm +unset c38lmvr +unset c38lmextratag +unset c38lmtag +unset c38modpath +unset c39lmf +unset c39lm +unset c39lmextratag +unset c39lmtag +unset c39modpath +unset c40lmf +unset c40lm +unset c40lmextratag +unset c40lmtag +unset c40modpath +unset c41lmf +unset c41lm +unset c41lmextratag +unset c41lmtag +unset c41modpath +unset c42lmf +unset c42lm +unset c42modpath +unset c43lmf +unset c43lm +unset c43lmextratag +unset c43lmtag +unset c44lmf +unset c44lm +unset c44lmextratag +unset c44lmtag +unset c44modpath +unset c45lmf +unset c45lm +unset c45lmextratag +unset c45lmtag +unset c45modpath +unset c46lmf +unset c46lm +unset c46modpath +unset c47lmf +unset c47lm +unset c47lmextratag +unset c47lmtag +unset c47modpath +unset c49lmf +unset c49lm +unset c49lmvr +unset c49lmextratag +unset c49lmtag +unset c49modpath unset c18modpath1 unset c18modpath1re @@ -334,6 +420,95 @@ unset c36modpath1re unset c36mod1 unset c36mod1vr +unset c37modpath1 +unset c37modpath1re +unset c37mod1 +unset c37mod1extratag +unset c37mod1tag +unset c37mod1vr +unset c37mod2 +unset c37mod2extratag +unset c37mod2tag +unset c38modpath1 +unset c38modpath1re +unset c38mod1 +unset c38mod1extratag +unset c38mod1tag +unset c38mod1vr +unset c38mod2 +unset c38mod2extratag +unset c38mod2tag +unset c39modpath1 +unset c39modpath1re +unset c39mod1 +unset c39mod1extratag +unset c39mod1tag +unset c39mod2 +unset c39mod2extratag +unset c39mod2tag +unset c40modpath1 +unset c40modpath1re +unset c40mod1 +unset c40mod1extratag +unset c40mod1tag +unset c40mod2 +unset c41modpath1 +unset c41modpath1re +unset c41mod1 +unset c41mod1extratag +unset c41mod1tag +unset c42modpath1 +unset c42modpath1re +unset c42mod1 +unset c43modpath1 +unset c43modpath1re +unset c43mod1 +unset c43mod1extratag +unset c43mod1tag +unset c43mod2 +unset c44modpath1 +unset c44modpath1re +unset c44mod1 +unset c44mod1extratag +unset c44mod1tag +unset c44mod2 +unset c44mod2extratag +unset c44mod2tag +unset c44mod3 +unset c45modpath1 +unset c45modpath1re +unset c45mod1 +unset c45mod1extratag +unset c45mod1tag +unset c45mod2 +unset c45mod2extratag +unset c45mod2tag +unset c45mod3 +unset c46modpath1 +unset c46modpath1re +unset c46mod1 +unset c46mod1extratag +unset c46mod1tag +unset c46mod2 +unset c46mod2extratag +unset c46mod2tag +unset c46mod3 +unset c47modpath1 +unset c47modpath1re +unset c47mod1 +unset c47mod1extratag +unset c47mod1tag +unset c49modpath1 +unset c49modpath1re +unset c49mod1 +unset c49mod2 +unset c49mod2extratag +unset c49mod2tag +unset c49mod3 +unset c49mod3extratag +unset c49mod3tag +unset c49mod4 + unset c17mod2 unset c17mod1 unset c17modpath1 @@ -536,6 +711,61 @@ unset coll36f unset coll36fp unset coll36fpre +unset coll37 +unset coll37f +unset coll37fp +unset coll37fpre +unset coll37pin +unset coll37pinf +unset coll37pinfp +unset coll38 +unset coll38f +unset coll38fp +unset coll38fpre +unset coll38pin +unset coll38pinf +unset coll38pinfp +unset coll39 +unset coll39fp +unset coll39fpre +unset coll40 +unset coll40fp +unset coll40fpre +unset coll41 +unset coll41fp +unset coll41fpre +unset coll42 +unset coll42fp +unset coll42fpre +unset coll43 +unset coll43fp +unset coll43fpre +unset coll44 +unset coll44f +unset coll44fp +unset coll44fpre +unset coll44pin +unset coll44pinf +unset coll44pinfp +unset coll45 +unset coll45fp +unset coll45fpre +unset coll46 +unset coll46fp +unset coll46fpre +unset coll47 +unset coll47f +unset coll47fp +unset coll47fpre +unset coll48 +unset coll48f +unset coll48fp +unset coll48fpre +unset coll49 +unset coll49fp +unset coll49fpre + +unset headercompattag unset nohomeerrmsg
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.70-maint/030-purge.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/030-purge.exp
Changed
@@ -30,7 +30,7 @@ set modulefile "$modpath/$module" # -# Check this only fo the /bin/csh +# Check this only for the /bin/csh # lappend ans list unset _LMFILES_
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.70-maint/040-list.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/040-list.exp
Changed
@@ -26,7 +26,7 @@ set header $cur_loaded # -# Check this only fo the /bin/csh +# Check this only for the /bin/csh # set ts_csh "$header\n$module" @@ -123,7 +123,7 @@ set test_cols 16 if {!info exists term_cols} { - # skip tests if current terminal witdh is unknown + # skip tests if current terminal width is unknown send_user "\tskipping terminal width-specific tests\n" # set a specific terminal width } elseif {catch {exec stty cols $test_cols} || getTtyCols ne $test_cols} {
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.70-maint/045-listlong.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/045-listlong.exp
Changed
@@ -120,7 +120,17 @@ setenv_loaded_module $module $modulefile testouterr_cmd_re csh {-l list} OK $ts_csh +unsetenv_var __MODULES_LMALTNAME + +# +# Test module name with space character +# + +setenv_path_var MODULEPATH $modpath.3 +setenv_loaded_module list {variant/w s} list "$modpath.3/variant/w s" +set ts_csh "$header'variant/w s'\\s*\0-9:\/ *" +testouterr_cmd_re csh {-l list} OK $ts_csh # # Cleanup
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.70-maint/048-listlongno.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/048-listlongno.exp
Changed
@@ -22,7 +22,7 @@ ############################################################################## # -# Check this only fo the /bin/csh +# Check this only for the /bin/csh # set ts_csh $no_loaded
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.70-maint/055-whatis.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/055-whatis.exp
Changed
@@ -35,7 +35,7 @@ set module_3 "whatis/multiple" set module_4 "whatis/string" set module_5 "whatis/lines" -set module_6 "NonExistant" +set module_6 "NonExistent" set module_7 "bad" set whatis_2 " whatis/single"
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.70-maint/056-whatis-nullpath.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/056-whatis-nullpath.exp
Changed
@@ -35,7 +35,7 @@ # The tests testouterr_cmd "csh" "whatis" "OK" "$ts_csh_1" -# restore environnement +# restore environment setenv_path_var MODULEPATH $modpath # Cleanup
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.70-maint/060-apropos.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/060-apropos.exp
Changed
@@ -20,7 +20,7 @@ # invocation creates an apropos cache (which has been # removed while initialization of this part of the # testsuite), the second one searches case insensitive -# thrue the cache and the last one lokks up a not- +# through the cache and the last one looks up a non- # existing pattern. # }C% #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.70-maint/070-display.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/070-display.exp
Changed
@@ -36,7 +36,7 @@ set modulefile_1 "$modpath/help/2.0" set modulefile_1_reld "$reldmodpath/help/2.0" set modulefile_1_reldd "$relddmodpath/help/2.0" -set module_2 "NonExistant" +set module_2 "NonExistent" set module_3 "bad" set module_4 "test" set module_5 "bad2" @@ -246,7 +246,7 @@ # test small width terminal set test_cols 60 if {!info exists term_cols} { - # skip tests if current terminal witdh is unknown + # skip tests if current terminal width is unknown send_user "\tskipping terminal width-specific tests\n" # set a specific terminal width } elseif {catch {exec stty cols $test_cols} || getTtyCols ne $test_cols} {
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.70-maint/080-help.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/080-help.exp
Changed
@@ -22,7 +22,7 @@ # add test regarding the redirection of stdout # help/2.0 => puts stdout # help/3.0 => puts stderr -# both should provide the same stderr outpout +# both should provide the same stderr output # }C% # ############################################################################## @@ -58,9 +58,21 @@ .*Module Specific Help for $modpathre/$module: ((DEBUG|Evaluate modulerc:|Evaluate modulefile:|Get modules:) .*)+ -DEBUG \\\#1:help:$module\\\ putsModfileCmd: stderr Help_out \\\(itrp=__modfile_help_1\\\) +DEBUG \\\#1:help:$module\\\ execute-modulefile: puts stderr Help_out .*Help_out.* -DEBUG \\\#1:help:$module\\\ putsModfileCmd: stderr Help_err \\\(itrp=__modfile_help_1\\\) +DEBUG \\\#1:help:$module\\\ execute-modulefile: puts stderr Help_err +.*Help_err.* +(DEBUG .*)+ +$modlin +(DEBUG .*)+" +set err_debug2_help "((DEBUG|Evaluate modulerc:|Evaluate modulefile:|Get modules:) .*)+ +$modlin +.*Module Specific Help for $modpathre/$module: + +((DEBUG|Evaluate modulerc:|Evaluate modulefile:|Get modules:) .*)+ +DEBUG \\\#1:help:$module\\\ execute-modulefile: putsModfileCmd __modfile_help_1 stderr Help_out +.*Help_out.* +DEBUG \\\#1:help:$module\\\ execute-modulefile: putsModfileCmd __modfile_help_1 stderr Help_err .*Help_err.* (DEBUG .*)+ $modlin @@ -88,7 +100,7 @@ $custom $modlin" -set module_4 "NonExistant" +set module_4 "NonExistent" set out_err_4 "$err_path'$module_4'" @@ -119,8 +131,8 @@ # test debug mode testouterr_cmd_re "sh" "-D help $module" "OK" "$err_debug_help" -# test multiple debug argument do not change result -testouterr_cmd_re "sh" "--debug help $module -D" "OK" "$err_debug_help" +# test multiple debug argument: sets debug2 mode which change result a bit +testouterr_cmd_re "sh" "--debug help $module -D" "OK" "$err_debug2_help" # test stdout output: MUST be empty test_cmd "sh" "help $module" "OK"
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.70-maint/085-test.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/085-test.exp
Changed
@@ -63,7 +63,7 @@ escre msg_moderr "$msg_invcmdname \"bad-command\"" bad-command $modulefile4nore/before 26 { } $modlin" -set module6 "NonExistant" +set module6 "NonExistent" set mod6_err "$err_path'$module6'" #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.70-maint/120-autoinit.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/120-autoinit.exp
Changed
@@ -93,10 +93,10 @@ set custom {module restore unk} set custom escre msg_moderr {Collection unk cannot be found} $custom $modrc 36 { } -set tserr_initrc_exinstalled "msg_load mj\nload m1\nload m2\n\nmsg_top_load m2 {} m1 {}\n\nunload m2\nmsg_unload m2\nunload m1\nmsg_unload m1\nmsg_unload mj\nload m1\nmsg_load m1\nload m3\nmsg_load m3\nmsg_load {'space yc/4'}\n$err_path'unk'\n$custom" +set tserr_initrc_exinstalled "msg_load mj\nload m1\nload m2\n\nmsg_top_load m2 {} m1 {}\n\nunload m2\nmsg_unload m2\nunload m1\nmsg_unload {m1 <aL>}\nmsg_unload mj\nload m1\nmsg_load {m1 <aL>}\nload m3\nmsg_load m3\nmsg_load {'space yc/4'}\n$err_path'unk'\n$custom" set tserr_initrc1_exinstalled msg_load null -# check if stderr terminal attachement state is forced +# check if stderr terminal attachment state is forced set is_stderr_tty siteconfig_isStderrTty if { $verbose > 0 } { send_user "\tIs STDERR a TTY? = '$is_stderr_tty'\n" @@ -106,11 +106,11 @@ set err_cmd "$error_msgs: No autoinit mode available for 'cmd' shell" set end_quar_sh "\\s*if \\\ \"\\\${_mlv}\" = \"\\\${_mlv##\\\*\\\\\\!A-Za-z0-9_\\\}\" -a \"\\\${_mlv}\" = \"\\\${_mlv#\\\0-9\\\}\" \\\; then -\\s*if \\\ -n \"`eval 'echo \\\${'\\\$_mlv'\\\+x}'`\" \\\; then -\\s*_mlre=\"\\\${_mlre:-}__MODULES_QUAR_\\\${_mlv}='`eval 'echo \\\${'\\\$_mlv'}'`' \"; +\\s*if \\\ -n \"\\\$\\\(eval 'echo \\\${'\\\$_mlv'\\\+x}'\\\)\" \\\; then +\\s*_mlre=\"\\\${_mlre:-}__MODULES_QUAR_\\\${_mlv}='\\\$\\\(eval 'echo \\\${'\\\$_mlv'}'\\\)' \"; \\s*fi; \\s*_mlrv=\"MODULES_RUNENV_\\\${_mlv}\"; -\\s*_mlre=\"\\\${_mlre:-}\\\${_mlv}='`eval 'echo \\\${'\\\$_mlrv':-}'`' \"; +\\s*_mlre=\"\\\${_mlre:-}\\\${_mlv}='\\\$\\\(eval 'echo \\\${'\\\$_mlrv':-}'\\\)' \"; \\s*fi; \\s*done;" set func_quar_sh_quar "\\s*unset _mlre _mlIFS; @@ -172,53 +172,100 @@ set func_modcmd_bash_quar "\\s*if \\\ -n \"\\\${_mlre:-}\" \\\; then \\s*_mlre=\"\\\${_mlre:-}__MODULES_QUARANTINE_SET=1 \"; -\\s*eval `eval \\\${_mlre} $tclshlocre $modulecmd_pathre bash '\"\\$\\@\"'`; +\\s*eval \"\\\$\\\(eval \\\${_mlre} $tclshlocre $modulecmd_pathre bash '\"\\$\\@\"'\\\)\"; \\s*else -\\s*eval `$tclshlocre $modulecmd_pathre bash \"\\$\\@\"`; +\\s*eval \"\\\$\\\($tclshlocre $modulecmd_pathre bash \"\\$\\@\"\\\)\"; \\s*fi;" if {$install_quarantinesupport eq y} { set func_modcmd_sh "\\s*if \\\ -n \"\\\${_mlre:-}\" \\\; then \\s*_mlre=\"\\\${_mlre:-}__MODULES_QUARANTINE_SET=1 \"; -\\s*eval `eval \\\${_mlre} $tclshlocre $modulecmd_pathre sh '\"\\$\\@\"'`; +\\s*eval \"\\\$\\\(eval \\\${_mlre} $tclshlocre $modulecmd_pathre sh '\"\\$\\@\"'\\\)\"; \\s*else -\\s*eval `$tclshlocre $modulecmd_pathre sh \"\\$\\@\"`; +\\s*eval \"\\\$\\\($tclshlocre $modulecmd_pathre sh \"\\$\\@\"\\\)\"; \\s*fi;" set func_modcmd_bash $func_modcmd_bash_quar set func_modcmd_ksh "\\s*if \\\ -n \"\\\${_mlre:-}\" \\\; then \\s*_mlre=\"\\\${_mlre:-}__MODULES_QUARANTINE_SET=1 \"; -\\s*eval `eval \\\${_mlre} $tclshlocre $modulecmd_pathre ksh '\"\\$\\@\"'`; +\\s*eval \"\\\$\\\(eval \\\${_mlre} $tclshlocre $modulecmd_pathre ksh '\"\\$\\@\"'\\\)\"; \\s*else -\\s*eval `$tclshlocre $modulecmd_pathre ksh \"\\$\\@\"`; +\\s*eval \"\\\$\\\($tclshlocre $modulecmd_pathre ksh \"\\$\\@\"\\\)\"; \\s*fi;" set func_modcmd_zsh "\\s*if \\\ -n \"\\\${_mlre:-}\" \\\; then \\s*_mlre=\"\\\${_mlre:-}__MODULES_QUARANTINE_SET=1 \"; -\\s*eval `eval \\\${\\^\\^=_mlre} $tclshlocre $modulecmd_pathre zsh '\"\\$\\@\"'`; +\\s*eval \"\\\$\\\(eval \\\${\\^\\^=_mlre} $tclshlocre $modulecmd_pathre zsh '\"\\$\\@\"'\\\)\"; \\s*else -\\s*eval `$tclshlocre $modulecmd_pathre zsh \"\\$\\@\"`; +\\s*eval \"\\\$\\\($tclshlocre $modulecmd_pathre zsh \"\\$\\@\"\\\)\"; \\s*fi;" } else { -set func_modcmd_sh "\\s*eval `$tclshlocre $modulecmd_pathre sh \"\\$\\@\"`;" -set func_modcmd_bash "\\s*eval `$tclshlocre $modulecmd_pathre bash \"\\$\\@\"`;" -set func_modcmd_ksh "\\s*eval `$tclshlocre $modulecmd_pathre ksh \"\\$\\@\"`;" -set func_modcmd_zsh "\\s*eval `$tclshlocre $modulecmd_pathre zsh \"\\$\\@\"`;" +set func_modcmd_sh "\\s*eval \"\\\$\\\($tclshlocre $modulecmd_pathre sh \"\\$\\@\"\\\)\";" +set func_modcmd_bash "\\s*eval \"\\\$\\\($tclshlocre $modulecmd_pathre bash \"\\$\\@\"\\\)\";" +set func_modcmd_ksh "\\s*eval \"\\\$\\\($tclshlocre $modulecmd_pathre ksh \"\\$\\@\"\\\)\";" +set func_modcmd_zsh "\\s*eval \"\\\$\\\($tclshlocre $modulecmd_pathre zsh \"\\$\\@\"\\\)\";" } -if {$is_stderr_tty} { - set func_name "_module_raw" - set add_func_sh "\nmodule\\\(\\\) { _module_raw \"\\\$\\\@\" 2>&1; };" - set add_func_fish "\nfunction module\n\\s*_module_raw \\\$argv 2>&1\nend" -} else { - set func_name "module" - set add_func_sh "" - set add_func_fish "" -} +set func_name "_module_raw" +set add_func_sh "\nmodule\\\(\\\) { +\\s*local _mlredir=$is_stderr_tty; +\\s*if \\\ -n \"\\\${MODULES_REDIRECT_OUTPUT\\\+x}\" \\\; then +\\s*if \\\ \"\\\$MODULES_REDIRECT_OUTPUT\" = '0' \\\; then +\\s*_mlredir=0; +\\s*elif \\\ \"\\\$MODULES_REDIRECT_OUTPUT\" = '1' \\\; then +\\s*_mlredir=1; +\\s*fi; +\\s*fi; +\\s*case \" \\$\\@ \" in +\\s*\\\*' --no-redirect '\\\*\\\) _mlredir=0 ;; +\\s*\\\*' --redirect '\\\*\\\) _mlredir=1 ;; +\\s*esac; +\\s*if \\\ \\\$_mlredir -eq 0 \\\; then +\\s*_module_raw \"\\$\\@\"; +\\s*else +\\s*_module_raw \"\\$\\@\" 2>&1; +\\s*fi; +};" + +set add_func_ksh "\nmodule\\\(\\\) { +\\s*typeset _mlredir=$is_stderr_tty; +\\s*if \\\ -n \"\\\${MODULES_REDIRECT_OUTPUT\\\+x}\" \\\; then +\\s*if \\\ \"\\\$MODULES_REDIRECT_OUTPUT\" = '0' \\\; then +\\s*_mlredir=0; +\\s*elif \\\ \"\\\$MODULES_REDIRECT_OUTPUT\" = '1' \\\; then +\\s*_mlredir=1; +\\s*fi; +\\s*fi; +\\s*case \" \\$\\@ \" in +\\s*\\\*' --no-redirect '\\\*\\\) _mlredir=0 ;; +\\s*\\\*' --redirect '\\\*\\\) _mlredir=1 ;; +\\s*esac; +\\s*if \\\ \\\$_mlredir -eq 0 \\\; then +\\s*_module_raw \"\\$\\@\"; +\\s*else +\\s*_module_raw \"\\$\\@\" 2>&1; +\\s*fi; +};" + +set add_func_fish "\nfunction module +\\s*set _mlredir $is_stderr_tty +\\s*if set -q MODULES_REDIRECT_OUTPUT +\\s*if \\\ \"\\\$MODULES_REDIRECT_OUTPUT\" = '0' \\\ +\\s*set _mlredir 0 +\\s*else if \\\ \"\\\$MODULES_REDIRECT_OUTPUT\" = '1' \\\ +\\s*set _mlredir 1 +\\s*end +\\s*end +\\s*if contains -- --no-redirect \\\$argv; or begin ; \\\ \\\$_mlredir -eq 0 \\\; and not contains -- --redirect \\\$argv ; end +\\s*_module_raw \\\$argv +\\s*else +\\s*_module_raw \\\$argv 2>&1 +\\s*end +end" set func_bash_quar "$func_name\\\(\\\) {\n$func_silentdbg$func_quar_sh_quar$func_modcmd_bash_quar\n$func_end_quar\n};$add_func_sh" set func_bash_silentdbg "$func_name\\\(\\\) {\n$func_silentdbg_silentdbg$func_quar_sh$func_modcmd_bash\n$func_end_silentdbg\n};$add_func_sh" set func_sh "$func_name\\\(\\\) {\n$func_silentdbg$func_quar_sh$func_modcmd_sh\n$func_end\n};$add_func_sh" set func_bash "$func_name\\\(\\\) {\n$func_silentdbg$func_quar_sh$func_modcmd_bash\n$func_end\n};$add_func_sh" -set func_ksh "$func_name\\\(\\\) {\n$func_silentdbg$func_quar_sh$func_modcmd_ksh\n$func_end\n};$add_func_sh" +set func_ksh "$func_name\\\(\\\) {\n$func_silentdbg$func_quar_sh$func_modcmd_ksh\n$func_end\n};$add_func_ksh" set func_zsh "$func_name\\\(\\\) {\n$func_silentdbg$func_quar_zsh$func_modcmd_zsh\n$func_end\n};$add_func_sh" set eval_cmd_csh expr {$install_wa277 eq {y} ? "eval `$tclshlocre $modulecmd_pathre csh \\\\!\\*`" : "eval \"`$tclshlocre $modulecmd_pathre csh \\\\!\\*:q`\""} @@ -295,7 +342,7 @@ \\s*eval `\\\${_mlre}$tclshlocre $modulecmd_pathre perl \\\$args`; \\s*return \\\$_mlstatus; }" -set func_python "import re, subprocess +set func_python "import sys, re, subprocess def module\\\(\\*arguments\\\): \\s*_mlre = os.environ.copy\\\(\\\) \\s*if 'MODULES_RUN_QUARANTINE' in os.environ: @@ -310,11 +357,14 @@ \\s*_mlre\\\_mlv\\\ = '' \\s*_mlre\\\'__MODULES_QUARANTINE_SET'\\\ = '1' \\s*ns = {} -\\s*exec\\\(subprocess\\.Popen\\\(\\\'$tclshlocre', '$modulecmd_pathre', 'python'\\\ \\+ list\\\(arguments\\\), stdout=subprocess\\.PIPE, env=_mlre\\\)\\.communicate\\\(\\\)\\\0\\\, ns\\\) +\\s*out, err = subprocess\\.Popen\\\(\\\'$tclshlocre', '$modulecmd_pathre', 'python'\\\ \\+ list\\\(arguments\\\), stdout=subprocess\\.PIPE, stderr=subprocess\\.PIPE, env=_mlre\\\)\\.communicate\\\(\\\) +\\s*exec\\\(out, ns\\\) \\s*if '_mlstatus' in ns: \\s*_mlstatus = ns\\\'_mlstatus'\\\ \\s*else: \\s*_mlstatus = True +\\s*if err.decode\\\(\\\): +\\s*print\\\(err.decode\\\(\\\), end='', file=sys.stderr\\\) \\s*return _mlstatus" set func_ruby "class ENVModule \\s*def ENVModule.module\\\(\\*args\\\) @@ -434,14 +484,17 @@ \\s*eval `$tclshlocre $modulecmd_pathre perl \\\$args`; \\s*return \\\$_mlstatus; }" -set func_python "import re, subprocess +set func_python "import sys, re, subprocess def module\\\(\\*arguments\\\): \\s*ns = {} -\\s*exec\\\(subprocess\\.Popen\\\(\\\'$tclshlocre', '$modulecmd_pathre', 'python'\\\ \\+ list\\\(arguments\\\), stdout=subprocess\\.PIPE\\\)\\.communicate\\\(\\\)\\\0\\\, ns\\\) +\\s*out, err = subprocess\\.Popen\\\(\\\'$tclshlocre', '$modulecmd_pathre', 'python'\\\ \\+ list\\\(arguments\\\), stdout=subprocess\\.PIPE, stderr=subprocess\\.PIPE\\\)\\.communicate\\\(\\\) +\\s*exec\\\(out, ns\\\) \\s*if '_mlstatus' in ns: \\s*_mlstatus = ns\\\'_mlstatus'\\\ \\s*else: \\s*_mlstatus = True +\\s*if err.decode\\\(\\\): +\\s*print\\\(err.decode\\\(\\\), end='', file=sys.stderr\\\) \\s*return _mlstatus" set func_ruby "class ENVModule \\s*def ENVModule.module\\\(\\*args\\\) @@ -961,7 +1014,7 @@ lappend ans list set MODULE_VERSION "(.*)" } - # etc/initrc is prefered over init/modulerc + # etc/initrc is preferred over init/modulerc testouterr_cmd_re sh autoinit $ans $tserr_initrc_exinstalled # cannot test access if cannot change file permission @@ -1080,7 +1133,7 @@ lappend ans list ERR set linenum expr {cmpversion $tclsh_version 8.6 == -1 ? 13 : 20} set custom escre msg_moderr {module: Command 'refresh' not supported} {module refresh<EXM>} $modrc $linenum { } - set tserr "msg_load mj\nload m1\nload m2\n\nmsg_top_load m2 {} m1 {}\n\nunload m2\nmsg_unload m2\nunload m1\nmsg_unload m1\nmsg_unload mj\nload m1\nmsg_load m1\nload m3\nmsg_load m3\nmsg_load {'space yc/4'}\n$custom" + set tserr "msg_load mj\nload m1\nload m2\n\nmsg_top_load m2 {} m1 {}\n\nunload m2\nmsg_unload m2\nunload m1\nmsg_unload {m1 <aL>}\nmsg_unload mj\nload m1\nmsg_load {m1 <aL>}\nload m3\nmsg_load m3\nmsg_load {'space yc/4'}\n$custom" testouterr_cmd_re sh autoinit $ans $tserr # test impact of quarantine support enablement through initrc config file @@ -1107,7 +1160,7 @@ set linenum expr {cmpversion $tclsh_version 8.6 == -1 ? 14 : 21} set custom {module restore unk} set custom escre msg_moderr {Collection unk cannot be found} $custom $modrc 36 { } - set tserr "msg_load mj\nload m1\nload m2\n\nmsg_top_load m2 {} m1 {}\n\nunload m2\nmsg_unload m2\nunload m1\nmsg_unload m1\nmsg_unload mj\nload m1\nmsg_load m1\nload m3\nmsg_load m3\nmsg_load {'space yc/4'}\n$err_path'unk'\n$custom" + set tserr "msg_load mj\nload m1\nload m2\n\nmsg_top_load m2 {} m1 {}\n\nunload m2\nmsg_unload m2\nunload m1\nmsg_unload {m1 <aL>}\nmsg_unload mj\nload m1\nmsg_load {m1 <aL>}\nload m3\nmsg_load m3\nmsg_load {'space yc/4'}\n$err_path'unk'\n$custom" testouterr_cmd_re bash autoinit $ans $tserr unsetenv_var TESTSUITE_INITRC @@ -1136,7 +1189,7 @@ set linenum expr {cmpversion $tclsh_version 8.6 == -1 ? 14 : 21} set custom {module restore unk} set custom escre msg_moderr {Collection unk cannot be found} $custom $modrc 36 { } - set tserr "msg_load mj\nload m1\nload m2\n\nmsg_top_load m2 {} m1 {}\n\nunload m2\nmsg_unload m2\nunload m1\nmsg_unload m1\nmsg_unload mj\nload m1\nmsg_load m1\nload m3\nmsg_load m3\nmsg_load {'space yc/4'}\n$err_path'unk'\n$custom" + set tserr "msg_load mj\nload m1\nload m2\n\nmsg_top_load m2 {} m1 {}\n\nunload m2\nmsg_unload m2\nunload m1\nmsg_unload {m1 <aL>}\nmsg_unload mj\nload m1\nmsg_load {m1 <aL>}\nload m3\nmsg_load m3\nmsg_load {'space yc/4'}\n$err_path'unk'\n$custom" testouterr_cmd_re bash autoinit $ans $tserr unsetenv_var TESTSUITE_INITRC @@ -1174,7 +1227,7 @@ set linenum expr {cmpversion $tclsh_version 8.6 == -1 ? 14 : 21} set custom {module restore unk} set custom escre msg_moderr {Collection unk cannot be found} $custom $modrc 36 { } - set tserr "msg_load mj\nload m1\nload m2\n\nmsg_top_load m2 {} m1 {}\n\nunload m2\nmsg_unload m2\nunload m1\nmsg_unload m1\nmsg_unload mj\nload m1\nmsg_load m1\nload m3\nmsg_load m3\nmsg_load {'space yc/4'}\nmsg_load refresh/5.0\n$err_path'unk'\n$custom" + set tserr "msg_load mj\nload m1\nload m2\n\nmsg_top_load m2 {} m1 {}\n\nunload m2\nmsg_unload m2\nunload m1\nmsg_unload {m1 <aL>}\nmsg_unload mj\nload m1\nmsg_load {m1 <aL>}\nload m3\nmsg_load m3\nmsg_load {'space yc/4'}\nmsg_load {refresh/5.0 <bar>}\n$err_path'unk'\n$custom" testouterr_cmd_re bash autoinit $ans $tserr unsetenv_var TESTSUITE_INITRC @@ -1247,7 +1300,7 @@ lappend ans list set MODULE_VERSION "(.*)" } - # etc/modulespath is prefered over init/.modulespath + # etc/modulespath is preferred over init/.modulespath testouterr_cmd_re sh autoinit $ans {} # cannot test access if cannot change file permission
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.70-maint/140-multiargs.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/140-multiargs.exp
Changed
@@ -51,8 +51,8 @@ set modfile_b2 "$modpath/$mod_b2" set modfilere_b2 "$modpathre/$mod_b2" set disp_b2 "append-path\tPATH :" -set errlo_b2 escre msg_load $mod_b2 msg_moderr "add-path $msg_patheqsep" "append-path\tPATH\t\t:" $modfile_b2 24 -set errsrc_b2 escre msg_moderr "add-path $msg_patheqsep" "append-path\tPATH\t\t:" $modfile_b2 24 { } +set errlo_b2 escre msg_load $mod_b2 msg_moderr "append-path $msg_patheqsep" "append-path\tPATH\t\t:" $modfile_b2 24 +set errsrc_b2 escre msg_moderr "append-path $msg_patheqsep" "append-path\tPATH\t\t:" $modfile_b2 24 { } set errdi_b2 "$errsrc_b2\n" set mod_b3 "module/bad"
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.70-maint/150-append-path.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/150-append-path.exp
Changed
@@ -76,10 +76,10 @@ # test bad argument list testouterr_cmd_re "sh" "append-path FOO" "ERR" "$error_msgs: Unexpected number of args for 'append-path' command\n$err_typehelp" -testouterr_cmd_re "sh" "append-path -d : FOO" "ERR" "$error_msgs: add-path $msg_needenvvarval FOO" -testouterr_cmd_re "sh" "append-path -d :" "ERR" "$error_msgs: add-path $msg_needenvvarname" -testouterr_cmd_re "sh" "append-path -d : " "ERR" "$error_msgs: add-path $msg_validenvvarname" -testouterr_cmd_re "sh" "append-path --delim= FOO /path/to" "ERR" "$error_msgs: add-path $msg_nonemptydelim" +testouterr_cmd_re "sh" "append-path -d : FOO" "ERR" "$error_msgs: append-path $msg_needenvvarval FOO" +testouterr_cmd_re "sh" "append-path -d :" "ERR" "$error_msgs: append-path $msg_needenvvarname" +testouterr_cmd_re "sh" "append-path -d : " "ERR" "$error_msgs: append-path $msg_validenvvarname" +testouterr_cmd_re "sh" "append-path --delim= FOO /path/to" "ERR" "$error_msgs: append-path $msg_nonemptydelim" # @@ -125,7 +125,7 @@ lappend ans list set __MODULES_SHARE_FOO "$path1:2" lappend ans list set FOO "$path1:$path1" testouterr_cmd_re "sh" "append-path --duplicates FOO $path1" $ans "" -testouterr_cmd_re "sh" "append-path --index --duplicates FOO $path1" $ans "$warn_msgs: --index option has no effect on add-path" +testouterr_cmd_re "sh" "append-path --index --duplicates FOO $path1" $ans "$warn_msgs: --index option has no effect on append-path" # @@ -157,6 +157,16 @@ # +# test path command arguments +# + +testouterr_cmd sh {append-path FOO /tmp --remove-on-unload} ERR err_invopt --remove-on-unload +testouterr_cmd sh {append-path FOO /tmp --append-on-unload /tmp} ERR err_invopt --append-on-unload +testouterr_cmd sh {append-path FOO /tmp --prepend-on-unload /tmp} ERR err_invopt --prepend-on-unload +testouterr_cmd sh {append-path FOO /tmp --noop-on-unload /tmp} ERR err_invopt --noop-on-unload + + +# # Cleanup #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.70-maint/151-prepend-path.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/151-prepend-path.exp
Changed
@@ -78,9 +78,9 @@ # test bad argument list testouterr_cmd_re "sh" "prepend-path FOO" "ERR" "$error_msgs: Unexpected number of args for 'prepend-path' command\n$err_typehelp" -testouterr_cmd_re "sh" "prepend-path -d : FOO" "ERR" "$error_msgs: add-path $msg_needenvvarval FOO" -testouterr_cmd_re "sh" "prepend-path -d :" "ERR" "$error_msgs: add-path $msg_needenvvarname" -testouterr_cmd_re "sh" "prepend-path -d : " "ERR" "$error_msgs: add-path $msg_validenvvarname" +testouterr_cmd_re "sh" "prepend-path -d : FOO" "ERR" "$error_msgs: prepend-path $msg_needenvvarval FOO" +testouterr_cmd_re "sh" "prepend-path -d :" "ERR" "$error_msgs: prepend-path $msg_needenvvarname" +testouterr_cmd_re "sh" "prepend-path -d : " "ERR" "$error_msgs: prepend-path $msg_validenvvarname" # @@ -247,6 +247,16 @@ # +# test path command arguments +# + +testouterr_cmd sh {prepend-path FOO --remove-on-unload /tmp} ERR err_invopt --remove-on-unload +testouterr_cmd sh {prepend-path FOO --append-on-unload /tmp} ERR err_invopt --append-on-unload +testouterr_cmd sh {prepend-path FOO --prepend-on-unload /tmp} ERR err_invopt --prepend-on-unload +testouterr_cmd sh {prepend-path FOO --noop-on-unload /tmp} ERR err_invopt --noop-on-unload + + +# # Cleanup #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.70-maint/152-remove-path.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/152-remove-path.exp
Changed
@@ -76,10 +76,10 @@ # test bad argument list testouterr_cmd_re "sh" "remove-path FOO" "ERR" "$error_msgs: Unexpected number of args for 'remove-path' command\n$err_typehelp" -testouterr_cmd_re "sh" "remove-path -d : FOO" "ERR" "$error_msgs: unload-path $msg_needenvvarval FOO" -testouterr_cmd_re "sh" "remove-path -d :" "ERR" "$error_msgs: unload-path $msg_needenvvarname" -testouterr_cmd_re "sh" "remove-path -d : " "ERR" "$error_msgs: unload-path $msg_validenvvarname" -testouterr_cmd_re "sh" "remove-path --delim= FOO /path/to" "ERR" "$error_msgs: unload-path $msg_nonemptydelim" +testouterr_cmd_re "sh" "remove-path -d : FOO" "ERR" "$error_msgs: remove-path $msg_needenvvarval FOO" +testouterr_cmd_re "sh" "remove-path -d :" "ERR" "$error_msgs: remove-path $msg_needenvvarname" +testouterr_cmd_re "sh" "remove-path -d : " "ERR" "$error_msgs: remove-path $msg_validenvvarname" +testouterr_cmd_re "sh" "remove-path --delim= FOO /path/to" "ERR" "$error_msgs: remove-path $msg_nonemptydelim" # @@ -116,7 +116,7 @@ lappend ans list unset __MODULES_SHARE_FOO lappend ans list set FOO /foo testouterr_cmd_re "sh" "remove-path FOO $path1" $ans "" -testouterr_cmd_re "sh" "remove-path --duplicates FOO $path1" $ans "$warn_msgs: --duplicates option has no effect on unload-path" +testouterr_cmd_re "sh" "remove-path --duplicates FOO $path1" $ans "$warn_msgs: --duplicates option has no effect on remove-path" # @@ -126,7 +126,7 @@ set ans list lappend ans list set __MODULES_SHARE_FOO "$path1:2" lappend ans list set FOO "$path1:$path1" -testouterr_cmd_re "sh" "remove-path --index FOO $path1" "ERR" "$error_msgs: unload-path $msg_valididxvalue" +testouterr_cmd_re "sh" "remove-path --index FOO $path1" "ERR" "$error_msgs: remove-path $msg_valididxvalue" testouterr_cmd_re "sh" "remove-path --index FOO 1" $ans "" @@ -307,6 +307,16 @@ # +# test path command arguments +# + +testouterr_cmd sh {remove-path --remove-on-unload FOO /tmp} ERR err_invopt --remove-on-unload +testouterr_cmd sh {remove-path --append-on-unload FOO /tmp} ERR err_invopt --append-on-unload +testouterr_cmd sh {remove-path --prepend-on-unload FOO /tmp} ERR err_invopt --prepend-on-unload +testouterr_cmd sh {remove-path --noop-on-unload FOO /tmp} ERR err_invopt --noop-on-unload + + +# # Cleanup #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.70-maint/154-is-saved.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/154-is-saved.exp
Changed
@@ -39,6 +39,17 @@ testouterr_cmd "sh" "is-saved" "OK" "" +# test collection requiring an upcoming version of Modules +# test effect of mcookie configuration with this collection +testouterr_cmd sh "is-saved coll48" ERR {} +testouterr_cmd sh "is-saved $homewithcoll/coll48" ERR {} +setenv_var MODULES_MCOOKIE_CHECK eval +testouterr_cmd sh "is-saved coll48" ERR {} +setenv_var MODULES_MCOOKIE_CHECK always +setenv_var MODULES_MCOOKIE_VERSION_CHECK 0 +testouterr_cmd sh "is-saved coll48" ERR {} +setenv_var MODULES_MCOOKIE_VERSION_CHECK 1 + # define a collection target if { $verbose > 0 } { send_user "\tSetup MODULES_COLLECTION_TARGET = 'target'\n"
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.70-maint/190-emptyarg.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/190-emptyarg.exp
Changed
@@ -40,7 +40,7 @@ # wrong arg number if command does not accept any argument -foreach cmd list list purge reload aliases savelist autoinit { +foreach cmd list purge reload aliases savelist autoinit { testouterr_cmd "sh" "$cmd " "ERR" "$error_msgs: Unexpected number of args for '$cmd' command\n$err_typehelp" } @@ -80,13 +80,14 @@ # also leads to error for path management commands except if only variable value is empty set ans list lappend ans list setpath FOO "" -foreach cmd list append-path prepend-path { - testouterr_cmd "sh" "$cmd " "ERR" "$error_msgs: add-path $msg_validenvvarname" - testouterr_cmd "sh" "$cmd -d " "ERR" "$error_msgs: add-path $msg_nonemptydelim" - testouterr_cmd "sh" "$cmd FOO " $ans "" -} -testouterr_cmd "sh" "remove-path " "ERR" "$error_msgs: unload-path $msg_validenvvarname" -testouterr_cmd "sh" "remove-path -d " "ERR" "$error_msgs: unload-path $msg_nonemptydelim" +testouterr_cmd "sh" "append-path " "ERR" "$error_msgs: append-path $msg_validenvvarname" +testouterr_cmd "sh" "append-path -d " "ERR" "$error_msgs: append-path $msg_nonemptydelim" +testouterr_cmd "sh" "append-path FOO " $ans "" +testouterr_cmd "sh" "prepend-path " "ERR" "$error_msgs: prepend-path $msg_validenvvarname" +testouterr_cmd "sh" "prepend-path -d " "ERR" "$error_msgs: prepend-path $msg_nonemptydelim" +testouterr_cmd "sh" "prepend-path FOO " $ans "" +testouterr_cmd "sh" "remove-path " "ERR" "$error_msgs: remove-path $msg_validenvvarname" +testouterr_cmd "sh" "remove-path -d " "ERR" "$error_msgs: remove-path $msg_nonemptydelim" set ans list lappend ans list unset FOO "" testouterr_cmd "sh" "remove-path FOO " $ans ""
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.70-maint/200-errdisp.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/200-errdisp.exp
Changed
@@ -24,7 +24,7 @@ set test_cols 20 if {!info exists term_cols} { - # skip tests if current terminal witdh is unknown + # skip tests if current terminal width is unknown send_user "\tskipping terminal width-specific tests\n" # set a specific terminal width } elseif {catch {exec stty cols $test_cols} || getTtyCols ne $test_cols} {
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.70-maint/210-clear.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/210-clear.exp
Changed
@@ -33,6 +33,7 @@ lappend ans list unset _LMFILES_ lappend ans list unset __MODULES_LMPREREQ lappend ans list unset LOADEDMODULES +lappend ans list unset __MODULES_LMEXTRATAG lappend ans list unset __MODULES_LMTAG lappend ans list unset __MODULES_LMSOURCESH @@ -57,6 +58,7 @@ lappend ans list unset _LMFILES_ lappend ans list unset __MODULES_LMPREREQ lappend ans list unset LOADEDMODULES +lappend ans list unset __MODULES_LMEXTRATAG lappend ans list unset __MODULES_LMTAG lappend ans list unset __MODULES_LMSOURCESH testouterr_cmd sh {clear y} $ans {} @@ -67,7 +69,8 @@ setenv_var __MODULES_LMPREREQ clear/2&clear/1 setenv_var __MODULES_LMCONFLICT clear/2&clear/3 setenv_var __MODULES_LMSOURCESH "clear/2&bash testsuite/example/sh-to-mod.sh arg1:arg2|prepend-path FOOPATH /path/to/dir1" -setenv_var __MODULES_LMTAG clear/2&nearly-forbidden +setenv_var __MODULES_LMEXTRATAG clear/2&foo +setenv_var __MODULES_LMTAG clear/2&nearly-forbidden&foo setenv_var __MODULES_LMVARIANT clear/2&foo|val1|0|0 setenv_path_var FOO bar set ans list @@ -77,6 +80,7 @@ lappend ans list unset _LMFILES_ lappend ans list unset __MODULES_LMPREREQ lappend ans list unset LOADEDMODULES +lappend ans list unset __MODULES_LMEXTRATAG lappend ans list unset __MODULES_LMTAG lappend ans list unset __MODULES_LMSOURCESH testouterr_cmd sh {clear YES} $ans {}
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.70-maint/220-config.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/220-config.exp
Changed
@@ -26,6 +26,7 @@ unsetenv_var MODULES_IMPLICIT_REQUIREMENT unsetenv_var MODULERCFILE unsetenv_var MODULES_TAG_COLOR_NAME +unsetenv_var MODULES_MCOOKIE_CHECK unsetenv_var MODULES_MCOOKIE_VERSION_CHECK unsetenv_var MODULES_AVAIL_OUTPUT unsetenv_var MODULES_AVAIL_TERSE_OUTPUT @@ -53,6 +54,7 @@ avail_terse_output $install_availterseoutput\ csh_limit 4000\ collection_pin_version 0\ + collection_pin_tag 0\ collection_target <undef>\ color "never \\\(env-var\\\)"\ colors expr {$install_termbg eq {dark} ? $valid_darkbgcolors : $valid_lightbgcolors}\ @@ -68,12 +70,14 @@ list_output $install_listoutput\ list_terse_output $install_listterseoutput\ locked_configs $install_lockedconfigs\ + mcookie_check always\ mcookie_version_check expr {$install_mcookieversioncheck eq {y}}\ ml expr {$install_ml eq {y}}\ nearly_forbidden_days $install_nearlyforbiddendays\ pager "$install_pagercmd"\ quarantine_support expr {$install_quarantinesupport eq {y}}\ rcfile <undef>\ + redirect_output 1\ run_quarantine <undef>\ search_match $install_searchmatch\ set_shell_startup expr {$install_setshellstartup eq {y}}\ @@ -98,6 +102,7 @@ avail_output MODULES_AVAIL_OUTPUT\ avail_terse_output MODULES_AVAIL_TERSE_OUTPUT\ collection_pin_version MODULES_COLLECTION_PIN_VERSION\ + collection_pin_tag MODULES_COLLECTION_PIN_TAG\ collection_target MODULES_COLLECTION_TARGET\ color MODULES_COLOR\ colors MODULES_COLORS\ @@ -111,12 +116,14 @@ implicit_requirement MODULES_IMPLICIT_REQUIREMENT\ list_output MODULES_LIST_OUTPUT\ list_terse_output MODULES_LIST_TERSE_OUTPUT\ + mcookie_check MODULES_MCOOKIE_CHECK\ mcookie_version_check MODULES_MCOOKIE_VERSION_CHECK\ ml MODULES_ML\ nearly_forbidden_days MODULES_NEARLY_FORBIDDEN_DAYS\ pager MODULES_PAGER\ quarantine_support MODULES_QUARANTINE_SUPPORT\ rcfile MODULERCFILE\ + redirect_output MODULES_REDIRECT_OUTPUT\ run_quarantine MODULES_RUN_QUARANTINE\ search_match MODULES_SEARCH_MATCH\ set_shell_startup MODULES_SET_SHELL_STARTUP\ @@ -139,6 +146,7 @@ avail_output {modulepath alias dirwsym sym tag key}\ avail_terse_output {modulepath alias dirwsym sym tag key}\ collection_pin_version {0 1}\ + collection_pin_tag {0 1}\ color {never auto always}\ extended_default {0 1}\ icase {never search always}\ @@ -146,10 +154,12 @@ implicit_requirement {0 1}\ list_output {header idx variant sym tag key}\ list_terse_output {header idx variant sym tag key}\ + mcookie_check {eval always}\ mcookie_version_check {0 1}\ ml {0 1}\ nearly_forbidden_days {0 365}\ quarantine_support {0 1}\ + redirect_output {0 1}\ search_match {starts_with contains}\ set_shell_startup {0 1}\ shells_with_ksh_fpath {sh bash csh tcsh fish}\ @@ -176,7 +186,7 @@ implicit_default 1\ -set statelist list always_read_full_file autoinit clock_seconds cmdline commandname domainname error_count extra_siteconfig_loaded false_rendered force hiding_threshold inhibit_errreport inhibit_interp init_error_report is_stderr_tty is_win kernelversion lm_info_cached machine modulefile nodename os osversion paginate path_separator report_format reportfd return_false shell shelltype siteconfig_loaded sub1_separator sub2_separator subcmd subcmd_args tcl_ext_lib_loaded tcl_version term_columns usergroups username +set statelist list always_read_full_file autoinit clock_seconds cmdline commandname domainname error_count extra_siteconfig_loaded false_rendered force hiding_threshold inhibit_errreport inhibit_interp init_error_report is_stderr_tty is_win kernelversion lm_info_cached machine modulefile nodename os osversion paginate path_separator report_format reportfd return_false shell shelltype siteconfig_loaded sub1_separator sub2_separator subcmd subcmd_args supported_shells tcl_ext_lib_loaded tcl_version term_columns usergroups username if {is_quick_mode} { array unset configdfl @@ -348,7 +358,7 @@ append tserr "\n$param\\s+silent \\(cmd-line\\)" } else { append tserr "\n$param\\s+$configset($param)" - if {lsearch -exact list auto_handling color $param != -1} { + if {lsearch -exact list auto_handling color redirect_output $param != -1} { append tserr " \\(cmd-line\\)" } elseif {info exists configvar($param) || $param eq {runenv_foo}} { append tserr " \\(env-var\\)" @@ -356,7 +366,7 @@ } } } -testouterr_cmd_re sh {config --silent --no-auto --color=never} OK $tserr +testouterr_cmd_re sh {config --silent --no-auto --color=never --no-redirect} OK $tserr # report current state
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.70-maint/230-verbosity.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/230-verbosity.exp
Changed
@@ -41,10 +41,10 @@ # test the different verbosity level with command-line switch option if available testouterr_cmd_re sh {load -s module/meta} $ans {} setenv_var MODULES_VERBOSITY concise -testouterr_cmd_re sh {load module/meta} $ans msg_load trace/all_on $err_trace +testouterr_cmd_re sh {load module/meta} $ans msg_load {trace/all_on <aL>} $err_trace setenv_var MODULES_VERBOSITY normal -testouterr_cmd_re sh {load module/meta} $ans msg_load trace/all_on $err_trace\n\nmsg_top_load module/meta {} {setenv/1.0 trace/all_on prereq/module} {} -testouterr_cmd_re sh {load -v module/meta} $ans msg_load setenv/1.0\n\nmsg_load trace/all_on $err_trace\n\nmsg_load prereq/module\n\nmsg_top_load module/meta {} {setenv/1.0 trace/all_on prereq/module} {} +testouterr_cmd_re sh {load module/meta} $ans msg_load {trace/all_on <aL>} $err_trace\n\nmsg_top_load module/meta {} {setenv/1.0 trace/all_on prereq/module} {} +testouterr_cmd_re sh {load -v module/meta} $ans msg_load {setenv/1.0 <aL>}\n\nmsg_load {trace/all_on <aL>} $err_trace\n\nmsg_load {prereq/module <aL>}\n\nmsg_top_load module/meta {} {setenv/1.0 trace/all_on prereq/module} {} skip_if_quick_mode @@ -173,9 +173,9 @@ if {$verbosity eq {silent} || $verbosity eq {concise}} { set tserr {} } elseif {$verbosity eq {normal}} { - set tserr msg_top_switch setenv/1.0 setenv/0.6 {} {} {} {} module/meta + set tserr msg_top_switch {setenv/1.0 <aL>} setenv/0.6 {} {} {} {} module/meta } elseif {$verbosity eq {verbose} || $verbosity eq {verbose2}} { - set tserr msg_unload module/meta\nmsg_unload setenv/1.0\nmsg_load setenv/0.6\nmsg_load module/meta\n\nmsg_top_switch setenv/1.0 setenv/0.6 {} {} {} {} module/meta + set tserr msg_unload module/meta\nmsg_unload {setenv/1.0 <aL>}\nmsg_load setenv/0.6\nmsg_load module/meta\n\nmsg_top_switch {setenv/1.0 <aL>} setenv/0.6 {} {} {} {} module/meta } testouterr_cmd_re sh {switch --auto setenv/0.6} $ans $tserr @@ -188,20 +188,20 @@ if {$verbosity eq {silent}} { set tserr {} } elseif {$verbosity eq {concise}} { - set tserr msg_unload trace/all_on $err_trace + set tserr msg_unload {trace/all_on <aL>} $err_trace } elseif {$verbosity eq {normal}} { - set tserr msg_unload trace/all_on $err_trace\n\nmsg_top_unload module/meta {} {prereq/module trace/all_on setenv/1.0} {} + set tserr msg_unload {trace/all_on <aL>} $err_trace\n\nmsg_top_unload module/meta {} {prereq/module trace/all_on setenv/1.0} {} } elseif {$verbosity eq {verbose} || $verbosity eq {verbose2}} { - set tserr msg_unload prereq/module\n\nmsg_unload trace/all_on $err_trace\n\nmsg_unload setenv/1.0\n\nmsg_top_unload module/meta {} {prereq/module trace/all_on setenv/1.0} {} + set tserr msg_unload {prereq/module <aL>}\n\nmsg_unload {trace/all_on <aL>} $err_trace\n\nmsg_unload {setenv/1.0 <aL>}\n\nmsg_top_unload module/meta {} {prereq/module trace/all_on setenv/1.0} {} } testouterr_cmd_re sh {unload --auto module/meta} $ans $tserr if {$verbosity eq {silent}} { set tserr {} } elseif {$verbosity eq {concise} || $verbosity eq {normal}} { - set tserr msg_unload trace/all_on $err_trace + set tserr msg_unload {trace/all_on <aL>} $err_trace } elseif {$verbosity eq {verbose} || $verbosity eq {verbose2}} { - set tserr msg_unload module/meta\nmsg_unload prereq/module\n\nmsg_unload trace/all_on $err_trace\n\nmsg_unload setenv/1.0 + set tserr msg_unload module/meta\nmsg_unload {prereq/module <aL>}\n\nmsg_unload {trace/all_on <aL>} $err_trace\n\nmsg_unload {setenv/1.0 <aL>} } testouterr_cmd_re sh {purge} $ans $tserr @@ -214,9 +214,9 @@ if {$verbosity eq {silent}} { set tserr {} } elseif {$verbosity eq {concise} || $verbosity eq {normal}} { - set tserr msg_unload trace/all_on $err_trace\n\nmsg_load trace/all_on $err_trace + set tserr msg_unload {trace/all_on <aL>} $err_trace\n\nmsg_load {trace/all_on <aL>} $err_trace } elseif {$verbosity eq {verbose} || $verbosity eq {verbose2}} { - set tserr msg_unload module/meta\nmsg_unload prereq/module\n\nmsg_unload trace/all_on $err_trace\n\nmsg_unload setenv/1.0\nmsg_load setenv/1.0\n\nmsg_load trace/all_on $err_trace\n\nmsg_load prereq/module\nmsg_load module/meta + set tserr msg_unload module/meta\nmsg_unload {prereq/module <aL>}\n\nmsg_unload {trace/all_on <aL>} $err_trace\n\nmsg_unload {setenv/1.0 <aL>}\nmsg_load {setenv/1.0 <aL>}\n\nmsg_load {trace/all_on <aL>} $err_trace\n\nmsg_load {prereq/module <aL>}\nmsg_load module/meta } testouterr_cmd_re sh {reload} $ans $tserr } @@ -248,13 +248,15 @@ # test 'debug2' verbosity set tserr "(DEBUG .*)+ DEBUG module list -DEBUG module: cmd='list', args='' +DEBUG module: isTopEvaluation 0 +DEBUG module: parseModuleCommandName list help +DEBUG parseModuleCommandName: \\\(command=list, cmdvalid=1, cmdempty=0\\\) (DEBUG .*)+ $no_loaded (DEBUG .*)+" set tserr2 "(DEBUG .*)+ DEBUG setState: .* -DEBUG module: cmd='list', args='' +DEBUG parseModuleCommandName: \\\(command=list, cmdvalid=1, cmdempty=0\\\) (DEBUG .*)+ $no_loaded (DEBUG .*)+" @@ -285,6 +287,23 @@ set tserr expr {$install_verbosity eq {silent} ? {} : "$err_path'unknown'"} testouterr_cmd sh {load unknown} ERR $tserr +# check dynamically defined procedure are correctly traced +setenv_var MODULES_ADVANCED_VERSION_SPEC 1 +setenv_path_var MODULEPATH $modpath.3 +setenv_var MODULES_VERBOSITY debug2 +set tserr "(DEBUG .*)+ +DEBUG parseModuleSpecification: .* +(DEBUG .*)+ +DEBUG modEq: .* +(DEBUG .*)+ +DEBUG modVersCmp: .* +(DEBUG .*)+ +DEBUG modEqStatic: .* +(DEBUG .*)+ +DEBUG doesModMatchAtDepth: .* +(DEBUG .*)+" +testouterr_cmd_re sh {avail foo@1:2} OK $tserr + # # Cleanup
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.70-maint/240-icase.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/240-icase.exp
Changed
@@ -529,7 +529,7 @@ setenv_var MODULEPATH $mp -testouterr_cmd sh {avail -i -t sPace\ Yd/3.0} OK "$mp:\nspace yd/3.0" +testouterr_cmd sh {avail -i -t sPace\ Yd/3.0} OK "$mp:\n'space yd/3.0'" set ans list lappend ans list set _LMFILES_ "$mp/space yd/3.0" lappend ans list set LOADEDMODULES "space yd/3.0"
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.70-maint/270-adv_version_spec.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/270-adv_version_spec.exp
Changed
@@ -473,17 +473,17 @@ testouterr_cmd sh {unload --auto advvers@1.3} $ans msg_top_unload advvers/1.3 {} advvers2/1.0 {} # unload prereq in auto mode -testouterr_cmd_re sh {unload --auto advvers2@1.0} $ans msg_top_unload advvers2/1.0 advvers/1.3 {} {} +testouterr_cmd_re sh {unload --auto advvers2@1.0} $ans msg_top_unload {advvers2/1.0 <aL>} advvers/1.3 {} {} # unload prereq in no-auto mode -testouterr_cmd_re sh {unload --no-auto advvers2@1.0} ERR msg_unload advvers2/1.0 err_prerequn advvers/1.3 +testouterr_cmd_re sh {unload --no-auto advvers2@1.0} ERR msg_unload {advvers2/1.0 <aL>} err_prerequn advvers/1.3 # force prereq unload set ans list lappend ans list set _LMFILES_ $mp/advvers/1.3 lappend ans list set LOADEDMODULES advvers/1.3 lappend ans list unset __MODULES_LMTAG -testouterr_cmd_re sh {unload --force --no-auto advvers2@1.0} $ans msg_unload advvers2/1.0 err_deplof advvers/1.3 +testouterr_cmd_re sh {unload --force --no-auto advvers2@1.0} $ans msg_unload {advvers2/1.0 <aL>} err_deplof advvers/1.3 unsetenv_loaded_module unsetenv_var __MODULES_LMPREREQ @@ -586,7 +586,7 @@ lappend ans list unset _LMFILES_ lappend ans list unset LOADEDMODULES lappend ans list unset __MODULES_LMTAG -testouterr_cmd_re sh {unload --auto advvers2@4.1} $ans msg_top_unload advvers2/4.1 advvers2/4.0 advvers2/4.2 {} +testouterr_cmd_re sh {unload --auto advvers2@4.1} $ans msg_top_unload {advvers2/4.1 <aL>} advvers2/4.0 advvers2/4.2 {} unsetenv_loaded_module unsetenv_var __MODULES_LMPREREQ @@ -622,7 +622,7 @@ lappend ans list set _LMFILES_ $mp/advvers2/6.0:$mp/advvers2/6.5:$mp/advvers2/6.3:$mp/advvers2/6.4 lappend ans list set LOADEDMODULES advvers2/6.0:advvers2/6.5:advvers2/6.3:advvers2/6.4 lappend ans list set __MODULES_LMTAG advvers2/6.0&auto-loaded:advvers2/6.5&auto-loaded -testouterr_cmd_re sh {unload --auto advvers2@6.1} $ans msg_top_unload advvers2/6.1 list advvers2/6.6 advvers2/6.2 advvers2/6.7 list advvers2/6.3 advvers2/6.4 +testouterr_cmd_re sh {unload --auto advvers2@6.1} $ans msg_top_unload {advvers2/6.1 <aL>} list advvers2/6.6 advvers2/6.2 advvers2/6.7 list advvers2/6.3 advvers2/6.4 unsetenv_loaded_module unsetenv_var __MODULES_LMPREREQ unsetenv_var __MODULES_LMCONFLICT
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.70-maint/271-adv_version_spec-in.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/271-adv_version_spec-in.exp
Changed
@@ -514,17 +514,17 @@ testouterr_cmd sh {unload --auto advvers4@1.3} $ans msg_top_unload advvers4/1.3 {} advvers5/1.0 {} # unload prereq in auto mode -testouterr_cmd_re sh {unload --auto advvers5@1.0} $ans msg_top_unload advvers5/1.0 advvers4/1.3 {} {} +testouterr_cmd_re sh {unload --auto advvers5@1.0} $ans msg_top_unload {advvers5/1.0 <aL>} advvers4/1.3 {} {} # unload prereq in no-auto mode -testouterr_cmd_re sh {unload --no-auto advvers5@1.0} ERR msg_unload advvers5/1.0 err_prerequn advvers4/1.3 +testouterr_cmd_re sh {unload --no-auto advvers5@1.0} ERR msg_unload {advvers5/1.0 <aL>} err_prerequn advvers4/1.3 # force prereq unload set ans list lappend ans list set _LMFILES_ $mp/advvers4/1.3 lappend ans list set LOADEDMODULES advvers4/1.3 lappend ans list unset __MODULES_LMTAG -testouterr_cmd_re sh {unload --force --no-auto advvers5@1.0} $ans msg_unload advvers5/1.0 err_deplof advvers4/1.3 +testouterr_cmd_re sh {unload --force --no-auto advvers5@1.0} $ans msg_unload {advvers5/1.0 <aL>} err_deplof advvers4/1.3 # test with alternative prereq setenv_loaded_module list advvers5/0.9 advvers4/1.3 list $mp/advvers5/0.9 $mp/advvers4/1.3 list advvers5/0.9 @@ -534,13 +534,13 @@ lappend ans list unset LOADEDMODULES lappend ans list unset __MODULES_LMTAG testouterr_cmd sh {unload --auto advvers4@1.3} $ans msg_top_unload advvers4/1.3 {} advvers5/0.9 {} -testouterr_cmd_re sh {unload --auto advvers5@0.9} $ans msg_top_unload advvers5/0.9 advvers4/1.3 {} {} -testouterr_cmd_re sh {unload --no-auto advvers5@0.9} ERR msg_unload advvers5/0.9 err_prerequn advvers4/1.3 +testouterr_cmd_re sh {unload --auto advvers5@0.9} $ans msg_top_unload {advvers5/0.9 <aL>} advvers4/1.3 {} {} +testouterr_cmd_re sh {unload --no-auto advvers5@0.9} ERR msg_unload {advvers5/0.9 <aL>} err_prerequn advvers4/1.3 set ans list lappend ans list set _LMFILES_ $mp/advvers4/1.3 lappend ans list set LOADEDMODULES advvers4/1.3 lappend ans list unset __MODULES_LMTAG -testouterr_cmd_re sh {unload --force --no-auto advvers5@0.9} $ans msg_unload advvers5/0.9 err_deplof advvers4/1.3 +testouterr_cmd_re sh {unload --force --no-auto advvers5@0.9} $ans msg_unload {advvers5/0.9 <aL>} err_deplof advvers4/1.3 unsetenv_loaded_module unsetenv_var __MODULES_LMPREREQ @@ -689,7 +689,7 @@ lappend ans list unset _LMFILES_ lappend ans list unset LOADEDMODULES lappend ans list unset __MODULES_LMTAG -testouterr_cmd_re sh {unload --auto advvers5@4.1} $ans msg_top_unload advvers5/4.1 advvers5/4.0 advvers5/4.2 {} +testouterr_cmd_re sh {unload --auto advvers5@4.1} $ans msg_top_unload {advvers5/4.1 <aL>} advvers5/4.0 advvers5/4.2 {} unsetenv_loaded_module unsetenv_var __MODULES_LMPREREQ @@ -725,12 +725,12 @@ lappend ans list set _LMFILES_ $mp/advvers5/6.0:$mp/advvers5/6.5:$mp/advvers5/6.3:$mp/advvers5/6.4 lappend ans list set LOADEDMODULES advvers5/6.0:advvers5/6.5:advvers5/6.3:advvers5/6.4 lappend ans list set __MODULES_LMTAG advvers5/6.0&auto-loaded:advvers5/6.5&auto-loaded -testouterr_cmd_re sh {unload --auto advvers5@6.1} $ans msg_top_unload advvers5/6.1 list advvers5/6.6 advvers5/6.2 advvers5/6.7 list advvers5/6.3 advvers5/6.4 +testouterr_cmd_re sh {unload --auto advvers5@6.1} $ans msg_top_unload {advvers5/6.1 <aL>} list advvers5/6.6 advvers5/6.2 advvers5/6.7 list advvers5/6.3 advvers5/6.4 unsetenv_loaded_module unsetenv_var __MODULES_LMPREREQ unsetenv_var __MODULES_LMCONFLICT -# load/unload additionnal prereq +# load/unload additional prereq # no dependent reload triggered as requirement is already satisfied setenv_loaded_module list advvers5/6.0 advvers5/6.2 list $mp/advvers5/6.0 $mp/advvers5/6.2 list advvers5/6.0 setenv_var __MODULES_LMPREREQ "advvers5/6.2&advvers5@5.0,6.0&advvers5 @6.0,6.1"
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.70-maint/272-adv_version_spec-range.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/272-adv_version_spec-range.exp
Changed
@@ -182,7 +182,7 @@ testouterr_cmd sh {avail -t ext?fl @1.3:} OK "$mp:\nextdfl/1.3.1(default)\nextdfl/1.3.7\nextdfl/1.4.5\nextdfl/2.0\nextdfl/2.0.1" testouterr_cmd sh {avail -t e??.* @:1.4} OK "$mp:\ne.t.fl/1.3.1\ne.t.fl/1.3.7\ne.t.fl/1.4.5" -# additionnal version tests +# additional version tests testouterr_cmd sh {avail -t extdfl8 @1.33:} OK "$mp:\nextdfl8/1.33" testouterr_cmd sh {avail -t extdfl8 @:1.3} OK "$mp:\nextdfl8/1.3.1\nextdfl8/1.3.7" testouterr_cmd sh {avail -t extdfl8 @1.3:1.4} OK "$mp:\nextdfl8/1.3.1\nextdfl8/1.3.7\nextdfl8/1.4.5" @@ -389,7 +389,7 @@ testouterr_cmd sh {path extdfl7 @:11} $ans {} testouterr_cmd sh {path extdfl7 @:10c} $ans {} -# additionnal version tests +# additional version tests testouterr_cmd sh {path extdfl8 @1.33:} list list text $mp/extdfl8/1.33 {} testouterr_cmd sh {path extdfl8 @:1.3} list list text $mp/extdfl8/1.3.7 {} testouterr_cmd sh {path extdfl8 @1.3:1.4} list list text $mp/extdfl8/1.4.5 {} @@ -589,10 +589,10 @@ testouterr_cmd sh {unload --auto advvers6@1.3} $ans msg_top_unload advvers6/1.3 {} advvers7/1.0 {} # unload prereq in auto mode -testouterr_cmd_re sh {unload --auto advvers7@1.0} $ans msg_top_unload advvers7/1.0 advvers6/1.3 {} {} +testouterr_cmd_re sh {unload --auto advvers7@1.0} $ans msg_top_unload {advvers7/1.0 <aL>} advvers6/1.3 {} {} # unload prereq in no-auto mode -testouterr_cmd_re sh {unload --no-auto advvers7@1.0} ERR msg_unload advvers7/1.0 err_prerequn advvers6/1.3 +testouterr_cmd_re sh {unload --no-auto advvers7@1.0} ERR msg_unload {advvers7/1.0 <aL>} err_prerequn advvers6/1.3 # with adv_version_spec disabled setenv_var MODULES_ADVANCED_VERSION_SPEC 0 @@ -608,7 +608,7 @@ lappend ans list set _LMFILES_ $mp/advvers6/1.3 lappend ans list set LOADEDMODULES advvers6/1.3 lappend ans list unset __MODULES_LMTAG -testouterr_cmd_re sh {unload --force --no-auto advvers7@1.0} $ans msg_unload advvers7/1.0 err_deplof advvers6/1.3 +testouterr_cmd_re sh {unload --force --no-auto advvers7@1.0} $ans msg_unload {advvers7/1.0 <aL>} err_deplof advvers6/1.3 # test with alternative prereq setenv_loaded_module list advvers7/0.9 advvers6/1.3 list $mp/advvers7/0.9 $mp/advvers6/1.3 list advvers7/0.9 @@ -618,13 +618,13 @@ lappend ans list unset LOADEDMODULES lappend ans list unset __MODULES_LMTAG testouterr_cmd sh {unload --auto advvers6@1.3} $ans msg_top_unload advvers6/1.3 {} advvers7/0.9 {} -testouterr_cmd_re sh {unload --auto advvers7@0.9} $ans msg_top_unload advvers7/0.9 advvers6/1.3 {} {} -testouterr_cmd_re sh {unload --no-auto advvers7@0.9} ERR msg_unload advvers7/0.9 err_prerequn advvers6/1.3 +testouterr_cmd_re sh {unload --auto advvers7@0.9} $ans msg_top_unload {advvers7/0.9 <aL>} advvers6/1.3 {} {} +testouterr_cmd_re sh {unload --no-auto advvers7@0.9} ERR msg_unload {advvers7/0.9 <aL>} err_prerequn advvers6/1.3 set ans list lappend ans list set _LMFILES_ $mp/advvers6/1.3 lappend ans list set LOADEDMODULES advvers6/1.3 lappend ans list unset __MODULES_LMTAG -testouterr_cmd_re sh {unload --force --no-auto advvers7@0.9} $ans msg_unload advvers7/0.9 err_deplof advvers6/1.3 +testouterr_cmd_re sh {unload --force --no-auto advvers7@0.9} $ans msg_unload {advvers7/0.9 <aL>} err_deplof advvers6/1.3 unsetenv_loaded_module unsetenv_var __MODULES_LMPREREQ @@ -807,7 +807,7 @@ lappend ans list unset _LMFILES_ lappend ans list unset LOADEDMODULES lappend ans list unset __MODULES_LMTAG -testouterr_cmd_re sh {unload --auto advvers7@4.1} $ans msg_top_unload advvers7/4.1 advvers7/4.0 advvers7/4.2 {} +testouterr_cmd_re sh {unload --auto advvers7@4.1} $ans msg_top_unload {advvers7/4.1 <aL>} advvers7/4.0 advvers7/4.2 {} unsetenv_loaded_module unsetenv_var __MODULES_LMPREREQ @@ -843,12 +843,12 @@ lappend ans list set _LMFILES_ $mp/advvers7/6.0:$mp/advvers7/6.5:$mp/advvers7/6.3:$mp/advvers7/6.4 lappend ans list set LOADEDMODULES advvers7/6.0:advvers7/6.5:advvers7/6.3:advvers7/6.4 lappend ans list set __MODULES_LMTAG advvers7/6.0&auto-loaded:advvers7/6.5&auto-loaded -testouterr_cmd_re sh {unload --auto advvers7@6.1} $ans msg_top_unload advvers7/6.1 list advvers7/6.6 advvers7/6.2 advvers7/6.7 list advvers7/6.3 advvers7/6.4 +testouterr_cmd_re sh {unload --auto advvers7@6.1} $ans msg_top_unload {advvers7/6.1 <aL>} list advvers7/6.6 advvers7/6.2 advvers7/6.7 list advvers7/6.3 advvers7/6.4 unsetenv_loaded_module unsetenv_var __MODULES_LMPREREQ unsetenv_var __MODULES_LMCONFLICT -# load/unload additionnal prereq +# load/unload additional prereq # no dependent reload triggered as requirement is already satisfied setenv_loaded_module list advvers7/6.0 advvers7/6.2 list $mp/advvers7/6.0 $mp/advvers7/6.2 list advvers7/6.0 setenv_var __MODULES_LMPREREQ "advvers7/6.2&advvers7@<6.0&advvers7 @<6.1" @@ -1027,9 +1027,9 @@ lappend ans list set _LMFILES_ "$mp/space yd/2.2" lappend ans list set LOADEDMODULES "space yd/2.2" testouterr_cmd sh {load space\ yd@:2.6} $ans {} -testouterr_cmd sh {avail -t space\ yd@:2.6} {} "$mp:\nspace yd/2.1\nspace yd/2.2" -testouterr_cmd sh {avail -t space\ yd@2.1:2.3} {} "$mp:\nspace yd/2.1\nspace yd/2.2" -testouterr_cmd sh {avail -t space\ yd@3.2:} {} "$mp:\nspace yd/4.1\nspace yd/5.0" +testouterr_cmd sh {avail -t space\ yd@:2.6} {} "$mp:\n'space yd/2.1'\n'space yd/2.2'" +testouterr_cmd sh {avail -t space\ yd@2.1:2.3} {} "$mp:\n'space yd/2.1'\n'space yd/2.2'" +testouterr_cmd sh {avail -t space\ yd@3.2:} {} "$mp:\n'space yd/4.1'\n'space yd/5.0'" set ans list lappend ans list set _LMFILES_ "$mp/space yd/4.1" lappend ans list set LOADEDMODULES "space yd/4.1"
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.70-maint/273-adv_version_spec-space.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/273-adv_version_spec-space.exp
Changed
@@ -72,7 +72,7 @@ lappend ans list unset _LMFILES_ lappend ans list unset LOADEDMODULES lappend ans list unset __MODULES_LMTAG -testouterr_cmd sh {unload --auto sp.ce\ y+@:2} $ans msg_top_unload {'sp.ce y+/2.6'} {'space yd/5.0'} {} {} +testouterr_cmd sh {unload --auto sp.ce\ y+@:2} $ans msg_top_unload {'sp.ce y+/2.6' <aL>} {'space yd/5.0'} {} {} testouterr_cmd sh {unload --auto space\ yd@4:} $ans msg_top_unload {'space yd/5.0'} {} "{'sp.ce y+/2.6'}" {} unsetenv_loaded_module unsetenv_var __MODULES_LMPREREQ @@ -442,7 +442,7 @@ lappend ans list unset LOADEDMODULES testouterr_cmd sh {unload --auto baz/1} $ans msg_top_unload baz/1 {'space ye/1.9'} {} {} -# load depedent module {sp.ce y+/2.7} +# load dependent module {sp.ce y+/2.7} setenv_loaded_module list {baz/1} {space ye/1.0} list "$mp/baz/1" "$mp/space ye/1.0" setenv_var __MODULES_LMPREREQ "space ye/1.0&sp.ce|y+@2.5<2.7|baz @<1" @@ -893,7 +893,7 @@ lappend ans list unset LOADEDMODULES testouterr_cmd sh {unload --auto baz/1} $ans msg_top_unload baz/1 {'space ye/1.5'} {} {} -# load depedent module {sp.ce y+/2.7} +# load dependent module {sp.ce y+/2.7} setenv_loaded_module list {baz/1} {space ye/1.1} list "$mp/baz/1" "$mp/space ye/1.1" setenv_var __MODULES_LMPREREQ "space ye/1.1&sp.ce|y+|@2.5<2.7|baz|@<1" @@ -910,7 +910,7 @@ lappend ans list set LOADEDMODULES "baz/1:sp.ce y+/2.7:space ye/1.5" testouterr_cmd_re sh {load --auto sp.ce\ y+/2.7} $ans msg_top_load {'sp.ce y\+/2.7'} {} {} "{'space ye/1.5'}" -# load depedent module {sp.ce y+/0 2} +# load dependent module {sp.ce y+/0 2} setenv_loaded_module list {baz/1} {space ye/1.6} list "$mp/baz/1" "$mp/space ye/1.6" setenv_var __MODULES_LMPREREQ "space ye/1.6&{sp.ce y+}|{@0 2}|baz|@<1"
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.70-maint/274-adv_version_spec-autosym.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/274-adv_version_spec-autosym.exp
Changed
@@ -445,9 +445,9 @@ testouterr_cmd sh {unload --auto autosym9@latest} $ans msg_top_unload autosym9/1 {} foo/2 {} testouterr_cmd sh {unload --auto autosym9/1} $ans msg_top_unload autosym9/1 {} foo/2 {} # test DepUn -testouterr_cmd sh {unload --auto foo@default} $ans msg_top_unload foo/2 autosym9/1 {} {} -testouterr_cmd sh {unload --auto foo@latest} $ans msg_top_unload foo/2 autosym9/1 {} {} -testouterr_cmd sh {unload --auto foo@2} $ans msg_top_unload foo/2 autosym9/1 {} {} +testouterr_cmd sh {unload --auto foo@default} $ans msg_top_unload {foo/2 <aL>} autosym9/1 {} {} +testouterr_cmd sh {unload --auto foo@latest} $ans msg_top_unload {foo/2 <aL>} autosym9/1 {} {} +testouterr_cmd sh {unload --auto foo@2} $ans msg_top_unload {foo/2 <aL>} autosym9/1 {} {} # test DepRe setenv_loaded_module list autosym9/1 list $mp/autosym9/1 setenv_var __MODULES_LMALTNAME autosym9/1&as|autosym9/default&as|autosym9/latest @@ -495,9 +495,9 @@ lappend ans list unset _LMFILES_ lappend ans list unset LOADEDMODULES lappend ans list unset __MODULES_LMTAG -testouterr_cmd sh {unload --auto foo/default} $ans msg_top_unload foo/2 autosym9/1 {} {} -testouterr_cmd sh {unload --auto foo/latest} $ans msg_top_unload foo/2 autosym9/1 {} {} -testouterr_cmd sh {unload --auto foo/2} $ans msg_top_unload foo/2 autosym9/1 {} {} +testouterr_cmd sh {unload --auto foo/default} $ans msg_top_unload {foo/2 <aL>} autosym9/1 {} {} +testouterr_cmd sh {unload --auto foo/latest} $ans msg_top_unload {foo/2 <aL>} autosym9/1 {} {} +testouterr_cmd sh {unload --auto foo/2} $ans msg_top_unload {foo/2 <aL>} autosym9/1 {} {} # conflict not seen, as symbol is not defined set ans list lappend ans list set _LMFILES_ $mp/foo/2:$mp/autosym9/1:$mp/autosym1/2
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.70-maint/280-ml.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/280-ml.exp
Changed
@@ -286,6 +286,7 @@ lappend ans list unset _LMFILES_ lappend ans list unset __MODULES_LMPREREQ lappend ans list unset LOADEDMODULES +lappend ans list unset __MODULES_LMEXTRATAG lappend ans list unset __MODULES_LMTAG lappend ans list unset __MODULES_LMSOURCESH testinouterr_cmd sh {clear} y $ans {}
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.70-maint/290-json.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/290-json.exp
Changed
@@ -81,6 +81,11 @@ # test mix of -t -l -j switches, last wins testouterr_cmd sh {list -t -j} OK $tserr testouterr_cmd sh {list -l -j} OK $tserr +# search on loaded modules +testouterr_cmd sh {list -j nocase extdfl} OK $tserr +set tserr "{\"extdfl/1.3.1\": { \"name\": \"extdfl/1.3.1\", \"type\": \"modulefile\", \"variants\": {}, \"symbols\": \ \"default\" \, \"tags\": \\, \"pathname\": \"$mp/extdfl/1.3.1\"}, +\"extdfl3/1.1/3\": { \"name\": \"extdfl3/1.1/3\", \"type\": \"modulefile\", \"variants\": {}, \"symbols\": \\, \"tags\": \\, \"pathname\": \"$mp/extdfl3/1.1/3\"}}" +testouterr_cmd sh {list -j extdfl} OK $tserr unsetenv_loaded_module unsetenv_var __MODULES_LMALTNAME @@ -272,6 +277,14 @@ } +# test module name with space character +setenv_loaded_module list {variant/w s} list "$modpath.3/variant/w s" +setenv_path_var MODULEPATH $modpath.3 + +set tserr "{\"variant/w s\": { \"name\": \"variant/w s\", \"type\": \"modulefile\", \"variants\": {}, \"symbols\": \\, \"tags\": \\, \"pathname\": \"$modpath.3/variant/w s\"}}" +testouterr_cmd sh {list -j} OK $tserr + + # # Cleanup #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.70-maint/300-err_stack.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/300-err_stack.exp
Changed
@@ -281,8 +281,8 @@ testouterr_cmd_re sh {test bad3/procsource} ERR $tserr # wrongly call a legit modulefile command from a modulefile procedure -set custom "$moderr_msgs: wrong # args: should be \"setenv var val\" - invoked from within +set custom "$moderr_msgs: wrong # args: should be \"setenv ?--set-if-undef? var val\" + while executing \"setenv\" (procedure \"my-proc\" line 2) invoked from within
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.70-maint/310-sh-to-mod.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/310-sh-to-mod.exp
Changed
@@ -73,13 +73,15 @@ # expected script env changes set tsvarpre "prepend-path\tFOOPATH /path/to/dir1 /path/to/dir2 /path/to/dir3 prepend-path\tFOOPATHCB /path/to/dir1 /path/to/d\\{r2 /path/to/dir3 -prepend-path\tFOOPATHEM {} /path/to/dir1 /path/to/dir2 /path/to/dir3" +prepend-path\tFOOPATHEM {} /path/to/dir1 /path/to/dir2 /path/to/dir3 +prepend-path\tFOOPATHWC /path/to/dir1 /path/to/d*r2 /path/to/dir3" set tsvar "setenv\t\tFOO value setenv\t\tFOOCB va\\{ue setenv\t\tFOOEM {} setenv\t\tFOOPATHSP {/path/to/dir1 /path/to/dir2 /path/to/dir3} setenv\t\tFOOPATHSPEM {/path/to/dir1 /path/to/dir2 /path/to/dir3 } -setenv\t\tFOOSP {value }" +setenv\t\tFOOSP {value } +setenv\t\tFOOWC va*ue" set tsfunc_bash "set-function\tfunccb \\n\\ \\ \\ \\ echo\\ f\\{o set-function\tfuncfoo { echo foo} @@ -89,7 +91,9 @@ set-function\tfuncsp { echo f\\\"o; echo b\\\\\\\"r; - echo f\\'o}" + echo f\\'o} +set-function\tfuncwc { + echo sou*sh}" set tsfunc_ksh "set-function\tfunccb \\n\\ \\ \\ \\ \\ \\ echo\\ f\\{o\\n\\ \\ \\ set-function\tfuncfoo { echo foo @@ -102,6 +106,9 @@ echo f\\\"o echo b\\\\\\\"r echo f\\'o + } +set-function\tfuncwc { + echo sou*sh }" set tsfunc_zsh "set-function\tfunccb \\n\\techo\\ f\\{o set-function\tfuncfoo { @@ -112,20 +119,30 @@ set-function\tfuncsp { \techo f\\\"o \techo b\\\\\\\"r -\techo f\\'o}" +\techo f\\'o} +set-function\tfuncwc { +\techo sou*sh}" set tsfunc_sh $tsfunc_bash set funcstart_fish expr {info exists fish_version_ge31 && $fish_version_ge31 ? { } : "\t"} -set tsfunc_fish "set-function\tfunccb { -${funcstart_fish}echo f\\{o} +set funcend_fish expr {info exists fish_version_ge32 && $fish_version_ge32 ? "\n " : {}} +set tsfunc_fish "set-function\tfunc_nested { +${funcstart_fish}function func_in + echo foo + end + func_in${funcend_fish}} +set-function\tfunccb { +${funcstart_fish}echo f\\{o${funcend_fish}} set-function\tfuncfoo { -${funcstart_fish}echo foo} +${funcstart_fish}echo foo${funcend_fish}} set-function\tfuncnl { ${funcstart_fish}echo foo - echo bar} + echo bar${funcend_fish}} set-function\tfuncsp { ${funcstart_fish}echo f\\\"o echo b\\\\\\\"r - echo f\\'o}" + echo f\\'o${funcend_fish}} +set-function\tfuncwc { +${funcstart_fish}echo sou*sh${funcend_fish}}" set tsalias_bash "set-alias\talcb echo\\ f\\{o set-alias\talem {} set-alias\talfoo {echo \$(grep \"report .Modules \" ../../modulecmd.tcl | tr -d \\\\ 2>/dev/null | awk '\{print \$3\}')} @@ -141,6 +158,39 @@ set-alias\talem {} set-alias\talfoo {echo `grep \"report .Modules \" ../../modulecmd.tcl | tr -d \\\\ | awk '\{print \\\$3\}'`} set-alias\talsp {echo f\\\"o; echo b\\\\\\\"r; echo f\\'o}" +set tscomp_bash "complete\tbash cmd {-o default -F _cmd} +complete\tbash mycmd {-j -P '\"%' -S '\"'} +complete\tbash othercmd -u" +set tscomp_tcsh "complete\ttcsh cmd {'n/-h/n/' 'n/--help/n/' 'n/-V/n/' 'n/--version/n/' 'p/1/\(-h -V --help --version\)/'} +complete\ttcsh mycmd {'n/help/`_module_avail`/' 'n/add/`_module_not_yet_loaded; echo \"--auto --no-auto --force -f --icase -i --tag --tag=\"`/'} +complete\ttcsh othercmd 'n/--help/n/'" +if {info exists fish_version_ge31 && $fish_version_ge31} { +set tscomp_alias_fish "complete\tfish alcb {--wraps echo\\ f\\\\\\\{o} +complete\tfish alfoo {--wraps echo\\ \\(grep\\ \\\"report\\ .Modules\\ \\\"\\ ../../modulecmd.tcl\\ \\|\\ tr\\ -d\\ \\\\\\\\\\ 2\\>/dev/null\\ \\|\\ awk\\ \\'\\{print\\ \\\$3\\}\\'\\)} +complete\tfish alsp {--wraps echo\\ f\\\\\\\"o\\;\\ echo\\ b\\\\\\\\\\\\\\\"r\\;\\ echo\\ f\\\\\\'o}" +set tscomp_fish "complete\tfish cmd {-l help -d 'Command help'} +complete\tfish cmd {-l version -d 'Command version'} +complete\tfish cmd {-s h -d 'Command help'} +complete\tfish cmd {-s V -d 'Command version'} +complete\tfish mycmd {--exclusive -s h -d 'Command help'} +complete\tfish othercmd {--no-files -l help -d 'Command help'} +complete\tfish othercmd {--no-files -s h -d 'Command help'} +complete\tfish othercmd {-l version -d 'Command version'} +complete\tfish othercmd {-s V -d 'Command version'}" +} else { +set tscomp_alias_fish "complete\tfish alcb {--wraps echo} +complete\tfish alfoo {--wraps echo} +complete\tfish alsp {--wraps echo}" +set tscomp_fish "complete\tfish cmd {--long-option help --description 'Command help'} +complete\tfish cmd {--long-option version --description 'Command version'} +complete\tfish cmd {--short-option 'h' --description 'Command help'} +complete\tfish cmd {--short-option 'V' --description 'Command version'} +complete\tfish mycmd {--exclusive --short-option 'h' --description 'Command help'} +complete\tfish othercmd {--long-option version --description 'Command version'} +complete\tfish othercmd {--no-files --long-option help --description 'Command help'} +complete\tfish othercmd {--no-files --short-option 'h' --description 'Command help'} +complete\tfish othercmd {--short-option 'V' --description 'Command version'}" +} set tscwd "chdir\t\t$env(TESTSUITEDIR)/modulefiles.2" @@ -167,7 +217,7 @@ testouterr_shtomod dash {} OK "#%Module\n$tscwd\n$tsvarpre\n$tsalias_dash\n$tsvar" } if {info exists shell_pathname(bash)} { - testouterr_shtomod bash {} OK "#%Module\n$tscwd\n$tsvarpre\n$tsalias_bash\n$tsfunc_bash\n$tsvar" + testouterr_shtomod bash {} OK "#%Module\n$tscwd\n$tscomp_bash\n$tsvarpre\n$tsalias_bash\n$tsfunc_bash\n$tsvar" } if {info exists shell_pathname(ksh)} { testouterr_shtomod ksh {} OK "#%Module\n$tscwd\n$tsvarpre\n$tsalias_ksh\n$tsfunc_ksh\n$tsvar" @@ -179,13 +229,13 @@ testouterr_shtomod zsh {} OK "#%Module\n$tscwd\n$tsvarpre\n$tsalias_zsh\n$tsfunc_zsh\n$tsvar" } if {info exists shell_pathname(fish)} { - testouterr_shtomod fish {} OK "#%Module\n$tscwd\n$tsvarpre\n$tsalias_fish\n$tsfunc_fish\n$tsvar" + testouterr_shtomod fish {} OK "#%Module\n$tscwd\n$tscomp_alias_fish\n$tscomp_fish\n$tsvarpre\n$tsalias_fish\n$tsfunc_fish\n$tsvar" } if {info exists shell_pathname(csh)} { testouterr_shtomod csh {} OK "#%Module\n$tscwd\n$tsvarpre\n$tsalias_csh\n$tsvar" } if {info exists shell_pathname(tcsh)} { - testouterr_shtomod csh {} OK "#%Module\n$tscwd\n$tsvarpre\n$tsalias_csh\n$tsvar" + testouterr_shtomod tcsh {} OK "#%Module\n$tscwd\n$tscomp_tcsh\n$tsvarpre\n$tsalias_csh\n$tsvar" } # remove progressively all kind of changes setenv_var TESTSUITE_SHTOMOD_NOVAR 1 @@ -201,7 +251,7 @@ testouterr_shtomod dash {} OK "#%Module\n$tscwd\n$tsalias_dash" } if {info exists shell_pathname(bash)} { - testouterr_shtomod bash {} OK "#%Module\n$tscwd\n$tsalias_bash\n$tsfunc_bash" + testouterr_shtomod bash {} OK "#%Module\n$tscwd\n$tscomp_bash\n$tsalias_bash\n$tsfunc_bash" } if {info exists shell_pathname(ksh)} { testouterr_shtomod ksh {} OK "#%Module\n$tscwd\n$tsalias_ksh\n$tsfunc_ksh" @@ -213,13 +263,13 @@ testouterr_shtomod zsh {} OK "#%Module\n$tscwd\n$tsalias_zsh\n$tsfunc_zsh" } if {info exists shell_pathname(fish)} { - testouterr_shtomod fish {} OK "#%Module\n$tscwd\n$tsalias_fish\n$tsfunc_fish" + testouterr_shtomod fish {} OK "#%Module\n$tscwd\n$tscomp_alias_fish\n$tscomp_fish\n$tsalias_fish\n$tsfunc_fish" } if {info exists shell_pathname(csh)} { testouterr_shtomod csh {} OK "#%Module\n$tscwd\n$tsalias_csh" } if {info exists shell_pathname(tcsh)} { - testouterr_shtomod tcsh {} OK "#%Module\n$tscwd\n$tsalias_csh" + testouterr_shtomod tcsh {} OK "#%Module\n$tscwd\n$tscomp_tcsh\n$tsalias_csh" } setenv_var TESTSUITE_SHTOMOD_NOFUNC 1 if {info exists shell_pathname(sh)} { @@ -233,7 +283,7 @@ testouterr_shtomod dash {} OK "#%Module\n$tscwd\n$tsalias_dash" } if {info exists shell_pathname(bash)} { - testouterr_shtomod bash {} OK "#%Module\n$tscwd\n$tsalias_bash" + testouterr_shtomod bash {} OK "#%Module\n$tscwd\n$tscomp_bash\n$tsalias_bash" } if {info exists shell_pathname(ksh)} { testouterr_shtomod ksh {} OK "#%Module\n$tscwd\n$tsalias_ksh" @@ -245,15 +295,44 @@ testouterr_shtomod zsh {} OK "#%Module\n$tscwd\n$tsalias_zsh" } if {info exists shell_pathname(fish)} { - testouterr_shtomod fish {} OK "#%Module\n$tscwd\n$tsalias_fish" + testouterr_shtomod fish {} OK "#%Module\n$tscwd\n$tscomp_alias_fish\n$tscomp_fish\n$tsalias_fish" } if {info exists shell_pathname(csh)} { testouterr_shtomod csh {} OK "#%Module\n$tscwd\n$tsalias_csh" } if {info exists shell_pathname(tcsh)} { - testouterr_shtomod tcsh {} OK "#%Module\n$tscwd\n$tsalias_csh" + testouterr_shtomod tcsh {} OK "#%Module\n$tscwd\n$tscomp_tcsh\n$tsalias_csh" } setenv_var TESTSUITE_SHTOMOD_NOALIAS 1 +if {info exists shell_pathname(sh)} { + testouterr_shtomod sh {} OK "#%Module\n$tscwd" +} +if {info exists shell_pathname(dash)} { + testouterr_shtomod dash {} OK "#%Module\n$tscwd" +} +if {info exists shell_pathname(bash)} { + testouterr_shtomod bash {} OK "#%Module\n$tscwd\n$tscomp_bash" +} +if {info exists shell_pathname(ksh)} { + testouterr_shtomod ksh {} OK "#%Module\n$tscwd" +} +if {info exists shell_pathname(ksh93)} { + testouterr_shtomod ksh93 {} OK "#%Module\n$tscwd" +} +if {info exists shell_pathname(zsh)} { + testouterr_shtomod zsh {} OK "#%Module\n$tscwd" +} +if {info exists shell_pathname(fish)} { + testouterr_shtomod fish {} OK "#%Module\n$tscwd\n$tscomp_fish" +} +if {info exists shell_pathname(csh)} { + testouterr_shtomod csh {} OK "#%Module\n$tscwd" +} +if {info exists shell_pathname(tcsh)} { + testouterr_shtomod tcsh {} OK "#%Module\n$tscwd\n$tscomp_tcsh" +} + +setenv_var TESTSUITE_SHTOMOD_NOCOMP 1 testouterr_shtomod ALL {} OK "#%Module\n$tscwd" setenv_var TESTSUITE_SHTOMOD_NOCD 1 testouterr_shtomod ALL {} OK {} @@ -285,7 +364,8 @@ setenv\t\tFOO value setenv\t\tFOOCB va\\{ue setenv\t\tFOOEM {} -setenv\t\tFOOSP {value }" +setenv\t\tFOOSP {value } +setenv\t\tFOOWC va*ue" set tserr "#%Module setenv\t\tFOO value setenv\t\tFOOARG1 val @@ -293,7 +373,8 @@ setenv\t\tFOOARG3 val\\{ue setenv\t\tFOOCB va\\{ue setenv\t\tFOOEM {} -setenv\t\tFOOSP {value }" +setenv\t\tFOOSP {value } +setenv\t\tFOOWC va*ue" if {info exists shell_pathname(sh)} { if {$sh_kind eq {dash}} { # dash does not take into account arguments passed to sourced script @@ -334,7 +415,8 @@ setenv\t\tFOOARG4 {} setenv\t\tFOOCB va\\{ue setenv\t\tFOOEM {} -setenv\t\tFOOSP {value }" +setenv\t\tFOOSP {value } +setenv\t\tFOOWC va*ue" if {info exists shell_pathname(sh)} { if {$sh_kind eq {dash}} { testouterr_shtomod sh "v'l val\"e val\\\"e " OK $tserr_noarg @@ -367,7 +449,7 @@ testouterr_shtomod tcsh "v'l val\"e val\\\"e " OK $tserr } -# set an environment variable containing a newline char to see if it distrub parsing +# set an environment variable containing a newline char to see if it disturbs parsing setenv_var TESTSUITE_FOONL "foo\nbar" set tserr "#%Module setenv\t\tFOO value @@ -377,7 +459,8 @@ setenv\t\tFOOARG4 {} setenv\t\tFOOCB va\\{ue setenv\t\tFOOEM {} -setenv\t\tFOOSP {value }" +setenv\t\tFOOSP {value } +setenv\t\tFOOWC va*ue" if {info exists shell_pathname(sh)} { if {$sh_kind eq {dash}} { testouterr_shtomod sh "v'l val\"e val\\\"e " OK $tserr_noarg @@ -420,46 +503,54 @@ setenv_var FOOPATHSP "/path/to/dir1 /path/to/dir2 /path/to/dir3" setenv_var FOOPATHSPEM "/path/to/dir1 /path/to/dir2 /path/to/dir3 " setenv_var FOOPATHCB /path/to/dir1:/path/to/d{r2:/path/to/dir3 +setenv_var FOOPATHWC /path/to/dir1:/path/to/d*r2:/path/to/dir3 testouterr_shtomod ALL {} OK {} setenv_var FOOPATH /path/to/dir2 setenv_var FOOPATHEM /path/to/dir2 setenv_var FOOPATHSP /path/to/dir2 setenv_var FOOPATHSPEM /path/to/dir2 setenv_var FOOPATHCB /path/to/d{r2 +setenv_var FOOPATHWC /path/to/d*r2 set tserr "#%Module append-path\t-d { } FOOPATHSP /path/to/dir3 append-path\t-d { } FOOPATHSPEM /path/to/dir3 {} append-path\tFOOPATH /path/to/dir3 append-path\tFOOPATHCB /path/to/dir3 append-path\tFOOPATHEM /path/to/dir3 +append-path\tFOOPATHWC /path/to/dir3 prepend-path\t-d { } FOOPATHSP /path/to/dir1 prepend-path\t-d { } FOOPATHSPEM /path/to/dir1 prepend-path\tFOOPATH /path/to/dir1 prepend-path\tFOOPATHCB /path/to/dir1 -prepend-path\tFOOPATHEM {} /path/to/dir1" +prepend-path\tFOOPATHEM {} /path/to/dir1 +prepend-path\tFOOPATHWC /path/to/dir1" testouterr_shtomod ALL {} OK $tserr setenv_var FOOPATH "/path/to/dir2:/path" setenv_var FOOPATHEM "/path/to/dir2:/path" setenv_var FOOPATHSP "/path/to/dir2 /path" setenv_var FOOPATHSPEM "/path/to/dir2 /path" setenv_var FOOPATHCB "/path/to/d{r2:/path" +setenv_var FOOPATHWC "/path/to/d*r2:/path" set tserr "#%Module append-path\t-d / FOOPATH to dir3 append-path\t-d / FOOPATHCB to dir3 append-path\t-d / FOOPATHEM to dir3 append-path\t-d / FOOPATHSP to dir3 append-path\t-d / FOOPATHSPEM to {dir3 } +append-path\t-d / FOOPATHWC to dir3 prepend-path\t-d { } FOOPATHSP /path/to/dir1 prepend-path\t-d { } FOOPATHSPEM /path/to/dir1 prepend-path\tFOOPATH /path/to/dir1 prepend-path\tFOOPATHCB /path/to/dir1 -prepend-path\tFOOPATHEM {} /path/to/dir1" +prepend-path\tFOOPATHEM {} /path/to/dir1 +prepend-path\tFOOPATHWC /path/to/dir1" testouterr_shtomod ALL {} OK $tserr unsetenv_var FOOPATH unsetenv_var FOOPATHEM unsetenv_var FOOPATHSP unsetenv_var FOOPATHSPEM unsetenv_var FOOPATHCB +unsetenv_var FOOPATHWC # path dedup tests setenv_var TESTSUITE_SHTOMOD_NOPATH 1 @@ -526,7 +617,7 @@ prepend-path\tFOOPATHDUPEM {} /path/to/dir1" testouterr_shtomod ALL {} OK $tserr -# ambigous prior value +# ambiguous prior value setenv_var FOOPATHDUP /path/to/dir1 setenv_var FOOPATHDUPEM : setenv_var FOOPATHDUPMIX : @@ -540,7 +631,7 @@ setenv\t\tFOOPATHDUPMIX {:/path/to/dir1:/path/to/dir1 /path/to/dir2 /path/to/dir1:/path/to/dir3:/path/to/dir3:}" testouterr_shtomod ALL {} OK $tserr -# ambigous prior value (#2) +# ambiguous prior value (#2) setenv_var FOOPATHDUP /path/to/dir1 setenv_var FOOPATHDUPEM {} setenv_var FOOPATHDUPMIX {} @@ -554,7 +645,7 @@ setenv\t\tFOOPATHDUPSPEM {/path/to/dir1 /path/to/dir1 /path/to/dir2 /path/to/dir1 /path/to/dir3 /path/to/dir3 }" testouterr_shtomod ALL {} OK $tserr -# ambigous prior value (#3) +# ambiguous prior value (#3) setenv_var FOOPATHDUP /path/to/dir1 setenv_var FOOPATHDUPEM /path/to/dir1:/path/to/dir3: setenv_var FOOPATHDUPMIX "/path/to/dir1 /path/to/dir2" @@ -626,6 +717,70 @@ setenv_var TESTSUITE_SHTOMOD_ERRMSG 1 testouterr_shtomod ALL {} ERR "$error_msgs: Script '<SCRIPTSH>' exited abnormally\n with following output\n output message\n error message" +unsetenv_var TESTSUITE_SHTOMOD_EXIT1 +unsetenv_var TESTSUITE_SHTOMOD_OUTMSG +unsetenv_var TESTSUITE_SHTOMOD_ERRMSG + + +# usage of module in script +setenv_path_var MODULEPATH $modpath +setenv_var TESTSUITE_SHTOMOD_MODULE 1 +# set things to trigger a module autoinit within test script in order to ensure +# module is defined, then cleanup not to report this setup within the environment +# changes made by the script +setenv_var MODULES_SET_SHELL_STARTUP 0 +setenv_var MODULES_CMD file normalize $env(TESTSUITEDIR)/../modulecmd.tcl +setenv_var TCLSH $TCLSH + +# if module was defined in environment prior test, the result of the source-sh evaluation +# will be the unset of the module functions +if {$is_modules_defined} { + set extratserr "\nunset-function\t_module_raw\nunset-function\tml\nunset-function\tmodule" +} else { + set extratserr {} +} + +set tserr "#%Module\n$tscwd\n$tsvarpre\n$tsvar\n" +if {$install_versioning eq {y}} { + append tserr "setenv\t\tMODULE_VERSION $install_version +setenv\t\tMODULE_VERSION_STACK $install_version\n" +} +append tserr "setenv\t\tMODULES_COLLECTION_TARGET bar +setenv\t\ttestsuite yes" +set tserrbash "$tserr$extratserr" +foreach sh $shtomod_avail_shells { + # unset module definition on bash when module is predefined + if {$sh eq {bash} || ($sh eq {sh} && $sh_kind eq {bash})} { + testouterr_shtomod $sh {} OK $tserrbash + # skip this test for old fish version as a __fish_restore_status + # function is defined in this case + } elseif {$sh ne {fish} || $fish_version_ge31} { + testouterr_shtomod $sh {} OK $tserr + } +} + +# already set variable with equal or different value +setenv_var MODULES_COLLECTION_TARGET foo +setenv_var testsuite yes +set tserr "#%Module\n$tscwd\n$tsvarpre\n$tsvar\n" +if {$install_versioning eq {y}} { + append tserr "setenv\t\tMODULE_VERSION $install_version +setenv\t\tMODULE_VERSION_STACK $install_version\n" +} +append tserr "setenv\t\tMODULES_COLLECTION_TARGET bar$extratserr" +testouterr_shtomod bash {} OK $tserr + +# module is loaded prior sh-to-mod +setenv_var testsuite no +setenv_loaded_module list setenv/1.0 list $modpath/setenv/1.0 +set tserr "#%Module\n$tscwd\n$tsvarpre\n$tsvar\n" +if {$install_versioning eq {y}} { + append tserr "setenv\t\tMODULE_VERSION $install_version +setenv\t\tMODULE_VERSION_STACK $install_version\n" +} +append tserr "setenv\t\tMODULES_COLLECTION_TARGET bar$extratserr" +testouterr_shtomod bash {} OK $tserr + # # Cleanup
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.70-maint/320-tags.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/320-tags.exp
Changed
@@ -48,7 +48,7 @@ lappend ans list set LOADEDMODULES tag/4.0 lappend ans list set __MODULES_LMTAG tag/4.0&nearly-forbidden set tomorrow clock format expr {clock seconds+86400} -format %Y-%m-%d -set tserr msg_load tag/4.0 err_accessnearlydenied $tomorrow +set tserr msg_load {tag/4.0 <nF>} err_accessnearlydenied $tomorrow testouterr_cmd sh {load tag/4.0} $ans $tserr # with empty element in variable @@ -210,7 +210,7 @@ set test_cols 120 if {!info exists term_cols} { - # skip tests if current terminal witdh is unknown + # skip tests if current terminal width is unknown send_user "\tskipping terminal width-specific tests\n" # set a specific terminal width } elseif {catch {exec stty cols $test_cols} || getTtyCols ne $test_cols} {
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.70-maint/321-tag_abbrev.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/321-tag_abbrev.exp
Changed
@@ -50,6 +50,10 @@ lappend ans list set __MODULES_LMTAG tag/5.0&foo&BaR testouterr_cmd sh {load tag/5.0} $ans {} +# test module designation when loading +set tserr msg_load {tag/5.0 <BaR:F>} +testouterr_cmd sh {load -v tag/5.0} $ans $tserr + # test with tag/5.0 loaded setenv_loaded_module list tag/5.0 list $mp/tag/5.0 setenv_var __MODULES_LMTAG tag/5.0&foo&BaR
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.70-maint/322-tag-sgr.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/322-tag-sgr.exp
Changed
@@ -12,7 +12,7 @@ # Description: Testuite testsequence # Command: # Modulefiles: tag -# Sub-Command: avail, list +# Sub-Command: load, avail, list # # Comment: %C{ # Test tag report rendering with SGR @@ -283,6 +283,78 @@ unsetenv_var __MODULES_LMTAG +# test tag rendering on module name containing a space character +setenv_loaded_module list {variant/w s} list "$mp/variant/w s" +setenv_var __MODULES_LMTAG {variant/w s&auto-loaded} +setenv_var MODULES_TAG_ABBREV auto-loaded=aL +setenv_var MODULES_COLORS {aL=100:al=96:de=4:H=2} +testouterr_cmd_re sh {list} OK "$cur_loaded + 1\\\) 'sgr 100variant/w ssgr 0' + +Key: +sgr 100auto-loadedsgr 0 " + +testouterr_cmd_re sh {avail -w 60 variant} OK "$modlin $mpre $modlin +variant/1.0 variant/3.0 variant/5.1 variant/7.1 +variant/2.0 variant/4.0 variant/6.0 variant/8.0 +variant/2.1/2/1 variant/5.0 variant/7.0 'sgr 100variant/w ssgr 0' + +Key: +sgr 100auto-loadedsgr 0 " +unsetenv_loaded_module +unsetenv_var __MODULES_LMTAG + + +# test sgr rendering over module designation when loading +setenv TESTSUITE_MODULE_TAG_SET1 1 +setenv_var MODULES_TAG_ABBREV foo=F +setenv_var MODULES_COLORS {F=42} +set ans list +lappend ans list set _LMFILES_ $mp/tag/5.0 +lappend ans list set LOADEDMODULES tag/5.0 +lappend ans list set __MODULES_LMTAG tag/5.0&foo +set tserr msg_load sgr 42tag/5.0sgr 0 +testouterr_cmd_re sh {load -v tag/5.0} $ans $tserr + +setenv_var MODULES_COLORS {F=42:hi=1} +set tserr msg_load sgr {42;1}tag/5.0sgr 0 +testouterr_cmd_re sh {load -v tag/5.0} $ans $tserr + +# test sgr rendering along module designation when loading +setenv_var MODULES_COLORS {F=42} +setenv_var MODULES_TAG_COLOR_NAME F +set tserr msg_load "tag/5.0 <sgr 42Fsgr 0>" +testouterr_cmd_re sh {load -v tag/5.0} $ans $tserr + +setenv_var MODULES_COLORS {F=42:hi=1} +set tserr msg_load "sgr 1tag/5.0sgr 22 <sgr 42Fsgr 0>" +testouterr_cmd_re sh {load -v tag/5.0} $ans $tserr + +unsetenv_var MODULES_TAG_COLOR_NAME +unsetenv TESTSUITE_MODULE_TAG_SET1 +unsetenv_var MODULES_TAG_ABBREV + + +# test module designation rendering with tags when module is already loaded +setenv_loaded_module list tag/8.0 list $mp/tag/8.0 +setenv_var __MODULES_LMTAG tag/8.0&bar + +setenv_var MODULES_COLORS bar=42 +set ans list +lappend ans list set __MODULES_LMEXTRATAG tag/8.0&foo +lappend ans list set __MODULES_LMTAG tag/8.0&bar&foo +set tserr msg_tag "sgr 42tag/8.0sgr 0 <foo>" +testouterr_cmd_re sh "load -vv --tag=foo tag/8.0" $ans $tserr +setenv_var MODULES_COLORS bar=42:hi=1 +set tserr msg_tag "sgr {42;1}tag/8.0sgr 0 <foo>" +testouterr_cmd_re sh "load -vv --tag=foo tag/8.0" $ans $tserr +setenv_var MODULES_COLORS bar=42:foo=44:hi=1 + +unsetenv_loaded_module +unsetenv_var __MODULES_LMTAG +unsetenv_var MODULES_COLORS + + # # Cleanup #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.70-maint/350-term_width.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/350-term_width.exp
Changed
@@ -24,7 +24,7 @@ set test_cols 169 if {!info exists term_cols} { - # skip tests if current terminal witdh is unknown + # skip tests if current terminal width is unknown send_user "\tskipping terminal width-specific tests\n" # set a specific terminal width } elseif {catch {exec stty cols $test_cols} || getTtyCols ne $test_cols} { @@ -286,6 +286,7 @@ unsetenv_var MODULES_TERM_WIDTH testerr_cmd sh {avail loc_rc --width=0} $width_0 +testerr_cmd sh {avail loc_rc --width} $width_0 testerr_cmd sh {avail loc_rc -w 0} $width_0 testerr_cmd sh {avail loc_rc --width=1} $width_1 testerr_cmd sh {avail loc_rc -w 1} $width_1 @@ -426,6 +427,7 @@ unsetenv_var MODULES_TERM_WIDTH testerr_cmd sh {list --width=0} $width_0 +testerr_cmd sh {list --width=} $width_0 testerr_cmd sh {list -w 1} $width_1 testerr_cmd sh {list --width=80} $width_80
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.70-maint/360-avail_output.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/360-avail_output.exp
Changed
@@ -278,7 +278,7 @@ set test_cols 100 if {!info exists term_cols} { - # skip tests if current terminal witdh is unknown + # skip tests if current terminal width is unknown send_user "\tskipping terminal width-specific tests\n" # set a specific terminal width } elseif {catch {exec stty cols $test_cols} || getTtyCols ne $test_cols} {
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.70-maint/361-list_output.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/361-list_output.exp
Changed
@@ -191,8 +191,10 @@ setenv_loaded_module list foo/1.0 list $mp/foo/1.0 testouterr_cmd sh {list -t --output=sym:header} OK $cur_loaded\nfoo/1.0(bar) +testouterr_cmd sh {list -t --output=sym:header foo} OK $cur_matchingloaded\nfoo/1.0(bar) setenv_var MODULES_LIST_OUTPUT sym:header testouterr_cmd sh {list} OK "$cur_loaded\nfoo/1.0(bar) " +testouterr_cmd sh {list foo} OK "$cur_matchingloaded\nfoo/1.0(bar) " unsetenv_var MODULES_LIST_OUTPUT @@ -213,6 +215,7 @@ # testouterr_cmd sh {list --output=sym:idx} OK " 1) foo/1.0(bar) " +testouterr_cmd sh {list --output=sym:idx foo} OK " 1) foo/1.0(bar) " testouterr_cmd sh {list -t -o idx:sym:key:header} OK "$cur_loaded\n 1) foo/1.0(bar) \n\nKey:\n(symbolic-version) "
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.70-maint/375-variant-whatis.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/375-variant-whatis.exp
Changed
@@ -62,8 +62,10 @@ testouterr_cmd_re sh {whatis variant/6.0} OK {} setenv_var TESTSUITE_VARIANT 7 -testouterr_cmd_re sh {whatis variant/6.0 foo=val1 bar=2} OK {} -testouterr_cmd_re sh {whatis variant/6.0} OK {} +set tserr "$modlin $mpre $modlin +\\s+variant/6.0: variant/6.0 " +testouterr_cmd_re sh {whatis variant/6.0 foo=val1 bar=2} OK $tserr +testouterr_cmd_re sh {whatis variant/6.0} OK $tserr setenv_var TESTSUITE_VARIANT 8 testouterr_cmd_re sh {whatis variant/6.0 foo=val1 bar=2} OK {}
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.70-maint/376-variant-tag.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/376-variant-tag.exp
Changed
@@ -156,7 +156,7 @@ # dot hidden file setenv_var TESTSUITE_VARIANT_TAG 7 -set tserr {variant/.w s <H>} +set tserr {'variant/.w s' <H>} testouterr_cmd sh {avail -t -o tag variant/.w\ s} OK $tserr testouterr_cmd sh {avail -t -o tag variant/.w\ s foo=val1} OK $tserr testouterr_cmd sh {avail -t -o tag variant/.w\ s foo=val1 bar=1} OK $tserr
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.70-maint/377-variant-shortcut.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/377-variant-shortcut.exp
Changed
@@ -239,7 +239,7 @@ lappend ans list set LOADEDMODULES variant/1.0:variant/7.0 lappend ans list set __MODULES_LMTAG variant/1.0&auto-loaded lappend ans list set TS0 {bar foo} -set tserr msg_load variant/1.0{%val1:foo=val1}\n\nmsg_top_load variant/7.0 {} variant/1.0{%val1:foo=val1} {} +set tserr msg_load {variant/1.0{%val1:foo=val1} <aL>}\n\nmsg_top_load variant/7.0 {} variant/1.0{%val1:foo=val1} {} testouterr_cmd_re sh {load --auto -v variant@7.0} $ans $tserr setenv_var MODULES_VARIANT_SHORTCUT foo=% @@ -253,7 +253,7 @@ lappend ans list set LOADEDMODULES variant/1.0:variant/7.0 lappend ans list set __MODULES_LMTAG variant/1.0&auto-loaded lappend ans list set TS0 {bar foo} -set tserr msg_load variant/1.0{bar=val2:%val1}\n\nmsg_top_load variant/7.0 {} variant/1.0{bar=val2:%val1} {} +set tserr msg_load {variant/1.0{bar=val2:%val1} <aL>}\n\nmsg_top_load variant/7.0 {} variant/1.0{bar=val2:%val1} {} testouterr_cmd_re sh {load --auto -v variant@7.0} $ans $tserr
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/390-state.exp
Added
@@ -0,0 +1,89 @@ +############################################################################## +# Modules Revision 3.0 +# Providing a flexible user environment +# +# File: modules.50-cmds/%M% +# Revision: %I% +# First Edition: 2021/10/19 +# Last Mod.: %U%, %G% +# +# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr +# +# Description: Testuite testsequence +# Command: state +# Modulefiles: +# Sub-Command: +# +# Comment: %C{ +# Test of the 'state' command +# }C% +# +############################################################################## + +set state_header "- State name $modlin.- Value $modlin" +set envvar_header "- Env. variable $modlin.- Value $modlin" + +set statelist list always_read_full_file autoinit clock_seconds cmdline commandname domainname error_count extra_siteconfig_loaded false_rendered force hiding_threshold inhibit_errreport inhibit_interp init_error_report is_stderr_tty is_win kernelversion lm_info_cached machine modulefile nodename os osversion paginate path_separator report_format reportfd return_false shell shelltype siteconfig_loaded sub1_separator sub2_separator subcmd subcmd_args supported_shells tcl_ext_lib_loaded tcl_version term_columns usergroups username + +# +# global state test +# + +set tserr "$vers_reportre\n\n$state_header" +if {auto_execok uname eq {} || auto_execok domainname eq {}} { + append tserr "(\nWARNING: Command '\\S+' cannot be found)+" +} +foreach param $statelist { + append tserr "\n$param\\s+.*" +} +append tserr "\n\n$envvar_header" +set envvar_list list +foreach var list LOADEDMODULES _LMFILES_ MODULE* __MODULES_* __MODULES_SHARE_* *_module* { + set envvar_list concat $envvar_list array names env -glob $var +} +foreach envvar lsort -unique $envvar_list { + append tserr "\nregsub -all {(\\${}*?()+\\)} $envvar {\\\1}\\s+regsub -all {(\\${}*?()+\\)} $env($envvar) {\\\1}" +} +testouterr_cmd_re sh {state} OK $tserr + +# also test via ml command +testouterr_cmd_re sh {ml state} OK $tserr + +# see 00/071 for bad argument number test + + +# +# specific state value retrieval +# + +# dynamically defined state +set tserr "$vers_reportre + +$state_header +supported_shells\\s+sh bash ksh zsh csh tcsh fish cmd tcl perl python ruby lisp cmake r" +testouterr_cmd_re sh {state supported_shells} OK $tserr + +# pre-registered state +set tserr "$vers_reportre + +$state_header +autoinit\\s+0" +testouterr_cmd_re sh {state autoinit} OK $tserr + +# also test via ml command +testouterr_cmd_re sh {ml state autoinit} OK $tserr + +# unknown state specified +set tserr "$error_msgs: State 'unknown' does not exist" +testouterr_cmd_re sh {state unknown} ERR $tserr + +# empty string state specified +set tserr "$error_msgs: State '' does not exist" +testouterr_cmd_re sh {state } ERR $tserr + + +# +# Cleanup +# + +reset_test_env
View file
_service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/400-list-search.exp
Added
@@ -0,0 +1,215 @@ +############################################################################## +# Modules Revision 3.0 +# Providing a flexible user environment +# +# File: modules.70-maint/%M% +# Revision: %I% +# First Edition: 2022/01/22 +# Last Mod.: %U%, %G% +# +# Authors: Xavier Delaruelle, xavier.delaruelle@cea.fr +# +# Description: Testuite testsequence +# Command: list +# Modulefiles: foo, bar +# Sub-Command: +# +# Comment: %C{ +# Test list sub-command search capabilities +# }C% +# +############################################################################## + +set mp $modpath.3 +set mpre $modpathre.3 +setenv_path_var MODULEPATH $mp + + + +set tserr $no_loaded +testouterr_cmd sh {list foo} OK $tserr + + +setenv_loaded_module list foo/1.0 list $mp/foo/1.0 + +set tserr "$cur_matchingloaded\n 1) foo/1.0 " +testouterr_cmd sh {list foo} OK $tserr + +set tserr $no_matchingloaded +testouterr_cmd sh {list bar} OK $tserr + +skip_if_quick_mode + +set tserr $no_matchingloaded +testouterr_cmd sh {list qux} OK $tserr + +set tserr "$cur_matchingloaded\n 1) foo/1.0 " +testouterr_cmd sh {list foo bar} OK $tserr +testouterr_cmd sh {list bar qux foo} OK $tserr + + +setenv_loaded_module list foo/1.0 bar/1.0 list $mp/foo/1.0 $mp/bar/1.0 + +set tserr "$cur_matchingloaded\n 1) foo/1.0 " +testouterr_cmd sh {list foo} OK $tserr + +set tserr "$cur_matchingloaded\n 1) bar/1.0 " +testouterr_cmd sh {list bar} OK $tserr + +set tserr $no_matchingloaded +testouterr_cmd sh {list qux} OK $tserr + +set tserr "$cur_matchingloaded\n 1) foo/1.0 2) bar/1.0 " +testouterr_cmd sh {list foo bar} OK $tserr +testouterr_cmd sh {list bar qux foo} OK $tserr + + +# search match & icase tests +setenv_var MODULES_SEARCH_MATCH starts_with + +set tserr "$cur_matchingloaded\n 1) foo/1.0 " +testouterr_cmd sh {list fo} OK $tserr +testouterr_cmd sh {list foo/} OK $tserr +testouterr_cmd sh {list foo//} OK $tserr +testouterr_cmd sh {list foo/1} OK $tserr +testouterr_cmd sh {list -S foo/1.} OK $tserr + +testouterr_cmd sh {list -i fO} OK $tserr +testouterr_cmd sh {list --icase foO//} OK $tserr +testouterr_cmd sh {-i list Foo/1.} OK $tserr + +testouterr_cmd sh {list -C oo} OK $tserr +testouterr_cmd sh {list --contains -i oO} OK $tserr + +set tserr $no_matchingloaded +testouterr_cmd sh {list oo} OK $tserr +testouterr_cmd sh {list -i oO} OK $tserr + +setenv_var MODULES_SEARCH_MATCH contains + +set tserr "$cur_matchingloaded\n 1) foo/1.0 " +testouterr_cmd sh {list fo} OK $tserr +testouterr_cmd sh {list -i foo/} OK $tserr +testouterr_cmd sh {list oo/} OK $tserr +testouterr_cmd sh {list o/1} OK $tserr +testouterr_cmd sh {list o//} OK $tserr +testouterr_cmd sh {list o/1.0} OK $tserr +testouterr_cmd sh {list -C o/1.0} OK $tserr + +set tserr $no_matchingloaded +testouterr_cmd sh {list -S oo} OK $tserr +testouterr_cmd sh {list --starts-with -i oO} OK $tserr + +unsetenv_var MODULES_SEARCH_MATCH + + +# glob match +set tserr "$cur_matchingloaded\n 1) foo/1.0 " +testouterr_cmd sh {list -S *o/} OK $tserr +testouterr_cmd sh {list -S ?o} OK $tserr +testouterr_cmd sh {list -i -S f?O} OK $tserr +testouterr_cmd sh {list -C oo?} OK $tserr + +set tserr "$cur_matchingloaded\n 1) foo/1.0 2) bar/1.0 " +testouterr_cmd sh {list */1} OK $tserr +testouterr_cmd sh {list *} OK $tserr +testouterr_cmd sh {list ?} OK $tserr + + +# icase/extended_default mix +setenv_var MODULES_ICASE search +setenv_var MODULES_EXTENDED_DEFAULT 1 +set tserr "$cur_matchingloaded\n 1) foo/1.0 " +testouterr_cmd sh {list fOo} OK $tserr +testouterr_cmd sh {list foo/1} OK $tserr + +setenv_var MODULES_ICASE never +set tserr $no_matchingloaded +testouterr_cmd sh {list fOo} OK $tserr +set tserr "$cur_matchingloaded\n 1) foo/1.0 " +testouterr_cmd sh {list foo/1} OK $tserr + +setenv_var MODULES_EXTENDED_DEFAULT 0 +setenv_var MODULES_ICASE search +set tserr "$cur_matchingloaded\n 1) foo/1.0 " +testouterr_cmd sh {list fOo} OK $tserr +testouterr_cmd sh {list foo/1} OK $tserr + +setenv_var MODULES_ICASE never +set tserr $no_matchingloaded +testouterr_cmd sh {list fOo} OK $tserr +set tserr "$cur_matchingloaded\n 1) foo/1.0 " +testouterr_cmd sh {list foo/1} OK $tserr + +unsetenv_var MODULES_ICASE + + +# ml +set tserr "$cur_matchingloaded\n 1) foo/1.0 " +testouterr_cmd sh {ml list foo} OK $tserr +testouterr_cmd sh {ml list -S *o/} OK $tserr +testouterr_cmd sh {ml list -S ?o} OK $tserr +testouterr_cmd sh {ml list -C oo} OK $tserr + + +# module alias/symbolic version +setenv_path_var __MODULES_LMALTNAME foo/1.0&al|aliasmod&al|vers/1.0:bar/1.0&bar/sym +set tserr "$cur_matchingloaded\n 1) foo/1.0 " +testouterr_cmd sh {list alias} OK $tserr +if {$install_icase eq {never}} { +testouterr_cmd sh {list aliasMOD} OK $no_matchingloaded +} else { +testouterr_cmd sh {list aliasMOD} OK $tserr +} +set tserr "$cur_matchingloaded\n 1) bar/1.0(sym) \n\nKey:\n(symbolic-version) " +testouterr_cmd sh {list *sym} OK $tserr + + +# advanced version spec +setenv_var MODULES_ADVANCED_VERSION_SPEC 1 +set tserr "$cur_matchingloaded\n 1) foo/1.0 " +testouterr_cmd sh {list foo@1} OK $tserr +testouterr_cmd sh {list foo@:1} OK $tserr +testouterr_cmd sh {list foo@1,2} OK $tserr +set tserr "$cur_matchingloaded\n 1) foo/1.0 2) bar/1.0(sym) \n\nKey:\n(symbolic-version) " +testouterr_cmd sh {list foo@:1 bar@1:} OK $tserr +testouterr_cmd sh {list vers@1.0,2: bar@1:} OK $tserr + + +# variant +setenv_var TESTSUITE_VARIANT list1 +setenv_path_var __MODULES_LMALTNAME variant/6.0&al|aliasmod +setenv_path_var __MODULES_LMVARIANT variant/6.0&foo|val1|0|0 +setenv_loaded_module list foo/1.0 bar/1.0 variant/6.0 list $mp/foo/1.0 $mp/bar/1.0 $mp/variant/6.0 + +set tserr "$cur_matchingloaded\n 1) variant/6.0{foo=val1} \n\nKey:\n{variant=value} " +testouterr_cmd sh {list variant@6} OK $tserr +testouterr_cmd sh {list variant@6 foo=val1} OK $tserr +set tserr "$no_matchingloaded" +testouterr_cmd sh {list variant@6 foo=val2} OK $tserr +set tserr "$cur_matchingloaded\n 1) bar/1.0 2) variant/6.0{foo=val1} \n\nKey:\n{variant=value} " +testouterr_cmd sh {list variant@6 foo=val1 bar @1} OK $tserr + +setenv_var TESTSUITE_VARIANT list2 +setenv_path_var __MODULES_LMVARIANT variant/6.0&foo|1|1|0 +set tserr "$cur_matchingloaded\n 1) variant/6.0{+foo} \n\nKey:\n{+variant}={variant=on} {variant=value} " +testouterr_cmd sh {list variant@6} OK $tserr +testouterr_cmd sh {list variant@6 +foo} OK $tserr +set tserr "$no_matchingloaded" +testouterr_cmd sh {list variant@6 -foo} OK $tserr +testouterr_cmd sh {list variant@6 ~foo} OK $tserr + + +unsetenv_var TESTSUITE_VARIANT +unsetenv_path_var __MODULES_LMVARIANT +unsetenv_path_var __MODULES_LMALTNAME +unsetenv_loaded_module + +unsetenv_var MODULES_ADVANCED_VERSION_SPEC + + +# +# Cleanup +# + +reset_test_env
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.70-maint/999-cleanup.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.70-maint/999-cleanup.exp
Changed
@@ -15,7 +15,7 @@ # Sub-Command: # # Comment: %C{ -# Cleanup all variables need for the maintainance +# Cleanup all variables need for the maintenance # part of the testsuite. # }C% #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.90-avail/020-single.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.90-avail/020-single.exp
Changed
@@ -41,7 +41,7 @@ \\(symbolic-version\\) " # -# Check this only fo the /bin/csh +# Check this only for the /bin/csh # set header "$modlin $modpathre $modlin\n"
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.90-avail/030-multiple.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.90-avail/030-multiple.exp
Changed
@@ -72,7 +72,7 @@ # tests on a module with single symbol # -# Check this only fo the /bin/csh +# Check this only for the /bin/csh set ts_csh "$header$module1/$mod1vers1\\($mod1sym\\)\\s+$module1/$mod1vers2\\s+" testouterr_cmd_re "csh" "avail $module1" "OK" "$ts_csh\n\n$key_sym"
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.90-avail/040-wild.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.90-avail/040-wild.exp
Changed
@@ -25,7 +25,7 @@ ############################################################################## # -# Check this only fo the /bin/csh +# Check this only for the /bin/csh # # ensure avail tests are made using in depth mode
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.90-avail/050-long.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.90-avail/050-long.exp
Changed
@@ -22,7 +22,7 @@ ############################################################################## # -# Check this only fo the /bin/csh +# Check this only for the /bin/csh # # ensure avail tests are made using in depth mode
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.90-avail/060-empty.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.90-avail/060-empty.exp
Changed
@@ -22,7 +22,7 @@ ############################################################################## # -# Check this only fo the /bin/csh +# Check this only for the /bin/csh #
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.90-avail/070-full.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.90-avail/070-full.exp
Changed
@@ -22,12 +22,12 @@ ############################################################################## # -# Check this only fo the /bin/sh +# Check this only for the /bin/sh # set test_cols 201 if {!info exists term_cols} { - # skip tests if current terminal witdh is unknown + # skip tests if current terminal width is unknown send_user "\tskipping terminal width-specific tests\n" # set a specific terminal width } elseif {catch {exec stty cols $test_cols} || getTtyCols ne $test_cols} {
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.90-avail/080-noindepth.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.90-avail/080-noindepth.exp
Changed
@@ -257,7 +257,7 @@ setenv_path_var MODULEPATH $mp testouterr_cmd sh {avail -t spacen} OK "$mp:\nspacen/\nspacenb/(dw s)\nspacenc/" -testouterr_cmd sh {avail -t space\ ya} OK "$mp:\nspace ya/" +testouterr_cmd sh {avail -t space\ ya} OK "$mp:\n'space ya'/" } @@ -271,7 +271,7 @@ create_endspace_test_modulefiles setenv_path_var MODULEPATH $mp -testouterr_cmd sh {avail -t space\ y\ } OK "$mp:\nspace y /" +testouterr_cmd sh {avail -t space\ y\ } OK "$mp:\n'space y '/" # delete modulepath link created for the test file delete $mp
View file
_service:tar_scm:modules-5.0.1.tar.bz2/testsuite/modules.91-sort/020-avail.exp -> _service:tar_scm:modules-5.1.1.tar.bz2/testsuite/modules.91-sort/020-avail.exp
Changed
@@ -123,7 +123,7 @@ testouterr_cmd_re "sh" "avail -t -L $mod3" "OK" "$ts_latest_sh" # -# tests on modules mixing directories overriden by alias +# tests on modules mixing directories overridden by alias # set mod4 "dirmodalias"
View file
_service:tar_scm:modules-5.0.1.tar.bz2/version.inc.in -> _service:tar_scm:modules-5.1.1.tar.bz2/version.inc.in
Changed
@@ -1,9 +1,9 @@ # Release definitions shared across the Makefiles of this project # run make to generate version.inc -MODULES_RELEASE := 5.0.1 -MODULES_BUILD_HASH := 1bb0199e -MODULES_BUILD_REFS := HEAD -> master, tag: v5.0.1, xd/master -MODULES_BUILD_FDATE := 2021-10-16 16:58:59 +0200 +MODULES_RELEASE := 5.1.1 +MODULES_BUILD_HASH := c1fd4dc1 +MODULES_BUILD_REFS := HEAD -> master, tag: v5.1.1 +MODULES_BUILD_FDATE := 2022-05-31 19:59:11 +0200 MODULES_BUILD := @MODULES_BUILD@ MODULES_BUILD_DATE := @MODULES_BUILD_DATE@
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2