From c6aee253960d78206e5da8e301fbe9cf567e6230 Mon Sep 17 00:00:00 2001 From: Valentin Reis Date: Tue, 21 May 2019 11:05:27 -0500 Subject: [PATCH] update for singularity tests --- deployments/argo.nixops | Bin 65536 -> 65536 bytes deployments/ci.nix | 35 ++++++++++++++-- dhrun/all-tests.dh | 35 +++++++++++----- dhrun/lib.dh | 82 +++++++++++++++++++++----------------- gitlab-ci/integration.yml | 1 + pkgs/dhrun/pin.json | 6 +-- 6 files changed, 108 insertions(+), 51 deletions(-) diff --git a/deployments/argo.nixops b/deployments/argo.nixops index cc656fa3cf6698181e804fe197406fe5809c1e06..167d8ebc48701ae964444ddde39239679566aa4b 100644 GIT binary patch delta 598 zcmaix%WD%+7{zmM?zEZCBZ(%dX*G!yH`dU+ng@avRH!amE4Y)IY1-*bl9^;O!K6iG zDg=ZgHu=)(rd?KW)p}7k*}8V;u27{5i^ZaUfU(An;6l#!ob!WoEQ?qcSsO;9&9m3g z=x+Au6mGcSc6d3Wkb91qWX4E`?2+#bW}J*puQc!Ap~@+OMlhc%>9V?L z-j=EgYlH}zz&sdRe$1BPJ!}Xijvz1Q3kypotAoUq)2aewEYL#G`=8?e`I1bTk1 z=Wn|SI*+-kR9Rf8PL|9nyH2h3m0QE?wk>E=u~TvSoi_1@xG&B)uJ?UrEE0f=`vH&e ziQ6JJ?jaW*c+0-|BRaLeV;^9*hg+qS)(bq8UixU@;0Z$n8*=Tg@W@_mRp98WKcp7t zm4uOrYLP@FRVc~{Jr<9pqVr|7rX}^{GGsq`Tit%h9y{RXk-y(y(8!9Nhiu1}PRa31 zT1qKezPOw-;!6*tj9xQMRms;)T}r3Jx>_%l&9Elr6jfg^gRSz(W=L)a_ao>>8Yb*FSX!4EFHcZ+!fJXa9o- V9~j-B{Tz4!9Rx9W=&Qq7^a~og!bboA delta 525 zcmYk3Pi)d~9L4+l@hgI@EfAT(F~ATHMi+3%fM}eFnk*i`Eg{hz9RCWGmbRl!al5RT z&6{!bhh9w7lOECZx~pg7#oH359%jf!^bT4%nRk8feLs0$!$5|C_GUq}8@vso9}Ca2 za7V_Y>~*-K;48T$eEECadX*cqPC1G4QHZbRVh}3U=k;@OX!6$4^Si*Sk;`NZ?V|(q zi-aUgmaLoIRe0X#Lm&$2vMg2kntH#e)!p6*0!xs_8?OV93U7&ut-?{EMzmWzCIVLzb2sv%1Eh{_t;Bd^DYq&EBTah16 z$ - + in { run-singularity = lib.makeBase ( lib.emptyMakeBaseArg "echo" singularityManifest cn @@ -72,6 +72,23 @@ [ "toto" ] : Optional Text } ) + , exitcode = + lib.makeBase + ( lib.emptyMakeBaseArg "false" basicManifest cn + ⫽ { args = + [] : List Text + , verbose = + True + , cmdwants = + [] : List Text + , cmdavoids = + [ "Traceback" ] + , timeout = + [ 600 ] : Optional Natural + , runExitcode = + [ +1 ] : Optional Integer + } + ) , hello = lib.makeBase ( lib.emptyMakeBaseArg "echo" basicManifest cn diff --git a/dhrun/lib.dh b/dhrun/lib.dh index 9fdbb89..ff2f164 100644 --- a/dhrun/lib.dh +++ b/dhrun/lib.dh @@ -1,20 +1,20 @@ λ(dataDir : Text) → let values = https://xgitlab.cels.anl.gov/argo/dhrun/raw/master/resources/package.dh - + let types = https://xgitlab.cels.anl.gov/argo/dhrun/raw/master/resources/types.dh - + let manifestDir = dataDir ++ "manifests/" - + let assetDir = dataDir ++ "assets/" - + let openmcDir = assetDir ++ "openmc/" - + let lammpsDir = assetDir - + let qmcPackDir = assetDir - + let basicCommand = λ ( args : { name : @@ -51,10 +51,14 @@ [ "PATH" ] , timeout = [] : Optional Natural + , otherwd = + [] : Optional Text + , exitcode = + [] : Optional Integer } - + let Powercap = < Cap : Text | NoCap : {} > - + let MakeBaseArg = { manifest : Text @@ -76,6 +80,8 @@ List types.EnvVar , timeout : Optional Natural + , runExitcode : + Optional Integer , passvars : List Text , powercap : @@ -83,7 +89,7 @@ , runwd : Optional Text } - + let emptyMakeBaseArg = λ(cmd : Text) → λ(manifest : Text) @@ -108,6 +114,8 @@ values.emptyVars , timeout = [] : Optional Natural + , runExitcode = + [] : Optional Integer , passvars = [] : List Text , powercap = @@ -116,13 +124,13 @@ [] : Optional Text } : MakeBaseArg - + let addVerbose = λ(v : Bool) → if v then [ "--verbose" ] else [] : List Text - + let addSingularity = λ(v : Bool) → if v then [ "--container-runtime", "singularity" ] else [] : List Text - + let addPowercap = λ(p : Powercap) → merge @@ -132,7 +140,7 @@ λ(x : {}) → [] : List Text } p - + let makeBase = λ(args : MakeBaseArg) → { cmds = @@ -158,8 +166,6 @@ "/tmp/argo_nodeos_config" } ] - , otherwd = - [] : Optional Text } , let b = basicCommand @@ -172,7 +178,7 @@ , outavoids = args.cmdavoids } - + in b ⫽ { args = [ "run" @@ -188,6 +194,8 @@ args.vars , timeout = args.timeout + , exitcode = + args.runExitcode , otherwd = args.runwd } @@ -204,14 +212,14 @@ [] : List Text } : types.Config - + let makeExtended = λ(args : MakeBaseArg) → λ(cmds : List types.Cmd) → let b = makeBase args in b ⫽ { cmds = b.cmds # cmds } - + let OptionalSleep = < Cmd : Text | Sleep : {} > - + let FilterTestArgs = { manifestname : Text @@ -234,7 +242,7 @@ , powercap : Powercap } - + let emptyFilterTestArgs = λ(filter : Text) → λ(cmd : Text) @@ -260,18 +268,18 @@ < NoCap = {=} | Cap : Text > } : FilterTestArgs - + let appTest = λ(args : FilterTestArgs) → let cn = "testContainer" - + in makeExtended { manifest = manifestDir ++ ( if args.isTest - + then args.manifestname - + else "parallel.json" ) , containerName = @@ -296,6 +304,8 @@ args.timeout , runwd = [] : Optional Text + , runExitcode = + [] : Optional Integer , powercap = args.powercap } @@ -308,7 +318,7 @@ , errfile = "nrmlisten.err" } - + in b ⫽ { args = [ "listen", "-u", cn, "--filter", args.filter ] @@ -318,15 +328,15 @@ values.emptyCheck ⫽ { wants = if args.isTest - + then [ args.filter ] - + else [] : List Text } } } ] - + let ProgressAppTestArg = { cmd : Text @@ -345,7 +355,7 @@ , powercap : Powercap } - + let emptyProgressAppTestArg = λ(cmd : Text) → λ(args : List Text) @@ -367,7 +377,7 @@ < NoCap = {=} | Cap : Text > } : ProgressAppTestArg - + let progressAppTest = λ(args : ProgressAppTestArg) → appTest @@ -390,7 +400,7 @@ args.powercap } ) - + let mkListen = λ(cn : Text) → λ(filter : Text) @@ -403,20 +413,20 @@ , errfile = filter ++ ".err" } - + in b ⫽ { args = [ "listen", "-u", cn, "--filter", filter ] } - + let powerexpeCmds = [ mkListen "testContainer" "power" , mkListen "testContainer" "performance" , mkListen "testContainer" "control" ] : List types.Cmd - + let extendApp = λ(c : types.Config) → λ(isTest : Bool) → if isTest then c else c ⫽ { cmds = c.cmds # powerexpeCmds } - + in { values = values , emptyMakeBaseArg = diff --git a/gitlab-ci/integration.yml b/gitlab-ci/integration.yml index ca81b85..ffafd65 100644 --- a/gitlab-ci/integration.yml +++ b/gitlab-ci/integration.yml @@ -54,3 +54,4 @@ testSingularity: extends: .test script: - "argonix build testSingularity --argopkgs $ARGOPKGS $EXTRA --verbose" + - notknl diff --git a/pkgs/dhrun/pin.json b/pkgs/dhrun/pin.json index f2a5930..09ddc1a 100644 --- a/pkgs/dhrun/pin.json +++ b/pkgs/dhrun/pin.json @@ -1,7 +1,7 @@ { "url": "https://github.com/freuk/dhrun.git", - "rev": "050991b7f2f1a885507d7cffadf61b06e0f61277", - "date": "2019-05-20T13:47:58-05:00", - "sha256": "1ac1zz4isx9imjm5hr3flh7fgn8mdqibflb77kzyybz5fr9ifnh9", + "rev": "d0ad28692d7071a1408d196d29b0c8e4303f8ca8", + "date": "2019-05-21T10:33:48-05:00", + "sha256": "19dmxgh5lkwslg3hwr84nrbskhpn6qfmn6iidxnv6i8jkmv18zpk", "fetchSubmodules": false } -- 2.26.2