[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#39729] [PATCH 4/7] installer: Bypass connectivity check when /tmp/i
From: |
Ludovic Courtès |
Subject: |
[bug#39729] [PATCH 4/7] installer: Bypass connectivity check when /tmp/installer-assume-online exists. |
Date: |
Sat, 22 Feb 2020 00:20:27 +0100 |
This is useful for automated tests.
* gnu/installer/newt/network.scm (wait-service-online)[online?]: New
procedure. Check for /tmp/installer-assume-online.
Use it instead of 'connman-online?'.
---
gnu/installer/newt/network.scm | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/gnu/installer/newt/network.scm b/gnu/installer/newt/network.scm
index 40d85817b6..461d5d99c0 100644
--- a/gnu/installer/newt/network.scm
+++ b/gnu/installer/newt/network.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018 Mathieu Othacehe <address@hidden>
-;;; Copyright © 2019 Ludovic Courtès <address@hidden>
+;;; Copyright © 2019, 2020 Ludovic Courtès <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -119,6 +119,10 @@ network devices were found. Do you want to continue
anyway?"))
(define (wait-service-online)
"Display a newt scale until connman detects an Internet access. Do
FULL-VALUE tentatives, spaced by 1 second."
+ (define (online?)
+ (or (connman-online?)
+ (file-exists? "/tmp/installer-assume-online")))
+
(let* ((full-value 5))
(run-scale-page
#:title (G_ "Checking connectivity")
@@ -127,10 +131,10 @@ FULL-VALUE tentatives, spaced by 1 second."
#:scale-update-proc
(lambda (value)
(sleep 1)
- (if (connman-online?)
+ (if (online?)
full-value
(+ value 1))))
- (unless (connman-online?)
+ (unless (online?)
(run-error-page
(G_ "The selected network does not provide access to the \
Internet, please try again.")
--
2.25.1
- [bug#39729] [PATCH 0/7] Testing the graphical installer, Ludovic Courtès, 2020/02/21
- [bug#39729] [PATCH 1/7] tests: 'run-basic-test' can enter a root password., Ludovic Courtès, 2020/02/21
- [bug#39729] [PATCH 4/7] installer: Bypass connectivity check when /tmp/installer-assume-online exists.,
Ludovic Courtès <=
- [bug#39729] [PATCH 6/7] installer: Honor /tmp/installer-system-init-options., Ludovic Courtès, 2020/02/21
- [bug#39729] [PATCH 2/7] installer: Use a Guile-Newt snapshot that supports 'form-watch-fd'., Ludovic Courtès, 2020/02/21
- [bug#39729] [PATCH 5/7] installer: Run commands without hopping through the shell., Ludovic Courtès, 2020/02/21
- [bug#39729] [PATCH 7/7] tests: install: Add "gui-installed-os"., Ludovic Courtès, 2020/02/21
- [bug#39729] [PATCH 3/7] installer: Implement a dialog on /var/guix/installer-socket., Ludovic Courtès, 2020/02/21
- [bug#39729] [PATCH 0/7] Testing the graphical installer, Mathieu Othacehe, 2020/02/27