2024-04-28 14:04:15 +00:00
|
|
|
args@{
|
|
|
|
self,
|
|
|
|
lib,
|
|
|
|
system,
|
|
|
|
pkgs,
|
|
|
|
inputs,
|
|
|
|
...
|
2024-08-27 11:17:30 +00:00
|
|
|
}:
|
|
|
|
let
|
2024-04-28 14:04:15 +00:00
|
|
|
nixos-lib = import (inputs.nixpkgs + "/nixos/lib") { };
|
|
|
|
|
2024-08-27 11:17:30 +00:00
|
|
|
loadTestFiles =
|
|
|
|
with lib;
|
|
|
|
dir:
|
|
|
|
mapAttrs' (
|
|
|
|
name: _:
|
|
|
|
let
|
|
|
|
test = ((import (dir + "/${name}")) args);
|
|
|
|
in
|
|
|
|
{
|
|
|
|
name = "test-" + (lib.strings.removeSuffix ".nix" name);
|
|
|
|
value = nixos-lib.runTest test;
|
|
|
|
}
|
|
|
|
) (filterAttrs (name: _: (hasSuffix ".nix" name) && name != "default.nix") (builtins.readDir dir));
|
|
|
|
in
|
|
|
|
loadTestFiles ./.
|