mirror of
https://github.com/github/codeql.git
synced 2025-12-18 09:43:15 +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.
16 lines
532 B
Python
16 lines
532 B
Python
import commands
|
|
import pathlib
|
|
|
|
|
|
def test(codeql, java_full):
|
|
fake_kotlin_classes = pathlib.Path("fake-kotlinc-classes")
|
|
fake_kotlin_classes.mkdir()
|
|
for source_file in pathlib.Path("fake-kotlinc-source").rglob("*.java"):
|
|
commands.run(
|
|
f"javac {source_file.relative_to("fake-kotlinc-source")} -d {fake_kotlin_classes.absolute()}",
|
|
_cwd="fake-kotlinc-source",
|
|
)
|
|
codeql.database.create(
|
|
command=[f"java -cp {fake_kotlin_classes} driver.Main"], _assert_failure=True
|
|
)
|