diff --git a/README.md b/README.md index 8c0efe544d..487e45e15a 100644 --- a/README.md +++ b/README.md @@ -178,6 +178,11 @@ flank: ## Default: 120.0 # default-test-time: 15 + ## Set default test time (in seconds) used for calculating shards of parametrized classes when previous tests results are not available. + ## Default test time for classes should be different from the default time for test + ## Default: 240.0 + # default-class-test-time: 30 + ## Disables sharding. Useful for parameterized tests. # disable-sharding: false @@ -400,6 +405,11 @@ flank: ## Default: 120.0 # default-test-time: 15 + ## Set default test time (in seconds) used for calculating shards of parametrized classes when previous tests results are not available. + ## Default test time for classes should be different from the default time for test + ## Default: 240.0 + # default-class-test-time: 30 + ## Disables sharding. Useful for parameterized tests. # disable-sharding: false diff --git a/flank-scripts/src/test/kotlin/flank/scripts/dependencies/update/UpdateGradleTest.kt b/flank-scripts/src/test/kotlin/flank/scripts/dependencies/update/UpdateGradleTest.kt index fe8c1bb62f..b3b2979523 100644 --- a/flank-scripts/src/test/kotlin/flank/scripts/dependencies/update/UpdateGradleTest.kt +++ b/flank-scripts/src/test/kotlin/flank/scripts/dependencies/update/UpdateGradleTest.kt @@ -32,7 +32,7 @@ class UpdateGradleTest { @Test fun `Should update RC version gradle`() { - val rcReportText = testReport.readText().replace( + val rcReportText = testReport.readText().replace("\r\n", "\n").replace( """ | "releaseCandidate": { | "version": "6.7-rc-1", diff --git a/test_runner/flank.ios.yml b/test_runner/flank.ios.yml index 0993182c70..f5e63ca832 100644 --- a/test_runner/flank.ios.yml +++ b/test_runner/flank.ios.yml @@ -109,7 +109,12 @@ flank: ## Default: 120.0 # default-test-time: 15 - ## Disables sharding. Useful for parameterized tests. + ## Set default test time (in seconds) used for calculating shards of parametrized classes when previous tests results are not available. + ## Default test time for classes should be different from the default time for test + ## Default: 240.0 + # default-class-test-time: 30 + +## Disables sharding. Useful for parameterized tests. # disable-sharding: false ## always run - these tests are inserted at the beginning of every shard diff --git a/test_runner/flank.yml b/test_runner/flank.yml index 436d9cf966..0708777b25 100644 --- a/test_runner/flank.yml +++ b/test_runner/flank.yml @@ -169,6 +169,11 @@ flank: ## Default: 120.0 # default-test-time: 15 + ## Set default test time (in seconds) used for calculating shards of parametrized classes when previous tests results are not available. + ## Default test time for classes should be different from the default time for test + ## Default: 240.0 + # default-class-test-time: 30 + ## Disables sharding. Useful for parameterized tests. # disable-sharding: false diff --git a/test_runner/src/main/kotlin/ftl/args/AndroidArgs.kt b/test_runner/src/main/kotlin/ftl/args/AndroidArgs.kt index 41377b345b..650007dccb 100644 --- a/test_runner/src/main/kotlin/ftl/args/AndroidArgs.kt +++ b/test_runner/src/main/kotlin/ftl/args/AndroidArgs.kt @@ -11,7 +11,7 @@ data class AndroidArgs( val useOrchestrator: Boolean, val roboDirectives: List, val roboScript: String?, - val environmentVariables: Map, + val environmentVariables: Map, // should not be printed, becuase could contains sensitive informations val directoriesToPull: List, val otherFiles: Map, val performanceMetrics: Boolean, @@ -73,6 +73,8 @@ AndroidArgs legacy-junit-result: $useLegacyJUnitResult ignore-failed-tests: $ignoreFailedTests output-style: ${outputStyle.name.toLowerCase()} + disable-results-upload: $disableResultsUpload + default-class-test-time: $defaultClassTestTime """.trimIndent() } } diff --git a/test_runner/src/main/kotlin/ftl/args/IosArgs.kt b/test_runner/src/main/kotlin/ftl/args/IosArgs.kt index 66da6631f0..838d7dcf45 100644 --- a/test_runner/src/main/kotlin/ftl/args/IosArgs.kt +++ b/test_runner/src/main/kotlin/ftl/args/IosArgs.kt @@ -58,6 +58,8 @@ IosArgs run-timeout: $runTimeout ignore-failed-tests: $ignoreFailedTests output-style: ${outputStyle.name.toLowerCase()} + disable-results-upload: $disableResultsUpload + default-class-test-time: $defaultClassTestTime """.trimIndent() } } diff --git a/test_runner/src/test/kotlin/ftl/args/AndroidArgsTest.kt b/test_runner/src/test/kotlin/ftl/args/AndroidArgsTest.kt index 3d69e3078e..968cf2a403 100644 --- a/test_runner/src/test/kotlin/ftl/args/AndroidArgsTest.kt +++ b/test_runner/src/test/kotlin/ftl/args/AndroidArgsTest.kt @@ -138,6 +138,8 @@ class AndroidArgsTest { run-timeout: 20m ignore-failed-tests: true output-style: single + disable-results-upload: true + default-class-test-time: 30.0 """ @After @@ -357,6 +359,8 @@ AndroidArgs legacy-junit-result: false ignore-failed-tests: true output-style: single + disable-results-upload: true + default-class-test-time: 30.0 """.trimIndent() ) } @@ -418,6 +422,8 @@ AndroidArgs legacy-junit-result: true ignore-failed-tests: false output-style: multi + disable-results-upload: false + default-class-test-time: 240.0 """.trimIndent(), args.toString() ) diff --git a/test_runner/src/test/kotlin/ftl/args/IosArgsTest.kt b/test_runner/src/test/kotlin/ftl/args/IosArgsTest.kt index 56e12e67cc..342f7197c4 100644 --- a/test_runner/src/test/kotlin/ftl/args/IosArgsTest.kt +++ b/test_runner/src/test/kotlin/ftl/args/IosArgsTest.kt @@ -91,6 +91,8 @@ class IosArgsTest { ignore-failed-tests: true keep-file-path: true output-style: single + disable-results-upload: true + default-class-test-time: 30.0 """ @get:Rule @@ -251,6 +253,8 @@ IosArgs run-timeout: 15m ignore-failed-tests: true output-style: single + disable-results-upload: true + default-class-test-time: 30.0 """.trimIndent() ) } @@ -301,6 +305,8 @@ IosArgs run-timeout: -1 ignore-failed-tests: false output-style: multi + disable-results-upload: false + default-class-test-time: 240.0 """.trimIndent(), args.toString() )