mirror of
https://github.com/github/codeql.git
synced 2025-12-17 09:13:20 +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.
20 lines
657 B
Python
20 lines
657 B
Python
import os
|
|
import commands
|
|
from build_fixture import build_fixture
|
|
|
|
|
|
@build_fixture
|
|
def build():
|
|
commands.run("kotlinc KotlinDefault.kt")
|
|
os.environ["CODEQL_EXTRACTOR_JAVA_AGENT_DISABLE_KOTLIN"] = "true"
|
|
commands.run("kotlinc KotlinDisabled.kt")
|
|
del os.environ["CODEQL_EXTRACTOR_JAVA_AGENT_DISABLE_KOTLIN"]
|
|
os.environ["CODEQL_EXTRACTOR_JAVA_AGENT_ENABLE_KOTLIN"] = "true"
|
|
commands.run("kotlinc KotlinEnabled.kt")
|
|
|
|
|
|
def test(codeql, java_full, build):
|
|
os.environ.pop("CODEQL_EXTRACTOR_JAVA_AGENT_ENABLE_KOTLIN", None)
|
|
os.environ.pop("CODEQL_EXTRACTOR_JAVA_AGENT_DISABLE_KOTLIN", None)
|
|
codeql.database.create(command=build)
|