[tests] use tests for compiler and stdlib from composite build

This commit is contained in:
Vasily Levchenko
2019-06-06 12:35:16 +03:00
parent c5cc5c3d2f
commit 6ed068862a
+19 -20
View File
@@ -50,16 +50,26 @@ repositories {
dependencies {
cli_bc project(path: ':backend.native', configuration: 'cli_bc')
update_tests (group: 'org', name: 'Kotlin_dev_Compiler', version: testKotlinCompilerVersion) {
artifact {
name = 'internal/kotlin-test-data'
type = 'zip'
if (project.hasProperty("kotlinProjectPath")) {
/**
* TODO: It's desired to get archives from composite build automatically, but still user have to execute :kotlin:zipTestData,
* unfortuantly `buildBy` on ConfigurableFileCollection doesn't work as desired and added dependsOn `:kotlin:zipTestData` in tasks
* using `update_external_tests` fails on evaluation phase.
*/
update_tests files(Paths.get(project.property("kotlinProjectPath").toString(), "dist", "kotlin-test-data.zip").toFile())
update_stdlib_tests files(Paths.get(project.property("kotlinProjectPath").toString(), "dist", "kotlin-stdlib-tests.zip").toFile())
} else {
update_tests(group: 'org', name: 'Kotlin_dev_Compiler', version: testKotlinCompilerVersion) {
artifact {
name = 'internal/kotlin-test-data'
type = 'zip'
}
}
}
update_stdlib_tests (group: 'org', name: 'Kotlin_dev_Compiler', version: kotlinStdlibVersion) {
artifact {
name = 'internal/kotlin-stdlib-tests'
type = 'zip'
update_stdlib_tests (group: 'org', name: 'Kotlin_dev_Compiler', version: kotlinStdlibVersion) {
artifact {
name = 'internal/kotlin-stdlib-tests'
type = 'zip'
}
}
}
}
@@ -121,17 +131,6 @@ def update_external_tests() {
externalTestsDir.mkdirs()
def compilerTestsFiles = configurations.update_tests.asFileTree
if (project.hasProperty("kotlinProjectPath")) {
def f = Paths.get(project.property("kotlinProjectPath").toString(), "dist", "kotlin-test-data.zip").toFile()
if (f.exists()) {
println("""
|Using $f as a source of codegen/box* and stdlib tests
|Update test data zip with :kotlin:zipTestData task
""".stripMargin())
compilerTestsFiles = project.files(f)
}
}
copy {
compilerTestsFiles.each {
from(zipTree(it))