Files
codeql/java/ql/integration-tests/kotlin/all-platforms/enabling/test.py
Cornelius Riemenschneider 321820e758 Java: Rename integration test directories.
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.
2024-08-30 10:28:25 +02:00

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)