Commit Graph

6 Commits

Author SHA1 Message Date
Xavier Delaruelle
dee5da597c Fix sym version targetting mod version with space in name
Correctly handle symbolic version target including a whitespace in their
name.
2020-02-03 08:04:53 +01:00
Xavier Delaruelle
ca59cfb0a1 Rewrite getSimplifiedLoadedModuleList proc
Use helper list if it is provided rather than only in case no MODULEPATH
is defined.

Rework name simplification code to make use of getPathToModule procedure
instead of listModules. Loop around as long as parent name matches
tested modulefile, so "foo/bar/version" can returned "foo" if
"foo/bar/version" is default version of "foo".

Add non-regression tests mixing deep and virtual modulefiles whose
definitions are spread through multiple modulepaths. Help checking
default versions are correctly detected in complex situation.
2018-02-28 09:30:37 +01:00
Xavier Delaruelle
6ac49b27ad Correctly handle deep virtual modules
Fix getModules procedure to correctly handle virtual modules when the
sub-directories they refer to does not exist on the filesystem. For
instance 'modvirt/dir0/sub1/1.0' may be a virtual module defined with

 module-virtual modvirt/dir0/sub1/1.0 .common

in 'modvirt/.modulerc' where modvirt/dir0 and modvirt/dir0/sub1 do not
correspond to existing directories on the filesystem.

Now getModules will define among its result virtual directory entries to
make the deep virtual modules findable when, for instance searching a
default version.

Add non-regression tests in 20-locate and 80-deep suites for the deep
virtual module use-case.
2018-01-14 10:39:32 +01:00
Xavier Delaruelle
ab3959b892 testsuite: add virtual modules location tests 2018-01-13 16:27:49 +01:00
Xavier Delaruelle
2d999716cc testsuite: mod corresp. to file or dir in diff modpath
Add location test for modulefiles spread in different modulepath
directories where modulefile name corresponds to a file in one modulepath
and corresponds to a directory in another modulepath.

Ensure correct support for #63.
2017-09-27 06:47:05 +02:00
Xavier Delaruelle
6a6cde2f56 testsuite: add tests for mods spread across paths
Add location tests for module, aliases and symbolic versions whose
definition are spread across multiple modulepaths.
2017-09-03 15:46:38 +02:00