From: Bruno Victal <mirai@makinata.eu>
To: 64356@debbugs.gnu.org
Cc: Bruno Victal <mirai@makinata.eu>
Subject: [bug#64356] [PATCH v2 3/4] tests: gdm: Prefer OCR to delay.
Date: Thu, 29 Jun 2023 22:44:28 +0100 [thread overview]
Message-ID: <88cc086aa67238867e93886ca16c86ca3a262f52.1688075033.git.mirai@makinata.eu> (raw)
In-Reply-To: <cover.1688070852.git.mirai@makinata.eu>
* gnu/tests/gdm.scm (run-gdm-test): Use wait-for-screen-text instead of sleep.
---
gnu/tests/gdm.scm | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/gnu/tests/gdm.scm b/gnu/tests/gdm.scm
index ec1df4b797..77163bc3e0 100644
--- a/gnu/tests/gdm.scm
+++ b/gnu/tests/gdm.scm
@@ -19,6 +19,7 @@
(define-module (gnu tests gdm)
#:use-module (gnu tests)
#:use-module (gnu packages freedesktop)
+ #:use-module (gnu packages ocr)
#:use-module (gnu services)
#:use-module (gnu services desktop)
#:use-module (gnu services xorg)
@@ -57,6 +58,7 @@ (define* (run-gdm-test #:key wayland?)
#~(begin
(use-modules (gnu build marionette)
(ice-9 format)
+ (srfi srfi-26)
(srfi srfi-64))
(let ((marionette (make-marionette (list #$vm)))
@@ -73,11 +75,18 @@ (define* (run-gdm-test #:key wayland?)
(start-service 'xorg-server))
marionette))
- (test-assert "gdm ready"
- (wait-for-file "/var/run/gdm/gdm.pid" marionette))
-
- ;; waiting for gdm.pid is not enough, tests may still sporadically fail.
- (sleep 1)
+ (test-group "gdm ready"
+ (test-assert "PID file present"
+ (wait-for-file "/var/run/gdm/gdm.pid" marionette))
+
+ ;; Waiting for gdm.pid is not enough, tests may still sporadically
+ ;; fail; ensure that the login screen is up.
+ ;; XXX: GNU Ocrad works but with '--invert' only.
+ (test-assert "login screen up"
+ (wait-for-screen-text marionette
+ (cut string-contains <> "Guix")
+ #:ocr #$(file-append ocrad "/bin/ocrad")
+ #:ocr-arguments "--invert")))
(test-equal (string-append "session-type is " expected-session-type)
expected-session-type
--
2.39.2
next prev parent reply other threads:[~2023-06-29 21:45 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-29 20:39 [bug#64356] [PATCH 0/4] Fix GDM and VNC tests Bruno Victal
2023-06-29 20:44 ` [bug#64356] [PATCH 1/4] tests: xvnc: Fix test Bruno Victal
2023-06-29 20:44 ` [bug#64356] [PATCH 2/4] marionette: Allow passing custom OCR arguments Bruno Victal
2023-06-29 20:44 ` [bug#64356] [PATCH 3/4] tests: gdm: Prefer OCR to delay Bruno Victal
2023-06-29 20:44 ` [bug#64356] [PATCH 4/4] tests: xvnc: Group up GDM test Bruno Victal
2023-06-29 21:44 ` [bug#64356] [PATCH v2 1/4] tests: xvnc: Fix test Bruno Victal
2023-06-29 21:44 ` [bug#64356] [PATCH v2 2/4] marionette: Allow passing custom OCR arguments Bruno Victal
2023-06-29 21:44 ` Bruno Victal [this message]
2023-06-29 21:44 ` [bug#64356] [PATCH v2 4/4] tests: xvnc: Group up GDM test Bruno Victal
2023-06-30 13:57 ` [bug#64356] [PATCH v3 0/4] Fix GDM + VNC tests Bruno Victal
2023-06-30 13:58 ` [bug#64356] [PATCH v3 1/4] tests: xvnc: Fix test Bruno Victal
2023-07-19 14:44 ` [bug#64356] [PATCH 0/4] Fix GDM and VNC tests Maxim Cournoyer
2023-06-30 13:58 ` [bug#64356] [PATCH v3 2/4] marionette: Allow passing custom OCR arguments Bruno Victal
2023-07-19 14:50 ` [bug#64356] [PATCH 0/4] Fix GDM and VNC tests Maxim Cournoyer
2023-06-30 13:58 ` [bug#64356] [PATCH v3 3/4] tests: gdm: Prefer OCR to delay Bruno Victal
2023-07-19 14:45 ` [bug#64356] [PATCH 0/4] Fix GDM and VNC tests Maxim Cournoyer
2023-06-30 13:58 ` [bug#64356] [PATCH v3 4/4] tests: xvnc: Group up GDM test Bruno Victal
2023-07-19 14:47 ` [bug#64356] [PATCH 0/4] Fix GDM and VNC tests Maxim Cournoyer
2023-07-01 3:23 ` Maxim Cournoyer
2023-07-19 14:50 ` bug#64356: " Maxim Cournoyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=88cc086aa67238867e93886ca16c86ca3a262f52.1688075033.git.mirai@makinata.eu \
--to=mirai@makinata.eu \
--cc=64356@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.