From 5ac1e9454fe3cd0d78263a8886f65e08233d14e7 Mon Sep 17 00:00:00 2001 From: Max Prokhorov Date: Thu, 23 Jan 2020 13:56:08 +0300 Subject: [PATCH] pio-test: pass --verbose to the run command context (#3338) * pio-test: pass --verbose to the run command context * restore old output behavior --- platformio/commands/test/command.py | 4 +++- platformio/commands/test/processor.py | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/platformio/commands/test/command.py b/platformio/commands/test/command.py index cb1c8117..b57b1d59 100644 --- a/platformio/commands/test/command.py +++ b/platformio/commands/test/command.py @@ -107,7 +107,8 @@ def cli( # pylint: disable=redefined-builtin raise exception.TestDirNotExists(test_dir) test_names = get_test_names(test_dir) - click.echo("Verbose mode can be enabled via `-v, --verbose` option") + if not verbose: + click.echo("Verbose mode can be enabled via `-v, --verbose` option") click.secho("Collected %d items" % len(test_names), bold=True) results = [] @@ -159,6 +160,7 @@ def cli( # pylint: disable=redefined-builtin monitor_rts=monitor_rts, monitor_dtr=monitor_dtr, verbose=verbose, + silent=not verbose, ), ) result = { diff --git a/platformio/commands/test/processor.py b/platformio/commands/test/processor.py index ed4f935c..7d9704b8 100644 --- a/platformio/commands/test/processor.py +++ b/platformio/commands/test/processor.py @@ -119,7 +119,8 @@ class TestProcessorBase(object): cmd_run, project_dir=self.options["project_dir"], upload_port=self.options["upload_port"], - silent=not self.options["verbose"], + verbose=self.options["verbose"], + silent=self.options["silent"], environment=[self.env_name], disable_auto_clean="nobuild" in target, target=target,