FIR IDE: introduce param for enabling disabled tests
This commit is contained in:
@@ -11,6 +11,7 @@ import java.nio.file.Path
|
|||||||
|
|
||||||
object IgnoreTests {
|
object IgnoreTests {
|
||||||
private const val INSERT_DIRECTIVE_AUTOMATICALLY = false // TODO use environment variable instead
|
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(
|
fun runTestIfEnabledByFileDirective(
|
||||||
testFile: Path,
|
testFile: Path,
|
||||||
@@ -46,6 +47,11 @@ object IgnoreTests {
|
|||||||
additionalFilesExtensions: List<String>,
|
additionalFilesExtensions: List<String>,
|
||||||
test: () -> Unit
|
test: () -> Unit
|
||||||
) {
|
) {
|
||||||
|
if (ALWAYS_CONSIDER_TEST_AS_PASSING) {
|
||||||
|
test()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
val testIsEnabled = directive.isEnabledInFile(testFile)
|
val testIsEnabled = directive.isEnabledInFile(testFile)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user