[Test] Add ability to disable specific handler if there was an error from previous one
This commit is contained in:
+4
-1
@@ -10,4 +10,7 @@ import org.jetbrains.kotlin.test.model.BackendInputHandler
|
||||
import org.jetbrains.kotlin.test.model.BackendKinds
|
||||
import org.jetbrains.kotlin.test.services.TestServices
|
||||
|
||||
abstract class AbstractIrHandler(testServices: TestServices) : BackendInputHandler<IrBackendInput>(testServices, BackendKinds.IrBackend)
|
||||
abstract class AbstractIrHandler(
|
||||
testServices: TestServices,
|
||||
doNotRunIfThereWerePreviousFailures: Boolean = false
|
||||
) : BackendInputHandler<IrBackendInput>(testServices, BackendKinds.IrBackend, doNotRunIfThereWerePreviousFailures)
|
||||
|
||||
+21
-6
@@ -11,13 +11,28 @@ import org.jetbrains.kotlin.test.model.BinaryArtifacts
|
||||
import org.jetbrains.kotlin.test.services.TestServices
|
||||
|
||||
abstract class JvmBinaryArtifactHandler(
|
||||
testServices: TestServices
|
||||
) : BinaryArtifactHandler<BinaryArtifacts.Jvm>(testServices, ArtifactKinds.Jvm)
|
||||
testServices: TestServices,
|
||||
doNotRunIfThereWerePreviousFailures: Boolean = false
|
||||
) : BinaryArtifactHandler<BinaryArtifacts.Jvm>(
|
||||
testServices,
|
||||
ArtifactKinds.Jvm,
|
||||
doNotRunIfThereWerePreviousFailures
|
||||
)
|
||||
|
||||
abstract class JsBinaryArtifactHandler(
|
||||
testServices: TestServices
|
||||
) : BinaryArtifactHandler<BinaryArtifacts.Js>(testServices, ArtifactKinds.Js)
|
||||
testServices: TestServices,
|
||||
doNotRunIfThereWerePreviousFailures: Boolean = false
|
||||
) : BinaryArtifactHandler<BinaryArtifacts.Js>(
|
||||
testServices,
|
||||
ArtifactKinds.Js,
|
||||
doNotRunIfThereWerePreviousFailures
|
||||
)
|
||||
|
||||
abstract class NativeBinaryArtifactHandler(
|
||||
testServices: TestServices
|
||||
) : BinaryArtifactHandler<BinaryArtifacts.Native>(testServices, ArtifactKinds.Native)
|
||||
testServices: TestServices,
|
||||
doNotRunIfThereWerePreviousFailures: Boolean = false
|
||||
) : BinaryArtifactHandler<BinaryArtifacts.Native>(
|
||||
testServices,
|
||||
ArtifactKinds.Native,
|
||||
doNotRunIfThereWerePreviousFailures
|
||||
)
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ import org.jetbrains.kotlin.test.model.BinaryArtifacts
|
||||
import org.jetbrains.kotlin.test.model.TestModule
|
||||
import org.jetbrains.kotlin.test.services.TestServices
|
||||
|
||||
class DxCheckerHandler(testServices: TestServices) : JvmBinaryArtifactHandler(testServices) {
|
||||
class DxCheckerHandler(testServices: TestServices) : JvmBinaryArtifactHandler(testServices, doNotRunIfThereWerePreviousFailures = true) {
|
||||
override val directivesContainers: List<DirectivesContainer>
|
||||
get() = listOf(CodegenTestDirectives)
|
||||
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ import org.jetbrains.kotlin.utils.addToStdlib.runIf
|
||||
import java.lang.reflect.Method
|
||||
import java.net.URLClassLoader
|
||||
|
||||
class JvmBoxRunner(testServices: TestServices) : JvmBinaryArtifactHandler(testServices) {
|
||||
class JvmBoxRunner(testServices: TestServices) : JvmBinaryArtifactHandler(testServices, doNotRunIfThereWerePreviousFailures = true) {
|
||||
companion object {
|
||||
private val BOX_IN_SEPARATE_PROCESS_PORT = System.getProperty("kotlin.test.box.in.separate.process.port")
|
||||
}
|
||||
|
||||
+7
-2
@@ -11,7 +11,12 @@ import org.jetbrains.kotlin.test.model.FrontendOutputHandler
|
||||
import org.jetbrains.kotlin.test.services.TestServices
|
||||
|
||||
abstract class ClassicFrontendAnalysisHandler(
|
||||
testServices: TestServices
|
||||
) : FrontendOutputHandler<ClassicFrontendOutputArtifact>(testServices, FrontendKinds.ClassicFrontend)
|
||||
testServices: TestServices,
|
||||
doNotRunIfThereWerePreviousFailures: Boolean = false
|
||||
) : FrontendOutputHandler<ClassicFrontendOutputArtifact>(
|
||||
testServices,
|
||||
FrontendKinds.ClassicFrontend,
|
||||
doNotRunIfThereWerePreviousFailures
|
||||
)
|
||||
|
||||
|
||||
|
||||
+3
-2
@@ -12,8 +12,9 @@ import org.jetbrains.kotlin.test.services.TestServices
|
||||
import java.io.File
|
||||
|
||||
abstract class FirAnalysisHandler(
|
||||
testServices: TestServices
|
||||
) : FrontendOutputHandler<FirOutputArtifact>(testServices, FrontendKinds.FIR) {
|
||||
testServices: TestServices,
|
||||
doNotRunIfThereWerePreviousFailures: Boolean = false
|
||||
) : FrontendOutputHandler<FirOutputArtifact>(testServices, FrontendKinds.FIR, doNotRunIfThereWerePreviousFailures) {
|
||||
protected val File.nameWithoutFirExtension: String
|
||||
get() = nameWithoutExtension.removeSuffix(".fir")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user