mirror of
https://github.com/github/codeql.git
synced 2026-02-26 03:43:41 +01:00
We are no longer bound to the platform-specific directories, so simplify the test organization. If you don't want this change, just skip merging this PR. It's purely optional. I kept the platform-specific directories around under `kotlin`, but you could also easily merge all these together if you find them unhelpful. I'll leave that change to you.
18 lines
542 B
Python
18 lines
542 B
Python
import tempfile
|
|
import runs_on
|
|
import pathlib
|
|
|
|
|
|
# The version of gradle used doesn't work on java 17
|
|
def test(codeql, use_java_11, java, environment):
|
|
gradle_override_dir = pathlib.Path(tempfile.mkdtemp())
|
|
if runs_on.windows:
|
|
(gradle_override_dir / "gradle.bat").write_text("@echo off\nexit /b 2\n")
|
|
else:
|
|
gradlepath = gradle_override_dir / "gradle"
|
|
gradlepath.write_text("#!/bin/bash\nexit 1\n")
|
|
gradlepath.chmod(0o0755)
|
|
|
|
environment.add_path(gradle_override_dir)
|
|
codeql.database.create()
|