From 8fff7084dba27f7852907e4af45d32c534b9e063 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 10 May 2022 18:25:26 +0300 Subject: [PATCH] Rename pio test --output-{format} options to --{format}-output --- docs | 2 +- platformio/test/command.py | 10 +++++----- tests/commands/test_test.py | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs b/docs index 4522b6d9..8acef5b3 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 4522b6d963d16fe2939ac99b2b1c7536a8cb3350 +Subproject commit 8acef5b3a213da8ee5ede66833f5e49a94055baf diff --git a/platformio/test/command.py b/platformio/test/command.py index d0786b17..7101bf2c 100644 --- a/platformio/test/command.py +++ b/platformio/test/command.py @@ -83,8 +83,8 @@ from platformio.test.runners.factory import TestRunnerFactory multiple=True, help="A program argument (multiple are allowed)", ) -@click.option("--output-json", type=click.Path(resolve_path=True)) -@click.option("--output-junit", type=click.Path(resolve_path=True)) +@click.option("--json-output", type=click.Path(resolve_path=True)) +@click.option("--junit-output", 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 @@ -103,8 +103,8 @@ def test_cmd( # pylint: disable=too-many-arguments,too-many-locals,redefined-bu monitor_rts, monitor_dtr, program_args, - output_json, - output_junit, + json_output, + junit_output, verbose, ): app.set_session_var("custom_project_conf", project_conf) @@ -177,7 +177,7 @@ 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) - for output_format, output_path in [("json", output_json), ("junit", output_junit)]: + for output_format, output_path in [("json", json_output), ("junit", junit_output)]: 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 6d59b670..376d5fcd 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", - "--output-junit", + "--junit-output", str(junit_output_path), ] ) @@ -526,7 +526,7 @@ int main(int argc, char **argv) [ "-d", str(project_dir), - "--output-junit", + "--junit-output", str(junit_output_path), ], ) @@ -551,7 +551,7 @@ int main(int argc, char **argv) [ "-d", str(project_dir), - "--output-json", + "--json-output", str(json_output_path), "-a", "-aa=1", # fail after the 1 error @@ -575,7 +575,7 @@ def test_googletest_framework(clirunner, tmp_path: Path): project_dir, "-e", "native", - "--output-junit", + "--junit-output", str(junit_output_path), ], ) @@ -602,7 +602,7 @@ def test_googletest_framework(clirunner, tmp_path: Path): project_dir, "-e", "native", - "--output-json", + "--json-output", str(json_output_path), "-a", "--gtest_filter=-FooTest.Bar",