1{ system ? builtins.currentSystem
2, config ? { }
3, pkgs ? import ../.. { inherit system config; }
4}@args:
5
6with pkgs.lib;
7
8let
9 testsForLinuxPackages = linuxPackages: (import ./make-test-python.nix ({ pkgs, ... }: {
10 name = "kernel-${linuxPackages.kernel.version}";
11 meta = with pkgs.lib.maintainers; {
12 maintainers = [ nequissimus atemu ];
13 };
14
15 nodes.machine = { ... }:
16 {
17 boot.kernelPackages = linuxPackages;
18 };
19
20 testScript =
21 ''
22 assert "Linux" in machine.succeed("uname -s")
23 assert "${linuxPackages.kernel.modDirVersion}" in machine.succeed("uname -a")
24 '';
25 }) args);
26 kernels = pkgs.linuxKernel.vanillaPackages // {
27 inherit (pkgs.linuxKernel.packages)
28 linux_4_14_hardened
29 linux_4_19_hardened
30 linux_5_4_hardened
31 linux_5_10_hardened
32 linux_5_15_hardened
33 linux_6_0_hardened
34
35 linux_testing;
36 };
37
38in mapAttrs (_: lP: testsForLinuxPackages lP) kernels // {
39 inherit testsForLinuxPackages;
40
41 testsForKernel = kernel: testsForLinuxPackages (pkgs.linuxPackagesFor kernel);
42}