Add system property to filter android test execution
This commit is contained in:
@@ -43,5 +43,9 @@ projectTest {
|
|||||||
systemProperty("kotlin.test.android.teamcity", true)
|
systemProperty("kotlin.test.android.teamcity", true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
project.findProperty("kotlin.test.android.path.filter")?.let {
|
||||||
|
systemProperty("kotlin.test.android.path.filter", it.toString())
|
||||||
|
}
|
||||||
|
|
||||||
workingDir = rootDir
|
workingDir = rootDir
|
||||||
}
|
}
|
||||||
|
|||||||
+6
@@ -41,6 +41,8 @@ class CodegenTestsOnAndroidGenerator private constructor(private val pathManager
|
|||||||
|
|
||||||
private val generatedTestNames = Lists.newArrayList<String>()
|
private val generatedTestNames = Lists.newArrayList<String>()
|
||||||
|
|
||||||
|
private val pathFilter: String? = System.getProperties().getProperty("kotlin.test.android.path.filter")
|
||||||
|
|
||||||
private fun generateOutputFiles() {
|
private fun generateOutputFiles() {
|
||||||
prepareAndroidModule()
|
prepareAndroidModule()
|
||||||
generateAndSave()
|
generateAndSave()
|
||||||
@@ -194,6 +196,10 @@ class CodegenTestsOnAndroidGenerator private constructor(private val pathManager
|
|||||||
} else if (FileUtilRt.getExtension(file.name) != KotlinFileType.EXTENSION) {
|
} else if (FileUtilRt.getExtension(file.name) != KotlinFileType.EXTENSION) {
|
||||||
// skip non kotlin files
|
// skip non kotlin files
|
||||||
} else {
|
} else {
|
||||||
|
if (pathFilter != null && !file.path.contains(pathFilter)) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
if (!InTextDirectivesUtils.isPassingTarget(TargetBackend.JVM, file)) {
|
if (!InTextDirectivesUtils.isPassingTarget(TargetBackend.JVM, file)) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user