From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#68919: 30.0.50; etc/w32-feature.el: tests do not work under --batch Date: Sun, 04 Feb 2024 09:08:56 +0200 Message-ID: <86h6io3dvb.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10867"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 68919@debbugs.gnu.org To: corwin@bru.st Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 04 08:10:20 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rWWdv-0002ax-Ah for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 04 Feb 2024 08:10:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rWWdT-0001Wr-UQ; Sun, 04 Feb 2024 02:09:51 -0500 Original-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 1rWWdS-0001WV-GT for bug-gnu-emacs@gnu.org; Sun, 04 Feb 2024 02:09:50 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rWWdS-00062q-8K for bug-gnu-emacs@gnu.org; Sun, 04 Feb 2024 02:09:50 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rWWde-0006Vz-0M for bug-gnu-emacs@gnu.org; Sun, 04 Feb 2024 02:10:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 04 Feb 2024 07:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68919 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 68919-submit@debbugs.gnu.org id=B68919.170703055924990 (code B ref 68919); Sun, 04 Feb 2024 07:10:01 +0000 Original-Received: (at 68919) by debbugs.gnu.org; 4 Feb 2024 07:09:19 +0000 Original-Received: from localhost ([127.0.0.1]:48134 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rWWcx-0006Uz-43 for submit@debbugs.gnu.org; Sun, 04 Feb 2024 02:09:19 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38598) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rWWcu-0006Ul-Va for 68919@debbugs.gnu.org; Sun, 04 Feb 2024 02:09:17 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rWWcd-0005zC-EP; Sun, 04 Feb 2024 02:08:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=9QapUCIzRhNLBeWkDxttjnEqPJZksMvVNT1OacXLjNc=; b=NOJoCnbVe2VU o8ScujLb1ZEHpv/UV/eODcayUKeyJIegHWyyUgN9zUAFWvXHC40iKI/OPPUCGLemb77eY62ZuBPOU jaUiG2oviI845yh272E7OATpXudWKv+NwMwF+MhviVvKQkmfmDWv01yD64tu7TcfvJTMWklPphKfh oU1yFHi5IbfAbAQmj0ehXEsQKkuCz79n3WQ/3plKVTEwKaGVihlw70or6FxKFPw3wg5/4xhCEHiUF JlAB4z0+VYe09zqhhbgJi+tXOkxO4bDfxs86nIchNsvB8uV7Mi/gQWKQNbhOmE7EzP+xE41Il948l WYDm+w9H7hZg/Vp+miLGfQ==; In-Reply-To: (corwin@bru.st) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:279398 Archived-At: > Date: Sat, 03 Feb 2024 21:41:34 -0600 > From: corwin@bru.st > > On 2024-02-03 21:37, Corwin Brust wrote: > > > > This currently fails because the harfbuzz test is ungated: it runs > > irrespective of whether a (graphical) display is attached. Once I > > receive a confirmation with this Bug# for the commit message, I'll > > send along a tiny patch to address this using `display-graphic-p'. > > > > Patch is attached > > diff --git a/etc/w32-feature.el b/etc/w32-feature.el > index 8d36e32e0fb..3bd818ea6ea 100644 > --- a/etc/w32-feature.el > +++ b/etc/w32-feature.el > @@ -45,10 +45,12 @@ feature-optimization > (string-match-p "CFLAGS=-O2" system-configuration-options))) > > (ert-deftest feature-harfbuzz () > - (should > - (eq > - 'harfbuzz > - (car (frame-parameter nil 'font-backend))))) > + (if (display-graphic-p) > + (should > + (eq > + 'harfbuzz > + (car (frame-parameter nil 'font-backend)))) > + (ert-skip "No graphic display"))) We can do better than this, I think. The following works in batch mode: emacs -batch --eval "(message \"%s\" (get 'uniscribe 'font-driver-superseded-by))" => harfbuzz So I suggest to rewrite the above test to use this technique. See syms_of_w32uniscribe_for_pdumper for the details: the above will only yield 'harfbuzz' if Emacs was built with HarfBuzz support and succeeded to load the HarfBuzz DLL at run time.