diff options
author | William A. Kennington III <william@wkennington.com> | 2014-05-01 06:21:30 -0500 |
---|---|---|
committer | William A. Kennington III <william@wkennington.com> | 2014-08-28 13:35:35 -0700 |
commit | 809caa87ab88fae9164347c3f1a63f6117c09821 (patch) | |
tree | 431a66e0879cccb3167ffd92686324de76e67dc1 /nixos/tests | |
parent | 8329d12b799b98a2b220e34ed347417c2d5b8fbe (diff) |
tests/installer: Add btrfs tests for grub and nixos-generate-config
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/installer.nix | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix index 621afffbfc1f9..89abafcab83a4 100644 --- a/nixos/tests/installer.nix +++ b/nixos/tests/installer.nix @@ -394,4 +394,49 @@ in { $machine->shutdown; ''; }; + + # Simple btrfs grub testing + btrfsSimple = makeInstallerTest { + 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", + "mount LABEL=root /mnt", + ); + ''; + }; + + # Test to see if we can detect /boot and /nix on subvolumes + btrfsSubvols = makeInstallerTest { + 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", + "btrfs device scan", + "mount LABEL=root /mnt", + "btrfs subvol create /mnt/boot", + "btrfs subvol create /mnt/nixos", + "umount /mnt", + "mount -o defaults,subvol=mnt LABEL=root /mnt", + "mkdir /mnt/boot", + "mount -o defaults,subvol=boot LABEL=root /mnt/boot", + ); + ''; + }; + + # Test to see if we can detect subvols by their id's + btrfsSubvolId = makeInstallerTest { + createPartitions = '' + $machine->succeed("false"); + ''; + }; + + # Test to see if we can detect a default subvolume on / + btrfsDefaultSubvol = makeInstallerTest { + createPartitions = '' + $machine->succeed("false"); + ''; + }; } |