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

lib tests: Add system parameter #291936

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

roberth
Copy link
Member

@roberth roberth commented Feb 27, 2024

Description of changes

Make it succeed on darwin.

I do not know why bash in darwin fails to match, but I have too much on my plate to also debug bash itself.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@roberth roberth requested a review from infinisil as a code owner February 27, 2024 23:15
@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label Feb 27, 2024
@github-actions github-actions bot added the 6.topic: lib The Nixpkgs function library label Feb 27, 2024
@infinisil
Copy link
Member

See #291933 :)

Copy link
Member

@infinisil infinisil left a comment

Choose a reason for hiding this comment

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

The first commit is good, I'd drop the second one though.

@@ -118,7 +118,7 @@ expectFailure() {
die "$expr evaluated successfully to $result, but it was expected to fail"
fi
stderr=$(<"$tmp/stderr")
if [[ ! "$stderr" =~ $expectedErrorRegex ]]; then
if ! grep -E "$expectedErrorRegex" <<< $stderr; then
Copy link
Member

Choose a reason for hiding this comment

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

Unfortunately this only seems to check the first line of the regex. It doesn't seem like grep supports that. So I think we should stick with the bash regex match for now.

@roberth roberth force-pushed the fix-lib-tests-darwin branch from 5b1a7f8 to 0a4d338 Compare September 30, 2024 07:59
@roberth roberth changed the title Fix lib tests on darwin lib tests: Add system parameter Sep 30, 2024
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1 and removed 10.rebuild-darwin: 1 10.rebuild-darwin: 1-10 labels Sep 30, 2024
@infinisil infinisil force-pushed the fix-lib-tests-darwin branch from 0a4d338 to efd4a64 Compare December 17, 2024 23:08
Copy link
Member

@infinisil infinisil left a comment

Choose a reason for hiding this comment

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

Rebased to fix the conflict, looking good :)

@github-actions github-actions bot added 10.rebuild-darwin: 1-10 and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1 labels Dec 17, 2024
@infinisil infinisil merged commit c67f1af into NixOS:master Dec 17, 2024
26 of 27 checks passed
@infinisil infinisil deleted the fix-lib-tests-darwin branch December 17, 2024 23:17
@roberth
Copy link
Member Author

roberth commented Dec 18, 2024

Thanks!

@roberth roberth added the backport release-24.11 Backport PR automatically label Dec 18, 2024
@nix-backports
Copy link

nix-backports bot commented Dec 18, 2024

Backport failed for release-24.11, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin release-24.11
git worktree add -d .worktree/backport-291936-to-release-24.11 origin/release-24.11
cd .worktree/backport-291936-to-release-24.11
git switch --create backport-291936-to-release-24.11
git cherry-pick -x efd4a649fe39a4156bf31af24028770e02c94fb5

@roberth
Copy link
Member Author

roberth commented Dec 18, 2024

Not convinced that a backport is necessary actually.
I'll leave it like this. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: darwin Running or building packages on Darwin 6.topic: lib The Nixpkgs function library 10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10 backport release-24.11 Backport PR automatically
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants