2022-08-25 16:16:26 +03:00
|
|
|
{ makeTest ? import <nixpkgs/nixos/tests/make-test-python.nix>
|
2022-09-30 13:55:28 +03:00
|
|
|
, eval-config ? import <nixpkgs/nixos/lib/eval-config.nix>
|
2022-08-26 09:41:58 +03:00
|
|
|
, pkgs ? (import <nixpkgs> { })
|
2023-06-06 14:32:47 +03:00
|
|
|
}:
|
2022-08-26 00:12:49 +03:00
|
|
|
let
|
2023-02-07 18:37:12 +03:00
|
|
|
lib = pkgs.lib;
|
2023-07-14 12:37:30 +03:00
|
|
|
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
|
2023-07-15 17:57:18 +03:00
|
|
|
(x: lib.hasSuffix ".nix" x && x != "default.nix")
|
2022-08-26 00:12:49 +03:00
|
|
|
(lib.attrNames (builtins.readDir ./.))
|
|
|
|
);
|
|
|
|
|
2023-03-03 10:09:13 +03:00
|
|
|
allTests = lib.genAttrs allTestFilenames (test: import (./. + "/${test}.nix") { inherit makeDiskoTest pkgs; }) // {
|
2023-02-07 18:56:08 +03:00
|
|
|
standalone = (pkgs.nixos [ ../example/stand-alone/configuration.nix ]).config.system.build.toplevel;
|
|
|
|
};
|
2022-08-26 09:41:58 +03:00
|
|
|
in
|
|
|
|
allTests
|