File: ci-report-coverage

package info (click to toggle)
golang-github-bep-golibsass 0.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,808 kB
  • sloc: cpp: 30,398; ansic: 848; sh: 662; makefile: 340; perl: 56
file content (42 lines) | stat: -rwxr-xr-x 1,465 bytes parent folder | download | duplicates (10)
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
34
35
36
37
38
39
40
41
42
#!/bin/bash

if [ "x$COVERAGE" = "xyes" ]; then

  # find / -name "gcovr"
  # find / -name "coveralls"
  # this is only needed for mac os x builds!
  PATH=$PATH:/Users/travis/Library/Python/2.7/bin/


  # exclude some directories from profiling (.libs is from autotools)
  export EXCLUDE_COVERAGE="--exclude plugins
                           --exclude sassc/sassc.c
                           --exclude src/sass-spec
                           --exclude src/.libs
                           --exclude src/debug.hpp
                           --exclude src/json.cpp
                           --exclude src/json.hpp
                           --exclude src/cencode.c
                           --exclude src/b64
                           --exclude src/utf8
                           --exclude src/utf8_string.hpp
                           --exclude src/utf8.h
                           --exclude src/utf8_string.cpp
                           --exclude src/sass2scss.h
                           --exclude src/sass2scss.cpp
                           --exclude src/test
                           --exclude src/posix
                           --exclude src/debugger.hpp"
  # debug used gcov version
  # option not available on mac
  if [ "$TRAVIS_OS_NAME" != "osx" ]; then
    gcov -v
  fi
  # create summarized report
  gcovr -r .
  # submit report to coveralls.io
  coveralls $EXCLUDE_COVERAGE --gcov-options '\-lp'

else
  echo "skip coverage reporting"
fi