Commit 947c9dc1 authored by Dmitrii Golovanov's avatar Dmitrii Golovanov Committed by Maureen Helm
Browse files

twister: coverage: Fix LCOV full path prefixes



In some cases genhtml incorrectly built reports from LCOV
coverage data using full path for some of the source files
and relative paths for other files.
This fix adds `--prefix` parameter to shorten paths explicitly
relative to the ZEPHYR_BASE directory.

Signed-off-by: default avatarDmitrii Golovanov <dmitrii.golovanov@intel.com>
parent a1042c40
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -224,6 +224,7 @@ class Lcov(CoverageTool):
        # The --ignore-errors source option is added to avoid it exiting due to
        # samples/application_development/external_lib/
        cmd = ["genhtml", "--legend", "--branch-coverage",
                                "--prefix", self.base_dir,
                                "-output-directory",
                                os.path.join(outdir, "coverage")] + files
        cmd = cmd + ignore_errors