Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@
from diagnostics_test_utils import *

# Ensure we're using an old Java version that won't work with Gradle
if "JAVA_HOME_8_X64" in os.environ:
os.environ["JAVA_HOME"] = os.environ["JAVA_HOME_8_X64"]
sep = ";" if platform.system() == "Windows" else ":"
os.environ["PATH"] = "".join([os.path.join(os.environ["JAVA_HOME"], "bin"), sep, os.environ["PATH"]])
for k in os.environ:
if k.upper() in ["JAVA_HOME_8_X64", "JAVA_HOME_8_ARM64"]:
os.environ["JAVA_HOME"] = os.environ[k]
sep = ";" if platform.system() == "Windows" else ":"
os.environ["PATH"] = "".join([os.path.join(os.environ["JAVA_HOME"], "bin"), sep, os.environ["PATH"]])
break

# Ensure the autobuilder *doesn't* see Java 11 or 17, which it could switch to in order to build the project:
for k in ["JAVA_HOME_11_X64", "JAVA_HOME_17_X64"]:
if k in os.environ:
# Ensure the autobuilder *doesn't* see newer Java versions, which it could switch to in order to build the project:
for k in os.environ:
if re.match(r"^JAVA_HOME_\d\d_", k):
del os.environ[k]

# Use a custom, empty toolchains.xml file so the autobuilder doesn't see any Java versions that may be
Expand Down