You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 16, 2025. It is now read-only.
related to codecov/engineering-team#555
These changes update the output of `--dry-run` option so that:
1. Users can get a list of tests that are being skipped
2. Users have the option to parse the output from JSON
> ⚠️
>
> The JSON output doesn't include the runner options in the tests to run list.
> Instead there's the 'runner_options' key with that info.
> This is to make sharding the list of tests easier
It's considerably more output, but given that we don't have clear guidelines on the
best way to do things I think it's better to provide all options.
Eventually adoption will converge to some way or another and we prioritize that.
Copy file name to clipboardExpand all lines: codecov_cli/commands/labelanalysis.py
+54-11Lines changed: 54 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,4 @@
1
+
importjson
1
2
importlogging
2
3
importpathlib
3
4
importtime
@@ -55,13 +56,23 @@
55
56
@click.option(
56
57
"--dry-run",
57
58
"dry_run",
58
-
help='Print list of tests to run and options that need to be added to the test runner as a space-separated list to stdout. Format is ATS_TESTS_TO_RUN="<options> <test_1> <test_2> ... <test_n>"',
59
+
help=(
60
+
"Print list of tests to run AND tests skipped (and options that need to be added to the test runner) to stdout. "
61
+
+"Also prints the same information in JSON format. "
62
+
+"JSON will have keys 'ats_tests_to_run', 'ats_tests_to_skip' and 'runner_options'. "
63
+
+"List of tests to run is prefixed with ATS_TESTS_TO_RUN= "
64
+
+"List of tests to skip is prefixed with ATS_TESTS_TO_SKIP="
65
+
),
59
66
is_flag=True,
60
67
)
61
68
@click.option(
62
69
"--dry-run-output-path",
63
70
"dry_run_output_path",
64
-
help="Prints the dry-run list into dry_run_output_path (in addition to stdout)",
71
+
help=(
72
+
"Prints the dry-run list (ATS_TESTS_TO_RUN) into dry_run_output_path (in addition to stdout)\n"
73
+
+"AND prints ATS_TESTS_TO_SKIP into dry_run_output_path_skipped\n"
74
+
+"AND prints dry-run JSON output into dry_run_output_path.json"
0 commit comments