Blame script/ci-report-coverage

Packit Service 7770af
#!/bin/bash
Packit Service 7770af
Packit Service 7770af
if [ "x$COVERAGE" = "xyes" ]; then
Packit Service 7770af
Packit Service 7770af
  # find / -name "gcovr"
Packit Service 7770af
  # find / -name "coveralls"
Packit Service 7770af
  # this is only needed for mac os x builds!
Packit Service 7770af
  PATH=$PATH:/Users/travis/Library/Python/2.7/bin/
Packit Service 7770af
Packit Service 7770af
Packit Service 7770af
  # exclude some directories from profiling (.libs is from autotools)
Packit Service 7770af
  export EXCLUDE_COVERAGE="--exclude plugins
Packit Service 7770af
                           --exclude sassc/sassc.c
Packit Service 7770af
                           --exclude src/sass-spec
Packit Service 7770af
                           --exclude src/.libs
Packit Service 7770af
                           --exclude src/debug.hpp
Packit Service 7770af
                           --exclude src/json.cpp
Packit Service 7770af
                           --exclude src/json.hpp
Packit Service 7770af
                           --exclude src/cencode.c
Packit Service 7770af
                           --exclude src/b64
Packit Service 7770af
                           --exclude src/utf8
Packit Service 7770af
                           --exclude src/utf8_string.hpp
Packit Service 7770af
                           --exclude src/utf8.h
Packit Service 7770af
                           --exclude src/utf8_string.cpp
Packit Service 7770af
                           --exclude src/sass2scss.h
Packit Service 7770af
                           --exclude src/sass2scss.cpp
Packit Service 7770af
                           --exclude src/test
Packit Service 7770af
                           --exclude src/posix
Packit Service 7770af
                           --exclude src/debugger.hpp"
Packit Service 7770af
  # debug used gcov version
Packit Service 7770af
  # option not available on mac
Packit Service 7770af
  if [ "$TRAVIS_OS_NAME" != "osx" ]; then
Packit Service 7770af
    gcov -v
Packit Service 7770af
  fi
Packit Service 7770af
  # create summarized report
Packit Service 7770af
  gcovr -r .
Packit Service 7770af
  # submit report to coveralls.io
Packit Service 7770af
  coveralls $EXCLUDE_COVERAGE --gcov-options '\-lp'
Packit Service 7770af
Packit Service 7770af
else
Packit Service 7770af
  echo "skip coverage reporting"
Packit Service 7770af
fi