aboutsummaryrefslogtreecommitdiff
path: root/gen_coverage_html.sh
diff options
context:
space:
mode:
authorrspangler@google.com <rspangler@google.com@06c00378-0e64-4dae-be16-12b19f9950a1>2009-10-09 20:56:14 +0000
committerrspangler@google.com <rspangler@google.com@06c00378-0e64-4dae-be16-12b19f9950a1>2009-10-09 20:56:14 +0000
commit570c65bd8d449c385e5687245b28b1ca58c11fea (patch)
tree0d7920630f2a8681e9250206670a2c62efa35bb3 /gen_coverage_html.sh
downloadlibbrillo-570c65bd8d449c385e5687245b28b1ca58c11fea.tar.gz
Start copying over source.
git-svn-id: svn://chrome-svn/chromeos/trunk@4 06c00378-0e64-4dae-be16-12b19f9950a1
Diffstat (limited to 'gen_coverage_html.sh')
-rwxr-xr-xgen_coverage_html.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/gen_coverage_html.sh b/gen_coverage_html.sh
new file mode 100755
index 0000000..9faf1a9
--- /dev/null
+++ b/gen_coverage_html.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+# Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+set -ex
+
+scons debug=1 -c
+scons debug=1
+lcov -d . --zerocounters
+./unittests
+lcov --base-directory . --directory . --capture --output-file app.info
+
+# some versions of genhtml support the --no-function-coverage argument,
+# which we want. The problem w/ function coverage is that every template
+# instantiation of a method counts as a different method, so if we
+# instantiate a method twice, once for testing and once for prod, the method
+# is tested, but it shows only 50% function coverage b/c it thinks we didn't
+# test the prod version.
+
+genhtml --no-function-coverage -o html ./app.info || genhtml -o html ./app.info