From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mathieu Othacehe Subject: Re: Plan for a release! Date: Fri, 20 Mar 2020 11:52:21 +0100 Message-ID: <87k13fjo2i.fsf@gmail.com> References: <87pne3d5t6.fsf@gnu.org> <87o8t1smpe.fsf@gnu.org> <87k13h7gg3.fsf@gnu.org> <87tv2ld04o.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:40764) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jFFGM-0007t8-SM for guix-devel@gnu.org; Fri, 20 Mar 2020 06:52:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jFFGL-0004WK-EA for guix-devel@gnu.org; Fri, 20 Mar 2020 06:52:26 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:46362) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jFFGL-0004VW-5j for guix-devel@gnu.org; Fri, 20 Mar 2020 06:52:25 -0400 Received: by mail-wr1-x433.google.com with SMTP id j17so3416690wru.13 for ; Fri, 20 Mar 2020 03:52:24 -0700 (PDT) Received: from meru ([2a01:cb18:832e:5f00:b0f7:cdca:88af:9474]) by smtp.gmail.com with ESMTPSA id f10sm7803450wrw.96.2020.03.20.03.52.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Mar 2020 03:52:22 -0700 (PDT) In-reply-to: <87tv2ld04o.fsf@gmail.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane-mx.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hey, >> Done, but it=E2=80=99d 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 --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: inline; filename=0001-tests-install-Abort-when-one-installation-step-fails.patch Content-Transfer-Encoding: quoted-printable >From 11193c030fa64cc3e2f6505062b7aa4fa9b2a2f4 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe 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 t= he 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 =C2=A9 2016, 2017, 2018, 2019, 2020 Ludovic Court=C3=A8s ;;; Copyright =C2=A9 2017, 2019 Tobias Geerinckx-Rice +;;; Copyright =C2=A9 2020 Mathieu Othacehe ;;; ;;; 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)) =20 + (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) =20 - (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-onli= ne" - (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-passphra= se) - #$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" statu= s. + (marionette-eval* + '(call-with-output-file "/tmp/installer-assume-online" + (const #t)) + #$marionette) + + ;; Run 'guix system init' with '--no-grafts', to cope with the l= ack + ;; 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)))) =20 (define %extra-packages ;; Packages needed when installing with an encrypted root. --=20 2.25.1 --=-=-=--