Kotlin: mark kotlin1 integration tests

Mark the integration tests that require a Kotlin 1.x language version
with @pytest.mark.kotlin1 so CI can run them on a pinned pre-2.4
compiler (Kotlin 2.4 no longer accepts -language-version 1.9).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Anders Fugmann
2026-06-16 16:24:43 +02:00
parent e10743bd08
commit 1b785a8ff6
6 changed files with 19 additions and 0 deletions

View File

@@ -1,6 +1,9 @@
import pathlib
import pytest
@pytest.mark.kotlin1
def test(codeql, java_full):
java_srcs = " ".join([str(s) for s in pathlib.Path().glob("*.java")])
codeql.database.create(

View File

@@ -1,6 +1,9 @@
import commands
import pytest
@pytest.mark.kotlin1
def test(codeql, java_full):
commands.run("kotlinc -language-version 1.9 test.kt -d lib")
codeql.database.create(command="kotlinc -language-version 1.9 user.kt -cp lib")

View File

@@ -1,2 +1,6 @@
import pytest
@pytest.mark.kotlin1
def test(codeql, java_full):
codeql.database.create(command="kotlinc -J-Xmx2G -language-version 1.9 SomeClass.kt")

View File

@@ -1,6 +1,9 @@
import commands
import pytest
@pytest.mark.kotlin1
def test(codeql, java_full):
commands.run("kotlinc -language-version 1.9 A.kt")
codeql.database.create(command="kotlinc -cp . -language-version 1.9 B.kt C.kt")

View File

@@ -1,6 +1,9 @@
import commands
import pytest
@pytest.mark.kotlin1
def test(codeql, java_full):
commands.run(["javac", "Test.java", "-d", "bin"])
codeql.database.create(command="kotlinc -language-version 1.9 user.kt -cp bin")

View File

@@ -1,6 +1,9 @@
import commands
import pytest
@pytest.mark.kotlin1
def test(codeql, java_full):
# Compile the JavaDefns2 copy outside tracing, to make sure the Kotlin view of it matches the Java view seen by the traced javac compilation of JavaDefns.java below.
commands.run(["javac", "JavaDefns2.java"])