From: Lars Ingebrigtsen <larsi@gnus.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: "emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: Re: Splitting some erc tests
Date: Wed, 25 May 2022 03:13:24 +0200 [thread overview]
Message-ID: <87bkvmfm8b.fsf@gnus.org> (raw)
In-Reply-To: <jwvczg2n1ox.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Tue, 24 May 2022 15:59:26 -0400")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> My bet is that they aren't. But IIRC the tests aren't run in the order
> in which they appear in the file, so I suspect that in *most* cases they
> are indeed sufficiently independent for your parallelism use-case.
> And those that aren't should be fixed accordingly.
I've done some slight testing, and it seems to work OK. I've extended
ert-run-tests-batch-and-exit to take a "modulo" parameter to select the
nth test, and then you can pass that in from the Makefile.
However, I'm a bit lost as to how to express this stuff in the Makefile
itself. If we're running without "-j<large-num>", then we don't want to
do this, but that information doesn't seem to be available without
something like this?
https://blog.jgc.org/2015/03/gnu-make-insanity-finding-value-of-j.html
We'd also just want this for a select number of the tests, and the tests
are run as such:
%.log: %.elc
$(AM_V_GEN)${MKDIR_P} $(dir $@)
$(AM_V_at)HOME=$(TEST_HOME) $(emacs) \
-l ert ${ert_opts} -l $(testloadfile) \
$(TEST_RUN_ERT)
What would be the most convenient way to have a different rule for a set
of named tests? I was first thinking of the moral equivalent of
%.log: %.elc
for i in `seq $jobs`; do
$(emacs) ... (ert-run-tests-batch-and-exit ... $i $jobs) &
done > $*.log
but that goes against the Make grain -- Make should control the
parallelism, of course. So a number of rules like:
%.log-1: %.elc
$(emacs) ... (ert-run-tests-batch-and-exit ... $* $jobs)
or something... but... this is way out of my Makefile comfort zone.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
next prev parent reply other threads:[~2022-05-25 1:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-24 19:11 Splitting some erc tests Lars Ingebrigtsen
2022-05-24 19:59 ` Stefan Monnier
2022-05-25 1:13 ` Lars Ingebrigtsen [this message]
2022-05-25 2:17 ` Stefan Monnier
2022-05-25 12:02 ` Lars Ingebrigtsen
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=87bkvmfm8b.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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.