1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
llvm-mirror/test/tools/llvm-cov/multiple-files.test
Vedant Kumar 340a374fe7 [llvm-cov] Strip redundant path components from filenames (fix PR31982)
Instead of stripping the longest common prefix off of the filenames in a
report, strip out the longest chain of redundant path components. This
fixes the case in PR31982, where there are two files with the same
prefix, and stripping out the LCP makes things less intelligible.

llvm-svn: 296029
2017-02-23 22:20:32 +00:00

16 lines
702 B
Plaintext

// RUN: llvm-profdata merge %S/Inputs/multiple-files.proftext -o %t.profdata
// RUN: llvm-cov report %S/Inputs/multiple-files.covmapping -instr-profile %t.profdata | FileCheck %s -check-prefix=MANY_COMPONENTS
// RUN: llvm-cov report %S/Inputs/multiple-files2.covmapping -instr-profile %t.profdata | FileCheck %s -check-prefix=ONE_COMPONENT
// MANY_COMPONENTS: Filename
// MANY_COMPONENTS-NEXT: ---
// MANY_COMPONENTS-NEXT: {{^}}a{{[/\\]}}f2.c
// MANY_COMPONENTS-NEXT: {{^}}b{{[/\\]}}c{{[/\\]}}f4.c
// MANY_COMPONENTS-NEXT: {{^}}b{{[/\\]}}f3.c
// MANY_COMPONENTS-NEXT: {{^}}f1.c
// ONE_COMPONENT: Filename
// ONE_COMPONENT-NEXT: ---
// ONE_COMPONENT-NEXT: {{^}}cov.c
// ONE_COMPONENT-NEXT: {{^}}cov.h