Benjamin Yule Bädorf
ec01fe5eea
Some checks failed
Flake checks / Check (pull_request) Failing after 3m23s
20 lines
479 B
Nix
20 lines
479 B
Nix
args@{
|
|
self,
|
|
lib,
|
|
system,
|
|
pkgs,
|
|
inputs,
|
|
...
|
|
}: let
|
|
nixos-lib = import (inputs.nixpkgs + "/nixos/lib") { };
|
|
|
|
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 ./.
|