Skip to content

Commit

Permalink
sanitycheck: coverage: Tolerate missing source files
Browse files Browse the repository at this point in the history
When calling genhtml to generate a coverage report directly from
sanitycheck (-C option), call it with the "--ignore-errors source"
option, so it does not exit when it meets a missing file, but
instead it warns the user and continues.

Fixes zephyrproject-rtos#13014

Signed-off-by: Alberto Escolar Piedras <[email protected]>
  • Loading branch information
aescolar authored and nashif committed Feb 3, 2019
1 parent c2699dd commit 834b86f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/sanitycheck
Original file line number Diff line number Diff line change
Expand Up @@ -2880,7 +2880,10 @@ def generate_coverage(outdir, ignores):
coveragefile, "--rc", "lcov_branch_coverage=1"],
stdout=coveragelog)

#The --ignore-errors source option is added to avoid it exiting due to
#samples/application_development/external_lib/
ret = subprocess.call(["genhtml", "--legend", "--branch-coverage",
"--ignore-errors", "source",
"-output-directory",
os.path.join(outdir, "coverage")] + files,
stdout=coveragelog)
Expand Down

0 comments on commit 834b86f

Please sign in to comment.