1{
2 system ? builtins.currentSystem,
3 config ? { },
4 pkgs ? import ../.. { inherit system config; },
5}@args:
6
7with pkgs.lib;
8
9let
10 testsForLinuxPackages =
11 linuxPackages:
12 (import ./make-test-python.nix (
13 { pkgs, ... }:
14 {
15 name = "kernel-${linuxPackages.kernel.version}";
16 meta = with pkgs.lib.maintainers; {
17 maintainers = [
18 nequissimus
19 atemu
20 ma27
21 ];
22 };
23
24 nodes.machine =
25 { ... }:
26 {
27 boot.kernelPackages = linuxPackages;
28 };
29
30 testScript = ''
31 assert "Linux" in machine.succeed("uname -s")
32 assert "${linuxPackages.kernel.modDirVersion}" in machine.succeed("uname -a")
33 '';
34 }
35 ) args);
36 kernels = pkgs.linuxKernel.vanillaPackages // {
37 inherit (pkgs.linuxKernel.packages)
38 linux_5_4_hardened
39 linux_5_10_hardened
40 linux_5_15_hardened
41 linux_6_1_hardened
42 linux_6_6_hardened
43 linux_6_12_hardened
44 linux_6_13_hardened
45 linux_rt_5_4
46 linux_rt_5_10
47 linux_rt_5_15
48 linux_rt_6_1
49 linux_rt_6_6
50 linux_libre
51
52 linux_testing
53 ;
54 };
55
56in
57mapAttrs (_: lP: testsForLinuxPackages lP) kernels
58// {
59 passthru = {
60 inherit testsForLinuxPackages;
61
62 # Useful for development testing of all Kernel configs without building full Kernel
63 configfiles = mapAttrs (_: lP: lP.kernel.configfile) kernels;
64
65 testsForKernel = kernel: testsForLinuxPackages (pkgs.linuxPackagesFor kernel);
66 };
67}