Merge pull request #247520 from Atemu/fix/kernel-passthru.tests

kernel: fix passthru.tests
This commit is contained in:
Robert Hensing 2023-08-08 21:29:19 +02:00 committed by GitHub
commit bc9d2d6a7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 4 deletions

View file

@ -21,7 +21,7 @@ let
if isAttrs val
then
if hasAttr "test" val then callTest val
else mapAttrs (n: s: discoverTests s) val
else mapAttrs (n: s: if n == "passthru" then s else discoverTests s) val
else if isFunction val
then
# Tests based on make-test-python.nix will return the second lambda

View file

@ -42,7 +42,9 @@ let
};
in mapAttrs (_: lP: testsForLinuxPackages lP) kernels // {
inherit testsForLinuxPackages;
passthru = {
inherit testsForLinuxPackages;
testsForKernel = kernel: testsForLinuxPackages (pkgs.linuxPackagesFor kernel);
testsForKernel = kernel: testsForLinuxPackages (pkgs.linuxPackagesFor kernel);
};
}

View file

@ -220,7 +220,7 @@ let
+ toString (lib.attrNames (if lib.isAttrs args then args else args {}))
) overridableKernel;
};
in [ (nixosTests.kernel-generic.testsForKernel overridableKernel) ] ++ kernelTests;
in [ (nixosTests.kernel-generic.passthru.testsForKernel overridableKernel) ] ++ kernelTests;
};
finalKernel = lib.extendDerivation true passthru kernel;