Skip to content

Commit

Permalink
Adding test of BASF case, using old spiderT.lua format
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert McLay committed Dec 1, 2024
1 parent 32391c0 commit b2af7a5
Show file tree
Hide file tree
Showing 6 changed files with 162 additions and 7 deletions.
20 changes: 20 additions & 0 deletions rt/modulerc/err.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1354,6 +1354,26 @@ lua ProjectDIR/src/lmod.in.lua shell --regression_testing purge
===========================
===========================
step 115
lua ProjectDIR/src/lmod.in.lua shell --regression_testing load xcc
===========================
module: xcc/1.0 isVisible status: true
===========================
step 116
lua ProjectDIR/src/lmod.in.lua shell --regression_testing load Foo/invisible
===========================
module: Foo/invisible isVisible status: false
===========================
step 117
lua ProjectDIR/src/lmod.in.lua shell --regression_testing load xcc
===========================
module: xcc/1.0 isVisible status: true
module: Foo/invisible isVisible status: false
===========================
step 118
lua ProjectDIR/src/lmod.in.lua shell --regression_testing purge
===========================
===========================
step 119
lua ProjectDIR/src/lmod.in.lua shell --regression_testing -A avail
===========================
ProjectDIR/rt/modulerc/mfG/Core
Expand Down
17 changes: 13 additions & 4 deletions rt/modulerc/modulerc.tdesc
Original file line number Diff line number Diff line change
Expand Up @@ -263,18 +263,27 @@ EOF
runLmod load xcc #112
runLmod load Foo/invisible #113
rm -rf $HOME/.cache
mkdir -p $HOME/.cache/lmod
SED=sed
if [ `uname -s` = Darwin ]; then SED=gsed; fi
$SED -e "s|%testDir%|$(testDir)|g" < $(testDir)/spiderT-basf-old.lua > $HOME/.cache/lmod/spiderT.lua
runLmod purge #114
runLmod load xcc #115
runLmod load Foo/invisible #116
runLmod load xcc #117
runLmod purge #118
unsetMT
unset LMOD_MODULERC
rm SitePackage.lua
export MODULEPATH_ROOT=$(testDir)/mfG
export MODULEPATH=$MODULEPATH_ROOT/Core
rm -rf $HOME/.cache
mkdir -p $HOME/.cache/lmod
SED=sed
if [ `uname -s` = Darwin ]; then SED=gsed; fi
$SED -e "s|%testDir%|$(testDir)|g" < $(testDir)/spiderT-old.lua > $HOME/.cache/lmod/spiderT.lua
runLmod -A avail #115
$SED -e "s|%testDir%|$(testDir)|g" < $(testDir)/spiderT-vub-old.lua > $HOME/.cache/lmod/spiderT.lua
runLmod -A avail #119
Expand Down
46 changes: 46 additions & 0 deletions rt/modulerc/out.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3045,6 +3045,52 @@ _ModuleTable_='_ModuleTable_={MTversion=3,depthT={},family={},mT={},mpathA={"Pro
export _ModuleTable_;
===========================
step 115
lua ProjectDIR/src/lmod.in.lua shell --regression_testing load xcc
===========================
LOADEDMODULES=xcc/1.0;
export LOADEDMODULES;
__LMOD_REF_COUNT_MODULEPATH=ProjectDIR/rt/modulerc/mfF/Compiler/xcc/1.0:1\;ProjectDIR/rt/modulerc/mfF/Core:1;
export __LMOD_REF_COUNT_MODULEPATH;
MODULEPATH=ProjectDIR/rt/modulerc/mfF/Compiler/xcc/1.0:ProjectDIR/rt/modulerc/mfF/Core;
export MODULEPATH;
_LMFILES_=ProjectDIR/rt/modulerc/mfF/Core/xcc/1.0.lua;
export _LMFILES_;
_ModuleTable_='_ModuleTable_={MTversion=3,depthT={},family={},mT={xcc={actionA={"prepend_path(\"MODULEPATH\",\"ProjectDIR/rt/modulerc/mfF/Compiler/xcc/1.0\")",},fn="ProjectDIR/rt/modulerc/mfF/Core/xcc/1.0.lua",fullName="xcc/1.0",loadOrder=1,propT={},stackDepth=0,status="active",userName="xcc",wV="000000001.*zfinal",},},mpathA={"ProjectDIR/rt/modulerc/mfF/Compiler/xcc/1.0","ProjectDIR/rt/modulerc/mfF/Core",},systemBaseMPATH="ProjectDIR/rt/modulerc/mfF/Core",}';
export _ModuleTable_;
===========================
step 116
lua ProjectDIR/src/lmod.in.lua shell --regression_testing load Foo/invisible
===========================
LOADEDMODULES=xcc/1.0:Foo/invisible;
export LOADEDMODULES;
MODULEPATH=ProjectDIR/rt/modulerc/mfF/Compiler/xcc/1.0:ProjectDIR/rt/modulerc/mfF/Core;
export MODULEPATH;
_LMFILES_=ProjectDIR/rt/modulerc/mfF/Core/xcc/1.0.lua:ProjectDIR/rt/modulerc/mfF/Compiler/xcc/1.0/Foo/invisible.lua;
export _LMFILES_;
_ModuleTable_='_ModuleTable_={MTversion=3,depthT={},family={},mT={Foo={fn="ProjectDIR/rt/modulerc/mfF/Compiler/xcc/1.0/Foo/invisible.lua",fullName="Foo/invisible",loadOrder=2,moduleKindT={kind="hidden",},propT={},stackDepth=0,status="active",userName="Foo/invisible",wV="*invisible.*zfinal",},xcc={actionA={"prepend_path(\"MODULEPATH\",\"ProjectDIR/rt/modulerc/mfF/Compiler/xcc/1.0\")",},fn="ProjectDIR/rt/modulerc/mfF/Core/xcc/1.0.lua",fullName="xcc/1.0",loadOrder=1,propT={},stackDepth=0,status="active",userName="xcc",wV="000000001.*zfinal",},},mpathA={"ProjectDIR/rt/modulerc/mfF/Compiler/xcc/1.0","ProjectDIR/rt/modulerc/mfF/Core",},systemBaseMPATH="ProjectDIR/rt/modulerc/mfF/Core",}';
export _ModuleTable_;
===========================
step 117
lua ProjectDIR/src/lmod.in.lua shell --regression_testing load xcc
===========================
MODULEPATH=ProjectDIR/rt/modulerc/mfF/Compiler/xcc/1.0:ProjectDIR/rt/modulerc/mfF/Core;
export MODULEPATH;
_ModuleTable_='_ModuleTable_={MTversion=3,depthT={},family={},mT={Foo={fn="ProjectDIR/rt/modulerc/mfF/Compiler/xcc/1.0/Foo/invisible.lua",fullName="Foo/invisible",loadOrder=2,moduleKindT={kind="hidden",},propT={},stackDepth=0,status="active",userName="Foo/invisible",wV="*invisible.*zfinal",},xcc={actionA={"prepend_path(\"MODULEPATH\",\"ProjectDIR/rt/modulerc/mfF/Compiler/xcc/1.0\")",},fn="ProjectDIR/rt/modulerc/mfF/Core/xcc/1.0.lua",fullName="xcc/1.0",loadOrder=1,propT={},stackDepth=0,status="active",userName="xcc",wV="000000001.*zfinal",},},mpathA={"ProjectDIR/rt/modulerc/mfF/Compiler/xcc/1.0","ProjectDIR/rt/modulerc/mfF/Core",},systemBaseMPATH="ProjectDIR/rt/modulerc/mfF/Core",}';
export _ModuleTable_;
===========================
step 118
lua ProjectDIR/src/lmod.in.lua shell --regression_testing purge
===========================
unset LOADEDMODULES;
__LMOD_REF_COUNT_MODULEPATH=ProjectDIR/rt/modulerc/mfF/Core:1;
export __LMOD_REF_COUNT_MODULEPATH;
MODULEPATH=ProjectDIR/rt/modulerc/mfF/Core;
export MODULEPATH;
unset _LMFILES_;
_ModuleTable_='_ModuleTable_={MTversion=3,depthT={},family={},mT={},mpathA={"ProjectDIR/rt/modulerc/mfF/Core",},systemBaseMPATH="ProjectDIR/rt/modulerc/mfF/Core",}';
export _ModuleTable_;
===========================
step 119
lua ProjectDIR/src/lmod.in.lua shell --regression_testing -A avail
===========================
__LMOD_REF_COUNT_MODULEPATH=ProjectDIR/rt/modulerc/mfG/Core:1;
Expand Down
83 changes: 83 additions & 0 deletions rt/modulerc/spiderT-basf-old.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
timestampFn = {
false,
}
mrcT = {
alias2modT = {},
hiddenT = {},
version2modT = {},
}

