summaryrefslogtreecommitdiff
path: root/test/tools/llvm-cov/llvm-cov.test
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2014-02-04 06:41:39 +0000
committerJustin Bogner <mail@justinbogner.com>2014-02-04 06:41:39 +0000
commit9433c770f7cd72882fa33edf3b53dd62a23abc21 (patch)
tree577aabed381b36bd14b1b0fdd7d7e40ac9c2dab2 /test/tools/llvm-cov/llvm-cov.test
parentf7d0d0798ea06dfc2629cd458a273197b6bb73e1 (diff)
downloadllvm-9433c770f7cd72882fa33edf3b53dd62a23abc21.tar.gz
llvm-9433c770f7cd72882fa33edf3b53dd62a23abc21.tar.bz2
llvm-9433c770f7cd72882fa33edf3b53dd62a23abc21.tar.xz
llvm-cov: Ignore missing .gcda files
When gcov is run without gcda data, it acts as if the counts are all zero and labels the file as - to indicate that there was no data. We should do the same. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200740 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/tools/llvm-cov/llvm-cov.test')
-rw-r--r--test/tools/llvm-cov/llvm-cov.test5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/tools/llvm-cov/llvm-cov.test b/test/tools/llvm-cov/llvm-cov.test
index cb0c99b747..f205cde791 100644
--- a/test/tools/llvm-cov/llvm-cov.test
+++ b/test/tools/llvm-cov/llvm-cov.test
@@ -48,6 +48,11 @@ RUN: llvm-cov test.c -a -b -c -u | diff -u test_-b.output -
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
+# Missing gcda file just gives 0 counts.
+RUN: llvm-cov test.c -gcda=no_such_gcda_file | diff -u test_no_gcda.output -
+RUN: diff -aub test_no_gcda.cpp.gcov test.cpp.gcov
+RUN: diff -aub test_no_gcda.h.gcov test.h.gcov
+
# Invalid gcno file.
RUN: not llvm-cov test.c -gcno=test_read_fail.gcno