Fix sym version targetting mod version with space in name

Correctly handle symbolic version target including a whitespace in their
name.
This commit is contained in:
Xavier Delaruelle
2020-02-03 07:40:05 +01:00
parent ac26f87e3c
commit dee5da597c
6 changed files with 16 additions and 1 deletions

View File

@@ -1764,7 +1764,7 @@ proc setModuleResolution {mod target {symver {}} {override_res_path 1}} {
# find end-point module and register step-by-step path to get to it
set res $target
set res_path $res
lappend res_path $res
while {$mod ne $res && [info exists g_resolvedPath($res)]} {
set res $g_resolvedPath($res)
lappend res_path $res

View File

@@ -0,0 +1,2 @@
#%Module
set ModulesVersion {no default}

View File

@@ -0,0 +1 @@
#%Module

View File

@@ -0,0 +1,2 @@
#%Module
set ModulesVersion {no default}

View File

@@ -0,0 +1 @@
#%Module

View File

@@ -572,6 +572,15 @@ for {set i 42} {$i <= 49} {incr i} {
cross_test_case $i
}
# test default symbol targetting 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"
testouterr_cmd sh {load loc_dv10} ERR "$err_path'loc_dv10/no default'"
unsetenv_var MODULES_AVAIL_INDEPTH
#
# Cleanup
#