[Runtime testing] Add basic runtime tests infrastructure

This commit is contained in:
Ilya Matveev
2020-10-06 13:05:24 +07:00
committed by Ilya Matveev
parent 378dc1954b
commit f606c59d5b
9 changed files with 575 additions and 0 deletions
+42
View File
@@ -86,12 +86,54 @@ bitcode {
create("objc") {
includeRuntime()
}
create("test_support", outputGroup = "test") {
includeRuntime()
dependsOn("downloadGoogleTest")
headersDirs += googletest.headersDirs
}
}
targetList.forEach { targetName ->
createTestTask(
project,
"${targetName}StdAllocRuntimeTests",
listOf(
"${targetName}Runtime",
"${targetName}TestSupport",
"${targetName}Strict",
"${targetName}Release",
"${targetName}StdAlloc"
)
)
createTestTask(
project,
"${targetName}MimallocRuntimeTests",
listOf(
"${targetName}Runtime",
"${targetName}TestSupport",
"${targetName}Strict",
"${targetName}Release",
"${targetName}Mimalloc",
"${targetName}OptAlloc"
)
)
tasks.register("${targetName}RuntimeTests") {
dependsOn("${targetName}StdAllocRuntimeTests")
dependsOn("${targetName}MimallocRuntimeTests")
}
}
val hostRuntime by tasks.registering {
dependsOn("${hostName}Runtime")
}
val hostRuntimeTests by tasks.registering {
dependsOn("${hostName}RuntimeTests")
}
val assemble by tasks.registering {
dependsOn(tasks.withType(CompileToBitcode::class).matching {
it.outputGroup == "main"