Skip to content

Commit c898933

Browse files
committed
fix(test): have codecov uploader exit with non-zero code on error
Pass the `--fail-on-error` flag to the codecov uploader. According to the docs, without this flag upload failures will be silently ignored (why isn't this the default??) [1]. We can also see this from the logs, which contain: ``` [2025-01-28T12:10:57.973Z] ['info'] Codecov will exit with status code 0. If you are expecting a non-zero exit code, please pass in the `-Z` flag ``` The `-Z` option is the short form of `--fail-on-error`, but let's be explicit here because `-Z` isn't exactly self-documenting. [1]: https://docs.codecov.com/docs/cli-options Signed-off-by: Patrick Roy <[email protected]>
1 parent 4b6c9b3 commit c898933

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/integration_tests/build/test_coverage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def test_coverage(monkeypatch):
9595
if not branch:
9696
branch = utils.check_output("git rev-parse --abbrev-ref HEAD").stdout
9797

98-
codecov_cmd = f"codecov -f {lcov_file} -F {global_props.host_linux_version}-{global_props.instance}"
98+
codecov_cmd = f"codecov --fail-on-error -f {lcov_file} -F {global_props.host_linux_version}-{global_props.instance}"
9999

100100
if pr_number and pr_number != "false":
101101
codecov_cmd += f" -P {pr_number}"

0 commit comments

Comments
 (0)