From patchwork Fri Sep 23 05:00:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 42856 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 1CAC227BBEE; Fri, 23 Sep 2022 06:03:10 +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.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS 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 631F027BBEA for ; Fri, 23 Sep 2022 06:03:09 +0100 (BST) Received: from localhost ([::1]:40206 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obaqC-0003XW-H0 for patchwork@mira.cbaines.net; Fri, 23 Sep 2022 01:03:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34810) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obapB-0003VG-MX for guix-patches@gnu.org; Fri, 23 Sep 2022 01:02:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39961) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1obapB-00026X-EB for guix-patches@gnu.org; Fri, 23 Sep 2022 01:02:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1obapB-00055K-9N for guix-patches@gnu.org; Fri, 23 Sep 2022 01:02:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58014] [PATCH 08/15] marionette: Make marionette-screen-text private. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 23 Sep 2022 05:02:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58014 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58014@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 58014-submit@debbugs.gnu.org id=B58014.166390929819405 (code B ref 58014); Fri, 23 Sep 2022 05:02:05 +0000 Received: (at 58014) by debbugs.gnu.org; 23 Sep 2022 05:01:38 +0000 Received: from localhost ([127.0.0.1]:39019 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1obaoj-00052v-GS for submit@debbugs.gnu.org; Fri, 23 Sep 2022 01:01:37 -0400 Received: from mail-qv1-f45.google.com ([209.85.219.45]:35573) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1obaoh-00052h-Fc for 58014@debbugs.gnu.org; Fri, 23 Sep 2022 01:01:35 -0400 Received: by mail-qv1-f45.google.com with SMTP id w4so8373046qvp.2 for <58014@debbugs.gnu.org>; Thu, 22 Sep 2022 22:01:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=9prbEq2F5yTDd06Ah6jMzI+2nqnFue97ZLq7lKjnP7g=; b=ILR+KSCkDxg3uZftpV6oyFkUEUy0oY+0Vd+c0lpKFn8YhcyXNHljenIHoAnN6jN/mU qUiQNYPU3WkRVmJMjYItm03rSdywyBM9N8C9EF7zYE/KaQ2K2A2/xAYzj7CcRJyfBoN5 m285yUSwf9puEIy+enlGwAI5BtCx71eB2IFH4qGVlqaN333CiU7OElSgyb+rN95CCMNB rV0eLytj1XseFv2EQSfehUp8cJfCCry3OIuqO5jI59ennvwZf4mBdbNxG83a25eFrb/l t1TlK0t6swaI8S3wDypLf3Llnt91potLC+yM07OH4kasX2DZ0BAr3N0PnXVGqmfEBYtP XUlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=9prbEq2F5yTDd06Ah6jMzI+2nqnFue97ZLq7lKjnP7g=; b=IPVWpDW6bvIfMXCnSej6EXDVvJ4msH8+UWqIgkhq5BWbWNYnJByOcQyBog5R9TyFmu JTHlj9me4sAEFZOX1i31ep14GYiG4Qi5OiKLh4Jn/mAYnHZYDwQpVqyzc+yuUzRjfrjS 2VeXg71BPkcu7pmGeutFiTypUWDqilek2CnDLSyKZ3wRxyx2h8kIGcB5I4khtMYAYnLp eQyTPZTvoN7yZkkwcF/7SYfum2KaJtSHnG7h6re2uCEEWsA/0uhKFsnoLsTvYxctG5bU WppOerymuSlsD9ZTI+6Kr41VXFFNTb4x5BoHgmf7SOhtlEwFOLj06zNRwOgcnnjxcDK/ /TVg== X-Gm-Message-State: ACrzQf0VgTSnL0FngIvcUFkam8PSivagb3O41KdZfa0ouRgictupUpMY vVmAKxrWQzZfmAdTnswZLf8Bt23tDHk= X-Google-Smtp-Source: AMsMyM4yni3ET2BNKT4qVmsUMFgwboPsTusqCWMcB+s5zgmPOTdFQ8vXzGm0i92aq7s5OecwTbha0A== X-Received: by 2002:a05:6214:c48:b0:4ac:b18d:c101 with SMTP id r8-20020a0562140c4800b004acb18dc101mr5472630qvj.107.1663909289882; Thu, 22 Sep 2022 22:01:29 -0700 (PDT) Received: from localhost.localdomain ([2607:fad8:4:3::1001]) by smtp.gmail.com with ESMTPSA id de4-20020a05620a370400b006bbb07ebd83sm5263534qkb.108.2022.09.22.22.01.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Sep 2022 22:01:29 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 23 Sep 2022 01:00:35 -0400 Message-Id: <20220923050042.29893-8-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220923050042.29893-1-maxim.cournoyer@gmail.com> References: <20220923050042.29893-1-maxim.cournoyer@gmail.com> 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" X-getmail-retrieved-from-mailbox: Patches 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. --- gnu/build/marionette.scm | 1 - gnu/tests/base.scm | 25 +++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/gnu/build/marionette.scm b/gnu/build/marionette.scm index 5ebf783892..aba6fb8146 100644 --- a/gnu/build/marionette.scm +++ b/gnu/build/marionette.scm @@ -33,7 +33,6 @@ (define-module (gnu build marionette) wait-for-tcp-port wait-for-unix-socket marionette-control - marionette-screen-text wait-for-screen-text %qwerty-us-keystrokes marionette-type diff --git a/gnu/tests/base.scm b/gnu/tests/base.scm index 636b127fb8..64cd6a911a 100644 --- a/gnu/tests/base.scm +++ b/gnu/tests/base.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2022 Ludovic Courtès ;;; Copyright © 2018 Clément Lassieur +;;; Copyright © 2022 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -509,18 +510,18 @@ (define (entry->list entry) (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))))