Commit 66581c19 authored by Valentin Reis's avatar Valentin Reis

Adding dhrun golden tests

parent f84d215c
Pipeline #7697 passed with stages
in 14 minutes and 42 seconds
......@@ -2,19 +2,19 @@
→ λ(manifestDir : Text)
→ λ(isTest : Bool)
→ let assetDir = dataDir ++ "test_assets/"
let types = ./dhrunlib/types.dh
let argotypes = ./argolib/types.dh
let argo = ./argolib/package.dh
let message = "HelloWorld"
let cn = "testContainer"
let idCmd = let id = λ(a : Type) → λ(x : a) → x in id types.Cmd
let makeExtended =
λ(daemonArg : argotypes.MkDaemon)
→ λ(daemonOverrides : types.Cmd → types.Cmd)
......@@ -38,7 +38,7 @@
[] : List Text
}
: types.Config
let manifests =
{ basic =
manifestDir ++ "basic.yml"
......@@ -47,15 +47,15 @@
, singularity =
manifestDir ++ "singularity.yml"
}
let ifTest =
λ(t : Type)
→ λ(default : t)
→ λ(value : t)
→ if isTest then value else default
let ifTestList = ifTest (List Text) ([] : List Text)
let withDaemon =
λ(daemonArg : argotypes.MkDaemon)
→ λ(runArg : argotypes.MkRun)
......@@ -87,12 +87,12 @@
)
)
extraCmds
let withDaemonNoExtras =
λ(runArg : argotypes.MkRun)
→ λ(runOverrides : types.Cmd → types.Cmd)
→ withDaemon argo.nrmd.defarg runArg runOverrides ([] : List types.Cmd)
let withDaemonExtraListen =
λ(filter : Text)
→ λ(doFilter : Bool)
......@@ -105,23 +105,23 @@
[ argo.listen.mk
(argo.listen.defarg cn ⫽ { filter = filter, doFilter = doFilter })
]
let withDaemonExtraProgresstest = withDaemonExtraListen "progress" True
let mkrun =
λ(manifest : Text) → λ(name : Text) → argo.run.defarg name manifest cn
let basicRun = mkrun manifests.basic
let perfRun = mkrun manifests.perf
let singularityRun = mkrun manifests.singularity
in { run =
withDaemonNoExtras (basicRun "true") idCmd
, pwd =
let somedir = "toto"
in withDaemonNoExtras
(basicRun "pwd" ⫽ { cmdwants = [ somedir ] : List Text })
(λ(x : types.Cmd) → x ⫽ { otherwd = [ somedir ] : Optional Text })
......
check_golden () {
echo "--- START checking golden test ${1}"
diff <(dhrun print <<< "let a = ./all-tests.dh \".\" \".\" True in a.${1}") <(cat golden/${1}.yaml)
echo "--- DONE checking golden test ${1}"
}
check_golden "run"
check_golden "pwd"
check_golden "exitcode"
check_golden "hello"
check_golden "listen"
check_golden "power"
check_golden "performance"
check_golden "qmcpack"
check_golden "openmc"
check_golden "lammps"
check_golden "amg"
check_golden "stream"
pre: "toto"
verbose: true
post: null
cmds:
- otherwd: null
args:
- --nrm_log
- ./nrm_log
- --verbose
postchecks: null
passvars:
- PATH
name: nrmd
err:
filecheck:
wants: null
avoids:
- Traceback
- ValueError
filename: nrmd.err
exitcode: null
timeout: null
vars:
- value: /tmp/argo_nodeos_config
varname: ARGO_NODEOS_CONFIG
out:
filecheck:
wants: null
avoids:
- Traceback
- ValueError
filename: nrmd.out
- otherwd: null
args:
- run
- -u
- testContainer
- .basic.yml
- mpiexec
- -n
- '2'
- amg
- -problem
- '2'
- -n
- '90'
- '90'
- '90'
- -P
- '2'
- '1'
- '1'
postchecks: null
passvars:
- PATH
name: nrm
err:
filecheck:
wants: null
avoids:
- Error
- error
- ERROR
- Traceback
- ValueError
filename: nrmrun.err
exitcode: null
timeout: 600
vars:
- value: '1'
varname: OMP_NUM_THREADS
out:
filecheck:
wants: null
avoids:
- Error
- error
- ERROR
- Traceback
- ValueError
filename: nrmrun.out
- otherwd: null
args:
- listen
- -u
- testContainer
- --filter
- progress
postchecks: null
passvars:
- PATH
name: nrm
err:
filecheck:
wants: null
avoids: null
filename: nrmlisten.err
exitcode: null
timeout: null
vars: null
out:
filecheck:
wants:
- progress
avoids: null
filename: nrmlisten.out
cleaning: true
workdir: ./_output
pre: null
verbose: true
post: null
cmds:
- otherwd: null
args:
- --nrm_log
- ./nrm_log
- --verbose
postchecks: null
passvars:
- PATH
name: nrmd
err:
filecheck:
wants: null
avoids:
- Traceback
- ValueError
filename: nrmd.err
exitcode: null
timeout: null
vars:
- value: /tmp/argo_nodeos_config
varname: ARGO_NODEOS_CONFIG
out:
filecheck:
wants: null
avoids:
- Traceback
- ValueError
filename: nrmd.out
- otherwd: null
args:
- run
- -u
- testContainer
- .basic.yml
- 'false'
postchecks: null
passvars:
- PATH
name: nrm
err:
filecheck:
wants: null
avoids:
- Traceback
- ValueError
filename: nrmrun.err
exitcode: 1
timeout: 600
vars: null
out:
filecheck:
wants: null
avoids:
- Traceback
- ValueError
filename: nrmrun.out
cleaning: true
workdir: ./_output
pre: null
verbose: true
post: null
cmds:
- otherwd: null
args:
- --nrm_log
- ./nrm_log
- --verbose
postchecks: null
passvars:
- PATH
name: nrmd
err:
filecheck:
wants: null
avoids:
- Traceback
- ValueError
filename: nrmd.err
exitcode: null
timeout: null
vars:
- value: /tmp/argo_nodeos_config
varname: ARGO_NODEOS_CONFIG
out:
filecheck:
wants: null
avoids:
- Traceback
- ValueError
filename: nrmd.out
- otherwd: null
args:
- run
- -u
- testContainer
- .basic.yml
- echo
- HelloWorld
postchecks: null
passvars:
- PATH
name: nrm
err:
filecheck:
wants: null
avoids:
- Traceback
- ValueError
filename: nrmrun.err
exitcode: null
timeout: 600
vars: null
out:
filecheck:
wants:
- HelloWorld
avoids:
- Traceback
- ValueError
filename: nrmrun.out
cleaning: true
workdir: ./_output
pre: null
verbose: true
post: null
cmds:
- otherwd: null
args:
- --nrm_log
- ./nrm_log
- --verbose
postchecks: null
passvars:
- PATH
name: nrmd
err:
filecheck:
wants: null
avoids:
- Traceback
- ValueError
filename: nrmd.err
exitcode: null
timeout: null
vars:
- value: /tmp/argo_nodeos_config
varname: ARGO_NODEOS_CONFIG
out:
filecheck:
wants: null
avoids:
- Traceback
- ValueError
filename: nrmd.out
- otherwd: null
args:
- run
- -u
- testContainer
- .basic.yml
- mpiexec
- -n
- '2'
- -bind-to
- core
- lmp_mpi
- -i
- .test_assets//modified.lj
postchecks: null
passvars:
- PATH
name: nrm
err:
filecheck:
wants: null
avoids:
- Error
- error
- ERROR
- Traceback
- ValueError
filename: nrmrun.err
exitcode: null
timeout: 600
vars: null
out:
filecheck:
wants: null
avoids:
- Error
- error
- ERROR
- Traceback
- ValueError
filename: nrmrun.out
- otherwd: null
args:
- listen
- -u
- testContainer
- --filter
- progress
postchecks: null
passvars:
- PATH
name: nrm
err:
filecheck:
wants: null
avoids: null
filename: nrmlisten.err
exitcode: null
timeout: null
vars: null
out:
filecheck:
wants:
- progress
avoids: null
filename: nrmlisten.out
cleaning: true
workdir: ./_output
pre: null
verbose: true
post: null
cmds:
- otherwd: null
args:
- --nrm_log
- ./nrm_log
- --verbose
postchecks: null
passvars:
- PATH
name: nrmd
err:
filecheck:
wants: null
avoids:
- Traceback
- ValueError
filename: nrmd.err
exitcode: null
timeout: null
vars:
- value: /tmp/argo_nodeos_config
varname: ARGO_NODEOS_CONFIG
out:
filecheck:
wants: null
avoids:
- Traceback
- ValueError
filename: nrmd.out
- otherwd: null
args:
- run
- -u
- testContainer
- .basic.yml
- sleep
- '1'
postchecks: null
passvars:
- PATH
name: nrm
err:
filecheck:
wants: null
avoids:
- Traceback
- ValueError
filename: nrmrun.err
exitcode: null
timeout: 600
vars: null
out:
filecheck:
wants: null
avoids:
- Traceback
- ValueError
filename: nrmrun.out
- otherwd: null
args:
- listen
- -u
- testContainer
- --filter
- ','
postchecks: null
passvars:
- PATH
name: nrm
err:
filecheck:
wants: null
avoids: null
filename: nrmlisten.err
exitcode: null
timeout: null
vars: null
out:
filecheck:
wants: null
avoids: null
filename: nrmlisten.out
cleaning: true
workdir: ./_output
pre:
- cp --no-preserve=mode -r .test_assets/openmc/* .
verbose: true
post: null
cmds:
- otherwd: null
args:
- --nrm_log
- ./nrm_log
- --verbose
postchecks: null
passvars:
- PATH
name: nrmd
err:
filecheck:
wants: null
avoids:
- Traceback
- ValueError
filename: nrmd.err
exitcode: null
timeout: null
vars:
- value: /tmp/argo_nodeos_config
varname: ARGO_NODEOS_CONFIG
out:
filecheck:
wants: null
avoids:
- Traceback
- ValueError
filename: nrmd.out
- otherwd: null
args:
- run
- -u
- testContainer
- .basic.yml
- mpiexec
- -n
- '2'
- openmc
postchecks: null
passvars:
- PATH
- OPENMC_CROSS_SECTIONS
name: nrm
err:
filecheck:
wants: null
avoids:
- Error
- error
- ERROR
- Traceback
- ValueError
filename: nrmrun.err
exitcode: null
timeout: 600
vars: null
out:
filecheck:
wants: null
avoids:
- Error
- error
- ERROR
- Traceback
- ValueError
filename: nrmrun.out
- otherwd: null
args:
- listen
- -u
- testContainer
- --filter
- progress
postchecks: null
passvars:
- PATH
name: nrm
err:
filecheck:
wants: null
avoids: null
filename: nrmlisten.err
exitcode: null
timeout: null
vars: null
out:
filecheck:
wants:
- progress
avoids: null
filename: nrmlisten.out
cleaning: true
workdir: ./_output
pre: null
verbose: true
post: null
cmds:
- otherwd: null
args:
- --nrm_log
- ./nrm_log
- --verbose
postchecks: null
passvars:
- PATH
name: nrmd
err:
filecheck:
wants: null
avoids:
- Traceback
- ValueError
filename: nrmd.err
exitcode: null
timeout: null
vars:
- value: /tmp/argo_nodeos_config
varname: ARGO_NODEOS_CONFIG
out:
filecheck:
wants: null
avoids:
- Traceback
- ValueError
filename: nrmd.out
- otherwd: null
args:
- run
- -u
- testContainer
- .perfwrap.yml
- sleep
- '15'
postchecks: null
passvars:
- PATH
name: nrm
err:
filecheck:
wants: null
avoids:
- Traceback
- ValueError
filename: nrmrun.err
exitcode: null
timeout: 600
vars: null
out:
filecheck:
wants: null
avoids:
- Traceback
- ValueError
filename: nrmrun.out
- otherwd: null
args:
- listen
- -u
- testContainer
- --filter
- performance
postchecks: null
passvars:
- PATH
name: nrm
err:
filecheck:
wants: null
avoids: null
filename: nrmlisten.err
exitcode: null
timeout: null
vars: null
out:
filecheck:
wants:
- performance
avoids: null
filename: nrmlisten.out
cleaning: true
workdir: ./_output
pre: null
verbose: true
post: null
cmds:
- otherwd: null
args:
- --nrm_log
- ./nrm_log
- --verbose
postchecks: null
passvars:
- PATH
name: nrmd
err:
filecheck:
wants: null
avoids:
- Traceback
- ValueError
filename: nrmd.err
exitcode: null
timeout: null
vars:
- value: /tmp/argo_nodeos_config