3
0
Fork 0
forked from mirrors/nixpkgs

nixosTests.kernel-generic: expose test-making functions

Changed the name to be clearer, 'makeKernelTest' could imply that it wants a
kernel pkg as its arg while it actually needs a set of linuxPackages.
This commit is contained in:
Atemu 2021-05-02 15:39:39 +02:00
parent 2b52f2b762
commit 457653d99c

View file

@ -6,7 +6,7 @@
with pkgs.lib;
let
makeKernelTest = linuxPackages: (import ./make-test-python.nix ({ pkgs, ... }: {
testsForLinuxPackages = linuxPackages: (import ./make-test-python.nix ({ pkgs, ... }: {
name = "kernel-${linuxPackages.kernel.version}";
meta = with pkgs.lib.maintainers; {
maintainers = [ nequissimus ];
@ -41,4 +41,8 @@ let
linuxPackages_testing;
};
in mapAttrs (_: kernel: makeKernelTest kernel) kernels
in mapAttrs (_: lP: testsForLinuxPackages lP) kernels // {
inherit testsForLinuxPackages;
testsForKernel = kernel: testsForLinuxPackages (pkgs.linuxPackagesFor kernel);
}