summaryrefslogtreecommitdiff
path: root/test/tools/llvm-cov/llvm-cov.test
blob: 411ac1f87396262fe85a40565a854cfd4f158ef3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# "cd" and globbing are unsupported in lit internal runner.
REQUIRES: shell
RUN: rm -rf %t
RUN: mkdir %t
RUN: cd %t
RUN: cp %p/Inputs/test* .

RUN: llvm-cov test.c | diff test_no_options.output -
RUN: llvm-cov test.c -f | diff test_-f.output -
RUN: diff -aub test_no_options.cpp.gcov test.cpp.gcov
RUN: diff -aub test_no_options.h.gcov test.h.gcov

RUN: llvm-cov test.c -a
RUN: diff -aub test_-a.cpp.gcov test.cpp.gcov
RUN: diff -aub test_-a.h.gcov test.h.gcov

RUN: llvm-cov test.c -a -b | diff test_-b.output -
# This is expected to fail because gcov doesn't actually output real branch or
# call statistics on a per function basis.
RUN: llvm-cov test.c -a -b -f | not diff test_-b_-f.output -
RUN: diff -aub test_-a_-b.cpp.gcov test.cpp.gcov
RUN: diff -aub test_-a_-b.h.gcov test.h.gcov

RUN: llvm-cov test.c -a -b -u
RUN: diff -aub test_-a_-b_-u.cpp.gcov test.cpp.gcov
RUN: diff -aub test_-a_-b_-u.h.gcov test.h.gcov

RUN: llvm-cov test.c -a -b -c -u
RUN: diff -aub test_-a_-b_-c_-u.cpp.gcov test.cpp.gcov
RUN: diff -aub test_-a_-b_-c_-u.h.gcov test.h.gcov

RUN: not llvm-cov test.c -gcno=test_read_fail.gcno

RUN: not llvm-cov test.c -gcda=test_file_checksum_fail.gcda

RUN: not llvm-cov test.c -gcda=test_func_checksum_fail.gcda

XFAIL: powerpc64, s390x, mips, sparc