Skip to content

Commit 0d2713b

Browse files
committed
fix(test): have codecov uploader exit with non-zero code on error
Pass the `-Z` flag (fail on error) 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 docs say that a long form `--fail-on-error` is available, but actually it doesnt seem to work, so we have to use `-Z`. [1]: https://docs.codecov.com/docs/cli-options Signed-off-by: Patrick Roy <[email protected]>
1 parent 4b6c9b3 commit 0d2713b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/integration_tests/build/test_coverage.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ 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+
# -Z flag means "fail on error". There's supposed to be a more descriptive long form in
99+
# --fail-on-error, but it doesnt work.
100+
codecov_cmd = f"codecov -Z -f {lcov_file} -F {global_props.host_linux_version}-{global_props.instance}"
99101

100102
if pr_number and pr_number != "false":
101103
codecov_cmd += f" -P {pr_number}"

0 commit comments

Comments
 (0)