mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
Merge pull request #247520 from Atemu/fix/kernel-passthru.tests
kernel: fix passthru.tests
This commit is contained in:
commit
bc9d2d6a7c
3 changed files with 6 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue