Almost there...



git-svn-id: svn://chrome-svn/chromeos/trunk@24 06c00378-0e64-4dae-be16-12b19f9950a1
diff --git a/gen_coverage_html.sh b/gen_coverage_html.sh
new file mode 100755
index 0000000..7ccc5d8
--- /dev/null
+++ b/gen_coverage_html.sh
@@ -0,0 +1,21 @@
+#!/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
+./update_engine_unittests
+lcov --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