[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Splitting some erc tests
From: |
Lars Ingebrigtsen |
Subject: |
Re: Splitting some erc tests |
Date: |
Wed, 25 May 2022 03:13:24 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
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