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

runNixOSTest interactive driver appends "-nographic" on macOS if DISPLAY is not set #390751

Closed
3 tasks done
mitchellh opened this issue Mar 17, 2025 · 2 comments · Fixed by #391589
Closed
3 tasks done
Labels
0.kind: bug Something is broken 6.topic: darwin Running or building packages on Darwin 6.topic: testing Tooling for automated testing of packages and modules

Comments

@mitchellh
Copy link

mitchellh commented Mar 17, 2025

Nixpkgs version

  • Unstable (25.05)

Describe the bug

If you create a NixOS test and run it with driverInteractive, then the qemu window does not show up on macOS because it is guarded on DISPLAY being set:

display_available = any(x in os.environ for x in ["DISPLAY", "WAYLAND_DISPLAY"])
if not display_available:
display_opts += " -nographic"

Setting a bogus DISPLAY env var fixes this, but this check probably shouldn't happen at all on macOS.

Steps to reproduce

Run the simple example here on macOS using a Linux builder: https://nixos.org/manual/nixos/stable/index.html#sec-nixos-tests

Expected behaviour

The qemu window should show up

Screenshots

With DISPLAY set to very-real-i-promise:

Image

Relevant log output

Additional context

No response

System metadata

 - system: `"aarch64-darwin"`
 - host os: `Darwin 24.3.0, macOS 15.3.2`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.18.1`
 - nixpkgs: `/nix/store/z88hhaq46sdqzkm0zas1sn284h7w87k9-source`

Are you using nix-darwin?

Yes, I am using nix-darwin.

Notify maintainers


Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)

I assert that this issue is relevant for Nixpkgs

Is this issue important to you?

Add a 👍 reaction to issues you find important.

@mitchellh mitchellh added 0.kind: bug Something is broken 6.topic: darwin Running or building packages on Darwin labels Mar 17, 2025
@mweinelt
Copy link
Member

cc @tfc, @roberth due to involvement with #303597

@mweinelt mweinelt added the 6.topic: testing Tooling for automated testing of packages and modules label Mar 17, 2025
@tfc
Copy link
Contributor

tfc commented Mar 18, 2025

Oh, good point. Thank you for debugging this @mitchellh!

I will handle it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken 6.topic: darwin Running or building packages on Darwin 6.topic: testing Tooling for automated testing of packages and modules
Projects
None yet
3 participants