From: Mathieu Othacehe <m.othacehe@gmail.com>
To: guix-devel@gnu.org
Subject: Re: Plan for a release!
Date: Fri, 20 Mar 2020 11:52:21 +0100 [thread overview]
Message-ID: <87k13fjo2i.fsf@gmail.com> (raw)
In-Reply-To: <87tv2ld04o.fsf@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 582 bytes --]
Hey,
>> Done, but it’d be nice to add more test of the installer!
>
> I can help on that. Maybe adding:
>
> * More partitioning patterns
> * More DE & services
Turns out, when selecting GNOME in choose-services call of (gnu tests
install), it triggers downloads during "guix system init ..." call.
I guess it's normal because the installer image does not contain those
packages. However, as there's no connection, it fails.
Not sure, we can go further?
In the meantime, here's a patch that helps dealing with installation
failures.
Thanks,
Mathieu
[-- Attachment #2: 0001-tests-install-Abort-when-one-installation-step-fails.patch --]
[-- Type: text/x-diff, Size: 7730 bytes --]
From 11193c030fa64cc3e2f6505062b7aa4fa9b2a2f4 Mon Sep 17 00:00:00 2001
From: Mathieu Othacehe <m.othacehe@gmail.com>
Date: Fri, 20 Mar 2020 11:36:33 +0100
Subject: [PATCH] tests: install: Abort when one installation step fails.
When marionette-eval calls fail in gui-test-program, the installation
continues which results in two scenarios:
- hang forever at the next marionette-eval call,
- keep going and start a broken installation, which is annoying because it
clears the terminal and hides the error.
Make sure that gui-test-program is exited with #f return code when one of the
marionette-eval calls fail.
* gnu/tests/install.scm (gui-test-program): Add a new macro
"marionette-eval*". Use it to abort to prompt 'gui-test and return #f when one
on the marionette-eval calls fail.
---
gnu/tests/install.scm | 139 ++++++++++++++++++++++++------------------
1 file changed, 78 insertions(+), 61 deletions(-)
diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm
index 4f650ffb34..4453b15e89 100644
--- a/gnu/tests/install.scm
+++ b/gnu/tests/install.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -946,70 +947,86 @@ build (current-guix) and then store a couple of full system images.")
(marionette-control (string-append "screendump " file)
#$marionette))
+ (define-syntax-rule (marionette-eval* exp marionette)
+ (unless (marionette-eval exp marionette)
+ (abort-to-prompt 'gui-test)))
+
(setvbuf (current-output-port) 'none)
(setvbuf (current-error-port) 'none)
- (marionette-eval '(use-modules (gnu installer tests))
- #$marionette)
-
- ;; Arrange so that 'converse' prints debugging output to the console.
- (marionette-eval '(let ((console (open-output-file "/dev/console")))
- (setvbuf console 'none)
- (conversation-log-port console))
- #$marionette)
-
- ;; Tell the installer to not wait for the Connman "online" status.
- (marionette-eval '(call-with-output-file "/tmp/installer-assume-online"
- (const #t))
- #$marionette)
-
- ;; Run 'guix system init' with '--no-grafts', to cope with the lack of
- ;; network access.
- (marionette-eval '(call-with-output-file
- "/tmp/installer-system-init-options"
- (lambda (port)
- (write '("--no-grafts" "--no-substitutes")
- port)))
- #$marionette)
-
- (marionette-eval '(define installer-socket
- (open-installer-socket))
- #$marionette)
- (screenshot "installer-start.ppm")
-
- (marionette-eval '(choose-locale+keyboard installer-socket)
- #$marionette)
- (screenshot "installer-locale.ppm")
-
- ;; Choose the host name that the "basic" test expects.
- (marionette-eval '(enter-host-name+passwords installer-socket
- #:host-name "liberigilo"
- #:root-password
- #$%root-password
- #:users
- '(("alice" "pass1")
- ("bob" "pass2")))
- #$marionette)
- (screenshot "installer-services.ppm")
-
- (marionette-eval '(choose-services installer-socket
- #:desktop-environments '()
- #:choose-network-service?
- (const #f))
- #$marionette)
- (screenshot "installer-partitioning.ppm")
-
- (marionette-eval '(choose-partitioning installer-socket
- #:encrypted? #$encrypted?
- #:passphrase #$%luks-passphrase)
- #$marionette)
- (screenshot "installer-run.ppm")
-
- (marionette-eval '(conclude-installation installer-socket)
- #$marionette)
-
- (sync)
- #t))
+ (call-with-prompt 'gui-test
+ (lambda ()
+ (marionette-eval* '(use-modules (gnu installer tests))
+ #$marionette)
+
+ ;; Arrange so that 'converse' prints debugging output to the
+ ;; console.
+ (marionette-eval*
+ '(let ((console (open-output-file "/dev/console")))
+ (setvbuf console 'none)
+ (conversation-log-port console))
+ #$marionette)
+
+ ;; Tell the installer to not wait for the Connman "online" status.
+ (marionette-eval*
+ '(call-with-output-file "/tmp/installer-assume-online"
+ (const #t))
+ #$marionette)
+
+ ;; Run 'guix system init' with '--no-grafts', to cope with the lack
+ ;; of network access.
+ (marionette-eval*
+ '(call-with-output-file
+ "/tmp/installer-system-init-options"
+ (lambda (port)
+ (write '("--no-grafts" "--no-substitutes")
+ port)))
+ #$marionette)
+
+ (marionette-eval* '(define installer-socket
+ (open-installer-socket))
+ #$marionette)
+ (screenshot "installer-start.ppm")
+
+ (marionette-eval* '(choose-locale+keyboard installer-socket)
+ #$marionette)
+ (screenshot "installer-locale.ppm")
+
+ ;; Choose the host name that the "basic" test expects.
+ (marionette-eval*
+ '(enter-host-name+passwords installer-socket
+ #:host-name "liberigilo"
+ #:root-password
+ #$%root-password
+ #:users
+ '(("alice" "pass1")
+ ("bob" "pass2")))
+ #$marionette)
+ (screenshot "installer-services.ppm")
+
+ (marionette-eval*
+ '(choose-services installer-socket
+ #:desktop-environments
+ '("GNOME")
+ #:choose-network-service?
+ (const #f))
+ #$marionette)
+ (screenshot "installer-partitioning.ppm")
+
+ (marionette-eval*
+ '(choose-partitioning installer-socket
+ #:encrypted? #$encrypted?
+ #:passphrase #$%luks-passphrase)
+ #$marionette)
+ (screenshot "installer-run.ppm")
+
+ (marionette-eval* '(conclude-installation installer-socket)
+ #$marionette)
+
+ (sync)
+ #t)
+ (lambda _
+ #f))))
(define %extra-packages
;; Packages needed when installing with an encrypted root.
--
2.25.1
next prev parent reply other threads:[~2020-03-20 10:52 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-24 21:38 Plan for a release! Ludovic Courtès
2020-02-24 22:55 ` Vincent Legoll
2020-02-25 14:00 ` Jonathan Brielmaier
2020-02-25 15:15 ` Vincent Legoll
2020-02-24 23:35 ` zimoun
2020-02-25 15:47 ` Joshua Branson
2020-03-05 4:54 ` jbranso
2020-03-08 12:04 ` pelzflorian (Florian Pelz)
2020-03-08 21:03 ` kmscon not working on MacBook Ludovic Courtès
2020-03-09 7:43 ` pelzflorian (Florian Pelz)
2020-03-09 9:48 ` Vincent Legoll
2020-03-09 16:45 ` Ludovic Courtès
2020-03-11 7:14 ` pelzflorian (Florian Pelz)
2020-03-11 7:25 ` pelzflorian (Florian Pelz)
2020-03-20 8:48 ` pelzflorian (Florian Pelz)
2020-03-20 8:51 ` pelzflorian (Florian Pelz)
2020-03-25 23:00 ` pelzflorian (Florian Pelz)
2020-03-26 2:26 ` Bengt Richter
2020-03-26 16:53 ` pelzflorian (Florian Pelz)
2020-03-29 10:26 ` pelzflorian (Florian Pelz)
2020-03-08 12:35 ` Gnome takes more than 5 minutes to start Ricardo Wurmus
2020-03-08 21:04 ` Btrfs/udev issue Ludovic Courtès
2020-03-05 13:42 ` Plan for a release! jbranso
2020-03-05 16:45 ` sirgazil
2020-03-06 16:32 ` Joshua Branson
2020-03-05 21:09 ` Jan
2020-03-06 16:33 ` Joshua Branson
2020-03-06 16:51 ` Thunar cannot launch gio-launch-desktop Ricardo Wurmus
2020-03-06 17:57 ` Jan
2020-03-06 21:51 ` Ricardo Wurmus
2020-03-06 23:59 ` Jan
2020-03-07 23:41 ` Jan
2020-03-08 9:08 ` Ricardo Wurmus
2020-03-08 22:05 ` Jan
2020-03-08 23:41 ` Jan
2020-03-09 22:41 ` Jan
2020-03-06 6:44 ` Plan for a release! pelzflorian (Florian Pelz)
2020-03-06 9:58 ` John Soo
2020-03-08 12:33 ` Ricardo Wurmus
2020-03-08 21:10 ` Ludovic Courtès
2020-03-12 13:54 ` Ludovic Courtès
2020-03-18 16:53 ` Ludovic Courtès
2020-03-18 17:31 ` Ricardo Wurmus
2020-03-18 17:49 ` Mathieu Othacehe
2020-03-20 10:52 ` Mathieu Othacehe [this message]
2020-03-20 13:13 ` Gábor Boskovits
2020-03-20 13:58 ` Mathieu Othacehe
2020-03-21 15:46 ` Ludovic Courtès
2020-03-23 14:05 ` Mathieu Othacehe
2020-03-26 11:55 ` Ludovic Courtès
2020-03-26 12:37 ` Vincent Legoll
2020-03-26 14:24 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k13fjo2i.fsf@gmail.com \
--to=m.othacehe@gmail.com \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.