@@ -15,6 +15,7 @@ import sun.nio.ch.lincheck.*
15
15
import org.jetbrains.kotlinx.lincheck.runner.*
16
16
import org.jetbrains.kotlinx.lincheck.strategy.*
17
17
import org.jetbrains.kotlinx.lincheck.strategy.managed.*
18
+ import org.jetbrains.kotlinx.lincheck.strategy.managed.ExecutionMode.GENERAL_PURPOSE_MODEL_CHECKER
18
19
import org.jetbrains.kotlinx.lincheck.strategy.managed.modelchecking.*
19
20
import org.jetbrains.kotlinx.lincheck.execution.ExecutionResult
20
21
import org.jetbrains.kotlinx.lincheck.execution.ExecutionScenario
@@ -39,7 +40,7 @@ const val MINIMAL_PLUGIN_VERSION = "0.11"
39
40
* @param version current Lincheck version.
40
41
* @param minimalPluginVersion minimal compatible plugin version.
41
42
* @param exceptions representation of the exceptions with their stacktrace occurred during the execution.
42
- * @param isGeneralPurposeModelChecking indicates if lincheck is running in the GPMC mode
43
+ * @param executionMode indicates the mode in which lincheck is running current test (see [ManagedStrategy.executionMode])
43
44
*/
44
45
@Suppress(" UNUSED_PARAMETER" )
45
46
fun testFailed (
@@ -48,7 +49,7 @@ fun testFailed(
48
49
version : String? ,
49
50
minimalPluginVersion : String ,
50
51
exceptions : Array <String >,
51
- isGeneralPurposeModelChecking : Boolean ,
52
+ executionMode : String
52
53
) {}
53
54
54
55
@@ -159,7 +160,7 @@ internal fun ManagedStrategy.runReplayIfPluginEnabled(failure: LincheckFailure)
159
160
version = lincheckVersion,
160
161
minimalPluginVersion = MINIMAL_PLUGIN_VERSION ,
161
162
exceptions = exceptionsRepresentation,
162
- isGeneralPurposeModelChecking = isGeneralPurposeModelChecking,
163
+ executionMode = executionMode.id
163
164
)
164
165
// Replay execution while it's needed.
165
166
do {
@@ -348,7 +349,7 @@ private data class ExceptionProcessingResult(
348
349
* Used to collect the data about the test instance, object numbers, threads, and continuations.
349
350
*/
350
351
private fun visualize (strategy : ManagedStrategy ) = runCatching {
351
- if (strategy.isGeneralPurposeModelChecking ) return @runCatching
352
+ if (strategy.executionMode == GENERAL_PURPOSE_MODEL_CHECKER ) return @runCatching
352
353
353
354
val runner = strategy.runner as ParallelThreadsRunner
354
355
val allThreads = strategy.getRegisteredThreads()
0 commit comments