llvm-cov: Added -c option for branch counts.
[oota-llvm.git] / test / tools / llvm-cov / llvm-cov.test
index 55af86e85125efb0af6853814588475d1c8f2f1c..02b8a3db9a5105a3f563731fef99730ded5ab685 100644 (file)
@@ -1,13 +1,34 @@
-RUN: cd %p/Inputs
-# "cd" is unsupported in lit internal runner.
+# "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 -gcno=test.gcno -gcda=test.gcda
-RUN: diff test.cpp.gcov test.cpp.llcov
-RUN: rm test.cpp.llcov
+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 -gcno=test.gcno -gcda=test.gcda -a
+RUN: diff -aub test_-a.cpp.gcov test.cpp.gcov
+RUN: diff -aub test_-a.h.gcov test.h.gcov
+
+RUN: llvm-cov -gcno=test.gcno -gcda=test.gcda -a -b
+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 -gcno=test.gcno -gcda=test.gcda -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 -gcno=test.gcno -gcda=test.gcda -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 -gcno=test_read_fail.gcno -gcda=test.gcda
 
-RUN: not llvm-cov -gcno=test.gcno -gcda=test_checksum_mismatch.gcda
+RUN: not llvm-cov -gcno=test.gcno -gcda=test_file_checksum_fail.gcda
+
+RUN: not llvm-cov -gcno=test.gcno -gcda=test_func_checksum_fail.gcda
 
 XFAIL: powerpc64, s390x, mips