From 3c61dc3e6f47e95a86da9a152833c8d98e80f97f Mon Sep 17 00:00:00 2001 From: aszlig Date: Fri, 11 Dec 2015 05:46:26 +0100 Subject: profiles/common: Move gathering tests to lib/. So my gut feeling in 90c080e was't wrong after all, so we need to create jobs for all the tests the machines include. In order to make this easier, we're going to re-use the collection of all test attributes from release.nix so putting it in lib/ makes sense. Signed-off-by: aszlig --- lib/get-tests.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 lib/get-tests.nix (limited to 'lib') diff --git a/lib/get-tests.nix b/lib/get-tests.nix new file mode 100644 index 00000000..22d85b12 --- /dev/null +++ b/lib/get-tests.nix @@ -0,0 +1,18 @@ +{ system ? builtins.currentSystem, nixpkgs ? import ../nixpkgs-path.nix }: + +with import "${nixpkgs}/lib"; + +{ + nixos = let + upstreamTests = (import "${nixpkgs}/nixos/release.nix" { + inherit nixpkgs; + }).tests; + isTestOrSystems = attr: attr ? test || attr ? ${system}; + cond = attr: !isTestOrSystems attr; + reduce = attr: if attr ? test then attr else attr.${system}; + in mapAttrsRecursiveCond cond (path: reduce) upstreamTests; + + vuizvui = import ../tests { + inherit system; + }; +} -- cgit 1.4.1