mrcMpathT = {}
spiderT = {
["%testDir%/mfF/Compiler/xcc/1.0"] = {
Foo = {
defaultA = {
{
barefn = ".modulerc.lua",
defaultIdx = 2,
fn = "%testDir%/mfF/Compiler/xcc/1.0/Foo/.modulerc.lua",
fullName = "Foo/.modulerc",
luaExt = 10,
mpath = "%testDir%/mfF/Compiler/xcc/1.0",
value = false,
},
},
defaultT = {
barefn = ".modulerc.lua",
defaultIdx = 2,
fn = "%testDir%/mfF/Compiler/xcc/1.0/Foo/.modulerc.lua",
fullName = "Foo/.modulerc",
luaExt = 10,
mpath = "%testDir%/mfF/Compiler/xcc/1.0",
value = false,
},
dirT = {},
fileT = {
["Foo/invisible"] = {
Version = "invisible",
canonical = "invisible",
fn = "%testDir%/mfF/Compiler/xcc/1.0/Foo/invisible.lua",
luaExt = 10,
mpath = "%testDir%/mfF/Compiler/xcc/1.0",
pV = "*invisible.*zfinal",
wV = "*invisible.*zfinal",
},
["Foo/visible"] = {
Version = "visible",
canonical = "visible",
fn = "%testDir%/mfF/Compiler/xcc/1.0/Foo/visible.lua",
luaExt = 8,
mpath = "%testDir%/mfF/Compiler/xcc/1.0",
pV = "*visible.*zfinal",
wV = "*visible.*zfinal",
},
},
},
},
["%testDir%/mfF/Core"] = {
xcc = {
defaultA = {},
defaultT = {},
dirT = {},
fileT = {
["xcc/1.0"] = {
Version = "1.0",
canonical = "1.0",
changeMPATH = true,
fn = "%testDir%/mfF/Core/xcc/1.0.lua",
luaExt = 4,
mpath = "%testDir%/mfF/Core",
pV = "000000001.*zfinal",
wV = "000000001.*zfinal",
},
},
},
},
version = 5,
}
mpathMapT = {
["%testDir%/mfF/Compiler/xcc/1.0"] = {
["xcc/1.0"] = "%testDir%/mfF/Core",
},
}

File renamed without changes.
3 changes: 0 additions & 3 deletions src/MRC.lua
Original file line number Diff line number Diff line change
Expand Up @@ -556,9 +556,6 @@ local function l_findForbiddenState(self, mpath, sn, fullName, fn)
wantedA[#wantedA + 1] = n
end
local resultT = l_find_resultT(self, "forbiddenT", {}, mpath, wantedA)




dbg.fini("l_findForbiddenState")
return resultT or {}
Expand Down

0 comments on commit b2af7a5

Please sign in to comment.