3
0
Fork 0
forked from mirrors/nixpkgs

nixos/tests/installer: Add a testcase for fat32 /boot

This commit is contained in:
William A. Kennington III 2015-07-08 12:05:31 -07:00
parent bd82a79fc1
commit e861889e99
3 changed files with 23 additions and 0 deletions

View file

@ -56,6 +56,7 @@ in rec {
(all nixos.tests.installer.lvm)
(all nixos.tests.installer.luksroot)
(all nixos.tests.installer.separateBoot)
(all nixos.tests.installer.separateBootFat)
(all nixos.tests.installer.simple)
(all nixos.tests.installer.simpleLabels)
(all nixos.tests.installer.simpleProvided)

View file

@ -229,6 +229,7 @@ in rec {
tests.installer.lvm = forAllSystems (system: hydraJob (import tests/installer.nix { inherit system; }).lvm.test);
tests.installer.luksroot = forAllSystems (system: hydraJob (import tests/installer.nix { inherit system; }).luksroot.test);
tests.installer.separateBoot = forAllSystems (system: hydraJob (import tests/installer.nix { inherit system; }).separateBoot.test);
tests.installer.separateBootFat = forAllSystems (system: hydraJob (import tests/installer.nix { inherit system; }).separateBootFat.test);
tests.installer.simple = forAllSystems (system: hydraJob (import tests/installer.nix { inherit system; }).simple.test);
tests.installer.simpleLabels = forAllSystems (system: hydraJob (import tests/installer.nix { inherit system; }).simpleLabels.test);
tests.installer.simpleProvided = forAllSystems (system: hydraJob (import tests/installer.nix { inherit system; }).simpleProvided.test);

View file

@ -254,6 +254,27 @@ in {
'';
};
# Same as the previous, but with fat32 /boot.
separateBootFat = makeInstallerTest "separateBootFat"
{ createPartitions =
''
$machine->succeed(
"parted /dev/vda mklabel msdos",
"parted /dev/vda -- mkpart primary ext2 1M 50MB", # /boot
"parted /dev/vda -- mkpart primary linux-swap 50MB 1024M",
"parted /dev/vda -- mkpart primary ext2 1024M -1s", # /
"udevadm settle",
"mkswap /dev/vda2 -L swap",
"swapon -L swap",
"mkfs.ext3 -L nixos /dev/vda3",
"mount LABEL=nixos /mnt",
"mkfs.vfat -n BOOT /dev/vda1",
"mkdir -p /mnt/boot",
"mount LABEL=BOOT /mnt/boot",
);
'';
};
# Create two physical LVM partitions combined into one volume group
# that contains the logical swap and root partitions.
lvm = makeInstallerTest "lvm"