File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
java/ql/integration-tests/all-platforms/java/diagnostics/java-version-too-old Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change 3
3
from diagnostics_test_utils import *
4
4
5
5
# Ensure we're using an old Java version that won't work with Gradle
6
- if "JAVA_HOME_8_X64" in os .environ :
7
- os .environ ["JAVA_HOME" ] = os .environ ["JAVA_HOME_8_X64" ]
8
- sep = ";" if platform .system () == "Windows" else ":"
9
- os .environ ["PATH" ] = "" .join ([os .path .join (os .environ ["JAVA_HOME" ], "bin" ), sep , os .environ ["PATH" ]])
6
+ for k in os .environ :
7
+ if k .upper () in ["JAVA_HOME_8_X64" , "JAVA_HOME_8_ARM64" ]:
8
+ os .environ ["JAVA_HOME" ] = os .environ [k ]
9
+ sep = ";" if platform .system () == "Windows" else ":"
10
+ os .environ ["PATH" ] = "" .join ([os .path .join (os .environ ["JAVA_HOME" ], "bin" ), sep , os .environ ["PATH" ]])
11
+ break
10
12
11
- # Ensure the autobuilder *doesn't* see Java 11 or 17 , which it could switch to in order to build the project:
12
- for k in [ "JAVA_HOME_11_X64" , "JAVA_HOME_17_X64" ] :
13
- if k in os . environ :
13
+ # Ensure the autobuilder *doesn't* see newer Java versions , which it could switch to in order to build the project:
14
+ for k in os . environ :
15
+ if re . match ( r"^JAVA_HOME_\d\d_" , k ) :
14
16
del os .environ [k ]
15
17
16
18
# Use a custom, empty toolchains.xml file so the autobuilder doesn't see any Java versions that may be
You can’t perform that action at this time.
0 commit comments