about summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2016-12-15 21:00:21 +0100
committeraszlig <aszlig@redmoonstudios.org>2016-12-15 21:07:19 +0100
commit147142674992c29025b50f9818d7ac104e0de223 (patch)
treee3ab71af9e52dcfd1d24e5967bfe3b12757ba4f9 /nixos/modules
parent4714ca8b565b62856b8d34312c511178d2cf78d4 (diff)
downloadnixlib-147142674992c29025b50f9818d7ac104e0de223.tar
nixlib-147142674992c29025b50f9818d7ac104e0de223.tar.gz
nixlib-147142674992c29025b50f9818d7ac104e0de223.tar.bz2
nixlib-147142674992c29025b50f9818d7ac104e0de223.tar.lz
nixlib-147142674992c29025b50f9818d7ac104e0de223.tar.xz
nixlib-147142674992c29025b50f9818d7ac104e0de223.tar.zst
nixlib-147142674992c29025b50f9818d7ac104e0de223.zip
nixos/test-instrumentation: Fix eval of boot tests
The boot tests import test-instrumentation.nix directly to create a VM
image that only contains things such as the backdoor and serial console
the same way as used by other NixOS VM tests.

With one difference though: It doesn't need nor want to have 9p
filesystems mounted, because we actually want to test an image rather
than re-using most stuff from the host's store.

Change tested against the boot.uefiUsb and ipv6 tests, just that it
becomes clear we don't break either the tests with 9p nor the boot
tests (which were already broken but now succeed).

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/testing/test-instrumentation.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/nixos/modules/testing/test-instrumentation.nix b/nixos/modules/testing/test-instrumentation.nix
index 373bf7665240..206df50a4207 100644
--- a/nixos/modules/testing/test-instrumentation.nix
+++ b/nixos/modules/testing/test-instrumentation.nix
@@ -9,6 +9,15 @@ let kernel = config.boot.kernelPackages.kernel; in
 
 {
 
+  # 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.program = mkOption { type = types.path; };
+
   config = {
 
     systemd.services.backdoor =