disko/tests/default.nix

22 lines
737 B
Nix
Raw Normal View History

2022-08-25 16:16:26 +03: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 14:32:47 +03:00
}:
2022-08-26 00:12:49 +03:00
let
lib = pkgs.lib;
diskoLib = import ../lib { inherit lib makeTest eval-config; };
makeDiskoTest = diskoLib.testLib.makeDiskoTest;
2022-09-04 13:44:38 +03:00
2022-08-26 00:12:49 +03:00
allTestFilenames =
builtins.map (lib.removeSuffix ".nix") (
builtins.filter
(x: lib.hasSuffix ".nix" x && x != "default.nix")
2022-08-26 00:12:49 +03:00
(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