Author: eelco
Date: Wed Apr 18 16:08:25 2012
New Revision: 33832
URL: https://nixos.org/websvn/nix/?rev=33832&sc=1
Log:
* Fix the GRUB 1 installer test. Note that GRUB 1 doesn't
automatically detect /dev/vd* devices, so users have to fix
/boot/grub/device.map manually.
Modified:
nixos/trunk/tests/installer.nix
Modified: nixos/trunk/tests/installer.nix
==============================================================================
--- nixos/trunk/tests/installer.nix Wed Apr 18 15:01:42 2012 (r33831)
+++ nixos/trunk/tests/installer.nix Wed Apr 18 16:08:25 2012 (r33832)
@@ -152,11 +152,15 @@
"${ config { inherit fileSystems testChannel grubVersion; } }",
"/mnt/etc/nixos/configuration.nix");
+ # Hack to get GRUB 1 to install on virtio. GRUB 1 has a patch
+ # from Gentoo to support virtio, but it's incomplete: it doesn't
+ # detect /dev/vd* automatically. And we don't care enough about
+ # GRUB 1 to fix it.
+ $machine->mustSucceed("mkdir -p /mnt/boot/grub; echo '(hd0) /dev/vda' >
/mnt/boot/grub/device.map");
+
# Perform the installation.
$machine->mustSucceed("nixos-install >&2");
- $machine->mustSucceed("cat /mnt/boot/grub/grub.cfg >&2");
-
$machine->shutdown;
# Now see if we can boot the installation.
@@ -165,20 +169,18 @@
# Did /boot get mounted, if appropriate?
# !!! There is currently no good way to wait for the
# `filesystems' task to finish.
- $machine->waitForFile("/boot/grub/grub.cfg");
+ $machine->waitForFile("/boot/grub");
# Did the swap device get activated?
# !!! Idem.
$machine->waitUntilSucceeds("cat /proc/swaps | grep -q /dev");
- $machine->mustSucceed("nix-env -i coreutils >&2");
+ $machine->mustSucceed("nix-env -f /etc/nixos/nixpkgs -i coreutils >&2");
$machine->mustSucceed("type -tP ls | tee /dev/stderr") =~ /.nix-profile/
or die "nix-env failed";
$machine->mustSucceed("nixos-rebuild switch >&2");
- $machine->mustSucceed("cat /boot/grub/grub.cfg >&2");
-
$machine->shutdown;
# And just to be sure, check that the machine still boots after
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits