Unverified Commit fac539a6 authored by Robert Hensing's avatar Robert Hensing Committed by GitHub
Browse files

NixOS Test Driver: Open Qemu with graphical output in driver interactive mode...

NixOS Test Driver: Open Qemu with graphical output in driver interactive mode also on macOS (#391589)
parents e2190468 482beabb
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
import base64
import io
import os
import platform
import queue
import re
import select
@@ -199,7 +200,13 @@ class StartCommand:
        allow_reboot: bool = False,
    ) -> str:
        display_opts = ""

        display_available = any(x in os.environ for x in ["DISPLAY", "WAYLAND_DISPLAY"])
        if platform.system() == "Darwin":
            # We have no DISPLAY variables on macOS and seemingly no better way
            # to find out
            display_available = "TERM_PROGRAM" in os.environ

        if not display_available:
            display_opts += " -nographic"