lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dawid Weiss <>
Subject Re: Gradle build effort (respin, please read)
Date Mon, 02 Dec 2019 16:35:28 GMT
> - run a single unit test (NOTE: one of the TODO’s is running the test multiple times.
Gradle defaults to marking a test as “good” once it passes and doesn’t re-run it until
there are code changes. This can be fixed)

See gradlew :helpTests, Erick -- I corrected some of it today. In short:

You can already run a single test multiple times with tests.iters
(passed via -P or -D). This works from IDEs as well (because it's the
runner's code, not gradle). Full 'beasting' mode is more difficult
because current working directories will overlap. I have some ideas
how this can be solved.

I don't think we should force tests to re-run if nothing has changed.
If everything is up-to-date and no properties have changed, the tests
should skip. It really helps with incremental runs. Please note that
"nothing has changed" is tricky with gradle because it takes all the
properties, arguments, etc. passed to the test runner as input -- we
pick a random test seed on each run so tests should re-run
automatically because the seed will be different. However, if you run
the same seed multiple times over (gradlew test -Ptests.seed=deadbeef)
then it will indeed skip them. Finally, if you wish to force a re-run
of any task gradle gives you many options to do so (the simplest is to
add a forced "cleanXXX" of a task named XXX - try it: gradlew
cleanTest test -Ptests.seed=deadbeef).

I will add this explanation to the tests help file.

I've warned gradle can be frustratingly complex! (but once you learn
it it's fun ;).


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message