[PATCH] D23922: [llvm-cov] Use the native path in the coverage report.

Vedant Kumar via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 29 10:49:24 PDT 2016


vsk added inline comments.

================
Comment at: test/tools/llvm-cov/native_separators.c:21
@@ +20,2 @@
+
+int main() {}
----------------
MaggieYi wrote:
> Currently, the source and binary files are only shown in the HTML report, not in the txt report. Should I put the source and binary files in the txt report as well?
Ideally I'd like to preserve feature-parity between the html/text views. It would be nice to extend the text view in a follow-up patch, but don't worry about it for now.

================
Comment at: tools/llvm-cov/SourceCoverageViewHTML.cpp:312
@@ +311,3 @@
+    SmallString<128> LinkTextStr(sys::path::relative_path(SF));
+    sys::path::remove_dots(LinkTextStr, /*remove_dot_dots=*/true);
+    sys::path::native(LinkTextStr);
----------------
MaggieYi wrote:
> I have added an index html test in the double_dots.c test.
> 
> I also considered the case you mentioned here, it could happen in the following case:
> Assuming: 
>     1) The “test.cpp”, “test.elf” and “test.profdata” are in the folder: “i:\codecoverage\test1”;
>     2) There are two folders “test1” and “test2” in the folder i:\codecoverage.
> Running the following commands:
>      $ cd i:\codecoverage\test1\
>      $ llvm-cov show –format=html –o output test.elf –instr-profile=test.profdata -filename-equivalence ..\test2\..\test1\test.cpp
> Checking the index.html file:
>      The “codecoverage\test1\test.cpp” is generated by llvm-cov.
> 
> I have checked the index.html fie, which is correct. I don’t know how to pass “..\test2\..\test1\test.cpp” to the command line in the llvm testing system. Could you please let me know how to do it?
> 
Good catch. You should be able to write "../test2/../test1/test.cpp" in a RUN line. IIRC, llvm-lit has logic to parse Unix filenames and re-write them on Windows hosts.


https://reviews.llvm.org/D23922





More information about the llvm-commits mailing list