Skip to content

Commit

Permalink
Issue #739: Add test to report module-info mode in when doing a spider
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert McLay committed Dec 13, 2024
1 parent 45be592 commit 95a34d5
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 3 deletions.
27 changes: 24 additions & 3 deletions rt/tclmodules/err.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
step 1
lua ProjectDIR/src/lmod.in.lua shell --regression_testing --version
===========================
Modules based on Lua: Version 8.7.30 2023-07-21 17:13 -05:00
Modules based on Lua: Version 8.7.53 2024-10-12 19:57 -05:00
by Robert McLay [email protected]
===========================
step 2
Expand Down Expand Up @@ -33,8 +33,8 @@ step 6
lua ProjectDIR/src/lmod.in.lua shell --regression_testing avail
===========================
ProjectDIR/rt/tclmodules/mf
a/1.0 getenv/1.0 hide/2.0 (D)
earlyLateOutput/2.0 (L) hide/1.0 showMe/1.0
a/1.0 getenv/1.0 hide/2.0 (D) showMe/1.0
earlyLateOutput/2.0 (L) hide/1.0 outputMode/1.0
Where:
D: Default Module
L: Module is loaded
Expand All @@ -48,3 +48,24 @@ step 7
lua ProjectDIR/src/lmod.in.lua shell --regression_testing load getenv
===========================
FOUND
===========================
step 8
lua ProjectDIR/src/lmod.in.lua shell --regression_testing spider
===========================
The following is a list of the modules and extensions currently available:
a: a/1.0
earlyLateOutput: earlyLateOutput/2.0
getenv: getenv/1.0
hide: hide/1.0, hide/2.0
outputMode: outputMode/1.0
showMe: showMe/1.0
To learn more about a package execute:
$ module spider Foo
where "Foo" is the name of a module.
To find detailed information about a particular package you
must specify the version if there is more than one version:
$ module spider Foo/11.1
===========================
step 9
cat myMode.log
===========================
3 changes: 3 additions & 0 deletions rt/tclmodules/mf/outputMode/1.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#%Module
module-whatis [ exec bash -c "echo myMode: [module-info mode] > myMode.log" ]

13 changes: 13 additions & 0 deletions rt/tclmodules/out.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,16 @@ _LMFILES_=ProjectDIR/rt/tclmodules/mf/earlyLateOutput/2.0:ProjectDIR/rt/tclmodul
export _LMFILES_;
_ModuleTable_='_ModuleTable_={MTversion=3,depthT={},family={},mT={earlyLateOutput={fn="ProjectDIR/rt/tclmodules/mf/earlyLateOutput/2.0",fullName="earlyLateOutput/2.0",loadOrder=1,propT={},stackDepth=0,status="active",userName="earlyLateOutput",wV="000000002.*zfinal",},getenv={fn="ProjectDIR/rt/tclmodules/mf/getenv/1.0",fullName="getenv/1.0",loadOrder=2,propT={},stackDepth=0,status="active",userName="getenv",wV="000000001.*zfinal",},},mpathA={"ProjectDIR/rt/tclmodules/mf",},systemBaseMPATH="ProjectDIR/rt/tclmodules/mf",}';
export _ModuleTable_;
===========================
step 8
lua ProjectDIR/src/lmod.in.lua shell --regression_testing spider
===========================
MODULEPATH=ProjectDIR/rt/tclmodules/mf;
export MODULEPATH;
_ModuleTable_='_ModuleTable_={MTversion=3,depthT={},family={},mT={earlyLateOutput={fn="ProjectDIR/rt/tclmodules/mf/earlyLateOutput/2.0",fullName="earlyLateOutput/2.0",loadOrder=1,propT={},stackDepth=0,status="active",userName="earlyLateOutput",wV="000000002.*zfinal",},getenv={fn="ProjectDIR/rt/tclmodules/mf/getenv/1.0",fullName="getenv/1.0",loadOrder=2,propT={},stackDepth=0,status="active",userName="getenv",wV="000000001.*zfinal",},},mpathA={"ProjectDIR/rt/tclmodules/mf",},systemBaseMPATH="ProjectDIR/rt/tclmodules/mf",}';
export _ModuleTable_;
===========================
step 9
cat myMode.log
===========================
myMode: spider
2 changes: 2 additions & 0 deletions rt/tclmodules/tclmodules.tdesc
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ testdescript = {
runLmod show showMe # 5
runLmod avail # 6
runLmod load getenv # 7
runLmod spider # 8
runBase cat myMode.log # 9
HOME=$ORIG_HOME
cat _stdout.[0-9][0-9][0-9] > _stdout.orig
Expand Down

0 comments on commit 95a34d5

Please sign in to comment.