Skip to content

Commit 402c0f8

Browse files
committed
Kotlin: Update tests to use new kotlin_2_3_20 fixture
1 parent cd23341 commit 402c0f8

6 files changed

Lines changed: 15 additions & 27 deletions

File tree

  • java/ql/integration-tests/kotlin/all-platforms
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
import pathlib
2-
import pytest
32

43

5-
@pytest.mark.kotlin1
6-
def test(codeql, java_full):
4+
def test(codeql, java_full, kotlinc_2_3_20):
75
java_srcs = " ".join([str(s) for s in pathlib.Path().glob("*.java")])
86
codeql.database.create(
97
command=[
108
f"javac {java_srcs} -d build",
11-
"kotlinc -language-version 1.9 user.kt -cp build",
9+
f"{kotlinc_2_3_20} -language-version 1.9 user.kt -cp build",
1210
]
1311
)
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import commands
2-
import pytest
32

43

5-
@pytest.mark.kotlin1
6-
def test(codeql, java_full):
7-
commands.run("kotlinc -language-version 1.9 test.kt -d lib")
8-
codeql.database.create(command="kotlinc -language-version 1.9 user.kt -cp lib")
4+
def test(codeql, java_full, kotlinc_2_3_20):
5+
commands.run(f"{kotlinc_2_3_20} -language-version 1.9 test.kt -d lib")
6+
codeql.database.create(command=f"{kotlinc_2_3_20} -language-version 1.9 user.kt -cp lib")
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
1-
import pytest
2-
3-
4-
@pytest.mark.kotlin1
5-
def test(codeql, java_full):
6-
codeql.database.create(command="kotlinc -J-Xmx2G -language-version 1.9 SomeClass.kt")
1+
def test(codeql, java_full, kotlinc_2_3_20):
2+
codeql.database.create(command=f"{kotlinc_2_3_20} -J-Xmx2G -language-version 1.9 SomeClass.kt")
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import commands
2-
import pytest
32

43

5-
@pytest.mark.kotlin1
6-
def test(codeql, java_full):
7-
commands.run("kotlinc -language-version 1.9 A.kt")
8-
codeql.database.create(command="kotlinc -cp . -language-version 1.9 B.kt C.kt")
4+
def test(codeql, java_full, kotlinc_2_3_20):
5+
commands.run(f"{kotlinc_2_3_20} -language-version 1.9 A.kt")
6+
codeql.database.create(command=f"{kotlinc_2_3_20} -cp . -language-version 1.9 B.kt C.kt")

java/ql/integration-tests/kotlin/all-platforms/java-interface-redeclares-tostring/test.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import pytest
33

44

5-
@pytest.mark.kotlin1
6-
def test(codeql, java_full):
5+
def test(codeql, java_full, kotlinc_2_3_20):
76
commands.run(["javac", "Test.java", "-d", "bin"])
8-
codeql.database.create(command="kotlinc -language-version 1.9 user.kt -cp bin")
7+
codeql.database.create(command=f"{kotlinc_2_3_20} -language-version 1.9 user.kt -cp bin")

java/ql/integration-tests/kotlin/all-platforms/kotlin_java_lowering_wildcards/test.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22
import pytest
33

44

5-
@pytest.mark.kotlin1
6-
def test(codeql, java_full):
5+
def test(codeql, java_full, kotlinc_2_3_20):
76
# 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.
87
commands.run(["javac", "JavaDefns2.java"])
98
codeql.database.create(
109
command=[
11-
"kotlinc kotlindefns.kt",
10+
f"{kotlinc_2_3_20} kotlindefns.kt",
1211
"javac JavaUser.java JavaDefns.java -cp .",
13-
"kotlinc -language-version 1.9 -cp . kotlinuser.kt",
12+
f"{kotlinc_2_3_20} -language-version 1.9 -cp . kotlinuser.kt",
1413
]
1514
)

0 commit comments

Comments
 (0)