Commit f2fe1567 authored by Valentin Reis's avatar Valentin Reis
Browse files

updates dhall code for new dhrun version

parent 3e4ce8bb
Pipeline #6384 passed with stages
in 8 minutes and 2 seconds
...@@ -6,17 +6,30 @@ in let cn = "testContainer" ...@@ -6,17 +6,30 @@ in let cn = "testContainer"
in let basicManifest = lib.argopkgsManifestDirPath ++ "basic.json" in let basicManifest = lib.argopkgsManifestDirPath ++ "basic.json"
in let argIfTest =
λ(isTest : Bool)
→ { isTest =
isTest
, timeout =
if isTest
then [ 60 ] : Optional Natural
else [] : Optional Natural
}
in let apps = in let apps =
{ qmcpack = { qmcpack =
λ(isTest : Bool) λ(isTest : Bool)
→ lib.progressAppTest → lib.progressAppTest
( lib.emptyProgressAppTestArg ( lib.emptyProgressAppTestArg
"mpiexec" "mpiexec"
[ "-n" [ "-n"
, if isTest then "2" else "24" , if isTest then "2" else "24"
, "qmcpack" , "qmcpack"
, lib.qmcPackDir ++ "/simple-H2O.xml" , lib.qmcPackDir ++ "/simple-H2O.xml"
] ]
⫽ argIfTest isTest
) )
, lammps = , lammps =
λ(isTest : Bool) λ(isTest : Bool)
...@@ -31,7 +44,7 @@ in let apps = ...@@ -31,7 +44,7 @@ in let apps =
, "-i" , "-i"
, lib.lammpsDir ++ "/modified.lj" , lib.lammpsDir ++ "/modified.lj"
] ]
{ isTest = isTest } argIfTest isTest
) )
, openmc = , openmc =
λ(isTest : Bool) λ(isTest : Bool)
...@@ -39,7 +52,7 @@ in let apps = ...@@ -39,7 +52,7 @@ in let apps =
( lib.emptyProgressAppTestArg ( lib.emptyProgressAppTestArg
"mpiexec" "mpiexec"
[ "-n", if isTest then "2" else "24", "openmc" ] [ "-n", if isTest then "2" else "24", "openmc" ]
{ isTest = isTest } argIfTest isTest
) )
⫽ { pre = [ "cp -r \$OPENMC_PWD/* ." ] } ⫽ { pre = [ "cp -r \$OPENMC_PWD/* ." ] }
, amg = , amg =
...@@ -61,16 +74,14 @@ in let apps = ...@@ -61,16 +74,14 @@ in let apps =
, "12" , "12"
, "1" , "1"
] ]
⫽ { vars = ⫽ argIfTest isTest
[ { varname = "OMP_NUM_THREADS", value = "1" } ] ⫽ { vars = [ { varname = "OMP_NUM_THREADS", value = "1" } ] }
, isTest =
isTest
}
) )
, stream = , stream =
λ(isTest : Bool) λ(isTest : Bool)
→ lib.progressAppTest → lib.progressAppTest
( lib.emptyProgressAppTestArg "stream_c" ([] : List Text) ( lib.emptyProgressAppTestArg "stream_c" ([] : List Text)
⫽ argIfTest isTest
⫽ { vars = ⫽ { vars =
[ { varname = [ { varname =
"OMP_NUM_THREADS" "OMP_NUM_THREADS"
...@@ -79,8 +90,6 @@ in let apps = ...@@ -79,8 +90,6 @@ in let apps =
} }
, { varname = "OMP_PLACES", value = "cores" } , { varname = "OMP_PLACES", value = "cores" }
] ]
, isTest =
isTest
} }
) )
} }
...@@ -88,12 +97,28 @@ in let apps = ...@@ -88,12 +97,28 @@ in let apps =
in { hello = in { hello =
lib.makeBase lib.makeBase
( lib.emptyMakeBaseArgs "echo" basicManifest cn ( lib.emptyMakeBaseArgs "echo" basicManifest cn
⫽ { args = [ message ], verbose = True, cmdwants = [ message ] } ⫽ { args =
[ message ]
, verbose =
True
, cmdwants =
[ message ]
, timeout =
[ 60 ] : Optional Natural
}
) )
, listen = , listen =
lib.makeExtended lib.makeExtended
( lib.emptyMakeBaseArgs "sleep" basicManifest cn ( lib.emptyMakeBaseArgs "sleep" basicManifest cn
⫽ { args = [ "1" ], verbose = True, cmdwants = [] : List Text } ⫽ { args =
[ "1" ]
, verbose =
True
, cmdwants =
[] : List Text
, timeout =
[ 60 ] : Optional Natural
}
) )
[ lib.values.emptyCmd [ lib.values.emptyCmd
{ name = { name =
...@@ -106,9 +131,15 @@ in { hello = ...@@ -106,9 +131,15 @@ in { hello =
⫽ { args = [ "listen", "-u", cn ] } ⫽ { args = [ "listen", "-u", cn ] }
] ]
, power = , power =
lib.appTest (lib.emptyFilterTestArgs "power") lib.appTest
( lib.emptyFilterTestArgs "power"
⫽ { timeout = [ 60 ] : Optional Natural }
)
, performance = , performance =
lib.appTest (lib.emptyFilterTestArgs "performance") lib.appTest
( lib.emptyFilterTestArgs "performance"
⫽ { timeout = [ 60 ] : Optional Natural }
)
, stream = , stream =
apps.stream True apps.stream True
, openmc = , openmc =
......
...@@ -33,6 +33,8 @@ in let basicCommand = ...@@ -33,6 +33,8 @@ in let basicCommand =
values.emptyVars values.emptyVars
, passvars = , passvars =
[ "PATH" ] [ "PATH" ]
, timeout =
[] : Optional Natural
} }
in let MakeBaseArgs = in let MakeBaseArgs =
...@@ -50,6 +52,8 @@ in let MakeBaseArgs = ...@@ -50,6 +52,8 @@ in let MakeBaseArgs =
List Text List Text
, vars : , vars :
List types.EnvVar List types.EnvVar
, timeout :
Optional Natural
} }
in let emptyMakeBaseArgs = in let emptyMakeBaseArgs =
...@@ -113,6 +117,8 @@ in let makeBase = ...@@ -113,6 +117,8 @@ in let makeBase =
# args.args # args.args
, passvars = , passvars =
[ "PATH" ] [ "PATH" ]
, timeout =
args.timeout
} }
] ]
, verbosity = , verbosity =
...@@ -144,6 +150,8 @@ in let FilterTestArgs = ...@@ -144,6 +150,8 @@ in let FilterTestArgs =
List types.EnvVar List types.EnvVar
, isTest : , isTest :
Bool Bool
, timeout :
Optional Natural
} }
in let emptyFilterTestArgs = in let emptyFilterTestArgs =
...@@ -158,6 +166,8 @@ in let emptyFilterTestArgs = ...@@ -158,6 +166,8 @@ in let emptyFilterTestArgs =
values.emptyVars values.emptyVars
, isTest = , isTest =
False False
, timeout =
[] : Optional Natural
} }
in let sleepArgs = in let sleepArgs =
...@@ -190,6 +200,8 @@ in let appTest = ...@@ -190,6 +200,8 @@ in let appTest =
[] : List Text [] : List Text
, vars = , vars =
args.vars args.vars
, timeout =
args.timeout
} }
[ let b = [ let b =
values.emptyCmd values.emptyCmd
...@@ -228,6 +240,8 @@ in let ProgressAppTestArg = ...@@ -228,6 +240,8 @@ in let ProgressAppTestArg =
List types.EnvVar List types.EnvVar
, isTest : , isTest :
Bool Bool
, timeout :
Optional Natural
} }
in let emptyProgressAppTestArg = in let emptyProgressAppTestArg =
...@@ -241,6 +255,8 @@ in let emptyProgressAppTestArg = ...@@ -241,6 +255,8 @@ in let emptyProgressAppTestArg =
[] : List types.EnvVar [] : List types.EnvVar
, isTest = , isTest =
False False
, timeout =
[] : Optional Natural
} }
: ProgressAppTestArg : ProgressAppTestArg
...@@ -256,6 +272,8 @@ in let progressAppTest = ...@@ -256,6 +272,8 @@ in let progressAppTest =
args.vars args.vars
, isTest = , isTest =
False False
, timeout =
args.timeout
} }
) )
......
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