summaryrefslogtreecommitdiff
path: root/tools/coverage/llvm-gcov
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2017-07-18 10:18:55 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-07-18 14:35:28 +0000
commit574366b637c1e937efc7b1becb1d151c3599f7af (patch)
tree405fe694c72cca7b9d24a6eea87b942c119297e7 /tools/coverage/llvm-gcov
parent61a3cb81a298640ec65fc019926a3a46b8cf8617 (diff)
downloadpdfium-574366b637c1e937efc7b1becb1d151c3599f7af.tar.xz
Add tools for generating coverage information
Adds script coverage_report.py for generating code coverage reports. This script depends on the llvm-gcov wrapper script and the lcovrc config file that are checked in with it. BUG=pdfium:797 Change-Id: I0416349186835c0e4dd7f4907d2b472a4406e027 Reviewed-on: https://pdfium-review.googlesource.com/7810 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'tools/coverage/llvm-gcov')
-rwxr-xr-xtools/coverage/llvm-gcov15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/coverage/llvm-gcov b/tools/coverage/llvm-gcov
new file mode 100755
index 0000000000..8141e7ef27
--- /dev/null
+++ b/tools/coverage/llvm-gcov
@@ -0,0 +1,15 @@
+#!/bin/bash
+# Copyright 2017 The PDFium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Wrapper script to make llvm-cov behave like gcov, so it can be passed in as the --gcov-tool
+# parameter when using lcov. Specifically adds the keyword 'gcov' to the arguments being passed in,
+# to tell llvm-cov to operate in gcov compatibility mode.
+#
+# LLVM_COV_BIN needs to be set by caller and should the path to
+# a llvm-cov binary with a version of 3.5 or greater.
+
+set -e
+
+exec ${LLVM_COV_BIN} gcov $*