Skip to content

nexusmods-app: fix passthru tests#354018

Merged
Aleksanaa merged 1 commit into
NixOS:masterfrom
MattSturgeon:nexus-fix-tests
Dec 10, 2024
Merged

nexusmods-app: fix passthru tests#354018
Aleksanaa merged 1 commit into
NixOS:masterfrom
MattSturgeon:nexus-fix-tests

Conversation

@MattSturgeon

@MattSturgeon MattSturgeon commented Nov 6, 2024

Copy link
Copy Markdown
Contributor

While working on #354015 and #360174, I noticed that the passthru tests are not actually passing. I don't think this is a new issue, rather I think this has just gone unnoticed until now.

I've resolved the fontconfig related issues in one commit, but I've had to disable the tests in another. I believe the issue is that the CLI also launches the GUI (Nexus-Mods/NexusMods.App#2179), which I assume will not work in the stdenv sandbox?

EDIT: The other issues were resolved by ensuring XDG_STATE_HOME and XDG_DATA_HOME exist and are writable.

Build using

$ nix-build -A nexusmods-app.passthru.tests --check

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.11 Release Notes (or backporting 23.11 and 24.05 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.

@ofborg ofborg Bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Nov 6, 2024
@MattSturgeon MattSturgeon marked this pull request as ready for review November 29, 2024 19:29
@corngood

corngood commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

I've noticed that these tests pass intermittently, at least on my machine.

Edit: to be clear, I mean without this change. If this makes them reliable then that's awesome.

Comment on lines 147 to 149

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

If we just want an empty and/or default fontconfig file, is there a better alternative to using makeFontsConfig?

@l0b0

l0b0 commented Nov 29, 2024

Copy link
Copy Markdown
Contributor

Build using

$ nix-build -A pkgs.nexusmods-app.passthru.tests

That finishes in less than a second on my machine, with no feedback and exit code 0. Adding --check does not change the outcome.

nix-build -A nexusmods-app --check fails with this interesting message:

error: derivation '/nix/store/5xzldg25sballz8119xvrjsfrfjr9xdj-nexusmods-app-0.6.3.drv' may not be deterministic: output '/nix/store/7ccpwslwpnig1gfz99mbsq946bzb9vi9-nexusmods-app-0.6.3' differs

Comment thread pkgs/by-name/ne/nexusmods-app/package.nix Outdated
@MattSturgeon

Copy link
Copy Markdown
Contributor Author

Build using

$ nix-build -A pkgs.nexusmods-app.passthru.tests

That finishes in less than a second on my machine, with no feedback and exit code 0. Adding --check does not change the outcome.

Sorry, I should've been more clear. That's how to run the tests, however the second commit in this PR completely disables all the tests. See https://github.com/NixOS/nixpkgs/pull/354018/files#r1863938537

I intended that command for testing without this PR and/or testing the first commit of this PR.


I've noticed that these tests pass intermittently, at least on my machine.

Interesting... I was unable to get the tests to build at all, and assumed it was due to Nexus-Mods/NexusMods.App#2179 (hence disabling them entirely in the second commit)

@corngood

corngood commented Dec 4, 2024

Copy link
Copy Markdown
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 354018

@MattSturgeon

Copy link
Copy Markdown
Contributor Author

I've had to disable the tests in another. I believe the issue is that the CLI also launches the GUI (Nexus-Mods/NexusMods.App#2179), which I assume will not work in the stdenv sandbox?

This proved incorrect.

Ensuring XDG_STATE_HOME and XDG_DATA_HOME exist and are writable is enough for all passthru tests to pass.

I guess it was failing while attempting to write its initial state and/or logs.

This PR now fixes the passthru tests without needing to disable any of them.

Comment thread pkgs/by-name/ne/nexusmods-app/package.nix Outdated
@corngood

corngood commented Dec 4, 2024

Copy link
Copy Markdown
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 354018


x86_64-linux

- ensure fontconfig file exists
- ensure XDG dirs are writable
@Aleksanaa Aleksanaa merged commit 512ea53 into NixOS:master Dec 10, 2024
@nixpkgs-ci

nixpkgs-ci Bot commented Dec 10, 2024

Copy link
Copy Markdown
Contributor

Successfully created backport PR for release-24.11:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants