Commit 9f78ce0d authored by Valentin Reis's avatar Valentin Reis

massive testset refactor.

parent b2a822e8
Pipeline #7689 failed with stages
in 27 minutes and 12 seconds
This diff is collapsed.
let values = ../../resources/package.dh let values = ../resources/package.dh
let types = ../../resources/types.dh let types = ../resources/types.dh
in λ ( args in λ ( args
: { name : : { name :
......
...@@ -4,14 +4,13 @@ let types = ../resources/types.dh ...@@ -4,14 +4,13 @@ let types = ../resources/types.dh
let argotypes = ./types.dh let argotypes = ./types.dh
let basicCommand = ./internal/basicCommand.dh let basicCommand = ./basicCommand.dh
let defaultMkListen = let defaultMkListen =
λ(containerName : Text) λ(containerName : Text)
→ λ(attr : Text)
→ { attr = → { attr =
"performance" "performance"
, isTest = , doFilter =
False False
, filter = , filter =
"," ","
...@@ -30,20 +29,19 @@ let listen = ...@@ -30,20 +29,19 @@ let listen =
, outavoids = , outavoids =
[] : List Text [] : List Text
, outwants = , outwants =
if a.isTest then [ a.filter ] else [] : List Text if a.doFilter then [ a.filter ] else [] : List Text
} }
⫽ { args = [ "listen", "-u", a.containerName, "--filter", a.filter ] } ⫽ { args = [ "listen", "-u", a.containerName, "--filter", a.filter ] }
: types.Cmd : types.Cmd
let default = let default =
λ(containerName : Text) λ(containerName : Text)
→ λ(attr : Text) → listen (defaultMkListen containerName) : types.Cmd
→ listen (defaultMkListen containerName attr) : types.Cmd
in { defarg = in { defarg =
defaultMkListen : Text → Text → argotypes.MkListen defaultMkListen : Text → argotypes.MkListen
, mk = , mk =
listen : argotypes.MkListen → types.Cmd listen : argotypes.MkListen → types.Cmd
, default = , default =
default : Text → Text → types.Cmd default : Text → types.Cmd
} }
...@@ -4,7 +4,7 @@ let types = ../resources/types.dh ...@@ -4,7 +4,7 @@ let types = ../resources/types.dh
let argotypes = ./types.dh let argotypes = ./types.dh
let basicCommand = ./internal/basicCommand.dh let basicCommand = ./basicCommand.dh
let addVerbose = λ(v : Bool) → if v then [ "--verbose" ] else [] : List Text let addVerbose = λ(v : Bool) → if v then [ "--verbose" ] else [] : List Text
...@@ -28,7 +28,9 @@ let defaultMkDaemon = ...@@ -28,7 +28,9 @@ let defaultMkDaemon =
, powercap = , powercap =
< NoCap = {=} | Cap : Text > < NoCap = {=} | Cap : Text >
, singularity = , singularity =
True False
, daemonavoids =
[] : List Text
} }
: argotypes.MkDaemon : argotypes.MkDaemon
...@@ -53,11 +55,7 @@ let daemon = ...@@ -53,11 +55,7 @@ let daemon =
{ filename = { filename =
"nrmd.out" "nrmd.out"
, filecheck = , filecheck =
{ wants = { wants = [] : List Text, avoids = a.daemonavoids }
[] : List Text
, avoids =
[ "Traceback", "ValueError" ] : List Text
}
} }
, vars = , vars =
[ { varname = [ { varname =
......
{ nrmd = ./nrmd.dh, run = ./run.dh, listen = ./listen.dh } {basic = ./basicCommand.dh, nrmd = ./nrmd.dh, run = ./run.dh, listen = ./listen.dh }
...@@ -4,33 +4,26 @@ let types = ../resources/types.dh ...@@ -4,33 +4,26 @@ let types = ../resources/types.dh
let argotypes = ./types.dh let argotypes = ./types.dh
let basicCommand = ./internal/basicCommand.dh let basicCommand = ./basicCommand.dh
let defaultMkRun = let defaultMkRun =
λ(cmd : Text) λ(cmd : Text)
→ λ(manifest : Text) → λ(manifest : Text)
→ λ(containerName : Text)
→ { manifest = → { manifest =
manifest manifest
, cmd = , cmd =
cmd cmd
, containerName = , containerName =
"containerName" containerName
, args = , args =
[] : List Text [] : List Text
, cmdwants = , cmdwants =
[] : List Text [] : List Text
, cmdavoids = , cmdavoids =
[] : List Text [] : List Text
, vars =
values.emptyVars
, timeout =
[] : Optional Natural
, runExitcode =
[] : Optional Integer
, passvars = , passvars =
[] : List Text [] : List Text
, runwd =
[] : Optional Text
} }
: argotypes.MkRun : argotypes.MkRun
...@@ -54,25 +47,26 @@ let run = ...@@ -54,25 +47,26 @@ let run =
, passvars = , passvars =
b.passvars # a.passvars b.passvars # a.passvars
, vars = , vars =
a.vars values.emptyVars
, timeout = , timeout =
a.timeout [] : Optional Natural
, exitcode = , exitcode =
a.runExitcode [] : Optional Integer
, otherwd = , otherwd =
a.runwd [] : Optional Text
} }
: types.Cmd : types.Cmd
let default = let default =
λ(cmd : Text) λ(cmd : Text)
→ λ(manifest : Text) → λ(manifest : Text)
→ run (defaultMkRun cmd manifest) : types.Cmd → λ(containerName : Text)
→ run (defaultMkRun cmd manifest containerName) : types.Cmd
in { defarg = in { defarg =
defaultMkRun : Text → Text → argotypes.MkRun defaultMkRun : Text → Text → Text → argotypes.MkRun
, mk = , mk =
run : argotypes.MkRun → types.Cmd run : argotypes.MkRun → types.Cmd
, default = , default =
default : Text → Text → types.Cmd default : Text → Text → Text → types.Cmd
} }
...@@ -2,7 +2,16 @@ let types = ../resources/types.dh ...@@ -2,7 +2,16 @@ let types = ../resources/types.dh
let Powercap = < Cap : Text | NoCap : {} > let Powercap = < Cap : Text | NoCap : {} >
let MkDaemon = { verbose : Bool, powercap : Powercap, singularity : Bool } let MkDaemon =
{ verbose :
Bool
, powercap :
Powercap
, singularity :
Bool
, daemonavoids :
List Text
}
let MkRun = let MkRun =
{ manifest : { manifest :
...@@ -17,20 +26,12 @@ let MkRun = ...@@ -17,20 +26,12 @@ let MkRun =
List Text List Text
, cmdavoids : , cmdavoids :
List Text List Text
, vars :
List types.EnvVar
, timeout :
Optional Natural
, runExitcode :
Optional Integer
, passvars : , passvars :
List Text List Text
, runwd :
Optional Text
} }
let MkListen = let MkListen =
{ attr : Text, containerName : Text, isTest : Bool, filter : Text } { attr : Text, containerName : Text, doFilter : Bool, filter : Text }
in { MkRun = in { MkRun =
MkRun MkRun
......
...@@ -18,11 +18,21 @@ ...@@ -18,11 +18,21 @@
let Powercap = < Cap : Text | NoCap : {} > let Powercap = < Cap : Text | NoCap : {} >
let makeBase = let id = λ(a : Type) → λ(x : a) → x
let idCmd = id types.Cmd
let makeExtended =
λ(daemonArg : argotypes.MkDaemon) λ(daemonArg : argotypes.MkDaemon)
→ λ(daemonOverrides : types.Cmd → types.Cmd)
→ λ(runArg : argotypes.MkRun) → λ(runArg : argotypes.MkRun)
→ λ(runOverrides : types.Cmd → types.Cmd)
→ λ(extraCmds : List types.Cmd)
→ { cmds = → { cmds =
[ argo.nrmd.mk daemonArg, argo.run.mk runArg ] [ daemonOverrides (argo.nrmd.mk daemonArg)
, runOverrides (argo.run.mk runArg)
]
# extraCmds
, verbose = , verbose =
True True
, cleaning = , cleaning =
...@@ -36,12 +46,6 @@ ...@@ -36,12 +46,6 @@
} }
: types.Config : types.Config
let makeExtended =
λ(daemonArg : argotypes.MkDaemon)
→ λ(runArg : argotypes.MkRun)
→ λ(cmds : List types.Cmd)
→ let b = makeBase daemonArg runArg in b ⫽ { cmds = b.cmds # cmds }
let FilterTestArgs = let FilterTestArgs =
{ manifestname : { manifestname :
Text Text
...@@ -92,11 +96,20 @@ ...@@ -92,11 +96,20 @@
: FilterTestArgs : FilterTestArgs
let appTest = let appTest =
let cn = "testContainer" let cn = "containerName"
in λ(args : FilterTestArgs) in λ(args : FilterTestArgs)
→ makeExtended → makeExtended
{ powercap = args.powercap, verbose = True, singularity = False } { powercap =
args.powercap
, verbose =
True
, singularity =
False
, daemonavoids =
[ "Traceback", "ValueError" ]
}
idCmd
{ manifest = { manifest =
manifestDir manifestDir
++ ( if args.isTest ++ ( if args.isTest
...@@ -115,18 +128,15 @@ ...@@ -115,18 +128,15 @@
[] : List Text [] : List Text
, cmdavoids = , cmdavoids =
args.cmdavoids args.cmdavoids
, vars =
args.vars
, passvars = , passvars =
args.passvars args.passvars
, timeout =
args.timeout
, runwd =
[] : Optional Text
, runExitcode =
[] : Optional Integer
} }
[ argo.listen.default cn args.filter ] ( λ(c : types.Cmd)
→ c ⫽ { timeout = args.timeout, vars = args.vars }
)
[ argo.listen.mk
(argo.listen.defarg cn ⫽ { filter = args.filter })
]
let ProgressAppTestArg = let ProgressAppTestArg =
{ cmd : { cmd :
...@@ -208,9 +218,12 @@ ...@@ -208,9 +218,12 @@
in b ⫽ { args = [ "listen", "-u", cn, "--filter", filter ] } in b ⫽ { args = [ "listen", "-u", cn, "--filter", filter ] }
let powerexpeCmds = let powerexpeCmds =
[ argo.listen.default "testContainer" "power" let cn = "containerName"
, argo.listen.default "testContainer" "performance"
, argo.listen.default "testContainer" "control" in [ argo.listen.mk (argo.listen.defarg cn ⫽ { filter = "power" })
, argo.listen.mk
(argo.listen.defarg cn ⫽ { filter = "performance" })
, argo.listen.mk (argo.listen.defarg cn ⫽ { filter = "control" })
] ]
: List types.Cmd : List types.Cmd
...@@ -221,8 +234,6 @@ ...@@ -221,8 +234,6 @@
in { values = in { values =
values values
, makeBase =
makeBase
, makeExtended = , makeExtended =
makeExtended makeExtended
, appTest = , appTest =
...@@ -245,4 +256,6 @@ ...@@ -245,4 +256,6 @@
powerexpeCmds powerexpeCmds
, extendApp = , extendApp =
extendApp extendApp
, idCmd =
id 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