all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Clément Pit--Claudel" <clement.pit@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Display test suite
Date: Thu, 7 Jul 2016 15:40:42 -0400	[thread overview]
Message-ID: <577EB03A.6030703@gmail.com> (raw)
In-Reply-To: <83ziptjtsk.fsf@gnu.org>


[-- Attachment #1.1: Type: text/plain, Size: 2549 bytes --]

On 2016-07-07 12:29, Eli Zaretskii wrote:
>> From: Clément Pit--Claudel <clement.pit@gmail.com> Date: Thu, 7 Jul
>> 2016 11:47:54 -0400
>> 
>> Richard recently suggested giving Emacs the ability to take a
>> screenshot of itself. Could we imagine using this to run regression
>> tests of the display engine?
> 
> Maybe I'm missing something, but I don't see how.  A test suite
> needs to include the expected results for each test.  Even if you
> include an image file for each test that shows what should be
> displayed, AFAIU the image will be specific to the display
> resolution, number of colors, dimensions, etc., so inappropriate for
> automatic comparison with the screenshot on the target machine.  Am I
> right?

You're right; that's why I can only run the company-coq tests on my machine. Still, one might imagine setting up Emacs in a particular way to make them reproducible. Along these lines, I run the PNG through an optimizer and strip the metadata to make sure that I get the same output every time.

> Also, comparing images that could have a small number of pixels 
> different in some corner is error-prone.

There are very nice tools to do image diffs; they will highlight the offending pixels in a different color.

> IMO, a test suite for the display engine needs a way to describe 
> precisely what's on the screen, in some language, and then compare 
> those descriptions.

Yes, that would be nice (we have something like that for font-lock, right?)

>> Of course, it could be hard to get screeenshots to looks exactly
>> the same for everyone. Instead, we could have a makefile target
>> that builds a large collection of these screenshots, and another
>> one that rebuilds it and compares against a previously generated
>> one.
> 
> But then each time I start using a new machine, my reference point
> is reset to a newer date, and I lose the ability for comparing
> against older versions.

Absolutely. I think such tests would serve as a nice way to check your own commits (for before/after tests).

Also, maybe the variability is a good point: each people regularly run these tests, then changes that affect only one configuration would be noticed. If we have tests that produce the same output for every one, changes that affect only one particular set of configurations would not be noticed.

In any case, I've found the graphical tests that I do for company-coq very useful; whether they could generalize to all of Emacs is a non-trivial question.

Cheers,
Clément.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2016-07-07 19:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-07  6:57 Dead or unused face handling code Dmitry Antipov
2016-07-07 15:15 ` Eli Zaretskii
2016-07-07 15:47   ` Display test suite Clément Pit--Claudel
2016-07-07 16:29     ` Eli Zaretskii
2016-07-07 19:40       ` Clément Pit--Claudel [this message]
2016-07-08 13:40     ` Richard Stallman
2016-07-08 13:44       ` Kaushal Modi
2016-07-08 16:19         ` Clément Pit--Claudel
2016-07-08 13:50       ` Andreas Schwab
2016-07-08 15:19       ` raman
2016-07-07 17:47   ` Dead or unused face handling code Dmitry Antipov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=577EB03A.6030703@gmail.com \
    --to=clement.pit@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.