From 1b785a8ff66bb83a3d9d8c2791863ac8a753df63 Mon Sep 17 00:00:00 2001 From: Anders Fugmann Date: Tue, 16 Jun 2026 16:24:43 +0200 Subject: [PATCH] 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> --- .../kotlin/all-platforms/enhanced-nullability/test.py | 3 +++ .../kotlin/all-platforms/external-property-overloads/test.py | 3 +++ .../all-platforms/extractor_information_kotlin1/test.py | 4 ++++ .../kotlin/all-platforms/file_classes/test.py | 3 +++ .../all-platforms/java-interface-redeclares-tostring/test.py | 3 +++ .../all-platforms/kotlin_java_lowering_wildcards/test.py | 3 +++ 6 files changed, 19 insertions(+) diff --git a/java/ql/integration-tests/kotlin/all-platforms/enhanced-nullability/test.py b/java/ql/integration-tests/kotlin/all-platforms/enhanced-nullability/test.py index e030b51db8f..d4dc20e7e65 100644 --- a/java/ql/integration-tests/kotlin/all-platforms/enhanced-nullability/test.py +++ b/java/ql/integration-tests/kotlin/all-platforms/enhanced-nullability/test.py @@ -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( diff --git a/java/ql/integration-tests/kotlin/all-platforms/external-property-overloads/test.py b/java/ql/integration-tests/kotlin/all-platforms/external-property-overloads/test.py index 403f3729d06..6306fe00a9a 100644 --- a/java/ql/integration-tests/kotlin/all-platforms/external-property-overloads/test.py +++ b/java/ql/integration-tests/kotlin/all-platforms/external-property-overloads/test.py @@ -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") diff --git a/java/ql/integration-tests/kotlin/all-platforms/extractor_information_kotlin1/test.py b/java/ql/integration-tests/kotlin/all-platforms/extractor_information_kotlin1/test.py index 5a0dc9e072b..6167bca8034 100755 --- a/java/ql/integration-tests/kotlin/all-platforms/extractor_information_kotlin1/test.py +++ b/java/ql/integration-tests/kotlin/all-platforms/extractor_information_kotlin1/test.py @@ -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") diff --git a/java/ql/integration-tests/kotlin/all-platforms/file_classes/test.py b/java/ql/integration-tests/kotlin/all-platforms/file_classes/test.py index 99c21ceb0b8..4657b69b8f1 100644 --- a/java/ql/integration-tests/kotlin/all-platforms/file_classes/test.py +++ b/java/ql/integration-tests/kotlin/all-platforms/file_classes/test.py @@ -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") diff --git a/java/ql/integration-tests/kotlin/all-platforms/java-interface-redeclares-tostring/test.py b/java/ql/integration-tests/kotlin/all-platforms/java-interface-redeclares-tostring/test.py index 3db804c83be..98dabf87dde 100644 --- a/java/ql/integration-tests/kotlin/all-platforms/java-interface-redeclares-tostring/test.py +++ b/java/ql/integration-tests/kotlin/all-platforms/java-interface-redeclares-tostring/test.py @@ -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") diff --git a/java/ql/integration-tests/kotlin/all-platforms/kotlin_java_lowering_wildcards/test.py b/java/ql/integration-tests/kotlin/all-platforms/kotlin_java_lowering_wildcards/test.py index d1c4948dfe7..c565721e2c8 100644 --- a/java/ql/integration-tests/kotlin/all-platforms/kotlin_java_lowering_wildcards/test.py +++ b/java/ql/integration-tests/kotlin/all-platforms/kotlin_java_lowering_wildcards/test.py @@ -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"])