Merge pull request #22048 from github/jketema/kotlin1-pytest

Kotlin: Update tests to use new `kotlin_2_3_20` fixture
This commit is contained in:
Jeroen Ketema
2026-06-25 15:01:33 +02:00
committed by GitHub
6 changed files with 7 additions and 21 deletions

View File

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

View File

@@ -1,8 +1,6 @@
import commands
import pytest
@pytest.mark.kotlin1
def test(codeql, java_full):
def test(codeql, java_full, kotlinc_2_3_20):
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,6 +1,2 @@
import pytest
@pytest.mark.kotlin1
def test(codeql, java_full):
codeql.database.create(command="kotlinc -J-Xmx2G -language-version 1.9 SomeClass.kt")
def test(codeql, java_full, kotlinc_2_3_20):
codeql.database.create(command=f"kotlinc -J-Xmx2G -language-version 1.9 SomeClass.kt")

View File

@@ -1,8 +1,6 @@
import commands
import pytest
@pytest.mark.kotlin1
def test(codeql, java_full):
def test(codeql, java_full, kotlinc_2_3_20):
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,8 +1,6 @@
import commands
import pytest
@pytest.mark.kotlin1
def test(codeql, java_full):
def test(codeql, java_full, kotlinc_2_3_20):
commands.run(["javac", "Test.java", "-d", "bin"])
codeql.database.create(command="kotlinc -language-version 1.9 user.kt -cp bin")

View File

@@ -1,9 +1,7 @@
import commands
import pytest
@pytest.mark.kotlin1
def test(codeql, java_full):
def test(codeql, java_full, kotlinc_2_3_20):
# 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"])
codeql.database.create(