diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 904e140b9..535cd9857 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -17,4 +17,5 @@ dependencies { implementation("org.ajoberstar.grgit:grgit-core:4.1.0") implementation("com.squareup:kotlinpoet:1.8.0") implementation("com.google.code.gson:gson:2.8.6") + implementation("org.gradle:test-retry-gradle-plugin:1.3.1") } diff --git a/buildSrc/src/main/kotlin/org/cqfn/save/buildutils/kotlin-library.gradle.kts b/buildSrc/src/main/kotlin/org/cqfn/save/buildutils/kotlin-library.gradle.kts index e35c72365..f85028c52 100644 --- a/buildSrc/src/main/kotlin/org/cqfn/save/buildutils/kotlin-library.gradle.kts +++ b/buildSrc/src/main/kotlin/org/cqfn/save/buildutils/kotlin-library.gradle.kts @@ -14,6 +14,7 @@ import org.jetbrains.kotlin.gradle.targets.jvm.tasks.KotlinJvmTest plugins { kotlin("multiplatform") kotlin("plugin.serialization") + id("org.gradle.test-retry") } kotlin { @@ -99,3 +100,11 @@ configurePublishing() tasks.withType { useJUnitPlatform() } + +tasks.withType { + retry { + failOnPassedAfterRetry.set(false) + maxFailures.set(10) + maxRetries.set(5) + } +} \ No newline at end of file diff --git a/examples/discovery-test/highlevel/save.toml b/examples/discovery-test/highlevel/save.toml index 0f46852d6..c540a6a4b 100644 --- a/examples/discovery-test/highlevel/save.toml +++ b/examples/discovery-test/highlevel/save.toml @@ -1,7 +1,7 @@ [general] execCmd = "./detekt" tags = ["test"] -description = "My description 2" +description = "Test suite" suiteName = "DocsCheck" [warn] diff --git a/examples/discovery-test/highlevel/suite2/inner/save.toml b/examples/discovery-test/highlevel/suite2/inner/save.toml index 51bfb1cec..ca62bf7a9 100644 --- a/examples/discovery-test/highlevel/suite2/inner/save.toml +++ b/examples/discovery-test/highlevel/suite2/inner/save.toml @@ -1,7 +1,7 @@ [general] execCmd="./ktlint -R diktat-0.4.2.jar" tags = ["mytags"] -description = "My suite description" +description = "Empty suite" suiteName = "DocsCheck" [fix] diff --git a/examples/discovery-test/save.toml b/examples/discovery-test/save.toml index d1d451d34..6a42d9655 100644 --- a/examples/discovery-test/save.toml +++ b/examples/discovery-test/save.toml @@ -1,7 +1,7 @@ [general] execCmd = "./detekt" tags = ["test"] -description = "My description 1" +description = "All suites" suiteName = "DocsCheck" [warn] diff --git a/save-core/src/commonNonJsMain/kotlin/org/cqfn/save/core/files/ConfigDetector.kt b/save-core/src/commonNonJsMain/kotlin/org/cqfn/save/core/files/ConfigDetector.kt index 7866d4cd5..d7c99e7c7 100644 --- a/save-core/src/commonNonJsMain/kotlin/org/cqfn/save/core/files/ConfigDetector.kt +++ b/save-core/src/commonNonJsMain/kotlin/org/cqfn/save/core/files/ConfigDetector.kt @@ -37,8 +37,8 @@ class ConfigDetector(private val fs: FileSystem) { } ?: run { logError("Config file was not found in $testConfig") - throw IllegalArgumentException("Provided option '--test-config' $testConfig doesn't correspond" + - " to a valid save.toml file") + throw IllegalArgumentException("Provided directory [$testConfig] doesn't contain" + + " save.toml configuration file") } }