Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try and get coveralls working #534

Merged
merged 21 commits into from
Nov 23, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
72d94eb
Merge branch 'master' of https://github.com/OpenLightingProject/ola i…
peternewman Nov 21, 2014
651728f
Merge branch 'master' of https://github.com/OpenLightingProject/ola i…
peternewman Nov 21, 2014
91b3389
Try and get coveralls working
peternewman Nov 21, 2014
75d666c
Don't be verbose
peternewman Nov 21, 2014
5dfd787
Switch back to make + make check to see if that's what's stopping cov…
peternewman Nov 21, 2014
78d635f
Simply back to the coveralls example to try and make it work
peternewman Nov 21, 2014
72f1c88
Correct package name, probably now redundant
peternewman Nov 21, 2014
83b1c83
Fix a typo that broke gcov support
peternewman Nov 21, 2014
49b6b6d
Don't be verbose
peternewman Nov 21, 2014
75e64b9
More .gitignore
peternewman Nov 21, 2014
4df5ca6
Try and fix a link issue when using gcov
peternewman Nov 21, 2014
a24cabd
Reduce the amount of log output
peternewman Nov 21, 2014
41f8018
Revert back to a more traditional build, but still using coveralls
peternewman Nov 22, 2014
de1465d
Ignore some directories for coverage
peternewman Nov 22, 2014
f017e5e
Simplify the coverage build
peternewman Nov 22, 2014
8b8d26a
Add some troubleshooting
peternewman Nov 22, 2014
2f6ec08
Use the right gcov
peternewman Nov 22, 2014
0caf6fb
Update gcov path
peternewman Nov 23, 2014
4cc0065
Try and fix coveralls still
peternewman Nov 23, 2014
a2234d2
Turn on verbose for coveralls
peternewman Nov 23, 2014
cb12d38
Undo the coveralls verbose, it's actually working, just a bit slowly.
peternewman Nov 23, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
*.dirstamp
*.gcda
*.gcno
*.gcov
*.la
*.lo
*.log
Expand Down
12 changes: 5 additions & 7 deletions .travis-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,10 @@ elif [[ $TASK = 'doxygen' ]]; then
else
echo "Found $warnings doxygen warnings"
fi;
elif [[ $TASK = 'coverage' ]]; then
# Compile with coverage for coveralls
autoreconf -i && ./configure --enable-gcov && make && make check
else
if [ "$CXX" = "g++-4.8" ]; then
# Compile with coverage for coveralls
autoreconf -i && ./configure --enable-gcov && make distcheck
else
# Otherwise compile and check as normal
autoreconf -i && ./configure && make distcheck
fi;
# Otherwise compile and check as normal
autoreconf -i && ./configure && make distcheck
fi
13 changes: 9 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,34 @@ matrix:
env: TASK='compile'
- compiler: gcc
env: TASK='compile'
- compiler: gcc
env: TASK='coverage'
- env: TASK='doxygen'
- env: TASK='lint'
- env: TASK='check-licences'
allow_failures:
- compiler: gcc
env: TASK='coverage'

cache: apt

before_install:
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
- sudo apt-get update -qq
- sudo apt-cache search microhttpd
- sudo apt-get install -qq protobuf-compiler libprotobuf-lite7 libprotobuf-dev libprotoc-dev bison flex libftdi-dev libftdi1 libusb-1.0-0-dev liblo-dev libavahi-client-dev uuid-dev libcppunit-dev libcppunit-1.12-1 libncurses5-dev python-protobuf libmicrohttpd-dev
#g++-4.9 won't work on Ubuntu 12.04 that Travis currently uses
- if [ "$CXX" = "g++" ]; then sudo apt-get install -qq g++-4.8; fi
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi
#Remove the old g++/gcc to ensure we're using the latest ones
- if [ "$CXX" = "g++-4.8" ]; then sudo rm /usr/bin/g++; sudo rm /usr/bin/gcc; fi
#Install coveralls
- if [ "$CXX" = "g++-4.8" ]; then sudo pip install cpp-coveralls; fi
#Install coveralls if required
- if [ "$TASK" = "coverage" ]; then sudo pip install -qq cpp-coveralls; fi
#Install doxygen if required
- if [ "$TASK" = "doxygen" ]; then sudo apt-get install -qq doxygen; fi
- pwd

after_success:
- coveralls --exclude lib --exclude tests --gcov-options '\-lp'
- if [ "$TASK" = "coverage" ]; then coveralls --gcov /usr/bin/gcov-4.8 -b . -E 'Test.cpp$' --gcov-options '\-lp' > /dev/null; fi

notifications:
irc:
Expand Down
5 changes: 3 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -463,9 +463,10 @@ AM_CONDITIONAL([FATAL_WARNINGS], [test "x$enable_fatal_warnings" != xno])
AC_ARG_ENABLE(
[gcov],
[AS_HELP_STRING([--enable-gcov], [Turn on code coverage analysis tools])])
AS_IF([test "x$enable_gov" = xyes],
AS_IF([test "x$enable_gcov" = xyes],
[CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
CXXFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"])
CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
LIBS="$LIBS -lgcov"])

# Enable HTTP support. This requires libmicrohttpd.
AC_ARG_ENABLE(
Expand Down