Skip to content
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.

Fixed gcov not being found in certain instances. #263

Merged
merged 1 commit into from May 29, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 5 additions & 7 deletions codecov/__init__.py
Expand Up @@ -925,13 +925,11 @@ def main(*argv, **kwargs):
True,
dont_search_here,
):
cmd = (
sanitize_arg("", codecov.gcov_exec or "")
+ " -pb "
+ sanitize_arg("", codecov.gcov_args or "")
+ " "
+ path
)
cmd = sanitize_arg("", codecov.gcov_exec or "").split(" ")
cmd.append("-pb")
if codecov.gcov_args:
cmd.append(sanitize_arg("", codecov.gcov_args or ""))
cmd.append(path)
Comment on lines +928 to +932
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cmd = sanitize_arg("", codecov.gcov_exec or "").split(" ")
cmd.append("-pb")
if codecov.gcov_args:
cmd.append(sanitize_arg("", codecov.gcov_args or ""))
cmd.append(path)
cmd = [
*sanitize_arg("", codecov.gcov_exec or "").split(" "),
"-pb",
sanitize_arg("", codecov.gcov_args or ""),
path,
]

Copy link
Contributor Author

@nmoinvaz nmoinvaz May 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is how I initially had it, but my CI threw some errors with "" entries if gcov_args not supplied. It was trying to find "" as an input file.

Also I split() gcov_exec due to "llvm-cov-6.0 gcov" possibly being passed in.

write(" Executing gcov (%s)" % cmd)
write(try_to_run(cmd))

Expand Down