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

minor dhrun-nix refactor

parent e8bc2391
Pipeline #6634 passed with stages
in 3 minutes and 26 seconds
......@@ -41,6 +41,9 @@
let
callPackage = pkgs.lib.callPackageWith (pkgs // argopkgs);
addBI = drv: bi: drv.overrideAttrs
(old:{buildInputs=old.buildInputs ++ [ bi ];});
argopkgs = rec {
# library of nix expressions
argolib = import ../lib/utils.nix;
......@@ -370,11 +373,6 @@ let
'';
});
appDhrunScript = app: pkgs.writeText "test.dhall" ''
let all = ${dhrunSpecs}/all-tests.dh
in all.apps.${app} True < NoCap = {=} | Cap : Text >
'';
doDhrunApp = app :
let
dhrunscript = pkgs.writeText "test.dhall" ''
......@@ -387,8 +385,7 @@ let
doDhrunKey = key:
let
dhrunscript = pkgs.writeText "test.dhall" ''
let all = ${dhrunSpecs}/all-tests.dh
in all.${key}
let all = ${dhrunSpecs}/all-tests.dh in all.${key}
'';
in
doDhrun dhrunscript;
......@@ -398,18 +395,12 @@ let
testPerfwrapper = doDhrunKey "performance";
testPower = doDhrunKey "power";
testSTREAM = (doDhrunApp "stream").overrideAttrs
(old:{buildInputs=old.buildInputs++[ stream ];});
testAMG = (doDhrunApp "amg").overrideAttrs
(old:{buildInputs=old.buildInputs++[ amg ];});
testOpenMC = (doDhrunApp "openmc").overrideAttrs
(old:{buildInputs=old.buildInputs++[ openmc ];
OPENMC_CROSS_SECTIONS = "${openmc-data}/cross_sections.xml";
});
testLAMMPS = (doDhrunApp "lammps").overrideAttrs
(old:{buildInputs=old.buildInputs++[ lammps ];});
testQMCPack = (doDhrunApp "qmcpack").overrideAttrs
(old:{buildInputs=old.buildInputs++[ qmcpack ];});
testSTREAM = addBI (doDhrunApp "stream") stream;
testAMG = addBI (doDhrunApp "amg") amg;
testOpenMC = (addBI (doDhrunApp "openmc") openmc).overrideAttrs
(old:{ OPENMC_CROSS_SECTIONS = "${openmc-data}/cross_sections.xml"; });
testLAMMPS = addBI (doDhrunApp "lammps") lammps;
testQMCPack = addBI (doDhrunApp "qmcpack") qmcpack ;
testAll = test.overrideAttrs
(old:{
......@@ -421,7 +412,8 @@ let
amg
openmc-data
];
OPENMC_CROSS_SECTIONS = "${openmc-data}/cross_sections.xml";});
OPENMC_CROSS_SECTIONS = "${openmc-data}/cross_sections.xml";
});
powerexpe = testAll.overrideAttrs (old:{
name = "power-experiments";
......
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