From 9433c770f7cd72882fa33edf3b53dd62a23abc21 Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Tue, 4 Feb 2014 06:41:39 +0000 Subject: 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 --- test/tools/llvm-cov/llvm-cov.test | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/tools/llvm-cov/llvm-cov.test') 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 -- cgit v1.2.3