summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorbecker33 <becker33@llnl.gov>2017-06-21 09:58:41 -0700
committerGitHub <noreply@github.com>2017-06-21 09:58:41 -0700
commita1131011263c086042ec24748e518d6e2b16b5f8 (patch)
treea3da44ba1cb9bba1f8ff25f13af63b4c5e79720f /var
parent59b66b0d27d29f4c7c1db256389331a36ca9fa10 (diff)
downloadspack-a1131011263c086042ec24748e518d6e2b16b5f8.tar.gz
spack-a1131011263c086042ec24748e518d6e2b16b5f8.tar.bz2
spack-a1131011263c086042ec24748e518d6e2b16b5f8.tar.xz
spack-a1131011263c086042ec24748e518d6e2b16b5f8.zip
Module cmd fix (#3250)
* Parse modules in a way that works for both lmod and tcl * added test and made method more robust * refactoring for pythonic clarity * Improved detection of 'module' shell function + refactored module utilities into spack.util.module_cmd * Improved regex to reject nested parentheses we are not prepared to handle * make tests backwards compatible with python 2.6 * Improved regex to account for sh being aliased to bash and used in bash module definition on some systems * Improve test compatibility with lmod * Added error for None module_cmd * Add test for get_module_cmd_from_which() Add test for get_module_cmd_from_which(). Add -c argument to Popen call to typeset -f module in get_module_cmd_from_bash(). * Increased detection options Included BASH_FUNC_module() variable outside of typeset as a detection option This should work on bash even in restricted_shell mode Kept the typeset detection as an option in case the module function is not exported in bash Also added try statements to tests, with environment recreation in finally blocks. * More tests added; some hackiness * increased test coverage for util/module_cmd
Diffstat (limited to 'var')
0 files changed, 0 insertions, 0 deletions