[PATCH] D68733: Use -fdebug-compilation-dir to form absolute paths in coverage mappings
Yuke Liao via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 28 10:04:01 PDT 2019
liaoyuke added a comment.
In D68733#1702609 <https://reviews.llvm.org/D68733#1702609>, @vsk wrote:
> Thanks, lgtm!
>
> In PR43614 I mentioned adding an extra argument to llvm-cov to specify the base directory. On second thought, the existing `-path-equivalence` option should make that unnecessary.
I just tested out this CL, and I don't think it's working correctly (even with -path-equivalence flag)
The command I used is:
/usr/local/google/home/liaoyuke/chromium/src/third_party/llvm-build/Release+Asserts/bin/llvm-cov show -format=html -output-dir=/usr/local/google/home/liaoyuke/chromium/src/out/output_test_path -instr-profile=/usr/local/google/home/liaoyuke/chromium/src/out/output_test_path/linux/coverage.profdata -path-equivalence=../..,/usr/local/google/home/liaoyuke/chromium/src out/coverage/base_unittests
And the generated html files are as following: https://imgur.com/gallery/dlgQXhy
Specifically, there are a few problems:
1. The index.html files still show relative paths, but I'm expecting an absolute path given that I passed in the -path-equivalence flag.
2. The file level line-by-line view's styling is completely off, there is no table and no highlights.
3. I also tried the "llvm-cov export" command, it seems that it doesn't respect the -path-equivalence flag at all, and the produced json still uses relative paths in them. (I'm guessing the root cause is the same as 1)
Am I using the -path-equivalence flag correctly? And any other suggestions to work this around?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68733/new/
https://reviews.llvm.org/D68733
More information about the cfe-commits
mailing list