2021-04-07 15:57:58 +00:00
|
|
|
{
|
|
|
|
system ? builtins.currentSystem,
|
|
|
|
config ? { },
|
|
|
|
pkgs ? import ../.. { inherit system config; },
|
2021-04-13 09:07:39 +00:00
|
|
|
}@args:
|
2021-04-07 15:57:58 +00:00
|
|
|
|
|
|
|
with pkgs.lib;
|
|
|
|
|
|
|
|
let
|
2021-05-02 13:39:39 +00:00
|
|
|
testsForLinuxPackages =
|
|
|
|
linuxPackages:
|
|
|
|
(import ./make-test-python.nix (
|
|
|
|
{ pkgs, ... }:
|
2021-04-07 15:57:58 +00:00
|
|
|
{
|
2021-05-02 11:55:33 +00:00
|
|
|
name = "kernel-${linuxPackages.kernel.version}";
|
2021-04-07 15:57:58 +00:00
|
|
|
meta = with pkgs.lib.maintainers; {
|
2023-07-17 16:32:06 +00:00
|
|
|
maintainers = [
|
|
|
|
nequissimus
|
2024-12-10 19:26:33 +00:00
|
|
|
atemu
|
|
|
|
ma27
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2022-03-20 23:15:30 +00:00
|
|
|
nodes.machine =
|
2024-12-10 19:26:33 +00:00
|
|
|
{ ... }:
|
|
|
|
{
|
2021-04-07 15:57:58 +00:00
|
|
|
boot.kernelPackages = linuxPackages;
|
|
|
|
};
|
2024-12-10 19:26:33 +00:00
|
|
|
|
2021-04-07 15:57:58 +00:00
|
|
|
testScript = ''
|
|
|
|
assert "Linux" in machine.succeed("uname -s")
|
2021-04-07 16:28:15 +00:00
|
|
|
assert "${linuxPackages.kernel.modDirVersion}" in machine.succeed("uname -a")
|
2021-04-07 15:57:58 +00:00
|
|
|
'';
|
2021-04-13 09:07:39 +00:00
|
|
|
}
|
|
|
|
) args);
|
2024-07-04 22:09:29 +00:00
|
|
|
kernels = pkgs.linuxKernel.vanillaPackages // {
|
2021-11-01 09:18:46 +00:00
|
|
|
inherit (pkgs.linuxKernel.packages)
|
|
|
|
linux_5_4_hardened
|
|
|
|
linux_5_10_hardened
|
2021-11-15 19:10:37 +00:00
|
|
|
linux_5_15_hardened
|
2023-01-15 12:21:06 +00:00
|
|
|
linux_6_1_hardened
|
2023-12-14 18:30:51 +00:00
|
|
|
linux_6_6_hardened
|
2024-11-07 00:06:36 +00:00
|
|
|
linux_6_11_hardened
|
2023-07-17 16:32:06 +00:00
|
|
|
linux_rt_5_4
|
|
|
|
linux_rt_5_10
|
|
|
|
linux_rt_5_15
|
|
|
|
linux_rt_6_1
|
2024-05-28 09:38:06 +00:00
|
|
|
linux_rt_6_6
|
2023-07-17 16:32:06 +00:00
|
|
|
linux_libre
|
2021-11-01 09:18:46 +00:00
|
|
|
|
|
|
|
linux_testing
|
|
|
|
;
|
2021-05-02 11:55:33 +00:00
|
|
|
};
|
|
|
|
|
2021-05-02 13:39:39 +00:00
|
|
|
in
|
|
|
|
mapAttrs (_: lP: testsForLinuxPackages lP) kernels
|
|
|
|
// {
|
2023-08-06 13:45:09 +00:00
|
|
|
passthru = {
|
|
|
|
inherit testsForLinuxPackages;
|
2021-05-02 13:39:39 +00:00
|
|
|
|
2024-04-01 23:13:35 +00:00
|
|
|
# Useful for development testing of all Kernel configs without building full Kernel
|
|
|
|
configfiles = mapAttrs (_: lP: lP.kernel.configfile) kernels;
|
|
|
|
|
2023-08-06 13:45:09 +00:00
|
|
|
testsForKernel = kernel: testsForLinuxPackages (pkgs.linuxPackagesFor kernel);
|
|
|
|
};
|
2021-05-02 13:39:39 +00:00
|
|
|
}
|