disko/tests/default.nix

21 lines
735 B
Nix
Raw Normal View History

2022-08-25 15:16:26 +02:00
{ makeTest ? import <nixpkgs/nixos/tests/make-test-python.nix>
, eval-config ? import <nixpkgs/nixos/lib/eval-config.nix>
, pkgs ? (import <nixpkgs> { })
2023-06-06 13:32:47 +02:00
}:
2022-08-25 23:12:49 +02:00
let
lib = pkgs.lib;
makeDiskoTest = (pkgs.callPackage ./lib.nix { inherit makeTest eval-config; }).makeDiskoTest;
2022-09-04 12:44:38 +02:00
2022-08-25 23:12:49 +02:00
allTestFilenames =
builtins.map (lib.removeSuffix ".nix") (
builtins.filter
(x: lib.hasSuffix ".nix" x && x != "default.nix" && x != "lib.nix")
(lib.attrNames (builtins.readDir ./.))
);
allTests = lib.genAttrs allTestFilenames (test: import (./. + "/${test}.nix") { inherit makeDiskoTest pkgs; }) // {
standalone = (pkgs.nixos [ ../example/stand-alone/configuration.nix ]).config.system.build.toplevel;
};
in
allTests