Commit b2a822e8 authored by Valentin Reis's avatar Valentin Reis

test refactor

parent b2136521
Pipeline #7685 failed with stages
in 2 minutes and 26 seconds
let values = ../resources/package.dh
let values = ../../resources/package.dh
let types = ../resources/types.dh
let types = ../../resources/types.dh
in λ ( args
: { name :
......
......@@ -4,7 +4,7 @@ let types = ../resources/types.dh
let argotypes = ./types.dh
let basicCommand = ./basicCommand.dh
let basicCommand = ./internal/basicCommand.dh
let defaultMkListen =
λ(containerName : Text)
......@@ -35,10 +35,15 @@ let listen =
⫽ { args = [ "listen", "-u", a.containerName, "--filter", a.filter ] }
: types.Cmd
let default =
λ(containerName : Text)
→ λ(attr : Text)
→ listen (defaultMkListen containerName attr) : types.Cmd
in { defarg =
defaultMkListen : Text → Text → argotypes.MkListen
, mk =
listen : argotypes.MkListen → types.Cmd
, default =
listen defaultMkListen : Text → Text → types.Cmd
default : Text → Text → types.Cmd
}
......@@ -4,7 +4,7 @@ let types = ../resources/types.dh
let argotypes = ./types.dh
let basicCommand = ./basicCommand.dh
let basicCommand = ./internal/basicCommand.dh
let addVerbose = λ(v : Bool) → if v then [ "--verbose" ] else [] : List Text
......
{ nrmd = ./nrmd.dh, run = ./run.dh, listen = ./listen.dh, basicCommand = ./basicCommand.dh }
{ nrmd = ./nrmd.dh, run = ./run.dh, listen = ./listen.dh }
......@@ -4,7 +4,7 @@ let types = ../resources/types.dh
let argotypes = ./types.dh
let basicCommand = ./basicCommand.dh
let basicCommand = ./internal/basicCommand.dh
let defaultMkRun =
λ(cmd : Text)
......
......@@ -42,8 +42,6 @@
→ λ(cmds : List types.Cmd)
→ let b = makeBase daemonArg runArg in b ⫽ { cmds = b.cmds # cmds }
let OptionalSleep = < Cmd : Text | Sleep : {} >
let FilterTestArgs =
{ manifestname :
Text
......@@ -94,10 +92,10 @@
: FilterTestArgs
let appTest =
λ(args : FilterTestArgs)
→ let cn = "testContainer"
let cn = "testContainer"
in makeExtended
in λ(args : FilterTestArgs)
→ makeExtended
{ powercap = args.powercap, verbose = True, singularity = False }
{ manifest =
manifestDir
......@@ -128,33 +126,7 @@
, runExitcode =
[] : Optional Integer
}
[ let b =
values.emptyCmd
{ name =
"nrm"
, outfile =
"nrmlisten.out"
, errfile =
"nrmlisten.err"
}
in b
⫽ { args =
[ "listen", "-u", cn, "--filter", args.filter ]
, out =
b.out
⫽ { filecheck =
values.emptyCheck
⫽ { wants =
if args.isTest
then [ args.filter ]
else [] : List Text
}
}
}
]
[ argo.listen.default cn args.filter ]
let ProgressAppTestArg =
{ cmd :
......@@ -220,10 +192,25 @@
}
)
let mkListen =
λ(cn : Text)
→ λ(filter : Text)
→ let b =
values.emptyCmd
{ name =
"nrm"
, outfile =
filter ++ ".out"
, errfile =
filter ++ ".err"
}
in b ⫽ { args = [ "listen", "-u", cn, "--filter", filter ] }
let powerexpeCmds =
[ mkListen "testContainer" "power"
, mkListen "testContainer" "performance"
, mkListen "testContainer" "control"
[ argo.listen.default "testContainer" "power"
, argo.listen.default "testContainer" "performance"
, argo.listen.default "testContainer" "control"
]
: List types.Cmd
......
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