diff --git a/docs/index.md b/docs/index.md index 32a4095b0f..7bea0236b1 100644 --- a/docs/index.md +++ b/docs/index.md @@ -305,11 +305,12 @@ flank: ## The JUnit XML is used to determine failure. (default: false) # ignore-failed-tests: true - ### Output Style - ## Output style of execution status. May be one of [verbose, multi, single]. + ### Output Style flag + ## Output style of execution status. May be one of [verbose, multi, single, compact]. ## For runs with only one test execution the default value is 'verbose', in other cases ## 'multi' is used as the default. The output style 'multi' is not displayed correctly on consoles ## which don't support ansi codes, to avoid corrupted output use single or verbose. + ## The output style `compact` is used to produce less detailed output, it prints just Args, test and matrix count, weblinks, cost, and result reports. # output-style: single ### Full Junit Result flag @@ -650,10 +651,11 @@ flank: # legacy-junit-result: false ### Output Style flag - ## Output style of execution status. May be one of [verbose, multi, single]. + ## Output style of execution status. May be one of [verbose, multi, single, compact]. ## For runs with only one test execution the default value is 'verbose', in other cases ## 'multi' is used as the default. The output style 'multi' is not displayed correctly on consoles ## which don't support ansi codes, to avoid corrupted output use single or verbose. + ## The output style `compact` is used to produce less detailed output, it prints just Args, test and matrix count, weblinks, cost, and result reports. # output-style: single ### Full Junit Result flag diff --git a/flank-scripts/build.gradle.kts b/flank-scripts/build.gradle.kts index 396957f89a..37d321240f 100644 --- a/flank-scripts/build.gradle.kts +++ b/flank-scripts/build.gradle.kts @@ -28,7 +28,7 @@ shadowJar.apply { } } // .. -version = "1.1.5" +version = "1.1.4" group = "com.github.flank" application { diff --git a/test_runner/flank.ios.yml b/test_runner/flank.ios.yml index 2f80562215..67f66f8362 100644 --- a/test_runner/flank.ios.yml +++ b/test_runner/flank.ios.yml @@ -236,10 +236,11 @@ flank: # ignore-failed-tests: true ### Output Style - ## Output style of execution status. May be one of [verbose, multi, single]. + ## Output style of execution status. May be one of [verbose, multi, single, compact]. ## For runs with only one test execution the default value is 'verbose', in other cases ## 'multi' is used as the default. The output style 'multi' is not displayed correctly on consoles ## which don't support ansi codes, to avoid corrupted output use single or verbose. + ## The output style `compact` is used to produce less detailed output, it prints just Args, test and matrix count, weblinks, cost, and result reports. # output-style: single ### Full Junit Result flag diff --git a/test_runner/flank.yml b/test_runner/flank.yml index 9f985ba452..de262c2a7b 100644 --- a/test_runner/flank.yml +++ b/test_runner/flank.yml @@ -318,10 +318,11 @@ flank: # legacy-junit-result: false ### Output Style flag - ## Output style of execution status. May be one of [verbose, multi, single]. + ## Output style of execution status. May be one of [verbose, multi, single, compact]. ## For runs with only one test execution the default value is 'verbose', in other cases ## 'multi' is used as the default. The output style 'multi' is not displayed correctly on consoles ## which don't support ansi codes, to avoid corrupted output use single or verbose. + ## The output style `compact` is used to produce less detailed output, it prints just Args, test and matrix count, weblinks, cost, and result reports. # output-style: single ### Full Junit Result flag diff --git a/test_runner/src/main/kotlin/ftl/args/IArgs.kt b/test_runner/src/main/kotlin/ftl/args/IArgs.kt index 33d751f9ad..c946e3faa0 100644 --- a/test_runner/src/main/kotlin/ftl/args/IArgs.kt +++ b/test_runner/src/main/kotlin/ftl/args/IArgs.kt @@ -87,6 +87,6 @@ interface IArgs { val IArgs.logLevel get() = if (outputStyle == OutputStyle.Compact) OutputLogLevel.SIMPLE else OutputLogLevel.DETAILED -fun IArgs.setLogLevel() = also { +fun IArgs.setupLogLevel() = also { ftl.log.setLogLevel(logLevel) } diff --git a/test_runner/src/main/kotlin/ftl/cli/firebase/test/android/AndroidRunCommand.kt b/test_runner/src/main/kotlin/ftl/cli/firebase/test/android/AndroidRunCommand.kt index 85b34df39f..d9a04839f3 100644 --- a/test_runner/src/main/kotlin/ftl/cli/firebase/test/android/AndroidRunCommand.kt +++ b/test_runner/src/main/kotlin/ftl/cli/firebase/test/android/AndroidRunCommand.kt @@ -1,7 +1,7 @@ package ftl.cli.firebase.test.android import ftl.args.AndroidArgs -import ftl.args.setLogLevel +import ftl.args.setupLogLevel import ftl.args.validate import ftl.cli.firebase.test.CommonRunCommand import ftl.config.FtlConstants @@ -46,7 +46,7 @@ class AndroidRunCommand : CommonRunCommand(), Runnable { } AndroidArgs.load(Paths.get(configPath), cli = this).validate().run { - setLogLevel() + setupLogLevel() runBlocking { if (dumpShards) dumpShards() else newTestRun() diff --git a/test_runner/src/main/kotlin/ftl/cli/firebase/test/ios/IosRunCommand.kt b/test_runner/src/main/kotlin/ftl/cli/firebase/test/ios/IosRunCommand.kt index 58440551c4..f41a7855b2 100644 --- a/test_runner/src/main/kotlin/ftl/cli/firebase/test/ios/IosRunCommand.kt +++ b/test_runner/src/main/kotlin/ftl/cli/firebase/test/ios/IosRunCommand.kt @@ -1,7 +1,7 @@ package ftl.cli.firebase.test.ios import ftl.args.IosArgs -import ftl.args.setLogLevel +import ftl.args.setupLogLevel import ftl.args.validate import ftl.cli.firebase.test.CommonRunCommand import ftl.config.FtlConstants @@ -46,7 +46,7 @@ class IosRunCommand : CommonRunCommand(), Runnable { } IosArgs.load(Paths.get(configPath), cli = this).validate().run { - setLogLevel() + setupLogLevel() if (dumpShards) dumpShards() else runBlocking { newTestRun() } } diff --git a/test_runner/src/main/kotlin/ftl/log/OutputLogger.kt b/test_runner/src/main/kotlin/ftl/log/OutputLogger.kt index 9d9fb9de4f..63cc72592b 100644 --- a/test_runner/src/main/kotlin/ftl/log/OutputLogger.kt +++ b/test_runner/src/main/kotlin/ftl/log/OutputLogger.kt @@ -4,13 +4,13 @@ fun setLogLevel(logLevel: OutputLogLevel) { minimumLogLevel = logLevel } -fun log(message: Any, level: OutputLogLevel = OutputLogLevel.SIMPLE) = +fun log(message: Any, level: OutputLogLevel = OutputLogLevel.SIMPLE) { if (minimumLogLevel >= level) print(message) - else Unit +} -fun logLn(message: Any = "", level: OutputLogLevel = OutputLogLevel.SIMPLE) = +fun logLn(message: Any = "", level: OutputLogLevel = OutputLogLevel.SIMPLE) { if (minimumLogLevel >= level) println(message) - else Unit +} private var minimumLogLevel: OutputLogLevel = OutputLogLevel.DETAILED