From 95a34d5d11c9b6a02608c8d18c71adde4535b74e Mon Sep 17 00:00:00 2001 From: Robert McLay Date: Thu, 12 Dec 2024 22:30:40 -0700 Subject: [PATCH] Issue #739: Add test to report module-info mode in when doing a spider --- rt/tclmodules/err.txt | 27 ++++++++++++++++++++++++--- rt/tclmodules/mf/outputMode/1.0 | 3 +++ rt/tclmodules/out.txt | 13 +++++++++++++ rt/tclmodules/tclmodules.tdesc | 2 ++ 4 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 rt/tclmodules/mf/outputMode/1.0 diff --git a/rt/tclmodules/err.txt b/rt/tclmodules/err.txt index 92291bfbb..72f25cba5 100644 --- a/rt/tclmodules/err.txt +++ b/rt/tclmodules/err.txt @@ -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 mclay@tacc.utexas.edu =========================== step 2 @@ -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 @@ -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 +=========================== diff --git a/rt/tclmodules/mf/outputMode/1.0 b/rt/tclmodules/mf/outputMode/1.0 new file mode 100644 index 000000000..f5290e0ff --- /dev/null +++ b/rt/tclmodules/mf/outputMode/1.0 @@ -0,0 +1,3 @@ +#%Module +module-whatis [ exec bash -c "echo myMode: [module-info mode] > myMode.log" ] + diff --git a/rt/tclmodules/out.txt b/rt/tclmodules/out.txt index 8b59d800d..e19099fda 100644 --- a/rt/tclmodules/out.txt +++ b/rt/tclmodules/out.txt @@ -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 diff --git a/rt/tclmodules/tclmodules.tdesc b/rt/tclmodules/tclmodules.tdesc index ff4e7de89..8628c2a6f 100644 --- a/rt/tclmodules/tclmodules.tdesc +++ b/rt/tclmodules/tclmodules.tdesc @@ -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