mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-25 20:34:52 +03:00
Add basic kernel tests
This commit is contained in:
parent
da3640ec56
commit
656ec9de0e
@ -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 New Issue
Block a user