tests: Download test data as a teamcity artifact
This commit is contained in:
@@ -5,10 +5,24 @@ apply plugin: NativeInteropPlugin
|
||||
|
||||
configurations {
|
||||
cli_bc
|
||||
update_tests
|
||||
}
|
||||
|
||||
repositories {
|
||||
ivy {
|
||||
ivyPattern 'http://teamcity.jetbrains.com/guestAuth/repository/download/[module]/[revision]/teamcity-ivy.xml'
|
||||
artifactPattern 'http://teamcity.jetbrains.com/guestAuth/repository/download/[module]/[revision]/[artifact](.[ext])'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
cli_bc project(path: ':backend.native', configuration: 'cli_bc')
|
||||
update_tests (group: 'org', name: 'bt345', version: testDataVersion) {
|
||||
artifact {
|
||||
name = 'internal/kotlin-test-data'
|
||||
type = 'zip'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def testOutputRoot = rootProject.file("test.output").absolutePath
|
||||
@@ -29,6 +43,36 @@ allprojects {
|
||||
}
|
||||
}
|
||||
|
||||
task update_external_tests() {
|
||||
doLast {
|
||||
// Unzip.
|
||||
delete temporaryDir
|
||||
copy {
|
||||
configurations.update_tests.asFileTree.each {
|
||||
from(zipTree(it)) {
|
||||
include 'compiler/**'
|
||||
}
|
||||
}
|
||||
into(temporaryDir)
|
||||
}
|
||||
|
||||
// Copy only used tests into the test directory.
|
||||
externalTestsDir.mkdirs()
|
||||
delete(externalTestsDir.listFiles())
|
||||
|
||||
copy {
|
||||
from temporaryDir.absolutePath + "/compiler"
|
||||
into(externalTestsDir)
|
||||
include 'codegen/box/**'
|
||||
include 'codegen/boxInline/**'
|
||||
include 'compileKotlinAgainstKotlin/**'
|
||||
}
|
||||
|
||||
//clean tmp dir.
|
||||
delete temporaryDir
|
||||
}
|
||||
}
|
||||
|
||||
task clean {
|
||||
doLast {
|
||||
delete(rootProject.file(testOutputRoot))
|
||||
@@ -43,6 +87,7 @@ task run() {
|
||||
dependsOn(tasks.withType(KonanTest).matching { !(it instanceof RunExternalTestGroup) && it.enabled })
|
||||
}
|
||||
|
||||
|
||||
task run_external () {
|
||||
// TODO Consider test output directory cleaning before execution.
|
||||
// TODO Consider using some logger instead of println
|
||||
|
||||
@@ -7,7 +7,6 @@ import org.gradle.api.tasks.ParallelizableTask
|
||||
import org.gradle.api.tasks.TaskAction
|
||||
import org.gradle.process.ExecResult
|
||||
|
||||
// TODO: add support for smap tests
|
||||
abstract class KonanTest extends JavaExec {
|
||||
protected String source
|
||||
def backendNative = project.project(":backend.native")
|
||||
|
||||
@@ -4,3 +4,5 @@ minMacOsVersion = 10.10
|
||||
#kotlinCompilerModule=org.jetbrains.kotlin:kotlin-compiler:1.1-SNAPSHOT
|
||||
kotlinCompilerModule=org.jetbrains.kotlin:kotlin-compiler:1.1-20170308.180727-439
|
||||
|
||||
# Download artifacts of https://teamcity.jetbrains.com/viewType.html?buildTypeId=bt345
|
||||
testDataVersion=1009012:id
|
||||
|
||||
Reference in New Issue
Block a user