Support interop libraries in dynamic tests
This commit is contained in:
committed by
Vasily Levchenko
parent
438e1d34c5
commit
5a18a565b7
@@ -424,7 +424,16 @@ Task dynamicTest(String name, Closure<KonanDynamicTest> configureClosure) {
|
|||||||
if (task.enabled) {
|
if (task.enabled) {
|
||||||
konanArtifacts {
|
konanArtifacts {
|
||||||
def targetName = target.name
|
def targetName = target.name
|
||||||
|
def lib = task.interop
|
||||||
|
if (lib != null) {
|
||||||
|
UtilsKt.dependsOnKonanBuildingTask(task, lib, target)
|
||||||
|
}
|
||||||
dynamic(name, targets: [targetName]) {
|
dynamic(name, targets: [targetName]) {
|
||||||
|
if (lib != null) {
|
||||||
|
libraries {
|
||||||
|
artifact lib
|
||||||
|
}
|
||||||
|
}
|
||||||
srcFiles task.getSources()
|
srcFiles task.getSources()
|
||||||
baseDir "$testOutputLocal/$name"
|
baseDir "$testOutputLocal/$name"
|
||||||
extraOpts task.flags
|
extraOpts task.flags
|
||||||
|
|||||||
@@ -436,6 +436,9 @@ open class KonanDynamicTest : KonanStandaloneTest() {
|
|||||||
@Input
|
@Input
|
||||||
var clangFlags: List<String> = listOf()
|
var clangFlags: List<String> = listOf()
|
||||||
|
|
||||||
|
@Input @Optional
|
||||||
|
var interop: String? = null
|
||||||
|
|
||||||
// Replace testlib_api.h and all occurrences of the testlib with the actual name of the test
|
// Replace testlib_api.h and all occurrences of the testlib with the actual name of the test
|
||||||
private fun processCSource(): String {
|
private fun processCSource(): String {
|
||||||
val sourceFile = File(cSource)
|
val sourceFile = File(cSource)
|
||||||
|
|||||||
Reference in New Issue
Block a user