summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-cov
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/tools/llvm-cov')
-rw-r--r--llvm/test/tools/llvm-cov/Inputs/test_hash.output8
-rw-r--r--llvm/test/tools/llvm-cov/llvm-cov.test5
2 files changed, 13 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-cov/Inputs/test_hash.output b/llvm/test/tools/llvm-cov/Inputs/test_hash.output
new file mode 100644
index 00000000000..3f8b3f614d5
--- /dev/null
+++ b/llvm/test/tools/llvm-cov/Inputs/test_hash.output
@@ -0,0 +1,8 @@
+File 'srcdir/./nested_dir/../test.cpp'
+Lines executed:84.21% of 38
+srcdir/./nested_dir/../test.cpp:creating 'test.cpp##a806e5b3093cd6f683da88c0da150daf.gcov'
+
+File 'srcdir/./nested_dir/../test.h'
+Lines executed:100.00% of 1
+srcdir/./nested_dir/../test.h:creating 'test.h##0cbee7e2421fa4517420ac4f935620ca.gcov'
+
diff --git a/llvm/test/tools/llvm-cov/llvm-cov.test b/llvm/test/tools/llvm-cov/llvm-cov.test
index d460f37da2a..1ddbdad15cd 100644
--- a/llvm/test/tools/llvm-cov/llvm-cov.test
+++ b/llvm/test/tools/llvm-cov/llvm-cov.test
@@ -63,6 +63,11 @@ RUN: llvm-cov gcov -lp -gcno test_paths.gcno -gcda test_paths.gcda srcdir/../tes
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
+# Hash pathnames.
+RUN: llvm-cov gcov -x -gcno test_paths.gcno -gcda test_paths.gcda srcdir/../test_paths.cpp | diff -u test_hash.output -
+RUN: diff -aub test_paths.cpp.gcov test.cpp##a806e5b3093cd6f683da88c0da150daf.gcov
+RUN: diff -aub test_paths.h.gcov test.h##0cbee7e2421fa4517420ac4f935620ca.gcov
+
# Function summaries. This changes stdout, but not the gcov files.
RUN: llvm-cov gcov test.c -f | diff -u test_-f.output -
RUN: diff -aub test_no_options.cpp.gcov test.cpp.gcov
OpenPOWER on IntegriCloud