File: updatecoverage.sh

package info (click to toggle)
ecflow 5.15.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 51,868 kB
  • sloc: cpp: 269,341; python: 22,756; sh: 3,609; perl: 770; xml: 333; f90: 204; ansic: 141; makefile: 70
file content (33 lines) | stat: -rwxr-xr-x 785 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env bash

# Updates the coverage documentation, and copies it into the appropriate place
# in the gh-pages branch.
#   $1 from CMAKE will contain the root directory of cereal

# this requires lcov 1.10 or newer

set -e

COVERAGE_TESTS=./coverage_*

# run tests
for f in $COVERAGE_TESTS
  do
    echo $f
    $f
  done

# build coverage output
tempdir=`mktemp -d`

lcov --capture --directory $1 --output-file coverage.info --no-external
lcov --remove coverage.info '*/external/*' '*/cereal/details/util.hpp' 'sandbox/*' '*/unittests/*' -o coverage.info
genhtml --demangle-cpp coverage.info --output-directory ${tempdir}

# copy over to gh pages
git checkout gh-pages

rm -rf $1/assets/coverage
mkdir $1/assets/coverage
cp -r ${tempdir}/* $1/assets/coverage/
rm -rf ${tempdir}