2021-04-07 16:57:58 +01:00
|
|
|
{ system ? builtins.currentSystem
|
|
|
|
, config ? { }
|
|
|
|
, pkgs ? import ../.. { inherit system config; }
|
2021-04-13 10:07:39 +01:00
|
|
|
}@args:
|
2021-04-07 16:57:58 +01:00
|
|
|
|
|
|
|
with pkgs.lib;
|
|
|
|
|
|
|
|
let
|
2021-05-02 14:39:39 +01:00
|
|
|
testsForLinuxPackages = linuxPackages: (import ./make-test-python.nix ({ pkgs, ... }: {
|
2021-05-02 12:55:33 +01:00
|
|
|
name = "kernel-${linuxPackages.kernel.version}";
|
2021-04-07 16:57:58 +01:00
|
|
|
meta = with pkgs.lib.maintainers; {
|
2021-05-02 15:28:25 +01:00
|
|
|
maintainers = [ nequissimus atemu ];
|
2021-04-07 16:57:58 +01:00
|
|
|
};
|
|
|
|
|
2022-03-20 23:15:30 +00:00
|
|
|
nodes.machine = { ... }:
|
2021-04-07 16:57:58 +01:00
|
|
|
{
|
|
|
|
boot.kernelPackages = linuxPackages;
|
|
|
|
};
|
|
|
|
|
|
|
|
testScript =
|
|
|
|
''
|
|
|
|
assert "Linux" in machine.succeed("uname -s")
|
2021-04-07 17:28:15 +01:00
|
|
|
assert "${linuxPackages.kernel.modDirVersion}" in machine.succeed("uname -a")
|
2021-04-07 16:57:58 +01:00
|
|
|
'';
|
2021-04-13 10:07:39 +01:00
|
|
|
}) args);
|
2021-11-01 09:18:46 +00:00
|
|
|
kernels = pkgs.linuxKernel.vanillaPackages // {
|
|
|
|
inherit (pkgs.linuxKernel.packages)
|
|
|
|
linux_4_14_hardened
|
|
|
|
linux_4_19_hardened
|
|
|
|
linux_5_4_hardened
|
|
|
|
linux_5_10_hardened
|
2021-11-15 19:10:37 +00:00
|
|
|
linux_5_15_hardened
|
2022-05-05 23:22:37 +01:00
|
|
|
linux_5_17_hardened
|
2021-11-01 09:18:46 +00:00
|
|
|
|
|
|
|
linux_testing;
|
2021-05-02 12:55:33 +01:00
|
|
|
};
|
|
|
|
|
2021-05-02 14:39:39 +01:00
|
|
|
in mapAttrs (_: lP: testsForLinuxPackages lP) kernels // {
|
|
|
|
inherit testsForLinuxPackages;
|
|
|
|
|
|
|
|
testsForKernel = kernel: testsForLinuxPackages (pkgs.linuxPackagesFor kernel);
|
|
|
|
}
|