Commit c76a996e authored by Valentin Reis's avatar Valentin Reis

add list CI test

parent 66581c19
Pipeline #7698 failed with stages
in 3 minutes and 13 seconds
...@@ -2,43 +2,49 @@ ...@@ -2,43 +2,49 @@
→ λ(manifestDir : Text) → λ(manifestDir : Text)
→ λ(isTest : Bool) → λ(isTest : Bool)
→ let assetDir = dataDir ++ "test_assets/" → let assetDir = dataDir ++ "test_assets/"
let types = ./dhrunlib/types.dh let types = ./dhrunlib/types.dh
let argotypes = ./argolib/types.dh let argotypes = ./argolib/types.dh
let argo = ./argolib/package.dh let argo = ./argolib/package.dh
let message = "HelloWorld" let message = "HelloWorld"
let cn = "testContainer" let cn = "testContainer"
let idCmd = let id = λ(a : Type) → λ(x : a) → x in id types.Cmd let idCmd = let id = λ(a : Type) → λ(x : a) → x in id types.Cmd
let dhrunTemplate =
{ cmds =
[] : List types.Cmd
, verbose =
True
, cleaning =
True
, workdir =
"./_output"
, pre =
[] : List Text
, post =
[] : List Text
}
: types.Config
let makeExtended = let makeExtended =
λ(daemonArg : argotypes.MkDaemon) λ(daemonArg : argotypes.MkDaemon)
→ λ(daemonOverrides : types.Cmd → types.Cmd) → λ(daemonOverrides : types.Cmd → types.Cmd)
→ λ(runArg : argotypes.MkRun) → λ(runArg : argotypes.MkRun)
→ λ(runOverrides : types.Cmd → types.Cmd) → λ(runOverrides : types.Cmd → types.Cmd)
→ λ(extraCmds : List types.Cmd) → λ(extraCmds : List types.Cmd)
→ { cmds = → dhrunTemplate
⫽ { cmds =
[ daemonOverrides (argo.nrmd.mk daemonArg) [ daemonOverrides (argo.nrmd.mk daemonArg)
, runOverrides (argo.run.mk runArg) , runOverrides (argo.run.mk runArg)
] ]
# extraCmds # extraCmds
, verbose =
True
, cleaning =
True
, workdir =
"./_output"
, pre =
[] : List Text
, post =
[] : List Text
} }
: types.Config
let manifests = let manifests =
{ basic = { basic =
manifestDir ++ "basic.yml" manifestDir ++ "basic.yml"
...@@ -47,15 +53,15 @@ ...@@ -47,15 +53,15 @@
, singularity = , singularity =
manifestDir ++ "singularity.yml" manifestDir ++ "singularity.yml"
} }
let ifTest = let ifTest =
λ(t : Type) λ(t : Type)
→ λ(default : t) → λ(default : t)
→ λ(value : t) → λ(value : t)
→ if isTest then value else default → if isTest then value else default
let ifTestList = ifTest (List Text) ([] : List Text) let ifTestList = ifTest (List Text) ([] : List Text)
let withDaemon = let withDaemon =
λ(daemonArg : argotypes.MkDaemon) λ(daemonArg : argotypes.MkDaemon)
→ λ(runArg : argotypes.MkRun) → λ(runArg : argotypes.MkRun)
...@@ -87,12 +93,12 @@ ...@@ -87,12 +93,12 @@
) )
) )
extraCmds extraCmds
let withDaemonNoExtras = let withDaemonNoExtras =
λ(runArg : argotypes.MkRun) λ(runArg : argotypes.MkRun)
→ λ(runOverrides : types.Cmd → types.Cmd) → λ(runOverrides : types.Cmd → types.Cmd)
→ withDaemon argo.nrmd.defarg runArg runOverrides ([] : List types.Cmd) → withDaemon argo.nrmd.defarg runArg runOverrides ([] : List types.Cmd)
let withDaemonExtraListen = let withDaemonExtraListen =
λ(filter : Text) λ(filter : Text)
→ λ(doFilter : Bool) → λ(doFilter : Bool)
...@@ -105,23 +111,25 @@ ...@@ -105,23 +111,25 @@
[ argo.listen.mk [ argo.listen.mk
(argo.listen.defarg cn ⫽ { filter = filter, doFilter = doFilter }) (argo.listen.defarg cn ⫽ { filter = filter, doFilter = doFilter })
] ]
let withDaemonExtraProgresstest = withDaemonExtraListen "progress" True let withDaemonExtraProgresstest = withDaemonExtraListen "progress" True
let mkrun = let mkrun =
λ(manifest : Text) → λ(name : Text) → argo.run.defarg name manifest cn λ(manifest : Text) → λ(name : Text) → argo.run.defarg name manifest cn
let basicRun = mkrun manifests.basic let basicRun = mkrun manifests.basic
let perfRun = mkrun manifests.perf let perfRun = mkrun manifests.perf
let singularityRun = mkrun manifests.singularity let singularityRun = mkrun manifests.singularity
in { run = in { list =
dhrunTemplate ⫽ { cmds = [ argo.nrmd.default, argo.listen.default ] }
, run =
withDaemonNoExtras (basicRun "true") idCmd withDaemonNoExtras (basicRun "true") idCmd
, pwd = , pwd =
let somedir = "toto" let somedir = "toto"
in withDaemonNoExtras in withDaemonNoExtras
(basicRun "pwd" ⫽ { cmdwants = [ somedir ] : List Text }) (basicRun "pwd" ⫽ { cmdwants = [ somedir ] : List Text })
(λ(x : types.Cmd) → x ⫽ { otherwd = [ somedir ] : Optional Text }) (λ(x : types.Cmd) → x ⫽ { otherwd = [ somedir ] : Optional Text })
......
let types = ../dhrunlib/types.dh
let basicCommand = ./basicCommand.dh
let list =
basicCommand
{ name =
"nrm"
, outprefix =
"nrmlist"
, outavoids =
[] : List Text
, outwants =
[] : List Text
}
⫽ { args = [ "list" ] }
: types.Cmd
in { default = list : types.Cmd }
{basic = ./basicCommand.dh, nrmd = ./nrmd.dh, run = ./run.dh, listen = ./listen.dh } { basic =
./basicCommand.dh
, nrmd =
./nrmd.dh
, run =
./run.dh
, listen =
./listen.dh
, list =
./list.dh
}
...@@ -30,6 +30,11 @@ testHello: ...@@ -30,6 +30,11 @@ testHello:
script: script:
- "argonix test hello --argopkgs $ARGOPKGS $EXTRA --verbose" - "argonix test hello --argopkgs $ARGOPKGS $EXTRA --verbose"
testHello:
extends: .test
script:
- "argonix test list --argopkgs $ARGOPKGS $EXTRA --verbose"
testListen: testListen:
extends: .test extends: .test
script: 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