From patchwork Thu Jun 29 20:44:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 51440 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id CBD9A27BBEA; Thu, 29 Jun 2023 21:45:34 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id BB12227BBEA for ; Thu, 29 Jun 2023 21:45:32 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qEyVn-0006HI-VQ; Thu, 29 Jun 2023 16:45:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qEyVj-0006G4-39 for guix-patches@gnu.org; Thu, 29 Jun 2023 16:45:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qEyVi-0007VQ-O8 for guix-patches@gnu.org; Thu, 29 Jun 2023 16:45:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qEyVi-0006Gh-KP for guix-patches@gnu.org; Thu, 29 Jun 2023 16:45:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64356] [PATCH 3/4] tests: gdm: Prefer OCR to delay. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 29 Jun 2023 20:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64356 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64356@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 64356-submit@debbugs.gnu.org id=B64356.168807148024018 (code B ref 64356); Thu, 29 Jun 2023 20:45:02 +0000 Received: (at 64356) by debbugs.gnu.org; 29 Jun 2023 20:44:40 +0000 Received: from localhost ([127.0.0.1]:54136 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEyVL-0006FK-Pk for submit@debbugs.gnu.org; Thu, 29 Jun 2023 16:44:40 -0400 Received: from smtpm1.myservices.hosting ([185.26.105.232]:33468) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEyVK-0006FA-DP for 64356@debbugs.gnu.org; Thu, 29 Jun 2023 16:44:38 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm1.myservices.hosting (Postfix) with ESMTP id F00BC201F1 for <64356@debbugs.gnu.org>; Thu, 29 Jun 2023 22:44:37 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 5D99380097; Thu, 29 Jun 2023 22:44:37 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id fdHQDeQKNcnW; Thu, 29 Jun 2023 22:44:37 +0200 (CEST) Received: from guix-nuc.home.arpa (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id DEAB080060; Thu, 29 Jun 2023 22:44:36 +0200 (CEST) From: Bruno Victal Date: Thu, 29 Jun 2023 21:44:21 +0100 Message-Id: <88cc086aa67238867e93886ca16c86ca3a262f52.1688071435.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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