Update Python initialization example to precise that the init script
should be exec-ed in the global scope. This is important when init
script is executed from a function.
This change helps to clarify a question asked on #483.
Provide a way to track tests that are expected to fail. Add failcmd
argument on all test procedure to indicate the fail command to use to
report test failure. Use fail command by default. When using xfail
command, it indicates that test is expected to fail.
When TESTSUITE_ENABLE_MODULECACHE environment variable is set, cache
file is built for all modulepaths of the testsuite. Tests are run using
the cache files to resolve available modules.
When searching modules through cache files resolve files and directories
marked as limited access. First check such entries match the search
query, then test if these files and directories can be accessed by
current user.
The access test relies on the findModulesFromDirsAndFiles procedure, as
if module search was not performed with cache file, but just for the
limited-access entries.
Split code from findModules procedure that walk through a list of files
and directories to find modules. Create a new procedure named
findModulesFromDirsAndFiles for that purpose.
This new procedure will be helpful to resolve limited access files and
directories spotted in cache file.
When building cache, check all files and directory within modulepath
that have limited access. Limited access is when user building cache or
others cannot read file or cannot either read or search directory.
Limited access file or directory are recorded in cache file with
respectively limited-access-file and limited-access-directory cachefile
commands.
Limited access commands replace modulefile/modulerc definitions in the
cache if files or their parent directory has limited access.
Add cache_expiry_secs configuration option to control after how many
seconds (after last modification) to consider cache file expired and
ignore it. Set to 0 by default which means cache file never expires.
Value can vary from 0 to 31536000 which corresponds to the number of
seconds during one year.
When configuration option is set, it defies the
MODULES_CACHE_EXPIRY_SECS environment variable.