mirror of
https://github.com/github/codeql.git
synced 2026-06-19 03:41:07 +02:00
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:
@@ -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(
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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"])
|
||||
|
||||
Reference in New Issue
Block a user