Make some test tasks depending on dist
This commit is contained in:
@@ -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
@@ -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'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user