summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-13 17:24:11 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-13 17:35:57 +0200
commit647b0f5f5c0ae88e515d9415b1d0b0e4e13937b7 (patch)
tree9c44088ce2f77467cbf97756a66ab6813e1e77b5 /nixos
parent3e001244e4c53b6351ffe4f634fc545a05d626d7 (diff)
downloadnixlib-647b0f5f5c0ae88e515d9415b1d0b0e4e13937b7.tar
nixlib-647b0f5f5c0ae88e515d9415b1d0b0e4e13937b7.tar.gz
nixlib-647b0f5f5c0ae88e515d9415b1d0b0e4e13937b7.tar.bz2
nixlib-647b0f5f5c0ae88e515d9415b1d0b0e4e13937b7.tar.lz
nixlib-647b0f5f5c0ae88e515d9415b1d0b0e4e13937b7.tar.xz
nixlib-647b0f5f5c0ae88e515d9415b1d0b0e4e13937b7.tar.zst
nixlib-647b0f5f5c0ae88e515d9415b1d0b0e4e13937b7.zip
Update the installer tests for nixos-generate-config
Diffstat (limited to 'nixos')
-rw-r--r--nixos/tests/efi-installer.nix9
-rw-r--r--nixos/tests/installer.nix13
2 files changed, 7 insertions, 15 deletions
diff --git a/nixos/tests/efi-installer.nix b/nixos/tests/efi-installer.nix
index a9c5d7190306..f1a7d42f833c 100644
--- a/nixos/tests/efi-installer.nix
+++ b/nixos/tests/efi-installer.nix
@@ -37,13 +37,12 @@ let
   # The config to install
   config = builtins.toFile "configuration.nix" ''
     { pkgs, ... }: {
-      imports = [ ./hardware.nix <nixos/modules/testing/test-instrumentation.nix> ];
+      imports = [ ./hardware-configuration.nix <nixos/modules/testing/test-instrumentation.nix> ];
       boot.kernelPackages = pkgs.linuxPackages_3_10;
       boot.loader.grub.enable = false;
       boot.loader.efi.canTouchEfiVariables = true;
       boot.loader.gummiboot.enable = true;
       fonts.enableFontConfig = false;
-      fileSystems."/".label = "nixos";
     }
   '';
 
@@ -84,12 +83,10 @@ in {
 
       # Create the NixOS configuration.
       $machine->succeed(
-          "mkdir -p /mnt/etc/nixos",
-          "nixos-hardware-scan > /mnt/etc/nixos/hardware.nix",
+          "nixos-generate-config --root /mnt",
       );
 
-      my $cfg = $machine->succeed("cat /mnt/etc/nixos/hardware.nix");
-      print STDERR "Result of the hardware scan:\n$cfg\n";
+      $machine->succeed("cat /mnt/etc/nixos/hardware-configuration.nix >&2");
 
       $machine->copyFileFromHost(
           "${config}",
diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix
index 0ce780531712..6e06b544d258 100644
--- a/nixos/tests/installer.nix
+++ b/nixos/tests/installer.nix
@@ -38,7 +38,7 @@ let
       { config, pkgs, modulesPath, ... }:
 
       { imports =
-          [ ./hardware.nix
+          [ ./hardware-configuration.nix
             "''${modulesPath}/testing/test-instrumentation.nix"
           ];
 
@@ -48,10 +48,7 @@ let
         ''}
         boot.loader.grub.device = "${grubDevice}";
         boot.loader.grub.extraConfig = "serial; terminal_output.serial";
-        boot.initrd.kernelModules = [ "ext3" "ext4" "xfs" "virtio_console" ];
-
-        ${fileSystems}
-        swapDevices = [ { label = "swap"; } ];
+        boot.initrd.kernelModules = [ "virtio_console" ];
 
         environment.systemPackages = [ ${optionalString testChannel "pkgs.rlwrap"} ];
       }
@@ -143,12 +140,10 @@ let
 
       # Create the NixOS configuration.
       $machine->succeed(
-          "mkdir -p /mnt/etc/nixos",
-          "nixos-hardware-scan > /mnt/etc/nixos/hardware.nix",
+          "nixos-generate-config --root /mnt",
       );
 
-      my $cfg = $machine->succeed("cat /mnt/etc/nixos/hardware.nix");
-      print STDERR "Result of the hardware scan:\n$cfg\n";
+      $machine->succeed("cat /mnt/etc/nixos/hardware-configuration.nix >&2");
 
       $machine->copyFileFromHost(
           "${ config { inherit fileSystems testChannel grubVersion grubDevice; } }",