-- -*- lua -*-
testdescript = {
   owner   = "rtm",
   product = "modules",
   description = [[
	 Test initial module load
   ]],
   keywords = {"vasp" },

   active = 1,
   testName = "vasp",
   job_submit_method = "INTERACTIVE",

   runScript = [[

     . $(projectDir)/rt/common_funcs.sh

     unsetMT
     initStdEnvVars
     MODULEPATH_ROOT=$(projectDir)/mf;  export MODULEPATH_ROOT
     MODULEPATH=$(projectDir)/mf/Core:$(projectDir)/mf/Compiler/intel/10.1:$(projectDir)/mf/MPI/intel/10.1/openmpi/1.2.6;
     MODULEPATH=$(testDir)/mf:$MODULEPATH
     export MODULEPATH

     rm -fr _stderr.* _stdout.* err.* out.* .lmod.d

     runLmod --version                        # 1
     runLmod keyword graph                    # 2
     runLmod whatis vasp                      # 3
     runLmod help vasp                        # 4
     runLmod load vasp                        # 5
     runBase lua $(projectDir)/src/spider.in.lua -o list $LMOD_DEFAULT_MODULEPATH  # 6

     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
     joinBase64Results  -bash  _stderr.orig _stderr.new
     cleanUp _stderr.new 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'},
   },

}
