-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
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
Disallow output changes in installCheckPhase
#303361
Open
roberth
wants to merge
2
commits into
NixOS:staging
Choose a base branch
from
hercules-ci:disallow-output-changes-in-installCheck
base: staging
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Disallow output changes in installCheckPhase
#303361
roberth
wants to merge
2
commits into
NixOS:staging
from
hercules-ci:disallow-output-changes-in-installCheck
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This will indicate errors in the install script fixed up by the installed software, or software or configuration that relies on a writable installation directory.
installCheckPhase
12 tasks
Ericson2314
reviewed
Apr 11, 2024
pkgs/test/default.nix
Outdated
Comment on lines
91
to
109
# NB: ^^^^^^ | ||
# `import` and not `callPackage`, because we manipulate the whole `pkgs` | ||
# so that we can unit test without rebuilding everything; see setup/default.nix. | ||
basePkgs = | ||
if ! pkgs.config?baseCommit then pkgs | ||
else import ../.. { | ||
inherit (pkgs.stdenv.hostPlatform) system; | ||
config = { | ||
setupScript = "${ | ||
let oldPkgsStr = builtins.fetchGit { url = ../..; ref = pkgs.config.baseCommit; }; | ||
oldPkgsPath = /. + builtins.unsafeDiscardStringContext (oldPkgsStr); | ||
in oldPkgsPath + "/pkgs/stdenv/generic/setup.sh" | ||
}"; | ||
}; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I imagine other tests might start using this at some point :)
Ericson2314
approved these changes
Apr 11, 2024
4 tasks
infinisil
reviewed
May 25, 2024
Since the previous commit is already a mass-rebuild, I've taken the opportunity to add important documentation to setup.sh.
4829c07
to
07e3b36
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
0.kind: enhancement
Add something new
2.status: merge conflict
This PR has merge conflicts with the target branch
2.status: stale
https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
6.topic: stdenv
Standard environment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of changes
tests.setup
which runs quicker thantests.stdenv
. cc @ArtturinThis will indicate errors in the install script fixed up by the installed software, or software or configuration that relies on a writable installation directory.
NOTE: this only works for derivations which use the installCheck phase as intended. Some language integrations, like
pythonPackages
, need to call the new functions on their own.Things done
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.