-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
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
buildLinux: structuralize passthru.tests and kernelTests #287659
Conversation
@ofborg build linux linux.tests |
45c9ac3
to
243904a
Compare
243904a
to
d86b534
Compare
Bump onto master and resolve merge conflict. |
Override `finalAttrs.finalPackage` instead of `kernel` from the let-in block to make configEnv behave in accordance with overrideAttrs of the result package. Continuation of commit f10331c ("buildLinux: passthru by <pkg>.overrideAttrs instead of lib.extendDerivation")
Present passthru.tests of the result package as an attribute set instead of a list. Recommend adding tests by overriding `passthru.tests` with `overrideAttrs`. Make the input argument kernelTests accept an attribute set instead of a list. Handle the previous override interface of kerneTests as a list with a warning message and transform the elements into an attribute set in the form `passthru.tests.extra-kernel-test-<0-based index>`.
d86b534
to
5070af6
Compare
I rebased the changes and resolved merge conflicts. @roberth, I restructured the two test cases as version-does-not-dependent-on-patches-etc-nixos and version-does-not-dependent-on-patches-etc. I excluded the former by commenting it out and prefixing it with a wall of number signs ( |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-ready-for-review/3032/4332 |
#350008 surpassed this PR. I'll open a new, backportable PR to improve the overriding of |
Update: The new PR is #364679. |
Description of changes
Currently, both the
kernelTests
input argument ofbuildLinux
and thepassthru.tests
attribute of the result kernel package are lists. This PR brings the structural,passthru.tests.<name>
attribute set pattern tobuildLinux
. This includes:Presenting passthru.tests of the result package as an attribute set instead of a list.
Making the input argument kernelTests accept an attribute set instead of a list.
Handling the previous override interface of kerneTests as a list with a warning message and transform the elements into an attribute set in the form
passthru.tests.extra-kernel-test-<0-based index>
.If applied, one will be able to run a specific test case intuitively, without having to go through complex
--expr
specification.Things done
nixos-install-tools
)nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.