Commit 07b88bcd authored by Valentin Reis's avatar Valentin Reis

adds kill and setpower tests

parent 698ca2f3
Pipeline #7702 failed with stages
in 2 minutes and 7 seconds
......@@ -115,15 +115,27 @@
let withDaemonExtraProgresstest = withDaemonExtraListen "progress" True
let mkrun =
λ(manifest : Text) → λ(name : Text) → argo.run.defarg name manifest cn
λ(manifest : Text)
→ λ(name : Text)
→ argo.run.defarg name manifest cn : argotypes.MkRun
let basicRun = mkrun manifests.basic
let basicRun = mkrun manifests.basic : Text → argotypes.MkRun
let perfRun = mkrun manifests.perf
let perfRun = mkrun manifests.perf : Text → argotypes.MkRun
let singularityRun = mkrun manifests.singularity
let singularityRun = mkrun manifests.singularity : Text → argotypes.MkRun
in { list =
in { setpower =
dhrunTemplate ⫽ { cmds = [ argo.nrmd.default, argo.list.default ] }
, kill =
dhrunTemplate
⫽ { cmds =
[ argo.nrmd.default
, argo.kill.default cn
, argo.run.mk (basicRun "sleep" ⫽ { args = [ "13" ] })
]
}
, list =
dhrunTemplate ⫽ { cmds = [ argo.nrmd.default, argo.list.default ] }
, run =
withDaemonNoExtras (basicRun "true") idCmd
......
let types = ../dhrunlib/types.dh
let basicCommand = ./basicCommand.dh
let kill =
λ(containerName : Text)
→ basicCommand
{ name =
"nrm"
, outprefix =
"nrmkill"
, outavoids =
[] : List Text
, outwants =
[] : List Text
}
⫽ { args = [ "kill", containerName ] }
: types.Cmd
in { default = kill : Text → types.Cmd }
......@@ -8,4 +8,8 @@
./listen.dh
, list =
./list.dh
, kill =
./kill.dh
, setpower =
./setpower.dh
}
let types = ../dhrunlib/types.dh
let basicCommand = ./basicCommand.dh
let setpower =
basicCommand
{ name =
"nrm"
, outprefix =
"nrmsetpower"
, outavoids =
[] : List Text
, outwants =
[] : List Text
}
⫽ { args = [ "setpower", "150" ] }
: types.Cmd
in { default = setpower : types.Cmd }
#!/usr/bin/env bash
check_golden () {
echo "--- START checking golden test ${1}"
diff <(dhrun print <<< "let a = ./all-tests.dh \".\" \".\" True in a.${1}") <(cat golden/${1}.yaml)
......@@ -16,3 +17,5 @@ check_golden "openmc"
check_golden "lammps"
check_golden "amg"
check_golden "stream"
check_golden "list"
check_golden "setpower"
pre: "toto"
pre: null
verbose: true
post: null
cmds:
......
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: null
filename: nrmd.out
- otherwd: null
args:
- list
postchecks: null
passvars:
- PATH
name: nrm
err:
filecheck:
wants: null
avoids: null
filename: nrmlist.err
exitcode: null
timeout: null
vars: null
out:
filecheck:
wants: null
avoids: null
filename: nrmlist.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: null
filename: nrmd.out
- otherwd: null
args:
- list
postchecks: null
passvars:
- PATH
name: nrm
err:
filecheck:
wants: null
avoids: null
filename: nrmlist.err
exitcode: null
timeout: null
vars: null
out:
filecheck:
wants: null
avoids: null
filename: nrmlist.out
cleaning: true
workdir: ./_output
#!/usr/bin/env bash
print_golden () {
dhrun print <<< "let a = ./all-tests.dh \".\" \".\" True in a.${1}" > golden/${1}.yaml
}
......@@ -14,3 +15,5 @@ print_golden "openmc"
print_golden "lammps"
print_golden "amg"
print_golden "stream"
print_golden "list"
print_golden "setpower"
......@@ -30,6 +30,13 @@ testHello:
script:
- "argonix test hello --argopkgs $ARGOPKGS $EXTRA --verbose"
testSetpower:
extends: .test
tags:
- knl
script:
- "argonix test setpower --argopkgs $ARGOPKGS $EXTRA --verbose"
testList:
extends: .test
script:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment