From aa6741135cb7e78ab038eee798067f2df32bb6d9 Mon Sep 17 00:00:00 2001 From: aszlig Date: Fri, 11 Dec 2015 07:34:35 +0100 Subject: modules: Make requiresTests a list of paths. Unfortunately, we went into trouble and the Hydra machine not only consumed lots of ram during evaluation but it also triggered a bunch of evaluation errors because the available tests were strictly evaluated. Using attribute paths consisting of plain strings doesn't have the same problem, even though they look a bit uglier. Signed-off-by: aszlig --- release.nix | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'release.nix') diff --git a/release.nix b/release.nix index 2d5d9641..fc72ee2b 100644 --- a/release.nix +++ b/release.nix @@ -62,21 +62,15 @@ in with pkgsUpstream.lib; with builtins; { in mapAttrsRecursiveCond (m: !(m ? iso)) (const buildIso) allMachines; tests = let + machineList = collect (m: m ? build) allMachines; allTests = import ./lib/get-tests.nix { inherit system nixpkgs; }; - machineList = collect (m: m ? build) allMachines; - activatedTests = concatMap (machine: + activatedTests = unique (concatMap (machine: machine.build.config.vuizvui.requiresTests - ) [ (head machineList) ]; - cmpTest = a: b: - if a ? driver - then a.driver.testScript == b.driver.testScript && a.name == b.name - else a.drvPath == b.drvPath; - hasTest = test: any (cmpTest test) activatedTests; - includeTest = test: optionalAttrs (hasTest test) test; - cond = t: !((t.type or null) == "derivation" || t ? test); - in mapAttrsRecursiveCond cond (const includeTest) allTests; + ) machineList); + mkTest = path: setAttrByPath path (getAttrFromPath path allTests); + in fold recursiveUpdate {} (map mkTest activatedTests); pkgs = let releaseLib = import "${nixpkgs}/pkgs/top-level/release-lib.nix" { -- cgit 1.4.1