Migrate binary-compatibility-validator tests to gradle.
This commit is contained in:
+18
-23
@@ -1,26 +1,21 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Binary compatibility tests, overwrite results" type="JUnit" factoryName="JUnit">
|
||||
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
|
||||
<module name="binary-compatibility-validator" />
|
||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
||||
<option name="ALTERNATIVE_JRE_PATH" />
|
||||
<option name="PACKAGE_NAME" value="" />
|
||||
<option name="MAIN_CLASS_NAME" value="" />
|
||||
<option name="METHOD_NAME" value="" />
|
||||
<option name="TEST_OBJECT" value="package" />
|
||||
<option name="VM_PARAMETERS" value="-ea -Doverwrite.output=true" />
|
||||
<option name="PARAMETERS" value="" />
|
||||
<option name="WORKING_DIRECTORY" value="file://$MODULE_DIR$" />
|
||||
<option name="ENV_VARIABLES" />
|
||||
<option name="PASS_PARENT_ENVS" value="true" />
|
||||
<option name="TEST_SEARCH_SCOPE">
|
||||
<value defaultName="singleModule" />
|
||||
</option>
|
||||
<envs />
|
||||
<patterns />
|
||||
<method>
|
||||
<option name="Make" enabled="false" />
|
||||
<option name="Maven.BeforeRunTask" enabled="true" file="$PROJECT_DIR$/pom.xml" goal="clean package -pl :kotlin-runtime,:kotlin-stdlib,:binary-compatibility-validator -DskipTests" />
|
||||
</method>
|
||||
<configuration default="false" name="Binary compatibility tests, overwrite results" type="GradleRunConfiguration" factoryName="Gradle">
|
||||
<ExternalSystemSettings>
|
||||
<option name="executionName" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$/tools/binary-compatibility-validator" />
|
||||
<option name="externalSystemIdString" value="GRADLE" />
|
||||
<option name="scriptParameters" value=" --tests * " />
|
||||
<option name="taskDescriptions">
|
||||
<list />
|
||||
</option>
|
||||
<option name="taskNames">
|
||||
<list>
|
||||
<option value=":tools:binary-compatibility-validator:cleanTest" />
|
||||
<option value=":tools:binary-compatibility-validator:test" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="vmOptions" value="-Doverwrite.output=true" />
|
||||
</ExternalSystemSettings>
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
||||
@@ -11,6 +11,7 @@ include ':kotlin-stdlib'
|
||||
include ':kotlin-stdlib-js'
|
||||
include ':kotlin-stdlib-jre7'
|
||||
include ':kotlin-stdlib-jre8'
|
||||
include ':tools:binary-compatibility-validator'
|
||||
//include ':kotlin-reflect'
|
||||
|
||||
//include ':kotlin-compiler'
|
||||
|
||||
@@ -32,6 +32,11 @@ dependencies {
|
||||
testCompile project(':kotlin-test:kotlin-test-junit')
|
||||
}
|
||||
|
||||
task originalStdlibJar(type: Jar) {
|
||||
baseName = 'original-kotlin-stdlib'
|
||||
from sourceSets.main.output
|
||||
}
|
||||
|
||||
jar {
|
||||
manifestAttributes(manifest, project, 'Core')
|
||||
from("${rootDir}/../dist/builtins")
|
||||
|
||||
@@ -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