From 1c6d98533153bc8e0e36236e7fbcf1eb5e178d26 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 23 Oct 2020 11:31:56 +0200 Subject: installer: Use UUIDs in the 'swap-devices' field. Note: This change requires an updated 'guix' package that contains Linux-swap support in (gnu build file-systems). * gnu/installer/parted.scm (user-partitions->configuration): Use UUIDs in the 'swap-devices' field. * gnu/installer/newt/final.scm (run-final-page)[wait-for-clients]: New procedure. Use it. * gnu/installer/tests.scm (choose-partitioning): Wait for 'starting-final-step' message and move configuration file dialog handling to... (conclude-installation): ... here. Send over PORT the reply corresponding to 'starting-final-step'. * gnu/tests/install.scm (gui-test-program): When ENCRYPTED? is false, invoke 'swaplabel' in the marionette. (installation-target-os-for-gui-tests): When ENCRYPTED? is false, except a fixed UUID. --- gnu/tests/install.scm | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'gnu/tests') diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm index 86bd93966b..2d62a873ca 100644 --- a/gnu/tests/install.scm +++ b/gnu/tests/install.scm @@ -1211,6 +1211,16 @@ build (current-guix) and then store a couple of full system images.") #$marionette) (screenshot "installer-run.ppm") + (unless #$encrypted? + ;; At this point, user partitions are formatted and the installer is + ;; waiting for us to start the final step: generating the + ;; configuration file, etc. Set a fixed UUID on the swap partition + ;; that matches what 'installation-target-os-for-gui-tests' expects. + (marionette-eval* '(invoke #$(file-append util-linux "/sbin/swaplabel") + "-U" "11111111-2222-3333-4444-123456789abc" + "/dev/vda2") + #$marionette)) + (marionette-eval* '(conclude-installation installer-socket) #$marionette) @@ -1257,8 +1267,12 @@ build (current-guix) and then store a couple of full system images.") '("wheel" "audio" "video")))) %base-user-accounts)) ;; The installer does not create a swap device in guided mode with - ;; encryption support. - (swap-devices (if encrypted? '() '("/dev/vda2"))) + ;; encryption support. The installer produces a UUID for the partition; + ;; this "UUID" is explicitly set in 'gui-test-program' to the value shown + ;; below. + (swap-devices (if encrypted? + '() + (list (uuid "11111111-2222-3333-4444-123456789abc")))) (services (cons (service dhcp-client-service-type) (operating-system-user-services %minimal-os-on-vda))))) -- cgit v1.2.3