Make some test tasks depending on dist

This commit is contained in:
Ilya Matveev
2018-04-22 18:37:28 +07:00
committed by ilmat192
parent b03f0bfc83
commit 772c48e61e
2 changed files with 19 additions and 3 deletions
+9 -1
View File
@@ -2664,7 +2664,7 @@ static String outputPath(SourceSet set) {
}
if (isMac() && project.testTarget != 'wasm32') {
def target = project.testTarget ?: 'host'
def target = ext.platformManager.targetByName(project.testTarget ?: 'host').name
task testValuesFramework(type: FrameworkTest) {
frameworkName = 'Values'
@@ -2672,6 +2672,10 @@ if (isMac() && project.testTarget != 'wasm32') {
framework(frameworkName, targets: [ target ]) {
srcDir 'framework/values'
baseDir outputPath(sourceSets.testOutputFramework) + "/$frameworkName"
if (!useCustomDist) {
dependsOn ":${target}CrossDistRuntime", ':commonDistRuntime', ':distCompiler'
}
}
}
swiftSources = ['framework/values/values.swift']
@@ -2684,6 +2688,10 @@ if (isMac() && project.testTarget != 'wasm32') {
framework(frameworkName, targets: [ target ]) {
srcDir 'framework/stdlib'
baseDir outputPath(sourceSets.testOutputFramework) + "/$frameworkName"
if (!useCustomDist) {
dependsOn ":${target}CrossDistRuntime", ':commonDistRuntime', ':distCompiler'
}
}
}
swiftSources = ['framework/stdlib/stdlib.swift']
+10 -2
View File
@@ -20,7 +20,8 @@ buildscript {
classpath "org.jetbrains.kotlin:kotlin-native-gradle-plugin"
}
if (!hasProperty("konan.home")) {
ext.useCustomDist = project.hasProperty("konan.home")
if (!useCustomDist) {
ext.setProperty("konan.home", distDir.absolutePath)
}
}
@@ -34,7 +35,14 @@ konanArtifacts {
}
testFiles.files.each { file ->
def name = file.name
library(name.take(name.lastIndexOf('.'))) { srcFiles file.absolutePath }
library(name.take(name.lastIndexOf('.'))) {
srcFiles file.absolutePath
// Build the compiler before building the test unless a custom path to the distribution is specified.
if (!useCustomDist) {
dependsOn ':dist'
}
}
}
}