unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 37476@debbugs.gnu.org
Subject: bug#37476: [PATCH] Document ert test selectors in batch mode
Date: Sun, 22 Sep 2019 15:38:54 +0200	[thread overview]
Message-ID: <CADwFkm=obx+xBt87g7cOVgSLp7dFb37d6s_qU8gJV-LogPL7=w@mail.gmail.com> (raw)
In-Reply-To: <871rw8wkez.fsf@gnus.org>

Lars Ingebrigtsen <larsi@gnus.org> writes:

> > -If ERT is not part of your Emacs distribution, you may need to use
> > +You can specify selectors to only run a subset of your tests
> > +(@pxref{Test Selectors}).  For example, the following would run all
> > +tests where the name of the test matches the string ``to-match''.
> > +
> > +@example
> > +emacs -batch -l ert -l my-tests.el \
> > +      -eval '(ert-run-tests-batch-and-exit "to-match")'
> > +@end example
>
> I guess that would be nice to have documented, but it's not a use case
> I've ever had.  Tests are usually grouped in separate files, so you'd
> usually have (as in Emacs) "make foo-tests" or whatever in your
> Makefiles.

I find that it's sometimes easier to run just one unit test from a
file, since there is less output and therefore less scrolling.  I've
had to search the web to find out how to do this before.

I'm not sure I understand the second sentence.  Package developers
might have a Makefile similar to the one Emacs core has, which allows
you to easily specify test selectors, but they might also be missing
one.

> > +If you are using a version of Emacs older than 24.1, ERT is not part
> > +of your Emacs distribution.  In this case, you may need to use
>
> The Emacs manuals usually document what's currently in Emacs, so it's a
> bit odd to be talking about Emacs 24.1 here, isn't it?  So perhaps that
> paragraph should just be removed?

I completely agree, and was simply trying to be conservative.  If
that's what we want, I'll be happy to remove it.

Thanks for reviewing the patch.

Best regards,
Stefan Kangas





  reply	other threads:[~2019-09-22 13:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-21 13:09 bug#37476: [PATCH] Document ert test selectors in batch mode Stefan Kangas
2019-09-22 13:05 ` Lars Ingebrigtsen
2019-09-22 13:38   ` Stefan Kangas [this message]
2019-09-22 14:46     ` Eli Zaretskii
2019-09-22 17:23     ` Lars Ingebrigtsen
2019-09-28 16:07       ` Stefan Kangas
2019-09-29 11:10         ` Michael Albinus
2019-09-29 16:34           ` Stefan Kangas

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to='CADwFkm=obx+xBt87g7cOVgSLp7dFb37d6s_qU8gJV-LogPL7=w@mail.gmail.com' \
    --to=stefan@marxist.se \
    --cc=37476@debbugs.gnu.org \
    --cc=larsi@gnus.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).