On Sat, 29 Apr 2023 13:48:28 GMT, Kevin Rushforth <[email protected]> wrote:

> "gradle test" won't rerun a test that has already passed. This is surprising 
> behavior, especially for UI toolkit tests where there might be many reasons 
> to want to run the tests again, even if none of that tests "inputs" have 
> changed. This is especially bothersome when debugging an intermittent test 
> failure. Unlike rebuilding the JavaFX runtime or the docs, where there is no 
> need to rerun a task that was successful if none of the inputs to that task 
> have changed, I expect gradle to run my test when I tell it to.
> 
> This PR will make test tasks always run when specified.

FYI Gradle 7.6 introduced `--rerun` command which kind of solves that problem. 
There used to be a `--rerun-tasks` option which invalidates all tasks 
(including dependencies), but now the process is improved - if you run for 
example `gradle --info :web:test --rerun` it's going to qualify only the 
`:web:test` target as out of date, but all dependent tasks will remain 
up-to-date and will be skipped.

I do, however, agree that the behavior introduced by this change might be more 
intuitive when it comes to running tests.

-------------

PR Comment: https://git.openjdk.org/jfx/pull/1120#issuecomment-1529672716

Reply via email to