diff options
author | Mathieu Othacehe <othacehe@gnu.org> | 2021-04-27 17:30:28 +0200 |
---|---|---|
committer | Mathieu Othacehe <othacehe@gnu.org> | 2021-04-28 15:51:12 +0200 |
commit | 95b3fc12bce680e8e1dafffc62c7b1754352de7e (patch) | |
tree | e1187f4d92cd51f3c8aec1a7cb41d815089c2be3 /gnu/installer | |
parent | af7a615c5bbadcd1799d10b386fcc965078c2360 (diff) | |
download | guix-95b3fc12bce680e8e1dafffc62c7b1754352de7e.tar guix-95b3fc12bce680e8e1dafffc62c7b1754352de7e.tar.gz |
tests: Add gui-uefi-installed-os test.
* gnu/installer/tests.scm (conclude-installation): Rename it into ...
(start-installation): ... this new procedure.
(complete-installation): New procedure.
(choose-partitioning): Add an uefi-support? argument.
* gnu/tests/install.scm (uefi-firmware): New procedure.
(run-install, qemu-command/writable-image, gui-test-program,
installation-target-os-for-gui-tests): Add an uefi-support? argument.
(%extra-packages): Add grub-efi, fatfsck/static and dosfstools.
(%test-gui-installed-os): New variable.
Diffstat (limited to 'gnu/installer')
-rw-r--r-- | gnu/installer/tests.scm | 37 |
1 files changed, 29 insertions, 8 deletions
diff --git a/gnu/installer/tests.scm b/gnu/installer/tests.scm index f318546a2f..8ccd327a7c 100644 --- a/gnu/installer/tests.scm +++ b/gnu/installer/tests.scm @@ -37,7 +37,8 @@ enter-host-name+passwords choose-services choose-partitioning - conclude-installation + start-installation + complete-installation edit-configuration-file)) @@ -281,14 +282,19 @@ instrumented for further testing." (define* (choose-partitioning port #:key (encrypted? #t) + (uefi-support? #f) (passphrase "thepassphrase") (edit-configuration-file edit-configuration-file)) "Converse over PORT to choose the partitioning method. When ENCRYPTED? is true, choose full-disk encryption with PASSPHRASE as the LUKS passphrase. + +When UEFI-SUPPORT? is true, assume that we are running the installation tests +on an UEFI capable machine. + This conversation stops when the user partitions have been formatted, right before the installer generates the configuration file and shows it in a dialog -box." +box. " (converse port ((list-selection (title "Partitioning method") (multiple-choices? #f) @@ -306,11 +312,15 @@ box." disks)) ;; The "Partition table" dialog pops up only if there's not already a - ;; partition table. + ;; partition table and if the system does not support UEFI. ((list-selection (title "Partition table") (multiple-choices? #f) (items _)) + ;; When UEFI is supported, the partition is forced to GPT by the + ;; installer. + (not uefi-support?) "gpt") + ((list-selection (title "Partition scheme") (multiple-choices? #f) (items (,one-partition _ ...))) @@ -338,10 +348,10 @@ box." ;; UUIDs before it generates the configuration file. (values)))) -(define (conclude-installation port) - "Conclude the installation by checking over PORT that we get the generated +(define (start-installation port) + "Start the installation by checking over PORT that we get the generated configuration file, accepting it and starting the installation, and then -receiving the final messages once the 'guix system init' process has +receiving the pause message once the 'guix system init' process has completed." ;; Assume the previous message received was 'starting-final-step'; here we ;; send the reply to that message, which lets the installer continue. @@ -355,8 +365,19 @@ completed." (file ,configuration-file)) (edit-configuration-file configuration-file)) ((pause) ;"Press Enter to continue." - #t) - ((installation-complete) ;congratulations! + (values)))) + +(define (complete-installation port) + "Complete the installation by replying to the installer pause message and +waiting for the installation-complete message." + ;; Assume the previous message received was 'pause'; here we send the reply + ;; to that message, which lets the installer continue. + (write #t port) + (newline port) + (force-output port) + + (converse port + ((installation-complete) (values)))) ;;; Local Variables: |