From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id GKnaBAM+LWPpTwAAbAwnHQ (envelope-from ) for ; Fri, 23 Sep 2022 07:02:59 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id eEbTBAM+LWMUQwEAauVa8A (envelope-from ) for ; Fri, 23 Sep 2022 07:02:59 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8349B2ACA1 for ; Fri, 23 Sep 2022 07:02:58 +0200 (CEST) Received: from localhost ([::1]:40206 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obaq1-0003XW-ML for larch@yhetil.org; Fri, 23 Sep 2022 01:02:57 -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 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1663909378; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=9prbEq2F5yTDd06Ah6jMzI+2nqnFue97ZLq7lKjnP7g=; b=p53ubV/eRWSKYF5lE1Ai5mkTTKaTMBZAg8KD0snh3AFZiHSBdXpDnGyn3P+2dvLq6iJahr 6C8iAfXn7VEldDyXLmBW+wy+nYB7Xrsz800Hl0qG94pKF21B0wN8USRe4POjx7QfjKWLJu qSkecDi8GdQTwDIoVeo1ibRh9tt2T9VuvhxRoiMuiTgzqIxGSOq4roDvPBjkG66Vn3bo8N 8i0TJZy5mmdzfFANGfBYz3sRaxVkxpbz9y3VDOZTzKSqCwamyi4VzM/Qjb+s6qz6JzYDul va/EQyFWZD3b2Z8dyvWpIzkNLsZWJKupkZMMmVgE3+gwGboh20pVZKWw9rxD0Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1663909378; a=rsa-sha256; cv=none; b=sJfIQhO0knjePVGE/6iDgv4BkS6h5YGMB0e2FNoHWaUzbN3jLho+JshoJ+Se5n9IwuJXCF x7maqLeYaeFEI5+28gITYHKXaXP3ApWVRg4fj2r+Za/OLnvqw0rR62okSZ8flAiKojOwqe ZNl+xyGr5JtHRcjljbRHIX8TsLjb4bBo16Bitf8UMklcIzu/AvQ0EgLRlQWMnf+SqxusTV vujEmk3xbO4PPCbjU2dOTznsRJ0Q5xhPMDCiI5S9A1eXWSXYuIvq1WLCWf7k+Blb7WPiPx pOr6KS9frpLwZDUMkKGDZ+OR0OHISKwWNYpDz4UbPvzXn993hZlkhW854PuYWA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=ILR+KSCk; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 6.25 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=ILR+KSCk; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 8349B2ACA1 X-Spam-Score: 6.25 X-Migadu-Scanner: scn0.migadu.com X-TUID: IhdHFcxoFgEO 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)))) -- 2.37.3