tests/installer: Add swap to the new tests

This commit is contained in:
William A. Kennington III 2014-05-02 00:01:32 -05:00
parent 8b36bf5c59
commit 8ff4b3b780

View File

@ -401,7 +401,9 @@ in {
createPartitions = ''
$machine->succeed(
"sgdisk -Z /dev/vda",
"sgdisk -n 1:0:+1M -N 2 -t 1:ef02 -t 2:8300 -c 2:root /dev/vda",
"sgdisk -n 1:0:+1M -n 2:0:+100M -N 3 -t 1:ef02 -t 2:8200 -t 3:8300 -c 3:root /dev/vda",
"mkswap /dev/vda2 -L swap",
"swapon -L swap",
"mkfs.ext4 -L root /dev/vda2",
"mount LABEL=root /mnt",
);
@ -414,9 +416,11 @@ in {
createPartitions = ''
$machine->succeed(
"sgdisk -Z /dev/vda",
"sgdisk -n 1:0:+1M -n 2:0:+100M -N 3 -t 1:ef02 -t 2:8300 -t 3:8300 -c 2:boot -c 3:root /dev/vda",
"sgdisk -n 1:0:+1M -n 2:0:+100M -n 3:0:+100M -N 4 -t 1:ef02 -t 2:8300 -t 3:8200 -t 4:8300 -c 2:boot -c 4:root /dev/vda",
"mkswap /dev/vda3 -L swap",
"swapon -L swap",
"mkfs.ext4 -L boot /dev/vda2",
"mkfs.ext4 -L root /dev/vda3",
"mkfs.ext4 -L root /dev/vda4",
"mount LABEL=root /mnt",
"mkdir /mnt/boot",
"$(blkid -o export /dev/vda2); mount /dev/disk/by-uuid/\\$UUID /mnt/boot"
@ -430,8 +434,10 @@ in {
createPartitions = ''
$machine->succeed(
"sgdisk -Z /dev/vda",
"sgdisk -n 1:0:+1M -N 2 -t 1:ef02 -t 2:8300 -c 2:root /dev/vda",
"mkfs.btrfs -L root /dev/vda2",
"sgdisk -n 1:0:+1M -n 2:0:+100M -N 3 -t 1:ef02 -t 2:8200 -t 3:8300 -c 3:root /dev/vda",
"mkswap /dev/vda2 -L swap",
"swapon -L swap",
"mkfs.btrfs -L root /dev/vda3",
"mount LABEL=root /mnt",
);
'';
@ -442,8 +448,10 @@ in {
createPartitions = ''
$machine->succeed(
"sgdisk -Z /dev/vda",
"sgdisk -n 1:0:+1M -N 2 -t 1:ef02 -t 2:8300 -c 2:root /dev/vda",
"mkfs.btrfs -L root /dev/vda2",
"sgdisk -n 1:0:+1M -n 2:0:+100M -N 3 -t 1:ef02 -t 2:8200 -t 3:8300 -c 3:root /dev/vda",
"mkswap /dev/vda2 -L swap",
"swapon -L swap",
"mkfs.btrfs -L root /dev/vda3",
"btrfs device scan",
"mount LABEL=root /mnt",
"btrfs subvol create /mnt/boot",