From b2af7a58ca809ca35b846cc694be9c78e19a85a9 Mon Sep 17 00:00:00 2001 From: Robert McLay Date: Sat, 30 Nov 2024 20:33:40 -0600 Subject: [PATCH] Adding test of BASF case, using old spiderT.lua format --- rt/modulerc/err.txt | 20 +++++ rt/modulerc/modulerc.tdesc | 17 +++- rt/modulerc/out.txt | 46 ++++++++++ rt/modulerc/spiderT-basf-old.lua | 83 +++++++++++++++++++ .../{spiderT-old.lua => spiderT-vub-old.lua} | 0 src/MRC.lua | 3 - 6 files changed, 162 insertions(+), 7 deletions(-) create mode 100644 rt/modulerc/spiderT-basf-old.lua rename rt/modulerc/{spiderT-old.lua => spiderT-vub-old.lua} (100%) diff --git a/rt/modulerc/err.txt b/rt/modulerc/err.txt index 403d70775..a0d4a0fb8 100644 --- a/rt/modulerc/err.txt +++ b/rt/modulerc/err.txt @@ -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 diff --git a/rt/modulerc/modulerc.tdesc b/rt/modulerc/modulerc.tdesc index fdb82bc58..d124310da 100644 --- a/rt/modulerc/modulerc.tdesc +++ b/rt/modulerc/modulerc.tdesc @@ -263,7 +263,18 @@ 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 @@ -271,10 +282,8 @@ EOF 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 diff --git a/rt/modulerc/out.txt b/rt/modulerc/out.txt index 4aaff5d58..bccaf0040 100644 --- a/rt/modulerc/out.txt +++ b/rt/modulerc/out.txt @@ -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; diff --git a/rt/modulerc/spiderT-basf-old.lua b/rt/modulerc/spiderT-basf-old.lua new file mode 100644 index 000000000..bb246f5d2 --- /dev/null +++ b/rt/modulerc/spiderT-basf-old.lua @@ -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", + }, +} + diff --git a/rt/modulerc/spiderT-old.lua b/rt/modulerc/spiderT-vub-old.lua similarity index 100% rename from rt/modulerc/spiderT-old.lua rename to rt/modulerc/spiderT-vub-old.lua diff --git a/src/MRC.lua b/src/MRC.lua index 98ba8cb48..a39b2a5cf 100644 --- a/src/MRC.lua +++ b/src/MRC.lua @@ -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 {}