[FIR] continue executing the test pipeline in a case of FirLazyResolveContractViolationException is thrown
Previously in the black-box test, no actual tests were run in a case FirLazyResolveContractViolationException were thrown
This commit is contained in:
@@ -134,7 +134,8 @@ class TestRunner(private val testConfiguration: TestConfiguration) {
|
|||||||
for (step in testConfiguration.steps) {
|
for (step in testConfiguration.steps) {
|
||||||
if (!step.shouldProcessModule(module, inputArtifact)) continue
|
if (!step.shouldProcessModule(module, inputArtifact)) continue
|
||||||
|
|
||||||
when (val result = step.hackyProcessModule(module, inputArtifact, allFailedExceptions.isNotEmpty())) {
|
val thereWereCriticalExceptionsOnPreviousSteps = allFailedExceptions.any { it.failureDisablesNextSteps }
|
||||||
|
when (val result = step.hackyProcessModule(module, inputArtifact, thereWereCriticalExceptionsOnPreviousSteps)) {
|
||||||
is TestStep.StepResult.Artifact<*> -> {
|
is TestStep.StepResult.Artifact<*> -> {
|
||||||
require(step is TestStep.FacadeStep<*, *>)
|
require(step is TestStep.FacadeStep<*, *>)
|
||||||
if (step.inputArtifactKind != step.outputArtifactKind) {
|
if (step.inputArtifactKind != step.outputArtifactKind) {
|
||||||
|
|||||||
@@ -13,6 +13,13 @@ sealed class WrappedException(
|
|||||||
val priority: Int,
|
val priority: Int,
|
||||||
val additionalPriority: Int
|
val additionalPriority: Int
|
||||||
) : Exception(cause), Comparable<WrappedException> {
|
) : Exception(cause), Comparable<WrappedException> {
|
||||||
|
/**
|
||||||
|
* If [failureDisablesNextSteps] is `true`,
|
||||||
|
* then the following test steps might not be run considering this exception as critical.
|
||||||
|
* If false, the next steps will ignore this exception and continue running.
|
||||||
|
*/
|
||||||
|
open val failureDisablesNextSteps: Boolean get() = true
|
||||||
|
|
||||||
class FromFacade(cause: Throwable, val facade: AbstractTestFacade<*, *>) : WrappedException(cause, 0, 1) {
|
class FromFacade(cause: Throwable, val facade: AbstractTestFacade<*, *>) : WrappedException(cause, 0, 1) {
|
||||||
override val message: String
|
override val message: String
|
||||||
get() = "Exception was thrown"
|
get() = "Exception was thrown"
|
||||||
@@ -20,7 +27,10 @@ sealed class WrappedException(
|
|||||||
|
|
||||||
class FromMetaInfoHandler(cause: Throwable) : WrappedException(cause, 1, 1)
|
class FromMetaInfoHandler(cause: Throwable) : WrappedException(cause, 1, 1)
|
||||||
|
|
||||||
class FromHandler(cause: Throwable, val handler: AnalysisHandler<*>) : WrappedException(cause, 1, 2)
|
class FromHandler(cause: Throwable, val handler: AnalysisHandler<*>) : WrappedException(cause, 1, 2) {
|
||||||
|
override val failureDisablesNextSteps: Boolean
|
||||||
|
get() = handler.failureDisablesNextSteps
|
||||||
|
}
|
||||||
|
|
||||||
class FromAfterAnalysisChecker(cause: Throwable) : WrappedException(cause, 2, 1)
|
class FromAfterAnalysisChecker(cause: Throwable) : WrappedException(cause, 2, 1)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user