Warn about missing testData instead of failing (#3478)
* Warn about tests instead of failing with NPE
This commit is contained in:
@@ -48,15 +48,25 @@ repositories {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
cli_bc project(path: ':backend.native', configuration: 'cli_bc')
|
cli_bc project(path: ':backend.native', configuration: 'cli_bc')
|
||||||
|
def updateTestData = true
|
||||||
if (project.hasProperty("kotlinProjectPath")) {
|
if (project.hasProperty("kotlinProjectPath")) {
|
||||||
/**
|
def kotlinProj = project.property("kotlinProjectPath").toString()
|
||||||
* TODO: It's desired to get archives from composite build automatically, but still user have to execute :kotlin:zipTestData,
|
def testDataZip = Paths.get(kotlinProj, "dist", "kotlin-test-data.zip").toFile()
|
||||||
* unfortuantly `buildBy` on ConfigurableFileCollection doesn't work as desired and added dependsOn `:kotlin:zipTestData` in tasks
|
if (testDataZip.exists()) {
|
||||||
* using `update_external_tests` fails on evaluation phase.
|
update_tests files(testDataZip)
|
||||||
*/
|
updateTestData = false
|
||||||
update_tests files(Paths.get(project.property("kotlinProjectPath").toString(), "dist", "kotlin-test-data.zip").toFile())
|
} else {
|
||||||
update_stdlib_tests files(Paths.get(project.property("kotlinProjectPath").toString(), "dist", "kotlin-stdlib-tests.zip").toFile())
|
println("WARN: using tests provided by gradle.properties. Please execute :kotlin:zipTestData")
|
||||||
} else {
|
}
|
||||||
|
def stdlibTestsZip = Paths.get(kotlinProj, "dist", "kotlin-stdlib-tests.zip").toFile()
|
||||||
|
if (stdlibTestsZip.exists()) {
|
||||||
|
update_stdlib_tests files(stdlibTestsZip)
|
||||||
|
updateTestData = false
|
||||||
|
} else {
|
||||||
|
println("WARNING: using stdlib tests provided by gradle.properties. Please execute :kotlin:zipTestData")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (updateTestData) {
|
||||||
update_tests(group: 'org', name: 'Kotlin_KotlinPublic_Compiler', version: testKotlinCompilerVersion) {
|
update_tests(group: 'org', name: 'Kotlin_KotlinPublic_Compiler', version: testKotlinCompilerVersion) {
|
||||||
artifact {
|
artifact {
|
||||||
name = 'internal/kotlin-test-data'
|
name = 'internal/kotlin-test-data'
|
||||||
|
|||||||
Reference in New Issue
Block a user