diff options
author | Justin Bogner <mail@justinbogner.com> | 2014-02-18 09:19:48 +0000 |
---|---|---|
committer | Justin Bogner <mail@justinbogner.com> | 2014-02-18 09:19:48 +0000 |
commit | e9a3e5a93e1c52844dfb122e45c2afb16121d5b7 (patch) | |
tree | 427299b08153cb6e4cadb6e382ee81c6aecdb441 /llvm/test/tools/llvm-cov/llvm-cov.test | |
parent | 67bf8bd124f39734c94a1ed81bb3804de51ca789 (diff) | |
download | bcm5719-llvm-e9a3e5a93e1c52844dfb122e45c2afb16121d5b7.tar.gz bcm5719-llvm-e9a3e5a93e1c52844dfb122e45c2afb16121d5b7.zip |
llvm-cov: Support gcov's extermely lenient treatment of -o
In gcov, the -o flag can accept either a directory or a file name.
When given a directory, the gcda and gcno files are expected to be in
that directory. When given a file, the gcda and gcno files are
expected to be named based on the stem of that file. Non-existent
paths are treated as files.
This implements compatible behaviour.
llvm-svn: 201555
Diffstat (limited to 'llvm/test/tools/llvm-cov/llvm-cov.test')
-rw-r--r-- | llvm/test/tools/llvm-cov/llvm-cov.test | 10 |
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 c52a9815229..afd657be249 100644 --- a/llvm/test/tools/llvm-cov/llvm-cov.test +++ b/llvm/test/tools/llvm-cov/llvm-cov.test @@ -21,6 +21,16 @@ RUN: llvm-cov -o objdir test.c | diff -u test_no_options.output - RUN: diff -aub test_objdir.cpp.gcov test.cpp.gcov RUN: diff -aub test_objdir.h.gcov test.h.gcov +# Specifying an object file +RUN: llvm-cov -o objdir/test.o test.c | diff -u test_no_options.output - +RUN: diff -aub test_objdir.cpp.gcov test.cpp.gcov +RUN: diff -aub test_objdir.h.gcov test.h.gcov + +# Specifying an object file that could be ambiguous with a directory +RUN: llvm-cov -o objdir/test test.c | diff -u test_no_options.output - +RUN: diff -aub test_objdir.cpp.gcov test.cpp.gcov +RUN: diff -aub test_objdir.h.gcov test.h.gcov + # Preserve paths. This mangles the output filenames. RUN: mkdir -p %t/srcdir/nested_dir RUN: cp test.cpp test.h %t/srcdir |