[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#58014] [PATCH 08/15] marionette: Make marionette-screen-text privat
From: |
Maxim Cournoyer |
Subject: |
[bug#58014] [PATCH 08/15] marionette: Make marionette-screen-text private. |
Date: |
Fri, 23 Sep 2022 01:00:35 -0400 |
It has only one user, which is better suited for wait-for-screen-text anyway.
* gnu/tests/base.scm (run-basic-test): Refactor to use wait-for-screen-text
instead of marionette-screen-text.
---
gnu/build/marionette.scm | 1 -
gnu/tests/base.scm | 25 +++++++++++++------------
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/gnu/build/marionette.scm b/gnu/build/marionette.scm
index 5ebf783892..aba6fb8146 100644
--- a/gnu/build/marionette.scm
+++ b/gnu/build/marionette.scm
@@ -33,7 +33,6 @@ (define-module (gnu build marionette)
wait-for-tcp-port
wait-for-unix-socket
marionette-control
- marionette-screen-text
wait-for-screen-text
%qwerty-us-keystrokes
marionette-type
diff --git a/gnu/tests/base.scm b/gnu/tests/base.scm
index 636b127fb8..64cd6a911a 100644
--- a/gnu/tests/base.scm
+++ b/gnu/tests/base.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2022 Ludovic Courtès
<ludo@gnu.org>
;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
+;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -509,18 +510,18 @@ (define (entry->list entry)
(file-exists? capture))))
(test-assert "screen text"
- (let ((text (marionette-screen-text marionette
- #:ocr
- #$(file-append ocrad
- "/bin/ocrad"))))
- ;; Check whether the welcome message and shell prompt are
- ;; displayed. Note: OCR confuses "y" and "V" for instance, so
- ;; we cannot reliably match the whole text.
- (and (string-contains text "This is the GNU")
- (string-contains text
- (string-append
- "root@"
- #$(operating-system-host-name os))))))
+ (wait-for-screen-text
+ marionette
+ (lambda (text)
+ ;; Check whether the welcome message and shell prompt are
+ ;; displayed. Note: OCR confuses "y" and "V" for instance, so
+ ;; we cannot reliably match the whole text.
+ (and (string-contains text "This is the GNU")
+ (string-contains text
+ (string-append
+ "root@"
+ #$(operating-system-host-name os)))))
+ #:ocr #$(file-append ocrad "/bin/ocrad")))
(test-end))))
--
2.37.3
- [bug#58014] [PATCH 00/15] Add xvnc-service-type., Maxim Cournoyer, 2022/09/23
- [bug#58014] [PATCH 01/15] gnu: tigervnc-server: Use new style inputs, gexps., Maxim Cournoyer, 2022/09/23
- [bug#58014] [PATCH 03/15] gnu: tigervnc-server: Adjust PAM config., Maxim Cournoyer, 2022/09/23
- [bug#58014] [PATCH 02/15] gnu: tigervnc-server: Move source production into origin snippet., Maxim Cournoyer, 2022/09/23
- [bug#58014] [PATCH 04/15] gnu: tigervnc-server: Disable tests via #:tests?., Maxim Cournoyer, 2022/09/23
- [bug#58014] [PATCH 05/15] gnu: tigervnc-server: Patch and wrap vncserver script., Maxim Cournoyer, 2022/09/23
- [bug#58014] [PATCH 11/15] marionette: Add a callback arguments to wait-for-screen-text., Maxim Cournoyer, 2022/09/23
- [bug#58014] [PATCH 10/15] marionette: Define keystrokes for typing colons and exclamation marks., Maxim Cournoyer, 2022/09/23
- [bug#58014] [PATCH 06/15] gnu: gdm: Patch an extra reference to the Xsession script., Maxim Cournoyer, 2022/09/23
- [bug#58014] [PATCH 07/15] services: gdm: Add a configuration field to enable XDMCP., Maxim Cournoyer, 2022/09/23
- [bug#58014] [PATCH 08/15] marionette: Make marionette-screen-text private.,
Maxim Cournoyer <=
- [bug#58014] [PATCH 12/15] gnu: dconf: Set sysconfdir to /etc., Maxim Cournoyer, 2022/09/23
- [bug#58014] [PATCH 09/15] marionette: Preserve screen dumps on failures., Maxim Cournoyer, 2022/09/23
- [bug#58014] [PATCH 13/15] services: Add dconf-service-type., Maxim Cournoyer, 2022/09/23
- [bug#58014] [PATCH 15/15] services: Add xvnc-service-type., Maxim Cournoyer, 2022/09/23
- [bug#58014] [PATCH 14/15] services: xorg: Add auto-suspend? field to <gdm-configuration>., Maxim Cournoyer, 2022/09/23