summaryrefslogtreecommitdiff
path: root/gnu/installer/tests.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/installer/tests.scm')
-rw-r--r--gnu/installer/tests.scm48
1 files changed, 37 insertions, 11 deletions
diff --git a/gnu/installer/tests.scm b/gnu/installer/tests.scm
index f318546a2f..12d1d91608 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))
@@ -219,8 +220,9 @@ ROOT-PASSWORD, and USERS."
(string-contains service "NSS"))))
(choose-network-management-tool?
(lambda (service)
- (string-contains service "DHCP"))))
- "Converse over PORT to choose networking services."
+ (string-contains service "DHCP")))
+ (choose-other-service? (const #f)))
+ "Converse over PORT to choose services."
(define desktop-environments '())
(converse port
@@ -239,7 +241,11 @@ ROOT-PASSWORD, and USERS."
(multiple-choices? #f)
(items ,services))
(null? desktop-environments)
- (find choose-network-management-tool? services))))
+ (find choose-network-management-tool? services))
+
+ ((checkbox-list (title "Other services") (text _)
+ (items ,services))
+ (filter choose-other-service? services))))
(define (edit-configuration-file file)
"Edit FILE, an operating system configuration file generated by the
@@ -281,14 +287,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 +317,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 +353,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 +370,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: