From b40cb0ad33ba2ddfb99b6249ac41bc7911dde6f4 Mon Sep 17 00:00:00 2001 From: Nathan Moinvaziri Date: Tue, 1 Dec 2020 21:56:17 -0800 Subject: [PATCH] Added option to disable printing of gcov-out --- codecov/__init__.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/codecov/__init__.py b/codecov/__init__.py index e337717..2b338d8 100644 --- a/codecov/__init__.py +++ b/codecov/__init__.py @@ -376,6 +376,9 @@ def main(*argv, **kwargs): gcov.add_argument( "--gcov-exec", default="gcov", help="gcov executable to run. Defaults to 'gcov'" ) + gcov.add_argument( + "--no-gcov-out", action="store_true", default=False, help="Disable gcov output" + ) gcov.add_argument("--gcov-args", default="", help="extra arguments to pass to gcov") advanced = parser.add_argument_group( @@ -982,8 +985,11 @@ def main(*argv, **kwargs): if codecov.gcov_args: cmd.append(sanitize_arg("", codecov.gcov_args or "")) cmd.append(path) - write(" Executing gcov (%s)" % cmd) - write(try_to_run(cmd)) + if not codecov.no_gcov_out: + write(" Executing gcov (%s)" % cmd) + gcov_out = try_to_run(cmd) + if not codecov.no_gcov_out: + write(gcov_out) # Collect Reports # ---------------