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