summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-09-19 22:05:04 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-10-07 10:11:11 -0400
commit21f641e9faf55b13263d5f0b3314860af5d697a5 (patch)
tree6a3cc1e5b759280400a03f8d25efc91e34e8862c /gnu
parent1936668f5b7837104de4a091c8f6adf907ff9273 (diff)
downloadguix-21f641e9faf55b13263d5f0b3314860af5d697a5.tar.gz
marionette: Make marionette-screen-text private.
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.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/build/marionette.scm1
-rw-r--r--gnu/tests/base.scm25
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 @@
             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 @@ info --version")
                 (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))))