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