Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux: change tests to attrset #350008

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions pkgs/os-specific/linux/kernel/generic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ lib.makeOverridable ({ # The kernel source tarball.
, autoModules ? stdenv.hostPlatform.linux-kernel.autoModules
, preferBuiltin ? stdenv.hostPlatform.linux-kernel.preferBuiltin or false
, kernelArch ? stdenv.hostPlatform.linuxArch
, kernelTests ? []
, kernelTests ? {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is technically an API break, can we maybe handle both cases for a bit?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we think people are passing in custom kernel tests much? I'd be surprised…


, stdenv ? args'.stdenv
, buildPackages ? args'.buildPackages
Expand Down Expand Up @@ -281,12 +281,12 @@ kernel.overrideAttrs (finalAttrs: previousAttrs: {
modDirVersion = throw (explain "modDirVersion");
}))).version
emptyFile;
in [
(nixosTests.kernel-generic.passthru.testsForKernel overridableKernel)
versionDoesNotDependOnPatchesEtc
in {
inherit versionDoesNotDependOnPatchesEtc;
testsForKernel = nixosTests.kernel-generic.passthru.testsForKernel overridableKernel;
# Disabled by default, because the infinite recursion is hard to understand. The other test's error is better and produces a shorter trace.
# versionDoesNotDependOnPatchesEtcNixOS
] ++ kernelTests;
# inherit versionDoesNotDependOnPatchesEtcNixOS;
} // kernelTests;
};

}));
Expand Down