3
5
Fork 0
mirror of git://git.savannah.gnu.org/guix.git synced 2023-12-14 03:33:07 +01:00

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.
This commit is contained in:
Maxim Cournoyer 2022-09-19 22:05:04 -04:00
parent 1936668f5b
commit 21f641e9fa
No known key found for this signature in database
GPG key ID: 1260E46482E63562
2 changed files with 13 additions and 13 deletions

View file

@ -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

View file

@ -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))))