Commit 22e870cd authored by Valentin Reis's avatar Valentin Reis

dhrun codebase as a function. naturally..

parent f83e81dd
Pipeline #7362 failed with stages
in 22 minutes and 16 seconds
This diff is collapsed.
This diff is collapsed.
{
"acKind": "ImageManifest",
"acVersion": "0.6.0",
"name": "test",
"name": "basic",
"version": "0.0.1",
"app": {
"isolators": [
{
"name": "argo/scheduler",
"value": {
"policy": "SCHED_OTHER",
"priority": "0"
}
},
{
"name": "argo/container",
"value": {
"cpus": "2",
"mems": "1"
}
},
{
"name": "argo/perfwrapper",
"value": {
"enabled": "0"
}
},
{
"name": "argo/power",
"value": {
"enabled": "0",
"profile": "0",
"policy": "NONE",
"damper": "0.1",
"slowdown": "1.1"
}
},
{
"name": "argo/monitoring",
"value": {
"enabled": "1",
"ratelimit": "1000000000"
}
}
"container": {
"cpus": 2,
"mems": 1
}
},
"image": {
"path": "docker://ubuntu",
"type": "docker",
"binds": [
"/nix"
]
}
}
{
"acKind": "ImageManifest",
"acVersion": "0.6.0",
"name": "test",
"app": {
"isolators": [
{
"name": "argo/scheduler",
"value": {
"policy": "SCHED_OTHER",
"priority": "0"
}
},
{
"name": "argo/container",
"value": {
"cpus": "1",
"mems": "1"
}
},
{
"name": "argo/perfwrapper",
"value": {
"enabled": "0"
}
},
{
"name": "argo/power",
"value": {
"enabled": "1",
"profile": "1",
"policy": "NONE",
"damper": "1e9",
"slowdown": "1.1"
}
},
{
"name": "argo/monitoring",
"value": {
"enabled": "1",
"ratelimit": "10000000"
}
},
{
"name": "argo/hwbind",
"value": {
"enabled": "0"
}
}
]
},
"image": {
"path": "docker://ubuntu",
"type": "docker",
"binds": [ "/nix" ]
}
"name": "basic",
"version": "0.0.1",
"app": {
"container": {
"cpus": 1,
"mems": 1
}
},
"image": {
"path": "docker://ubuntu",
"type": "docker",
"binds": [
"/nix"
]
}
}
......@@ -434,19 +434,15 @@ let
doDhrun = dhrscript: test.overrideAttrs (old:{
buildPhase = ''
cat ${dhrscript} |\
dhall resolve |\
dhall normalize |\
dhall-to-yaml |\
dhrun run "-"
cat $DHRUNSCRIPT | dhall resolve | dhall normalize | dhall-to-yaml | dhrun run "-"
'';
buildInputs = old.buildInputs ++ [
dhall-json
pkgs.yq
dhall
];
DHRUNSCRIPT = "${dhrscript}";
DHRUNSPECS = "${dhrunSpecs}";
DHRUNSHARE = "${dhrun}/share";
installPhase = ''
mkdir -p $out
cp _output/* $out/
......@@ -456,7 +452,7 @@ let
doDhrunApp = app :
let
dhrunscript = pkgs.writeText "test.dhall" ''
let all = ${dhrunSpecs}/all-tests.dh
let all = ${dhrunSpecs}/all-tests.dh "${dhrunSpecs}/"
in all.${app} True < NoCap = {=} | Cap : Text >
'';
in
......@@ -465,14 +461,14 @@ let
doDhrunKey = key:
let
dhrunscript = pkgs.writeText "test.dhall" ''
let all = ${dhrunSpecs}/all-tests.dh in all.${key}
let all = ${dhrunSpecs}/all-tests.dh "${dhrunSpecs}/" in all.${key}
'';
in
doDhrun dhrunscript;
testGeneric = doDhrunKey genericTestName;
testSingularity = (doDhrunKey "run-singularity").overrideAttrs (o:{
buildInputs = o.buildInputs ++[ pkgs.singularity pkgs.hostname ];
buildInputs = o.buildInputs ++[ bleeding.singularity ];
});
testSTREAM = addBI (doDhrunApp "stream") stream;
......
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