Skip to content

Commit 9660b47

Browse files
committed
Hide GHA variables in java-version-too-old test
1 parent e8423f8 commit 9660b47

File tree

1 file changed

+5
-0
lines changed
  • java/ql/integration-tests/all-platforms/java/diagnostics/java-version-too-old

1 file changed

+5
-0
lines changed

java/ql/integration-tests/all-platforms/java/diagnostics/java-version-too-old/test.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
sep = ";" if platform.system() == "Windows" else ":"
99
os.environ["PATH"] = "".join([os.path.join(os.environ["JAVA_HOME"], "bin"), sep, os.environ["PATH"]])
1010

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:
14+
del os.environ[k]
15+
1116
run_codeql_database_create([], lang="java", runFunction = runUnsuccessfully, db = None)
1217

1318
check_diagnostics()

0 commit comments

Comments
 (0)