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 4/4] tests: xvnc: Group up GDM test.
Date: Thu, 29 Jun 2023 21:44:22 +0100
* gnu/tests/vnc.scm (run-xvnc-test): Group up GDM test. Use GNU Ocrad when
possible.
---
 gnu/tests/vnc.scm | 52 +++++++++++++++++++++++------------------------
 1 file changed, 26 insertions(+), 26 deletions(-)

diff --git a/gnu/tests/vnc.scm b/gnu/tests/vnc.scm
index e59972eee4..504cb544b1 100644
--- a/gnu/tests/vnc.scm
+++ b/gnu/tests/vnc.scm
@@ -152,43 +152,43 @@ (define (run-xvnc-test)
 | grep -Fq nothing"))
                marionette))
 
-            (test-assert "vnc lands on the gdm login screen"
+            (test-group "vnc lands on the gdm login screen"
               ;; This test runs vncviewer on the local VM and verifies that it
               ;; manages to access the GDM login screen (via XDMCP).
-              (begin
-                (define (ratpoison-abort)
-                  (marionette-control "sendkey ctrl-g" marionette))
-
-                (define (ratpoison-help)
-                  (marionette-control "sendkey ctrl-t" marionette)
-                  (marionette-type "?" marionette)
-                  (sleep 1))            ;wait for help screen to appear
-
-                (define (ratpoison-exec command)
-                  (marionette-control "sendkey ctrl-t" marionette)
-                  (marionette-type "!" marionette)
-                  (marionette-type (string-append command "\n") marionette))
-
-                ;; Wait until the ratpoison help screen can be displayed; this
-                ;; means the window manager is ready.
+              (define (ratpoison-abort)
+                (marionette-control "sendkey ctrl-g" marionette))
+
+              (define (ratpoison-help)
+                (marionette-control "sendkey ctrl-t" marionette)
+                (marionette-type "?" marionette)
+                (sleep 1))            ;wait for help screen to appear
+
+              (define (ratpoison-exec command)
+                (marionette-control "sendkey ctrl-t" marionette)
+                (marionette-type "!" marionette)
+                (marionette-type (string-append command "\n") marionette))
+
+              ;; Wait until the ratpoison help screen can be displayed; this
+              ;; means the window manager is ready.
+              ;; XXX: GNU Ocrad 0.28 yields poor results here, use tesseract
+              ;; instead.
+              (test-assert "window manager is ready"
                 (wait-for-screen-text marionette
                                       (cut string-contains <> "key bindings")
                                       #:ocr #$(file-append tesseract-ocr
                                                            "/bin/tesseract")
                                       #:pre-action ratpoison-help
-                                      #:post-action ratpoison-abort)
+                                      #:post-action ratpoison-abort))
 
                 ;; Run vncviewer and expect the GDM login screen (accessed via
                 ;; XDMCP).  This can take a while to appear on slower machines.
-                (ratpoison-exec "vncviewer localhost:5905")
-                ;; XXX: tesseract narrowly recognizes "Guix" as "uix" from the
-                ;; background image; ocrad fares worst.  Sadly, 'Username' is
-                ;; not recognized at all.
+              (ratpoison-exec "vncviewer localhost:5905")
+
+              (test-assert "GDM login screen ready"
                 (wait-for-screen-text marionette
-                                      (cut string-contains <> "uix")
-                                      #:ocr #$(file-append tesseract-ocr
-                                                           "/bin/tesseract")
-                                      #:timeout 120)))
+                                      (cut string-contains <> "Guix")
+                                      #:ocr #$(file-append ocrad "/bin/ocrad")
+                                      #:ocr-arguments "--invert")))
 
             (test-end)))))
 
-- 
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.