mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
Merge pull request #28988 from NeQuissimus/tests_kernel_basic
Add basic kernel tests
This commit is contained in:
commit
3558ed8bfd
5 changed files with 59 additions and 0 deletions
|
@ -91,6 +91,9 @@ in rec {
|
|||
(all nixos.tests.keymap.neo)
|
||||
(all nixos.tests.keymap.qwertz)
|
||||
(all nixos.tests.plasma5)
|
||||
(all nixos.tests.kernel-copperhead)
|
||||
(all nixos.tests.kernel-latest)
|
||||
(all nixos.tests.kernel-lts)
|
||||
#(all nixos.tests.lightdm)
|
||||
(all nixos.tests.login)
|
||||
(all nixos.tests.misc)
|
||||
|
|
|
@ -261,6 +261,9 @@ in rec {
|
|||
tests.plasma5 = callTest tests/plasma5.nix {};
|
||||
tests.keymap = callSubTests tests/keymap.nix {};
|
||||
tests.initrdNetwork = callTest tests/initrd-network.nix {};
|
||||
tests.kernel-copperhead = tests/kernel-copperhead.nix {};
|
||||
tests.kernel-latest = tests/kernel-latest.nix {};
|
||||
tests.kernel-lts = tests/kernel-lts.nix {};
|
||||
tests.keystone = callTest tests/keystone.nix {};
|
||||
tests.kubernetes = hydraJob (import tests/kubernetes.nix { system = "x86_64-linux"; });
|
||||
tests.latestKernel.login = callTest tests/login.nix { latestKernel = true; };
|
||||
|
|
19
nixos/tests/kernel-copperhead.nix
Normal file
19
nixos/tests/kernel-copperhead.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
name = "kernel-copperhead";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ nequissimus ];
|
||||
};
|
||||
|
||||
machine = { config, lib, pkgs, ... }:
|
||||
{
|
||||
boot.kernelPackages = pkgs.linuxPackages_hardened_copperhead;
|
||||
};
|
||||
|
||||
testScript =
|
||||
''
|
||||
$machine->succeed("uname -a");
|
||||
$machine->succeed("uname -s | grep 'Linux'");
|
||||
$machine->succeed("uname -a | grep '${pkgs.linuxPackages_hardened_copperhead.kernel.modDirVersion}'");
|
||||
$machine->succeed("uname -a | grep 'hardened'");
|
||||
'';
|
||||
})
|
17
nixos/tests/kernel-latest.nix
Normal file
17
nixos/tests/kernel-latest.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
name = "kernel-latest";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ nequissimus ];
|
||||
};
|
||||
|
||||
machine = { config, lib, pkgs, ... }:
|
||||
{
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
};
|
||||
|
||||
testScript =
|
||||
''
|
||||
$machine->succeed("uname -s | grep 'Linux'");
|
||||
$machine->succeed("uname -a | grep '${pkgs.linuxPackages_latest.kernel.version}'");
|
||||
'';
|
||||
})
|
17
nixos/tests/kernel-lts.nix
Normal file
17
nixos/tests/kernel-lts.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
import ./make-test.nix ({ pkgs, ...} : {
|
||||
name = "kernel-lts";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ nequissimus ];
|
||||
};
|
||||
|
||||
machine = { config, lib, pkgs, ... }:
|
||||
{
|
||||
boot.kernelPackages = pkgs.linuxPackages;
|
||||
};
|
||||
|
||||
testScript =
|
||||
''
|
||||
$machine->succeed("uname -s | grep 'Linux'");
|
||||
$machine->succeed("uname -a | grep '${pkgs.linuxPackages.kernel.version}'");
|
||||
'';
|
||||
})
|
Loading…
Reference in a new issue