xref: /llvm-project/llvm/test/tools/llvm-remarkutil/count/count-by-remark.test (revision 0603737ac0f73ff33326d0274b3152cc5a81e1ec)
1RUN: llvm-remarkutil count --parser=yaml --count-by=remark-name --group-by=source %p/Inputs/remark-count-by.yaml | FileCheck %s
2RUN: llvm-remarkutil count --parser=yaml --count-by=remark-name --group-by=function %p/Inputs/remark-count-by.yaml | FileCheck %s --check-prefix=CHECKFUNC
3RUN: llvm-remarkutil count --parser=yaml --count-by=remark-name --group-by=function-with-loc %p/Inputs/remark-count-by.yaml | FileCheck %s --check-prefix=CHECKFUNCLOC
4RUN: llvm-remarkutil count --parser=yaml --count-by=remark-name --group-by=total %p/Inputs/remark-count-by.yaml | FileCheck %s --check-prefix=CHECKTOTAL
5
6; CHECK-LABEL: Source,Count
7; CHECK: path/to/anno.c,3
8; CHECK: path/to/anno2.c,1
9
10; CHECKFUNC-LABEL: Function,Count
11; CHECKFUNC: func1,3
12; CHECKFUNC: func2,1
13
14; CHECKFUNCLOC-LABEL: FuctionWithDebugLoc,Count
15; CHECKFUNCLOC: path/to/anno.c:func1,2
16; CHECKFUNCLOC: path/to/anno.c:func2,1
17; CHECKFUNCLOC: path/to/anno2.c:func1,1
18
19; CHECKTOTAL-LABEL: Total,Count
20; CHECKTOTAL: Total,4
21