Make --low-priority set R8_GRADLE_CORES_PER_FORK
Seems to help with VMs becoming unresponsive to ssh / remote desktop
requests.
Change-Id: I1551b3e7c294da638b8f811cb9ffe909ce34f4c2
diff --git a/tools/test.py b/tools/test.py
index c071e71..26eda1e 100755
--- a/tools/test.py
+++ b/tools/test.py
@@ -409,6 +409,10 @@
if options.low_priority:
gradle_args.append('--priority=low')
+ # Default is 3, but some VMs become unresponsive with this value.
+ # Increase to reduce concurrency.
+ if not os.environ.get('R8_GRADLE_CORES_PER_FORK'):
+ os.environ['R8_GRADLE_CORES_PER_FORK'] = '5'
# Set all necessary Gradle properties and options first.
if options.shard_count: