xref: /llvm-project/llvm/test/tools/llvm-cov/multiple-files.test (revision 176b9f651685c52bce25e700a758bd33e6a5354d)
1fa754371SVedant Kumar// RUN: llvm-profdata merge %S/Inputs/multiple-files.proftext -o %t.profdata
211813280SVedant Kumar// RUN: llvm-cov report %S/Inputs/multiple-files.covmapping -instr-profile %t.profdata | FileCheck %s -check-prefix=MANY_COMPONENTS
311813280SVedant Kumar// RUN: llvm-cov report %S/Inputs/multiple-files2.covmapping -instr-profile %t.profdata | FileCheck %s -check-prefix=ONE_COMPONENT
4*176b9f65SMax Moroz// RUN: llvm-cov export %S/Inputs/multiple-files.covmapping -instr-profile %t.profdata -format=lcov | FileCheck %s -check-prefix=LCOV
5fa754371SVedant Kumar
611813280SVedant Kumar// MANY_COMPONENTS: Filename
711813280SVedant Kumar// MANY_COMPONENTS-NEXT: ---
811813280SVedant Kumar// MANY_COMPONENTS-NEXT: {{^}}a{{[/\\]}}f2.c
911813280SVedant Kumar// MANY_COMPONENTS-NEXT: {{^}}b{{[/\\]}}c{{[/\\]}}f4.c
1011813280SVedant Kumar// MANY_COMPONENTS-NEXT: {{^}}b{{[/\\]}}f3.c
1111813280SVedant Kumar// MANY_COMPONENTS-NEXT: {{^}}f1.c
1211813280SVedant Kumar
1311813280SVedant Kumar// ONE_COMPONENT: Filename
1411813280SVedant Kumar// ONE_COMPONENT-NEXT: ---
1511813280SVedant Kumar// ONE_COMPONENT-NEXT: {{^}}cov.c
1611813280SVedant Kumar// ONE_COMPONENT-NEXT: {{^}}cov.h
17*176b9f65SMax Moroz
18*176b9f65SMax Moroz// LCOV-LABEL: SF:{{.*}}a{{[/\\]}}f2.c
19*176b9f65SMax Moroz// LCOV: FN:1,f2
20*176b9f65SMax Moroz// No extra funcs
21*176b9f65SMax Moroz// LCOV-NOT: FN:
22*176b9f65SMax Moroz// LCOV-LABEL: SF:{{.*}}b{{[/\\]}}c{{[/\\]}}f4.c
23*176b9f65SMax Moroz// LCOV: FN:1,f4
24*176b9f65SMax Moroz// LCOV-LABEL: SF:{{.*}}b{{[/\\]}}f3.c
25*176b9f65SMax Moroz// LCOV: FN:1,f3
26*176b9f65SMax Moroz// LCOV-LABEL: SF:{{.*}}f1.c
27*176b9f65SMax Moroz// LCOV: FN:1,f1
28