Migrate binary-compatibility-validator tests to gradle.
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
apply plugin: 'kotlin'
|
||||
|
||||
dependencies {
|
||||
compile project(':kotlin-stdlib')
|
||||
compile 'org.ow2.asm:asm-debug-all:5.0.4'
|
||||
compile 'com.google.code.gson:gson:2.6.2'
|
||||
testCompile project(':kotlin-test:kotlin-test-junit')
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
test {
|
||||
java {
|
||||
srcDir "src/test/kotlin"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
compileTestKotlin {
|
||||
kotlinOptions {
|
||||
freeCompilerArgs = ['-Xdump-declarations-to', "${buildDir}/cases-declarations.json"]
|
||||
}
|
||||
}
|
||||
|
||||
test {
|
||||
dependsOn cleanCompileTestKotlin
|
||||
dependsOn(':kotlin-stdlib:originalStdlibJar')
|
||||
|
||||
systemProperties['overwrite.output'] = System.getProperty("overwrite.output", "false")
|
||||
jvmArgs '-ea'
|
||||
}
|
||||
+2
-2
@@ -8,8 +8,8 @@ import java.io.File
|
||||
class CasesPublicAPITest {
|
||||
|
||||
companion object {
|
||||
val visibilities = readKotlinVisibilities(File("target/cases-declarations.json"))
|
||||
val baseClassPath = File("target/test-classes/cases").absoluteFile
|
||||
val visibilities = readKotlinVisibilities(File("build/cases-declarations.json"))
|
||||
val baseClassPath = File("build/classes/test/cases").absoluteFile
|
||||
val baseOutputPath = File("src/test/kotlin/cases")
|
||||
}
|
||||
|
||||
|
||||
+4
-3
@@ -30,15 +30,16 @@ class RuntimePublicAPITest {
|
||||
val testName = TestName()
|
||||
|
||||
@Test fun kotlinRuntime() {
|
||||
snapshotAPIAndCompare("../../tools/runtime/target", "kotlin-runtime", listOf("runtime-declarations.json"), listOf("kotlin.jvm.internal"))
|
||||
snapshotAPIAndCompare("../../tools/runtime/build/libs", "kotlin-runtime", listOf("../runtime-declarations.json"), listOf("kotlin.jvm.internal"))
|
||||
}
|
||||
|
||||
//@Ignore("No more original stdlib jar is produced")
|
||||
@Test fun kotlinStdlib() {
|
||||
snapshotAPIAndCompare("../../stdlib/target", "original-kotlin-stdlib", listOf("stdlib-declarations.json"))
|
||||
snapshotAPIAndCompare("../../stdlib/build/libs", "original-kotlin-stdlib", listOf("../stdlib-declarations.json"))
|
||||
}
|
||||
|
||||
@Test fun kotlinStdlibRuntimeMerged() {
|
||||
snapshotAPIAndCompare("../../stdlib/target", "kotlin-stdlib", listOf("stdlib-declarations.json", "../../tools/runtime/target/runtime-declarations.json"), listOf("kotlin.jvm.internal"))
|
||||
snapshotAPIAndCompare("../../stdlib/build/libs", "kotlin-stdlib", listOf("../stdlib-declarations.json", "../runtime-declarations.json"), listOf("kotlin.jvm.internal"))
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user