diff mbox series

[bug#73927,14/16] installer: Add "Kernel" page to select the Hurd.

Message ID 87ldygcild.fsf@gnu.org
State New
Headers show
Series None | expand

Commit Message

Janneke Nieuwenhuizen Oct. 22, 2024, 2:34 p.m. UTC
Hi,

>> The installer patches look OK to me, I will try to test them
>> on real hardware soon.

Just a heads-up: While I'm pretty sure that the the config.scm is OK (if
you don't select any options, use static networking and fill in your IP
and gateway), I haven't had any luck yet installing it.

The guile-fibers for the hurd does currently (?) not cross-build from
32 bit, i.e.

   guix build guile-fibers --target=i586-pc-gnu --system=i686-linux

fails, and I had no luck with a 64bit machine, getting i/o errors while
running guix init.  No idea which device fails on me there.

> Ah, right; that fails.  I'll look into it, thanks for the pointer.
> Where are the .ppm files saved/how do I get at them?

Hmm, I could use some help here.  I tried the almost trivial patch
attached, but that fails and it's not clear to my why.  Possibly I don't
understand the code because it seems to me that the screenshot names
go out of sync after the locale page.  Also, the roundtrip time to test
something out is pretty bad...

Greetings,
Janneke

Comments

Mathieu Othacehe Oct. 22, 2024, 6:06 p.m. UTC | #1
Hey,

> Hmm, I could use some help here.  I tried the almost trivial patch
> attached, but that fails and it's not clear to my why.  Possibly I don't
> understand the code because it seems to me that the screenshot names
> go out of sync after the locale page.  Also, the roundtrip time to test
> something out is pretty bad...

The ppm stuff is just about keeping screenshots around to debug any test
failures. According to the log that you sent, I would say that the issue
is a mismatch between the installation step that is expected by the
marionette and the actual installation step:

--8<---------------cut here---------------start------------->8---
      pattern: ((quote input) ((quote title) "System administrator password") ((quote text) _) ((quote default) _)).
      sexp: (list-selection (title "Kernel") (multiple-choices? #f) (items ("Hurd" "Linux Libre"))).
--8<---------------cut here---------------end--------------->8---

The system administrator password page is expected but the kernel
selection page is sent.

It seems that you have chosen to display the Kernel selection page
between the host-name page and the network selection page. I guess that
by moving the Kernel step here:

--8<---------------cut here---------------start------------->8---
         ;; Prompt for users (name, group and home directory).
         (installer-step
          (id 'user)
          (description (G_ "User creation"))
          (compute (lambda _
                     ((installer-user-page current-installer))))
          (configuration-formatter users->configuration))

-> Kernel step

         ;; Ask the user to choose one or many desktop environment(s).
         (installer-step
          (id 'services)
          (description (G_ "Services"))
          (compute (lambda _
                     ((installer-services-page current-installer))))
          (configuration-formatter system-services->configuration))
--8<---------------cut here---------------end--------------->8---

the test would match with the actual installation step.

Hope that will help,

Thanks,

Mathieu
diff mbox series

Patch

From 22d12407d3b291318b76ac167d22104cc2852a85 Mon Sep 17 00:00:00 2001
Message-ID: <22d12407d3b291318b76ac167d22104cc2852a85.1729607385.git.janneke@gnu.org>
From: Janneke Nieuwenhuizen <janneke@gnu.org>
Date: Tue, 22 Oct 2024 11:00:59 +0200
Subject: [PATCH] squash! installer: Add "Kernel" page to select the Hurd.

* gnu/installer/tests.scm (choose-kernel): New procedure.
* gnu/tests/install.scm (gui-test-program): Use it.
---
 gnu/installer/tests.scm | 11 +++++++++++
 gnu/tests/install.scm   |  5 ++++-
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/gnu/installer/tests.scm b/gnu/installer/tests.scm
index 8785cd9a9f..a9a5d5d988 100644
--- a/gnu/installer/tests.scm
+++ b/gnu/installer/tests.scm
@@ -1,6 +1,7 @@ 
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2020 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -35,6 +36,7 @@  (define-module (gnu installer tests)
 
             choose-locale+keyboard
             enter-host-name+passwords
+            choose-kernel
             choose-services
             choose-partitioning
             start-installation
@@ -211,6 +213,15 @@  (define* (enter-host-name+passwords port
                       (password ,password)))
              names passwords))))))
 
+(define* (choose-kernel port #:key (kernel "Linux Libre"))
+  "Converse over PORT with the guided installer to choose the specified
+KERNEL."
+  (converse port
+    ((list-selection (title "Kernel")
+                     (multiple-choices? #f)
+                     (items _))
+     kernel)))
+
 (define* (choose-services port
                           #:key
                           (choose-desktop-environment? (const #f))
diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm
index 36dbd9111f..6be582373d 100644
--- a/gnu/tests/install.scm
+++ b/gnu/tests/install.scm
@@ -3,7 +3,7 @@ 
 ;;; Copyright © 2017, 2019, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;; Copyright © 2020 Danny Milosavljevic <dannym@scratchpost.org>
-;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2020, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2020, 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -1869,6 +1869,9 @@  (define* (gui-test-program marionette
                         #$marionette)
       (screenshot "installer-services.ppm")
 
+      (marionette-eval* '(choose-kernel installer-socket) #$marionette)
+      (screenshot "installer-kernel.ppm")
+
       (marionette-eval* '(choose-services installer-socket
                                           #:choose-desktop-environment?
                                           (const #$desktop?)

base-commit: 80f8ef0a01f2cf39deebfecc344e5f04d87d4bd4
-- 
2.46.0