From b90e89a7918b3d13777d790bbffa1d375ee5e7f6 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sun, 15 May 2022 14:54:07 +0300 Subject: [PATCH] no message --- docs | 2 +- platformio/test/command.py | 13 ++++++++----- tests/commands/test_test.py | 12 ++++++------ 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/docs b/docs index 30e2c2d6..5e906bbc 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 30e2c2d667560920f891d25bb51bad4e0c74d620 +Subproject commit 5e906bbc756d605abb2cedca52a1afef67220479 diff --git a/platformio/test/command.py b/platformio/test/command.py index bce1d7e7..cfc2ea3d 100644 --- a/platformio/test/command.py +++ b/platformio/test/command.py @@ -83,8 +83,8 @@ from platformio.test.runners.factory import TestRunnerFactory help="A program argument (multiple are allowed)", ) @click.option("--list-tests", is_flag=True) -@click.option("--json-output", type=click.Path(resolve_path=True)) -@click.option("--junit-output", type=click.Path(resolve_path=True)) +@click.option("--json-output-path", type=click.Path(resolve_path=True)) +@click.option("--junit-output-path", type=click.Path(resolve_path=True)) @click.option("--verbose", "-v", is_flag=True) @click.pass_context def test_cmd( # pylint: disable=too-many-arguments,too-many-locals,redefined-builtin @@ -104,8 +104,8 @@ def test_cmd( # pylint: disable=too-many-arguments,too-many-locals,redefined-bu monitor_dtr, program_args, list_tests, - json_output, - junit_output, + json_output_path, + junit_output_path, verbose, ): app.set_session_var("custom_project_conf", project_conf) @@ -157,7 +157,10 @@ def test_cmd( # pylint: disable=too-many-arguments,too-many-locals,redefined-bu stdout_report = TestReportFactory.new("stdout", test_result) stdout_report.generate(verbose=verbose or list_tests) - for output_format, output_path in [("json", json_output), ("junit", junit_output)]: + for output_format, output_path in [ + ("json", json_output_path), + ("junit", junit_output_path), + ]: if not output_path: continue custom_report = TestReportFactory.new(output_format, test_result) diff --git a/tests/commands/test_test.py b/tests/commands/test_test.py index 3ce95cd1..db7acb13 100644 --- a/tests/commands/test_test.py +++ b/tests/commands/test_test.py @@ -36,7 +36,7 @@ def test_calculator_example(tmp_path: Path): "uno", "-e", "native", - "--junit-output", + "--junit-output-path", str(junit_output_path), ] ) @@ -73,7 +73,7 @@ def test_list_tests(clirunner, validate_cliresult, tmp_path: Path): "-d", os.path.join("examples", "unit-testing", "calculator"), "--list-tests", - "--json-output", + "--json-output-path", str(json_output_path), ], ) @@ -547,7 +547,7 @@ int main(int argc, char **argv) [ "-d", str(project_dir), - "--junit-output", + "--junit-output-path", str(junit_output_path), ], ) @@ -572,7 +572,7 @@ int main(int argc, char **argv) [ "-d", str(project_dir), - "--json-output", + "--json-output-path", str(json_output_path), "-a", "-aa=1", # fail after the 1 error @@ -596,7 +596,7 @@ def test_googletest_framework(clirunner, tmp_path: Path): project_dir, "-e", "native", - "--junit-output", + "--junit-output-path", str(junit_output_path), ], ) @@ -623,7 +623,7 @@ def test_googletest_framework(clirunner, tmp_path: Path): project_dir, "-e", "native", - "--json-output", + "--json-output-path", str(json_output_path), "-a", "--gtest_filter=-FooTest.Bar",