[PATCH] D22692: [utils] Test the code coverage regression-checking script
Vedant Kumar via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 22 11:30:34 PDT 2016
vsk created this revision.
vsk added reviewers: MaggieYi, silvas, ikudrin.
vsk added a subscriber: llvm-commits.
Make sure that it can parse `llvm-cov report` output, so that the script doesn't break when we update llvm-cov.
https://reviews.llvm.org/D22692
Files:
test/tools/llvm-cov/report.cpp
Index: test/tools/llvm-cov/report.cpp
===================================================================
--- test/tools/llvm-cov/report.cpp
+++ test/tools/llvm-cov/report.cpp
@@ -1,4 +1,5 @@
-// RUN: llvm-cov report %S/Inputs/report.covmapping -instr-profile %S/Inputs/report.profdata -filename-equivalence 2>&1 | FileCheck %s
+// RUN: llvm-cov report %S/Inputs/report.covmapping -instr-profile %S/Inputs/report.profdata -filename-equivalence > %t.report.txt
+// RUN: FileCheck %s -input-file=%t.report.txt
// RUN: llvm-cov report %S/Inputs/report.covmapping -instr-profile %S/Inputs/report.profdata -filename-equivalence report.cpp 2>&1 | FileCheck -check-prefix=FILT-NEXT %s
// CHECK: Filename Regions Missed Regions Cover Functions Missed Functions Executed Lines Missed Lines Cover
@@ -40,3 +41,6 @@
// FUNCTIONS: _Z3foob
// FUNCTIONS: _Z3barv
// FUNCTIONS: _Z4func
+
+// Test whether the coverage regression checking script can parse `report` output.
+// RUN: %python $LLVM_SRC_ROOT/utils/check-coverage-regressions.py %t.report.txt %t.report.txt | count 0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22692.65115.patch
Type: text/x-patch
Size: 1103 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160722/60b48aca/attachment.bin>
More information about the llvm-commits
mailing list