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

Ofborg passthru.tests nixos tests with Darwin workaround should be reworked once underlying issue is fixed #345825

Open
mattpolzin opened this issue Oct 2, 2024 · 3 comments

Comments

@mattpolzin
Copy link
Contributor

mattpolzin commented Oct 2, 2024

Describe the bug

A growing number of PRs (see Additional Context below) are working around ofBorg CI failures when executing nixos tests on Darwin platforms. The underlying issue is tracked in #294725. Once that issue has been addressed, we can undo the workaround in these PRs (go back to simply referring to nixos tests unconditionally).

The tests fail with an error similar to:

error: a 'x86_64-linux' with features {} is required to build '/nix/store/iz6wl6z51wgh2rpp245jgx002hcz55vg-Xresources-Xft.drv', but I am a 'x86_64-darwin' with features [...]

The workaround tends to look roughly like the following:

tests = lib.optionalAttrs stdenv.buildPlatform.isLinux {
      # Ref: https://github.com/NixOS/nixpkgs/issues/345825
      test = nixosTests.terminal-emulators.rio;
    };

Expected behavior

Nixos tests should run (or at least gracefully skip themselves) on darwin architectures without explicitly avoiding them with optionalAttrs.

Additional context

In addition to the originally linked PR (344751), where a follow-up has been opened to skip the test, I know of at least one other location (Kitty) where the problem has been worked around -- this was where I found my precedent to suggest the workaround myself. A quick grep of rg 'tests = lib.optionalAttrs' turned up another location (zutty) so I suspect a fuzzier search may turn up a few others.


Add a 👍 reaction to issues you find important.

@mattpolzin
Copy link
Contributor Author

mattpolzin commented Oct 2, 2024

Thinking about this a bit more, it seems possible to me that it isn't all nixos tests that fail on Darwin but rather specific ones that rely on derivations that only support Linux. That's just a guess, but it occurred to me I may have overstated things by saying that nixos tests are failing on Darwin as a blanket statement.

@wegank
Copy link
Member

wegank commented Oct 2, 2024

Duplicate of #294725

@wegank wegank marked this as a duplicate of #294725 Oct 2, 2024
otavio added a commit to otavio/nixpkgs that referenced this issue Oct 4, 2024
Restrict test execution inside nixosTests for Linux devices as ofborg
'passthru.tests' nixosTests are failing on Darwin architectures.

Ref: NixOS#345825
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
@mattpolzin
Copy link
Contributor Author

I'll repurpose this ticket to track the necessary cleanup work after the underlying issue (#294725) is fixed.

@mattpolzin mattpolzin changed the title Ofborg passthru.tests nixos tests are failing on Darwin architectures Ofborg passthru.tests nixos tests with Darwin workaround should be reworked once underlying issue is fixed Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants