From c400ab55d692d862a938b0c9d02fdc1cd402c6ff Mon Sep 17 00:00:00 2001 From: Venkateswara Rao Mandela Date: Thu, 7 Mar 2019 15:00:11 +0530 Subject: [PATCH] nixos/tests: installer: restructure simple test data --- nixos/tests/installer.nix | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix index 07659b60b3b..2db9d283f2b 100644 --- a/nixos/tests/installer.nix +++ b/nixos/tests/installer.nix @@ -304,6 +304,22 @@ let ''; }; + # The (almost) simplest partitioning scheme: a swap partition and + # one big filesystem partition. + simple-test-config = { createPartitions = + '' + $machine->succeed( + "flock /dev/vda parted --script /dev/vda -- mklabel msdos" + . " mkpart primary linux-swap 1M 1024M" + . " mkpart primary ext2 1024M -1s", + "udevadm settle", + "mkswap /dev/vda1 -L swap", + "swapon -L swap", + "mkfs.ext3 -L nixos /dev/vda2", + "mount LABEL=nixos /mnt", + ); + ''; + }; in { @@ -312,21 +328,7 @@ in { # The (almost) simplest partitioning scheme: a swap partition and # one big filesystem partition. - simple = makeInstallerTest "simple" - { createPartitions = - '' - $machine->succeed( - "flock /dev/vda parted --script /dev/vda -- mklabel msdos" - . " mkpart primary linux-swap 1M 1024M" - . " mkpart primary ext2 1024M -1s", - "udevadm settle", - "mkswap /dev/vda1 -L swap", - "swapon -L swap", - "mkfs.ext3 -L nixos /dev/vda2", - "mount LABEL=nixos /mnt", - ); - ''; - }; + simple = makeInstallerTest "simple" simple-test-config; # Simple GPT/UEFI configuration using systemd-boot with 3 partitions: ESP, swap & root filesystem simpleUefiSystemdBoot = makeInstallerTest "simpleUefiSystemdBoot"