summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2016-06-28 02:09:39 +0000
committerVedant Kumar <vsk@apple.com>2016-06-28 02:09:39 +0000
commit7937ef37969f7d46d8626e2b61a6ae8361afbea6 (patch)
treeda524077905d16803c53d68fc50823be5f352880 /llvm/test/tools
parent9980075133ceec5746318ba133a1b09cffebd6ee (diff)
downloadbcm5719-llvm-7937ef37969f7d46d8626e2b61a6ae8361afbea6.tar.gz
bcm5719-llvm-7937ef37969f7d46d8626e2b61a6ae8361afbea6.zip
Reapply "[llvm-cov] Add an -output-dir option for the show sub-command""
Passing -output-dir path/to/dir to llvm-cov show creates path/to/dir if it doesn't already exist, and prints reports into that directory. In function view mode, all views are written into path/to/dir/functions.$EXTENSION. In file view mode, all views are written into path/to/dir/coverage/$PATH.$EXTENSION. Changes since the initial commit: - Avoid accidentally closing stdout twice. llvm-svn: 273985
Diffstat (limited to 'llvm/test/tools')
-rw-r--r--llvm/test/tools/llvm-cov/showLineExecutionCounts.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-cov/showLineExecutionCounts.cpp b/llvm/test/tools/llvm-cov/showLineExecutionCounts.cpp
index 6b969f709a9..587b973ec82 100644
--- a/llvm/test/tools/llvm-cov/showLineExecutionCounts.cpp
+++ b/llvm/test/tools/llvm-cov/showLineExecutionCounts.cpp
@@ -28,3 +28,9 @@ int main() { // CHECK: 161| [[@LINE]]|int main(
// RUN: llvm-cov show %S/Inputs/lineExecutionCounts.covmapping -instr-profile %t.profdata -filename-equivalence %s | FileCheck -check-prefixes=CHECK,WHOLE-FILE %s
// RUN: llvm-cov show %S/Inputs/lineExecutionCounts.covmapping -instr-profile %t.profdata -filename-equivalence -name=main %s | FileCheck -check-prefixes=CHECK,FILTER %s
+
+// Test -output-dir.
+// RUN: llvm-cov show %S/Inputs/lineExecutionCounts.covmapping -output-dir %t.dir -instr-profile %t.profdata -filename-equivalence %s
+// RUN: llvm-cov show %S/Inputs/lineExecutionCounts.covmapping -output-dir %t.dir -instr-profile %t.profdata -filename-equivalence -name=main %s
+// RUN: FileCheck -check-prefixes=CHECK,WHOLE-FILE -input-file %t.dir/coverage/tmp/showLineExecutionCounts.cpp.txt %s
+// RUN: FileCheck -check-prefixes=CHECK,FILTER -input-file %t.dir/functions.txt %s
OpenPOWER on IntegriCloud