-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #675: Adding test to show that remove_path works with module un…
…load
- Loading branch information
Robert McLay
committed
Nov 12, 2023
1 parent
1a06901
commit 807fa78
Showing
6 changed files
with
134 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
=========================== | ||
step 1 | ||
lua ProjectDIR/src/lmod.in.lua shell --regression_testing --version | ||
=========================== | ||
Modules based on Lua: Version 8.7.32 2023-08-28 12:42 -05:00 | ||
by Robert McLay [email protected] | ||
=========================== | ||
step 2 | ||
lua ProjectDIR/src/lmod.in.lua shell --regression_testing load A B | ||
=========================== | ||
=========================== | ||
step 3 | ||
lua ProjectDIR/src/lmod.in.lua shell --regression_testing unload B | ||
=========================== | ||
=========================== | ||
step 4 | ||
lua ProjectDIR/src/lmod.in.lua shell --regression_testing unload A | ||
=========================== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
setenv("A","A") | ||
remove_path("PATH","/path/to/remove") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
setenv("B","B") | ||
remove_path("PATH","/path/to/remove") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
=========================== | ||
step 1 | ||
lua ProjectDIR/src/lmod.in.lua shell --regression_testing --version | ||
=========================== | ||
=========================== | ||
step 2 | ||
lua ProjectDIR/src/lmod.in.lua shell --regression_testing load A B | ||
=========================== | ||
A=A; | ||
export A; | ||
B=B; | ||
export B; | ||
LOADEDMODULES=A/1.0:B/2.0; | ||
export LOADEDMODULES; | ||
__LMOD_REF_COUNT_MODULEPATH=ProjectDIR/rt/path_play/mf/Core:1; | ||
export __LMOD_REF_COUNT_MODULEPATH; | ||
MODULEPATH=ProjectDIR/rt/path_play/mf/Core; | ||
export MODULEPATH; | ||
__LMOD_REF_COUNT_PATH=ProjectDIR/proj_mgmt:1\;PATH_to_TM:1; | ||
export __LMOD_REF_COUNT_PATH; | ||
PATH=ProjectDIR/proj_mgmt:PATH_to_TM; | ||
export PATH; | ||
_LMFILES_=ProjectDIR/rt/path_play/mf/Core/A/1.0.lua:ProjectDIR/rt/path_play/mf/Core/B/2.0.lua; | ||
export _LMFILES_; | ||
_ModuleTable_='_ModuleTable_={MTversion=3,depthT={},family={},mT={A={fn="ProjectDIR/rt/path_play/mf/Core/A/1.0.lua",fullName="A/1.0",loadOrder=1,propT={},stackDepth=0,status="active",userName="A",wV="000000001.*zfinal",},B={fn="ProjectDIR/rt/path_play/mf/Core/B/2.0.lua",fullName="B/2.0",loadOrder=2,propT={},stackDepth=0,status="active",userName="B",wV="000000002.*zfinal",},},mpathA={"ProjectDIR/rt/path_play/mf/Core",},systemBaseMPATH="ProjectDIR/rt/path_play/mf/Core",}'; | ||
export _ModuleTable_; | ||
=========================== | ||
step 3 | ||
lua ProjectDIR/src/lmod.in.lua shell --regression_testing unload B | ||
=========================== | ||
unset B; | ||
LOADEDMODULES=A/1.0; | ||
export LOADEDMODULES; | ||
MODULEPATH=ProjectDIR/rt/path_play/mf/Core; | ||
export MODULEPATH; | ||
PATH=ProjectDIR/proj_mgmt:PATH_to_TM; | ||
export PATH; | ||
_LMFILES_=ProjectDIR/rt/path_play/mf/Core/A/1.0.lua; | ||
export _LMFILES_; | ||
_ModuleTable_='_ModuleTable_={MTversion=3,depthT={},family={},mT={A={fn="ProjectDIR/rt/path_play/mf/Core/A/1.0.lua",fullName="A/1.0",loadOrder=1,propT={},stackDepth=0,status="active",userName="A",wV="000000001.*zfinal",},},mpathA={"ProjectDIR/rt/path_play/mf/Core",},systemBaseMPATH="ProjectDIR/rt/path_play/mf/Core",}'; | ||
export _ModuleTable_; | ||
=========================== | ||
step 4 | ||
lua ProjectDIR/src/lmod.in.lua shell --regression_testing unload A | ||
=========================== | ||
unset A; | ||
unset LOADEDMODULES; | ||
MODULEPATH=ProjectDIR/rt/path_play/mf/Core; | ||
export MODULEPATH; | ||
PATH=ProjectDIR/proj_mgmt:PATH_to_TM; | ||
export PATH; | ||
unset _LMFILES_; | ||
_ModuleTable_='_ModuleTable_={MTversion=3,depthT={},family={},mT={},mpathA={"ProjectDIR/rt/path_play/mf/Core",},systemBaseMPATH="ProjectDIR/rt/path_play/mf/Core",}'; | ||
export _ModuleTable_; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
-- -*- lua -*- | ||
local testName = "path_play" | ||
|
||
testdescript = { | ||
owner = "rtm", | ||
product = "modules", | ||
description = [[ | ||
path_play | ||
]], | ||
keywords = {testName }, | ||
|
||
active = true, | ||
testName = testName, | ||
job_submit_method = "INTERACTIVE", | ||
|
||
runScript = [[ | ||
. $(projectDir)/rt/common_funcs.sh | ||
unsetMT | ||
initStdEnvVars | ||
export MODULEPATH_ROOT=$(testDir)/mf | ||
export MODULEPATH=$MODULEPATH_ROOT/Core | ||
rm -fr _stderr.* _stdout.* err.* out.* | ||
runLmod --version # 1 | ||
runLmod load A B # 2 | ||
runLmod unload B # 3 | ||
runLmod unload A # 3 | ||
HOME=$ORIG_HOME | ||
cat _stdout.[0-9][0-9][0-9] > _stdout.orig | ||
joinBase64Results -bash _stdout.orig _stdout.new | ||
cleanUp _stdout.new out.txt | ||
cat _stderr.[0-9][0-9][0-9] > _stderr.orig | ||
cleanUp _stderr.orig err.txt | ||
rm -f results.csv | ||
wrapperDiff --csv results.csv $(testDir)/out.txt out.txt | ||
wrapperDiff --csv results.csv $(testDir)/err.txt err.txt | ||
testFinish -r $(resultFn) -t $(runtimeFn) results.csv | ||
]], | ||
|
||
|
||
blessScript = [[ | ||
# perform what is needed | ||
]], | ||
|
||
tests = { | ||
{ id='t1'}, | ||
}, | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters