11package com.saveourtool.save.core.plugin
22
3+ import com.saveourtool.save.core.config.EvaluatedToolConfig
34import com.saveourtool.save.core.config.TestConfig
45import com.saveourtool.save.core.config.isSaveTomlConfig
56import com.saveourtool.save.core.files.createRelativePathToTheRoot
@@ -20,6 +21,7 @@ import kotlinx.serialization.Serializable
2021
2122/* *
2223 * Plugin that can be injected into SAVE during execution. Plugins accept contents of configuration file and then perform some work.
24+ *
2325 * @property testConfig
2426 * @property testFiles a list of files (test resources or save.toml configs)
2527 * @property fs describes the current file system
@@ -42,9 +44,10 @@ abstract class Plugin(
4244 /* *
4345 * Perform plugin's work.
4446 *
47+ * @param evaluatedToolConfig a configuration for evaluated tool
4548 * @return a sequence of [TestResult]s for each group of test resources
4649 */
47- fun execute (): Sequence <TestResult > {
50+ fun execute (evaluatedToolConfig : EvaluatedToolConfig ): Sequence <TestResult > {
4851 clean()
4952 val testFilesList = discoverTestFiles(testConfig.directory).toList()
5053
@@ -68,7 +71,7 @@ abstract class Plugin(
6871 val excludedTestResults = excludedTestFiles.map {
6972 TestResult (it, Ignored (" Excluded by configuration" ))
7073 }
71- handleFiles(actualTestFiles.asSequence()) + excludedTestResults
74+ handleFiles(evaluatedToolConfig, actualTestFiles.asSequence()) + excludedTestResults
7275 } else {
7376 emptySequence()
7477 }
@@ -77,10 +80,11 @@ abstract class Plugin(
7780 /* *
7881 * Perform plugin's work on a set of files.
7982 *
83+ * @param evaluatedToolConfig a configuration for evaluated tool
8084 * @param files a sequence of file groups, corresponding to tests.
8185 * @return a sequence of [TestResult]s for each group of test resources
8286 */
83- abstract fun handleFiles (files : Sequence <TestFiles >): Sequence <TestResult >
87+ abstract fun handleFiles (evaluatedToolConfig : EvaluatedToolConfig , files : Sequence <TestFiles >): Sequence <TestResult >
8488
8589 /* *
8690 * Discover groups of resource files which will be used to run tests, applying additional filtering
0 commit comments