From 402c0f89bc63ed951dfc40b145cbd78af54ed365 Mon Sep 17 00:00:00 2001 From: Jeroen Ketema Date: Wed, 24 Jun 2026 22:50:32 +0200 Subject: [PATCH 1/3] Kotlin: Update tests to use new `kotlin_2_3_20` fixture --- .../kotlin/all-platforms/enhanced-nullability/test.py | 6 ++---- .../all-platforms/external-property-overloads/test.py | 8 +++----- .../all-platforms/extractor_information_kotlin1/test.py | 8 ++------ .../kotlin/all-platforms/file_classes/test.py | 8 +++----- .../java-interface-redeclares-tostring/test.py | 5 ++--- .../all-platforms/kotlin_java_lowering_wildcards/test.py | 7 +++---- 6 files changed, 15 insertions(+), 27 deletions(-) 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 bec294a0623c..ee985f6de57c 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,13 +1,11 @@ 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=[ f"javac {java_srcs} -d build", - "kotlinc -language-version 1.9 user.kt -cp build", + f"{kotlinc_2_3_20} -language-version 1.9 user.kt -cp build", ] ) 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 711066d9490e..ca6aa65e8afe 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,8 +1,6 @@ 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") +def test(codeql, java_full, kotlinc_2_3_20): + commands.run(f"{kotlinc_2_3_20} -language-version 1.9 test.kt -d lib") + codeql.database.create(command=f"{kotlinc_2_3_20} -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 6167bca8034f..8da2eacc7209 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,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_2_3_20} -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 cdd8dee68ba9..92689da36545 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,8 +1,6 @@ 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") +def test(codeql, java_full, kotlinc_2_3_20): + commands.run(f"{kotlinc_2_3_20} -language-version 1.9 A.kt") + codeql.database.create(command=f"{kotlinc_2_3_20} -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 c0fc238c2a06..e559a8ef8667 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 @@ -2,7 +2,6 @@ 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") + codeql.database.create(command=f"{kotlinc_2_3_20} -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 c44bc319a957..9238134e51af 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 @@ -2,14 +2,13 @@ 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( command=[ - "kotlinc kotlindefns.kt", + f"{kotlinc_2_3_20} kotlindefns.kt", "javac JavaUser.java JavaDefns.java -cp .", - "kotlinc -language-version 1.9 -cp . kotlinuser.kt", + f"{kotlinc_2_3_20} -language-version 1.9 -cp . kotlinuser.kt", ] ) From f6b3d1eade198806fc00f189c6609aca6937600f Mon Sep 17 00:00:00 2001 From: Jeroen Ketema Date: Wed, 24 Jun 2026 23:34:39 +0200 Subject: [PATCH 2/3] Kotlin: Remove unneeded pytest imports --- .../all-platforms/java-interface-redeclares-tostring/test.py | 1 - .../kotlin/all-platforms/kotlin_java_lowering_wildcards/test.py | 1 - 2 files changed, 2 deletions(-) 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 e559a8ef8667..c99a0990804f 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,5 +1,4 @@ import commands -import pytest def test(codeql, java_full, kotlinc_2_3_20): 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 9238134e51af..e622858b5b99 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,5 +1,4 @@ import commands -import pytest def test(codeql, java_full, kotlinc_2_3_20): From 9b2e6077f18dd3bf2da69b6a27585edd1609ad1e Mon Sep 17 00:00:00 2001 From: Jeroen Ketema Date: Thu, 25 Jun 2026 12:58:27 +0200 Subject: [PATCH 3/3] Kotlin: Address review comments --- .../kotlin/all-platforms/enhanced-nullability/test.py | 2 +- .../kotlin/all-platforms/external-property-overloads/test.py | 4 ++-- .../all-platforms/extractor_information_kotlin1/test.py | 2 +- .../kotlin/all-platforms/file_classes/test.py | 4 ++-- .../all-platforms/java-interface-redeclares-tostring/test.py | 2 +- .../all-platforms/kotlin_java_lowering_wildcards/test.py | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) 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 ee985f6de57c..e6aa92cfc297 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 @@ -6,6 +6,6 @@ def test(codeql, java_full, kotlinc_2_3_20): codeql.database.create( command=[ f"javac {java_srcs} -d build", - f"{kotlinc_2_3_20} -language-version 1.9 user.kt -cp build", + "kotlinc -language-version 1.9 user.kt -cp build", ] ) 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 ca6aa65e8afe..d21c0541cf4f 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 @@ -2,5 +2,5 @@ def test(codeql, java_full, kotlinc_2_3_20): - commands.run(f"{kotlinc_2_3_20} -language-version 1.9 test.kt -d lib") - codeql.database.create(command=f"{kotlinc_2_3_20} -language-version 1.9 user.kt -cp lib") + 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 8da2eacc7209..eea3fcbf5492 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,2 @@ def test(codeql, java_full, kotlinc_2_3_20): - codeql.database.create(command=f"{kotlinc_2_3_20} -J-Xmx2G -language-version 1.9 SomeClass.kt") + codeql.database.create(command=f"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 92689da36545..baf7556962d9 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 @@ -2,5 +2,5 @@ def test(codeql, java_full, kotlinc_2_3_20): - commands.run(f"{kotlinc_2_3_20} -language-version 1.9 A.kt") - codeql.database.create(command=f"{kotlinc_2_3_20} -cp . -language-version 1.9 B.kt C.kt") + 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 c99a0990804f..57b0b6605616 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 @@ -3,4 +3,4 @@ def test(codeql, java_full, kotlinc_2_3_20): commands.run(["javac", "Test.java", "-d", "bin"]) - codeql.database.create(command=f"{kotlinc_2_3_20} -language-version 1.9 user.kt -cp 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 e622858b5b99..6346892aaa76 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 @@ -6,8 +6,8 @@ def test(codeql, java_full, kotlinc_2_3_20): commands.run(["javac", "JavaDefns2.java"]) codeql.database.create( command=[ - f"{kotlinc_2_3_20} kotlindefns.kt", + "kotlinc kotlindefns.kt", "javac JavaUser.java JavaDefns.java -cp .", - f"{kotlinc_2_3_20} -language-version 1.9 -cp . kotlinuser.kt", + "kotlinc -language-version 1.9 -cp . kotlinuser.kt", ] )