Skip to content

Commit 01587a7

Browse files
authored
In Android tests, disable Gradle daemon (#796)
* In Android tests, disable Gradle daemon * Update worker setup instructions * Add details to comment
1 parent b62dece commit 01587a7

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

‎master/custom/factories.py‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1320,15 +1320,19 @@ class AndroidBuild(BaseBuild):
13201320
"""Build Python for Android on a Linux or Mac machine, and test it using a
13211321
Gradle-managed emulator.
13221322
1323-
To set up a worker, see cpython/Android/README.md, especially the following
1324-
sections:
1323+
To set up a worker, see cpython/Platforms/Android/README.md, especially the
1324+
following sections:
13251325
13261326
* Install everything listed under "Prerequisites".
13271327
* Do any OS-specific setup mentioned under "Testing".
1328-
* If the managed emulator appears to be running out of memory, increase
1329-
its RAM size as described under "Testing".
13301328
"""
13311329

1330+
# When Gradle is interrupted, e.g. by a master shutdown, it sometimes gets
1331+
# into a state where it can't start emulators anymore. Work around this by
1332+
# not reusing Gradle daemons between runs
1333+
# (https://github.com/python/cpython/pull/155518#issuecomment-5259725142).
1334+
test_environ = {"GRADLE_OPTS": "-Dorg.gradle.daemon=false"}
1335+
13321336
def setup(self, **kwargs):
13331337
android_py = ["python3", "Platforms/Android"]
13341338
self.addSteps([
@@ -1375,6 +1379,7 @@ def setup(self, **kwargs):
13751379
Test(
13761380
command=android_py + ["test", "--managed", "maxVersion", "-v", "--slow-ci"],
13771381
timeout=step_timeout(self.test_timeout),
1382+
env=self.test_environ,
13781383
),
13791384
])
13801385

0 commit comments

Comments
 (0)