1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
|
-- -*- lua -*-
local testName = "cache"
testdescript = {
owner = "rtm",
product = "modules",
description = [[
Test initial module load
]],
keywords = {testName },
active = 1,
testName = testName,
job_submit_method = "INTERACTIVE",
runScript = [[
. $(projectDir)/rt/common_funcs.sh
unsetMT
initStdEnvVars
MODULEPATH_ROOT=$(testDir)/mf; export MODULEPATH_ROOT
MODULEPATH=$MODULEPATH_ROOT/Core; export MODULEPATH
remove_generated_lmod_files cacheDir fn
cp $(projectDir)/init/lmodrc.lua .lmodrc.lua
cat > fn << EOF
$(outputDir)/cacheDir: $(outputDir)/last_update
EOF
lua $(projectDir)/src/spiderCacheSupport.in.lua --descriptFn fn >> .lmodrc.lua
mkdir cacheDir
runLmod --version # 1
runLmod spider # 2
buildSpiderT $MODULEPATH > cacheDir/spiderT.lua.old
touch last_update
cp cacheDir/spiderT.lua.old cacheDir/spiderT.lua
runLmod spider # 3
mkdir -p .cache/lmod
mv cacheDir/spiderT.lua .cache/lmod
runLmod spider # 4
cat > .cache/lmod/spiderT.lua << EOF
spiderT = {
#
}
EOF
runLmod spider # 5
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'},
},
}
|