summary refs log tree commit diff
path: root/pkgs/top-level
diff options
context:
space:
mode:
authorTimo Kaufmann <timokau@zoho.com>2018-11-07 00:05:22 +0100
committerGitHub <noreply@github.com>2018-11-07 00:05:22 +0100
commit6141939d6e0a77c84905efd560c03c3032164ef1 (patch)
tree57930c5d117d67174ca6ba7f2219549eb4c2c116 /pkgs/top-level
parent13892da3e76351e0a280fa390e8cb49b1b8b9265 (diff)
parent02e1f00ffdd0c1a74fbc0be5f314b8921b0c9165 (diff)
downloadnixlib-6141939d6e0a77c84905efd560c03c3032164ef1.tar
nixlib-6141939d6e0a77c84905efd560c03c3032164ef1.tar.gz
nixlib-6141939d6e0a77c84905efd560c03c3032164ef1.tar.bz2
nixlib-6141939d6e0a77c84905efd560c03c3032164ef1.tar.lz
nixlib-6141939d6e0a77c84905efd560c03c3032164ef1.tar.xz
nixlib-6141939d6e0a77c84905efd560c03c3032164ef1.tar.zst
nixlib-6141939d6e0a77c84905efd560c03c3032164ef1.zip
Merge pull request #44439 from Ekleog/meta-tests
[RFC] Use `meta.tests` to link from packages to the tests that test them
Diffstat (limited to 'pkgs/top-level')
-rw-r--r--pkgs/top-level/all-packages.nix20
1 files changed, 20 insertions, 0 deletions
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 5a1b72ff1b38..9e9ee8797ff1 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -71,6 +71,26 @@ with pkgs;
 
   common-updater-scripts = callPackage ../common-updater/scripts.nix { };
 
+  ### Push NixOS tests inside the fixed point
+
+  nixosTests =
+    let
+      # TODO(Ericson2314,ekleog): Check this will work correctly with cross-
+      system = builtins.currentSystem;
+      rawTests = (import ../../nixos/release.nix {
+        nixpkgs = pkgs;
+      }).tests;
+      testNames = builtins.attrNames rawTests;
+      filteredList = builtins.filter
+        (test: rawTests.${test} ? ${system})
+        testNames;
+      finalList = map
+        (test: { name = test; value = rawTests.${test}.${system}; })
+        filteredList;
+      finalTests = builtins.listToAttrs finalList;
+    in
+    finalTests;
+
   ### BUILD SUPPORT
 
   autoreconfHook = makeSetupHook