File: updatecoverage.sh

package info (click to toggle)
libcereal 1.3.2%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,064 kB
  • sloc: cpp: 19,837; xml: 178; sh: 56; makefile: 13
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}