Initial commit
[yaffs-website] / node_modules / node-sass / src / libsass / script / ci-report-coverage
1 #!/bin/bash
2
3 if [ "x$COVERAGE" = "xyes" ]; then
4
5   # find / -name "gcovr"
6   # find / -name "coveralls"
7   # this is only needed for mac os x builds!
8   PATH=$PATH:/Users/travis/Library/Python/2.7/bin/
9
10
11   # exclude some directories from profiling (.libs is from autotools)
12   export EXCLUDE_COVERAGE="--exclude plugins
13                            --exclude sassc/sassc.c
14                            --exclude src/sass-spec
15                            --exclude src/.libs
16                            --exclude src/debug.hpp
17                            --exclude src/json.cpp
18                            --exclude src/json.hpp
19                            --exclude src/cencode.c
20                            --exclude src/b64
21                            --exclude src/utf8
22                            --exclude src/utf8_string.hpp
23                            --exclude src/utf8.h
24                            --exclude src/utf8_string.cpp
25                            --exclude src/sass2scss.h
26                            --exclude src/sass2scss.cpp
27                            --exclude src/test
28                            --exclude src/posix
29                            --exclude src/debugger.hpp"
30   # debug used gcov version
31   # option not available on mac
32   if [ "$TRAVIS_OS_NAME" != "osx" ]; then
33     gcov -v
34   fi
35   # create summarized report
36   gcovr -r .
37   # submit report to coveralls.io
38   coveralls $EXCLUDE_COVERAGE --gcov-options '\-lp'
39
40 else
41   echo "skip coverage reporting"
42 fi