Add pkgs.nixosTest

This commit is contained in:
Robert Hensing 2018-09-27 17:03:23 +02:00
parent 9871fe3564
commit cdca66d7e8
3 changed files with 72 additions and 4 deletions

View file

@ -1,4 +1,13 @@
{ system, pkgs, minimal ? false, config ? {} }:
{ system
, # Use a minimal kernel?
minimal ? false
, # Ignored
config ? null
# Nixpkgs, for qemu, lib and more
, pkgs
, # NixOS configuration to add to the VMs
extraConfigurations ? []
}:
with pkgs.lib;
with import ../lib/qemu-flags.nix { inherit pkgs; };
@ -28,7 +37,8 @@ rec {
../modules/testing/test-instrumentation.nix # !!! should only get added for automated test runs
{ key = "no-manual"; documentation.nixos.enable = false; }
{ key = "qemu"; system.build.qemu = qemu; }
] ++ optional minimal ../modules/testing/minimal-kernel.nix;
] ++ optional minimal ../modules/testing/minimal-kernel.nix
++ extraConfigurations;
extraArgs = { inherit nodes; };
};

View file

@ -1,6 +1,13 @@
{ system, pkgs, minimal ? false, config ? {} }:
{ system
, pkgs
# Use a minimal kernel?
, minimal ? false
# Ignored
, config ? null
# Modules to add to each VM
, extraConfigurations ? [] }:
with import ./build-vms.nix { inherit system pkgs minimal config; };
with import ./build-vms.nix { inherit system pkgs minimal extraConfigurations; };
with pkgs;
let