Temporary change path and fix coroutines package and full_jdk target

This commit is contained in:
Pavel Punegov
2018-06-20 18:46:35 +03:00
committed by Pavel Punegov
parent d503c0c661
commit 6b6a0daf61
2 changed files with 11 additions and 5 deletions
+6 -5
View File
@@ -113,17 +113,18 @@ task installTestLibrary(type: KlibInstall) {
repo = rootProject.file("${project.property("konan.home")}/klib/common")
}
// TODO: use lastSuccessful teamcity build.
// Gets tests from the same Kotlin compiler build
task update_external_tests() {
doLast {
// Unzip.
delete temporaryDir
copy {
configurations.update_tests.asFileTree.each {
from(zipTree(it)) {
include 'compiler/**'
// configurations.update_tests.asFileTree.each {
// from(zipTree(it)) {
from(zipTree(file('/Users/ppunegov/ws/kotlin/dist/kotlin-test-data.zip'))) {
include 'compiler/**'
}
}
into(temporaryDir)
}
@@ -647,6 +647,9 @@ class RunExternalTestGroup extends RunStandaloneKonanTest {
def result = super.buildCompileList()
for (String filePath : result) {
def text = project.file(filePath).text
if (text.contains('COROUTINES_PACKAGE')) {
text.replaceAll('COROUTINES_PACKAGE', 'kotlin.coroutines.experimental')
}
def pkg = null
if (text =~ packagePattern) {
pkg = (text =~ packagePattern)[0][1]
@@ -778,6 +781,8 @@ fun runTest() {
for (String s : ignoredBackends) {
if (s.contains("NATIVE")) { return false }
}
// No ignored backends. Check if test is targeted to FULL_JDK
if (!findLinesWithPrefixesRemoved(text, "// FULL_JDK").isEmpty()) { return false }
return true
}
}