From: Stefan Kangas <stefan@marxist.se>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 37476-done@debbugs.gnu.org
Subject: bug#37476: [PATCH] Document ert test selectors in batch mode
Date: Sat, 28 Sep 2019 18:07:39 +0200 [thread overview]
Message-ID: <CADwFkmnHSZS1nsQAzGXYvUAT5zXF0t1s-uNmfYqB+ZR91+afQw@mail.gmail.com> (raw)
In-Reply-To: <87ef08utwi.fsf@gnus.org>
[-- Attachment #1: Type: text/plain, Size: 515 bytes --]
Lars Ingebrigtsen <larsi@gnus.org> writes:
> > 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.
>
> Makes sense. I usually just run unit test inside the running Emacs when
> I want to test one specific thing.
No more comments in a week, so I've now pushed the attached as commit
cc7f2fb0cc.
(I removed the part about Emacs 24.1.)
Best regards,
Stefan Kangas
[-- Attachment #2: 0001-Document-ert-test-selectors-in-batch-mode-Bug-37476.patch --]
[-- Type: text/x-patch, Size: 1264 bytes --]
From cc7f2fb0cc1c077d0648e48d0d9efb713c375abe Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefankangas@gmail.com>
Date: Sat, 21 Sep 2019 14:58:08 +0200
Subject: [PATCH] Document ert test selectors in batch mode (Bug#37476)
* doc/misc/ert.texi (Running Tests in Batch Mode): Document test
selectors.
---
doc/misc/ert.texi | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/doc/misc/ert.texi b/doc/misc/ert.texi
index 2dbba095d6..889216cbef 100644
--- a/doc/misc/ert.texi
+++ b/doc/misc/ert.texi
@@ -337,10 +337,14 @@ Running Tests in Batch Mode
In quiet mode ERT prints only unexpected results and summary.
-If ERT is not part of your Emacs distribution, you may need to use
-@code{-L /path/to/ert/} so that Emacs can find it. You may need
-additional @code{-L} flags to ensure that @code{my-tests.el} and all the
-files that it requires are on your @code{load-path}.
+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
@node Test Selectors
--
2.20.1
next prev parent reply other threads:[~2019-09-28 16:07 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
2019-09-22 14:46 ` Eli Zaretskii
2019-09-22 17:23 ` Lars Ingebrigtsen
2019-09-28 16:07 ` Stefan Kangas [this message]
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=CADwFkmnHSZS1nsQAzGXYvUAT5zXF0t1s-uNmfYqB+ZR91+afQw@mail.gmail.com \
--to=stefan@marxist.se \
--cc=37476-done@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).