nixos/testing: Fix graphical tty output

Prior to this commit, the graphical output of an application
running during the boot process was only redirected to the serial
console. Therefore, testing those applications inside the driver (eg.
using `enableOCR = true` was not possible by default.

Limiting the consoles to only the `qemuSerialDevice` has originally been
introduced with fb9f5e4a03 to fix journal
output after the activation of both consoles have been introduced with
d4468bedb5.

However limiting the consoles to only `qemuSerialDevice`this is no longer
necessary since 6aba98aefd makes sure the
journal is always forwarded to the serial console used by the testing
driver.

This is a follow-up on https://github.com/NixOS/nixpkgs/pull/339730
This commit is contained in:
Frédéric Christ 2025-03-07 10:09:23 +01:00
parent 92d11f06d5
commit 459ddaec26

View file

@ -153,13 +153,10 @@ in
# be set.
virtualisation = lib.optionalAttrs (options ? virtualisation.qemu) {
qemu = {
# Only use a serial console, no TTY.
# NOTE: optionalAttrs
# test-instrumentation.nix appears to be used without qemu-vm.nix, so
# we avoid defining consoles if not possible.
# we avoid defining attributes if not possible.
# TODO: refactor such that test-instrumentation can import qemu-vm
# or declare virtualisation.qemu.console option in a module that's always imported
consoles = [ qemu-common.qemuSerialDevice ];
package = lib.mkDefault pkgs.qemu_test;
};
};