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

Ying Yi via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 28 12:35:01 PDT 2016


MaggieYi marked an inline comment as done.

================
Comment at: test/tools/llvm-cov/native_separators.c:21
@@ +20,2 @@
+
+int main() {}
----------------
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?

================
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);
----------------
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?



https://reviews.llvm.org/D23922





More information about the llvm-commits mailing list