Allow parallel testing within each subproject

Without this setting, Gradle would run multiple "test" tasks from
multiple subprojects concurrently, but each "test" task would only run
a single test at a time.  Some of our subprojects' test tasks take a
long time to complete, which could easily leave us sequentially
testing on just one or two CPU cores while other cores sit idle.

With this change, Gradle will use as many task slots as are
available (e.g., when run with "--parallel") to run multiple
simultaneous JUnit test classes within any given subproject.  This
seems to be fine for us:  I am unaware of any shared global state that
would cause conflicts between two test classes within any given
subproject.
This commit is contained in:
Ben Liblit 2018-03-31 18:15:40 -05:00
parent 4840966807
commit 3a1b1d1d1e
1 changed files with 2 additions and 0 deletions

View File

@ -87,6 +87,8 @@ subprojects { subproject ->
include '**/*Tests.class' include '**/*Tests.class'
include '**/Test*.class' include '**/Test*.class'
exclude '**/*AndroidLibs*.class' exclude '**/*AndroidLibs*.class'
maxParallelForks = Integer.MAX_VALUE
} }
} }