1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-19 04:02:10 +00:00
nixpkgs/nixos/tests/kernel-generic.nix

31 lines
726 B
Nix
Raw Normal View History

2021-04-07 16:57:58 +01:00
{ system ? builtins.currentSystem
, config ? { }
, pkgs ? import ../.. { inherit system config; }
}:
with pkgs.lib;
let
makeKernelTest = version: linuxPackages: (import ./make-test-python.nix ({ pkgs, ... }: {
name = "kernel-${version}";
meta = with pkgs.lib.maintainers; {
maintainers = [ nequissimus ];
};
machine = { ... }:
{
boot.kernelPackages = linuxPackages;
};
testScript =
''
assert "Linux" in machine.succeed("uname -s")
assert "${linuxPackages.kernel.version}" in machine.succeed("uname -a")
'';
}));
in
with pkgs; {
2021-04-07 17:06:41 +01:00
linux_5_10 = makeKernelTest "5.10" linuxPackages_5_10;
2021-04-07 16:57:58 +01:00
linux_5_11 = makeKernelTest "5.11" linuxPackages_5_11;
}