Commit Graph

3 Commits

Author SHA1 Message Date
Xavier Delaruelle
6f46cbf140 testsuite: check 'default' symbol spread
Add non-regression tests in 20-locate/045-symvers,
20-locate/068-transitive and 80-deep/068-transitive to ensure that
'default' symbol has same spreading properties than other symbols.
2017-08-24 14:54:45 +02:00
Xavier Delaruelle
96d8ef97a5 Include all kind of symvers target in getModules res
When parsing symbolic version targets in getModules procedures, these
targets were previously included in search result only if they were
found on the filesystem (file or directory). But sometimes, these
targets may be module alias and not a consistent file or directory.

This situation happens when a module-version is set on an alias which in
turns targets a modulefile in a different directory. When you query the
symbolic version in the end-point modulefile directory, you get the
modulefile as a result, but if you query the symbol in the alias
directory, this alias will be returned.

Adapt non-regression tests in 060-rc of 20-locate suite and in
068-transitive of 80-deep suite. Improve especially the 068-transitive
tests with aliases and symbols set from different module.
2017-08-17 17:08:11 +02:00
Xavier Delaruelle
06f79c50fd Let setModuleResolution handle g_moduleVersion
Register all symbolic module version in g_moduleVersion array by letting
setModuleResolution procedure handle this array. So now module-version
procedure deleguates g_moduleVersion handling to setModuleResolution.

With this change all symbols are now registered in g_moduleVersion which
enables to search on these names during an 'avail' command. It was
previously possible to match these symbols only if they were explicitely
defined on a 'module-version' statement and were not about the 'default'
symbol. Symbols inherited by transitivity are now also registered in
g_moduleVersion and resolution structure by recursive call to
setModuleResolution procedure.

setModuleResolution procedure has also been adapted to withdraw its
'override_default' argument. When called, setModuleResolution will now
always override an already defined symbolic version, but 'module-version'
procedure will refrain from calling setModuleResolution if this symbol
is already set in g_moduleVersion.

Introduce non-regression tests 068-transitive in 20-locate and 80-deep
suites and add new tests in 060-rc in 20-locate suite to check
transitive definitions in various conditions.
2017-08-17 17:07:43 +02:00