nixpkgs/nixos/tests/kernel-generic.nix
Maximilian Bosch 01eb8ec98a
linux_5_13: drop
5.13.19 was the last 5.13 release and the version is now EOL[1].

[1] https://lwn.net/Articles/869747/
2021-09-27 23:29:53 +02:00

49 lines
1.2 KiB
Nix

{ system ? builtins.currentSystem
, config ? { }
, pkgs ? import ../.. { inherit system config; }
}@args:
with pkgs.lib;
let
testsForLinuxPackages = linuxPackages: (import ./make-test-python.nix ({ pkgs, ... }: {
name = "kernel-${linuxPackages.kernel.version}";
meta = with pkgs.lib.maintainers; {
maintainers = [ nequissimus atemu ];
};
machine = { ... }:
{
boot.kernelPackages = linuxPackages;
};
testScript =
''
assert "Linux" in machine.succeed("uname -s")
assert "${linuxPackages.kernel.modDirVersion}" in machine.succeed("uname -a")
'';
}) args);
kernels = {
inherit (pkgs)
linuxPackages_4_4
linuxPackages_4_9
linuxPackages_4_14
linuxPackages_4_19
linuxPackages_5_4
linuxPackages_5_10
linuxPackages_5_14
linuxPackages_4_14_hardened
linuxPackages_4_19_hardened
linuxPackages_5_4_hardened
linuxPackages_5_10_hardened
linuxPackages_testing;
};
in mapAttrs (_: lP: testsForLinuxPackages lP) kernels // {
inherit testsForLinuxPackages;
testsForKernel = kernel: testsForLinuxPackages (pkgs.linuxPackagesFor kernel);
}