Fix a few tests failing due to Gradle version change.
This commit is contained in:
+3
-3
@@ -299,7 +299,7 @@ class KotlinGradleIT: BaseGradleIT() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testWipeClassesDirectoryBetweenBuilds() {
|
fun testWipeClassesDirectoryBetweenBuilds() {
|
||||||
val project = Project("kotlinJavaProject", NoSpecificGradleVersion)
|
val project = Project("kotlinJavaProject", SpecificGradleVersion("3.5"))
|
||||||
|
|
||||||
project.build("build") {
|
project.build("build") {
|
||||||
assertSuccessful()
|
assertSuccessful()
|
||||||
@@ -589,7 +589,7 @@ class KotlinGradleIT: BaseGradleIT() {
|
|||||||
val deployKotlinSrcKt = File(project.projectDir, "src/deploy/kotlin/kotlinSrc.kt")
|
val deployKotlinSrcKt = File(project.projectDir, "src/deploy/kotlin/kotlinSrc.kt")
|
||||||
deployKotlinSrcKt.appendText("\nfun topLevelFun() = 1")
|
deployKotlinSrcKt.appendText("\nfun topLevelFun() = 1")
|
||||||
|
|
||||||
project.build("build", "compileDeployKotlin") {
|
project.build("build", "deployClasses") {
|
||||||
assertSuccessful()
|
assertSuccessful()
|
||||||
// Main source set should have a *.kotlin_module file without '_main'
|
// Main source set should have a *.kotlin_module file without '_main'
|
||||||
assertFileExists(kotlinClassesDir() + "META-INF/$archivesBaseName.kotlin_module")
|
assertFileExists(kotlinClassesDir() + "META-INF/$archivesBaseName.kotlin_module")
|
||||||
@@ -605,7 +605,7 @@ class KotlinGradleIT: BaseGradleIT() {
|
|||||||
|
|
||||||
// Check that the Java source in a non-full-depth package structure was located correctly:
|
// Check that the Java source in a non-full-depth package structure was located correctly:
|
||||||
checkBytecodeContains(
|
checkBytecodeContains(
|
||||||
File(project.projectDir, "build/classes/kotlin/main/my/pack/name/app/MyApp.class"),
|
File(project.projectDir, kotlinClassesDir() + "my/pack/name/app/MyApp.class"),
|
||||||
"my/pack/name/util/JUtil.util")
|
"my/pack/name/util/JUtil.util")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-2
@@ -19,7 +19,10 @@ class SimpleKotlinGradleIT : BaseGradleIT() {
|
|||||||
project.build("compileDeployKotlin", "build") {
|
project.build("compileDeployKotlin", "build") {
|
||||||
assertSuccessful()
|
assertSuccessful()
|
||||||
assertContains("Finished executing kotlin compiler using daemon strategy")
|
assertContains("Finished executing kotlin compiler using daemon strategy")
|
||||||
assertReportExists("build/reports/tests/classes/demo.TestSource.html")
|
assertTrue {
|
||||||
|
fileInWorkingDir("build/reports/tests/classes/demo.TestSource.html").exists() ||
|
||||||
|
fileInWorkingDir("build/reports/tests/test/classes/demo.TestSource.html").exists()
|
||||||
|
}
|
||||||
assertContains(":compileKotlin", ":compileTestKotlin", ":compileDeployKotlin")
|
assertContains(":compileKotlin", ":compileTestKotlin", ":compileDeployKotlin")
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -131,7 +134,7 @@ class SimpleKotlinGradleIT : BaseGradleIT() {
|
|||||||
Project("allOpenSpring", GRADLE_VERSION).build("build") {
|
Project("allOpenSpring", GRADLE_VERSION).build("build") {
|
||||||
assertSuccessful()
|
assertSuccessful()
|
||||||
|
|
||||||
val classesDir = File(project.projectDir, "build/classes/main")
|
val classesDir = File(project.projectDir, kotlinClassesDir())
|
||||||
val openClass = File(classesDir, "test/OpenClass.class")
|
val openClass = File(classesDir, "test/OpenClass.class")
|
||||||
val closedClass = File(classesDir, "test/ClosedClass.class")
|
val closedClass = File(classesDir, "test/ClosedClass.class")
|
||||||
assertTrue(openClass.exists())
|
assertTrue(openClass.exists())
|
||||||
|
|||||||
+1
-1
@@ -32,7 +32,7 @@ class UpToDateIT : BaseGradleIT() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun testMutations(vararg mutations: ProjectMutation) {
|
private fun testMutations(vararg mutations: ProjectMutation) {
|
||||||
val project = Project("simpleProject", NoSpecificGradleVersion)
|
val project = Project("simpleProject", GradleVersionAtLeast("4.0"))
|
||||||
project.setupWorkingDir()
|
project.setupWorkingDir()
|
||||||
mutations.forEach {
|
mutations.forEach {
|
||||||
it.initProject(project)
|
it.initProject(project)
|
||||||
|
|||||||
Reference in New Issue
Block a user