blob: 9faf1a977fe668bc0a3be3c6a4b1b21fbebb7fa1 [file] [log] [blame]
rspangler@google.com570c65b2009-10-09 20:56:14 +00001#!/bin/bash
2
3# Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
4# Use of this source code is governed by a BSD-style license that can be
5# found in the LICENSE file.
6
7set -ex
8
9scons debug=1 -c
10scons debug=1
11lcov -d . --zerocounters
12./unittests
13lcov --base-directory . --directory . --capture --output-file app.info
14
15# some versions of genhtml support the --no-function-coverage argument,
16# which we want. The problem w/ function coverage is that every template
17# instantiation of a method counts as a different method, so if we
18# instantiate a method twice, once for testing and once for prod, the method
19# is tested, but it shows only 50% function coverage b/c it thinks we didn't
20# test the prod version.
21
22genhtml --no-function-coverage -o html ./app.info || genhtml -o html ./app.info