summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-cov/llvm-cov.test
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2014-04-23 21:44:55 +0000
committerJustin Bogner <mail@justinbogner.com>2014-04-23 21:44:55 +0000
commitc67f0250ef817ae4d3c749c82cf8de2e2eac5c99 (patch)
tree1a903bef4a7d5e79d89bdd34852987a468f0272c /llvm/test/tools/llvm-cov/llvm-cov.test
parentbac905c684f734c4a110acd0b94deacb29b5a475 (diff)
downloadbcm5719-llvm-c67f0250ef817ae4d3c749c82cf8de2e2eac5c99.tar.gz
bcm5719-llvm-c67f0250ef817ae4d3c749c82cf8de2e2eac5c99.zip
llvm-cov: Add support for gcov's --long-file-names option
GCOV provides an option to prepend output file names with the source file name, to disambiguate between covered data that's included from multiple sources. Add a flag to llvm-cov that does the same. llvm-svn: 207035
Diffstat (limited to 'llvm/test/tools/llvm-cov/llvm-cov.test')
-rw-r--r--llvm/test/tools/llvm-cov/llvm-cov.test10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-cov/llvm-cov.test b/llvm/test/tools/llvm-cov/llvm-cov.test
index 19d3e5db187..8457aef292f 100644
--- a/llvm/test/tools/llvm-cov/llvm-cov.test
+++ b/llvm/test/tools/llvm-cov/llvm-cov.test
@@ -43,6 +43,16 @@ RUN: llvm-cov test_paths.cpp | diff -u test_no_preserve_paths.output -
RUN: diff -aub test_paths.cpp.gcov test.cpp.gcov
RUN: diff -aub test_paths.h.gcov test.h.gcov
+# Long file names.
+RUN: llvm-cov -l test_paths.cpp | diff -u test_long_file_names.output -
+RUN: diff -aub test_paths.cpp.gcov test_paths.cpp##test.cpp.gcov
+RUN: diff -aub test_paths.h.gcov test_paths.cpp##test.h.gcov
+
+# Long file names and preserve paths.
+RUN: llvm-cov -lp -gcno test_paths.gcno -gcda test_paths.gcda srcdir/../test_paths.cpp | diff -u test_long_paths.output -
+RUN: diff -aub test_paths.cpp.gcov srcdir#^#test_paths.cpp##srcdir#nested_dir#^#test.cpp.gcov
+RUN: diff -aub test_paths.h.gcov srcdir#^#test_paths.cpp##srcdir#nested_dir#^#test.h.gcov
+
# Function summaries. This changes stdout, but not the gcov files.
RUN: llvm-cov test.c -f | diff -u test_-f.output -
RUN: diff -aub test_no_options.cpp.gcov test.cpp.gcov
OpenPOWER on IntegriCloud