GNU bug report logs -
#68919
30.0.50; etc/w32-feature.el: tests do not work under --batch
Previous Next
Reported by: Corwin Brust <corwin <at> bru.st>
Date: Sun, 4 Feb 2024 03:38:01 UTC
Severity: minor
Tags: patch
Found in version 30.0.50
Done: Corwin Brust <corwin <at> bru.st>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 68919 in the body.
You can then email your comments to 68919 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#68919
; Package
emacs
.
(Sun, 04 Feb 2024 03:38:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Corwin Brust <corwin <at> bru.st>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 04 Feb 2024 03:38:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Severity: minor
Tags: patch
thanks
It would be nice to be able to run the feature tests for the Windows
port in batch mode.
emacs.exe -l etc/w32-feature.el --batch -eval \
'(ert-run-tests-batch-and-exit)'
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'.
In GNU Emacs 30.0.50 (build 1, x86_64-w64-mingw32) of 2024-02-03 built
on AVALON
Repository revision: 4ebded3f5ee8617ac6b1debaa01706cd78206f39
Repository branch: master
Windowing system distributor 'Microsoft Corp.', version 10.0.19045
System Description: Microsoft Windows 10 Home (v10.0.2009.19045.3996)
Configured using:
'configure --with-modules --without-dbus --with-native-compilation
--without-compress-install --with-tree-sitter CFLAGS=-O2'
Configured features:
ACL GIF GMP GNUTLS HARFBUZZ JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP
NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XPM ZLIB
Important settings:
value of $LANG: ENU
locale-coding-system: cp1252
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
minibuffer-regexp-mode: t
line-number-mode: t
indent-tabs-mode: t
transient-mark-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny dired
dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068
epg-config gnus-util text-property-search mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils comp-run bytecomp
byte-compile comp-common rx time-date subr-x cl-loaddefs cl-lib rmc
iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode mwheel dos-w32 ls-lisp disp-table
term/w32-win w32-win w32-vars term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads w32notify w32 lcms2 multi-tty
move-toolbar make-network-process native-compile emacs)
Memory information:
((conses 16 61441 24999) (symbols 48 5987 0) (strings 32 17339 1819)
(string-bytes 1 551266) (vectors 16 9770)
(vector-slots 8 141106 10976) (floats 8 25 37) (intervals 56 257 0)
(buffers 984 11))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#68919
; Package
emacs
.
(Sun, 04 Feb 2024 03:42:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 68919 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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
[0001-etc-w32-feature.el-harfbuzz-skip-unless-display-grap.patch (text/x-diff, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#68919
; Package
emacs
.
(Sun, 04 Feb 2024 07:10:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 68919 <at> debbugs.gnu.org (full text, mbox):
> Date: Sat, 03 Feb 2024 21:41:34 -0600
> From: corwin <at> 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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#68919
; Package
emacs
.
(Sun, 04 Feb 2024 15:27:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 68919 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Sun, Feb 4, 2024 at 1:08 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> 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
>
Thank you, Eli - let me know if this is better. (Should we continue
using frame-parameters in when display-graphic-p is t? I assume not;
this works in both cases and is thus better because it's simpler, or
so I have thought.)
[0001-etc-w32-feature.el-harfbuzz-improve-test.patch (application/octet-stream, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#68919
; Package
emacs
.
(Sun, 04 Feb 2024 15:36:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 68919 <at> debbugs.gnu.org (full text, mbox):
> From: Corwin Brust <corwin <at> bru.st>
> Date: Sun, 4 Feb 2024 09:25:32 -0600
> Cc: 68919 <at> debbugs.gnu.org
>
> On Sun, Feb 4, 2024 at 1:08 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
> >
> > 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
> >
>
> Thank you, Eli - let me know if this is better.
LGTM, thanks.
> (Should we continue using frame-parameters in when display-graphic-p
> is t? I assume not; this works in both cases and is thus better
> because it's simpler, or so I have thought.)
Yes, for this particular feature there's no need to use
frame-parameters anymore, since the above test works in all kinds of
session.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#68919
; Package
emacs
.
(Tue, 24 Dec 2024 03:08:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 68919 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Corwin Brust <corwin <at> bru.st>
>> Date: Sun, 4 Feb 2024 09:25:32 -0600
>> Cc: 68919 <at> debbugs.gnu.org
>>
>> On Sun, Feb 4, 2024 at 1:08 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
>> >
>> > 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
>> >
>>
>> Thank you, Eli - let me know if this is better.
>
> LGTM, thanks.
Corwin, could you please install this patch and close this bug?
>
>> (Should we continue using frame-parameters in when display-graphic-p
>> is t? I assume not; this works in both cases and is thus better
>> because it's simpler, or so I have thought.)
>
> Yes, for this particular feature there's no need to use
> frame-parameters anymore, since the above test works in all kinds of
> session.
Not sure what to do about this part.
Reply sent
to
Corwin Brust <corwin <at> bru.st>
:
You have taken responsibility.
(Tue, 24 Dec 2024 03:29:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Corwin Brust <corwin <at> bru.st>
:
bug acknowledged by developer.
(Tue, 24 Dec 2024 03:29:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 68919-done <at> debbugs.gnu.org (full text, mbox):
On Mon, Dec 23, 2024 at 9:05 PM Stefan Kangas <stefankangas <at> gmail.com> wrote:
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> >> From: Corwin Brust <corwin <at> bru.st>
> >> Date: Sun, 4 Feb 2024 09:25:32 -0600
> >> Cc: 68919 <at> debbugs.gnu.org
> >>
> >> On Sun, Feb 4, 2024 at 1:08 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
> >> >
> >> > 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
> >> >
> >>
> >> Thank you, Eli - let me know if this is better.
> >
> > LGTM, thanks.
>
> Corwin, could you please install this patch and close this bug?
>
Done with 0e43e35f96e..c29b798537e emacs-30 -> emacs-30.
Thank you.
> >
> >> (Should we continue using frame-parameters in when display-graphic-p
> >> is t? I assume not; this works in both cases and is thus better
> >> because it's simpler, or so I have thought.)
> >
> > Yes, for this particular feature there's no need to use
> > frame-parameters anymore, since the above test works in all kinds of
> > session.
>
> Not sure what to do about this part.
>
Nothing to be done, I believe. Here I think Eli confirms I was correct
to ignore `display-graphic-p' because the font-driver-superseded-by
will only eq harfbuz when Emacs was both built with support for
harfbuzz -and- actually succeeded in loading the DLL in the run-time,
(so I guess we load that DLL even in batch mode :)
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 21 Jan 2025 12:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 144 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.