kernel: Add test for RC kernels

This commit is contained in:
Tim Steinbach 2021-04-07 12:28:15 -04:00 committed by Tim Steinbach
parent 491f0a677b
commit d3d40b09fd
3 changed files with 7 additions and 3 deletions

View File

@ -20,7 +20,7 @@ let
testScript =
''
assert "Linux" in machine.succeed("uname -s")
assert "${linuxPackages.kernel.version}" in machine.succeed("uname -a")
assert "${linuxPackages.kernel.modDirVersion}" in machine.succeed("uname -a")
'';
}));
in
@ -32,4 +32,6 @@ with pkgs; {
linux_5_4 = makeKernelTest "5.4" linuxPackages_5_4;
linux_5_10 = makeKernelTest "5.10" linuxPackages_5_10;
linux_5_11 = makeKernelTest "5.11" linuxPackages_5_11;
linux_testing = makeKernelTest "testing" linuxPackages_testing;
}

View File

@ -178,7 +178,7 @@ let
passthru = {
features = kernelFeatures;
inherit commonStructuredConfig isXen isZen isHardened isLibre;
inherit commonStructuredConfig isXen isZen isHardened isLibre modDirVersion;
kernelOlder = lib.versionOlder version;
kernelAtLeast = lib.versionAtLeast version;
passthru = kernel.passthru // (removeAttrs passthru [ "passthru" ]);

View File

@ -1,4 +1,4 @@
{ lib, buildPackages, fetchurl, perl, buildLinux, modDirVersionArg ? null, ... } @ args:
{ lib, buildPackages, fetchurl, perl, buildLinux, nixosTests, modDirVersionArg ? null, ... } @ args:
with lib;
@ -14,6 +14,8 @@ buildLinux (args // rec {
sha256 = "0w0zk2byimdbcvn8myqaq0ab6lyd43493fnkv9a1407dimpxb03d";
};
kernelTests = args.kernelTests or [ nixosTests.kernel-generic.linux_testing ];
# Should the testing kernels ever be built on Hydra?
extraMeta.hydraPlatforms = [];