FIR IDE: introduce param for enabling disabled tests

This commit is contained in:
Ilya Kirillov
2020-12-06 17:30:43 +01:00
parent a671054fa3
commit d6330337a9
@@ -11,6 +11,7 @@ import java.nio.file.Path
object IgnoreTests {
private const val INSERT_DIRECTIVE_AUTOMATICALLY = false // TODO use environment variable instead
private const val ALWAYS_CONSIDER_TEST_AS_PASSING = false // TODO use environment variable instead
fun runTestIfEnabledByFileDirective(
testFile: Path,
@@ -46,6 +47,11 @@ object IgnoreTests {
additionalFilesExtensions: List<String>,
test: () -> Unit
) {
if (ALWAYS_CONSIDER_TEST_AS_PASSING) {
test()
return
}
val testIsEnabled = directive.isEnabledInFile(testFile)
try {