From 0478b94d658a08904d3e41ff615a52775e65c085 Mon Sep 17 00:00:00 2001 From: aszlig Date: Fri, 11 Dec 2015 07:02:02 +0100 Subject: lib/get-test: Fix collecting upstream NixOS tests. The upstream tests all have their attributes cleaned up by the "hydraJob" function, so we can't check for the "test" attribute. Luckily this isn't a problem, because we're only searching for "anything not plain attribute namespacing" anyway. Signed-off-by: aszlig --- lib/get-tests.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/get-tests.nix b/lib/get-tests.nix index 22d85b12..0f93a5bb 100644 --- a/lib/get-tests.nix +++ b/lib/get-tests.nix @@ -7,9 +7,10 @@ with import "${nixpkgs}/lib"; upstreamTests = (import "${nixpkgs}/nixos/release.nix" { inherit nixpkgs; }).tests; - isTestOrSystems = attr: attr ? test || attr ? ${system}; + isTestOrJob = attr: (attr.type or null) == "derivation" || attr ? test; + isTestOrSystems = attr: isTestOrJob attr || attr ? ${system}; cond = attr: !isTestOrSystems attr; - reduce = attr: if attr ? test then attr else attr.${system}; + reduce = attr: if isTestOrJob attr then attr else attr.${system}; in mapAttrsRecursiveCond cond (path: reduce) upstreamTests; vuizvui = import ../tests { -- cgit 1.4.1