nixos/test-instrumentation: properly import options
for qemu
-check
If `qemu-vm.nix` is imported, the option `virtualisation.qemu.consoles` should be set to make sure that the machine's output isn't rendered on the graphical window of QEMU. This is needed when interactively running a NixOS test or in conjunction with `nixos-build-vms(8)`. The patch 257855753073987160c293fdedc9d95a33cbc0e8 tries to only do this if the option actually exists, however this condition used to be always false since `options` wasn't imported in the module and pointed to `lib.options` due to the `with lib;`-clause.
This commit is contained in:
parent
644ecea529
commit
2fbddb0ccb
@ -1,22 +1,13 @@
|
|||||||
# This module allows the test driver to connect to the virtual machine
|
# This module allows the test driver to connect to the virtual machine
|
||||||
# via a root shell attached to port 514.
|
# via a root shell attached to port 514.
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
{ options, config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
with import ../../lib/qemu-flags.nix { inherit pkgs; };
|
with import ../../lib/qemu-flags.nix { inherit pkgs; };
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
# This option is a dummy that if used in conjunction with
|
|
||||||
# modules/virtualisation/qemu-vm.nix gets merged with the same option defined
|
|
||||||
# there and only is declared here because some modules use
|
|
||||||
# test-instrumentation.nix but not qemu-vm.nix.
|
|
||||||
#
|
|
||||||
# One particular example are the boot tests where we want instrumentation
|
|
||||||
# within the images but not other stuff like setting up 9p filesystems.
|
|
||||||
options.virtualisation.qemu = { };
|
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
|
||||||
systemd.services.backdoor =
|
systemd.services.backdoor =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user