GNU bug report logs - #64356
[PATCH 0/4] Fix GDM and VNC tests

Previous Next

Package: guix-patches;

Reported by: Bruno Victal <mirai <at> makinata.eu>

Date: Thu, 29 Jun 2023 20:41:01 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Bruno Victal <mirai <at> makinata.eu>
To: 64356 <at> debbugs.gnu.org
Cc: Bruno Victal <mirai <at> makinata.eu>
Subject: [bug#64356] [PATCH v3 3/4] tests: gdm: Prefer OCR to delay.
Date: Fri, 30 Jun 2023 14:58:13 +0100
* 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..06177d4080 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





This bug report was last modified 1 year and 360 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.