Support interop libraries in dynamic tests

This commit is contained in:
Sergey Bogolepov
2021-01-29 14:07:19 +07:00
committed by Vasily Levchenko
parent 438e1d34c5
commit 5a18a565b7
2 changed files with 12 additions and 0 deletions
@@ -424,7 +424,16 @@ Task dynamicTest(String name, Closure<KonanDynamicTest> configureClosure) {
if (task.enabled) {
konanArtifacts {
def targetName = target.name
def lib = task.interop
if (lib != null) {
UtilsKt.dependsOnKonanBuildingTask(task, lib, target)
}
dynamic(name, targets: [targetName]) {
if (lib != null) {
libraries {
artifact lib
}
}
srcFiles task.getSources()
baseDir "$testOutputLocal/$name"
extraOpts task.flags
@@ -436,6 +436,9 @@ open class KonanDynamicTest : KonanStandaloneTest() {
@Input
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
private fun processCSource(): String {
val sourceFile = File(cSource)