From 91b3389b1c60d695c129ba1f8e2304aa4689a9d4 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Fri, 21 Nov 2014 02:05:41 +0000 Subject: [PATCH 01/19] Try and get coveralls working --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3e6f1a7d5a..fe8626efda 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,7 +32,7 @@ before_install: - if [ "$TASK" = "doxygen" ]; then sudo apt-get install -qq doxygen; fi after_success: - - coveralls --exclude lib --exclude tests --gcov-options '\-lp' + - coveralls --verbose --gcov-options '\-lp' notifications: irc: From 75d666c7ff41734ebf3006fefc56f4fd46d15030 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Fri, 21 Nov 2014 11:01:42 +0000 Subject: [PATCH 02/19] Don't be verbose --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index fe8626efda..5610ab96d2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,7 +32,7 @@ before_install: - if [ "$TASK" = "doxygen" ]; then sudo apt-get install -qq doxygen; fi after_success: - - coveralls --verbose --gcov-options '\-lp' + - coveralls --gcov-options '\-lp' notifications: irc: From 5dfd7876d0fd89a53ecca65a05195a5ef4d04c3c Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Fri, 21 Nov 2014 13:17:17 +0000 Subject: [PATCH 03/19] Switch back to make + make check to see if that's what's stopping coveralls --- .travis-ci.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis-ci.sh b/.travis-ci.sh index 4f73ddb880..941985990d 100755 --- a/.travis-ci.sh +++ b/.travis-ci.sh @@ -34,7 +34,7 @@ elif [[ $TASK = 'doxygen' ]]; then else if [ "$CXX" = "g++-4.8" ]; then # Compile with coverage for coveralls - autoreconf -i && ./configure --enable-gcov && make distcheck + autoreconf -i && ./configure --enable-gcov && make && make check else # Otherwise compile and check as normal autoreconf -i && ./configure && make distcheck From 78d635f0c3c641b1d4c0b86f103563f035f394fa Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Fri, 21 Nov 2014 14:00:33 +0000 Subject: [PATCH 04/19] Simply back to the coveralls example to try and make it work --- .travis.yml | 42 +++++++++--------------------------------- 1 file changed, 9 insertions(+), 33 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5610ab96d2..457357c8df 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,42 +1,18 @@ language: cpp -script: - - "bash -ex .travis-ci.sh" - -matrix: - fast_finish: true - include: - - compiler: clang - env: TASK='compile' - - compiler: gcc - env: TASK='compile' - - env: TASK='doxygen' - - env: TASK='lint' - - env: TASK='check-licences' - -cache: apt +compiler: + - gcc 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 doxygen if required - - if [ "$TASK" = "doxygen" ]; then sudo apt-get install -qq doxygen; fi + - sudo apt-get install -qq gcov 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 + - sudo pip install cpp-coveralls + +script: + - autoreconf -i && ./configure --enable-gcov && make && make check after_success: - - coveralls --gcov-options '\-lp' + - coveralls --verbose --exclude lib --exclude tests --gcov-options '\-lp' -notifications: - irc: - channels: - - "chat.freenode.net#openlighting" - on_success: change - on_failure: change +cache: apt From 72f1c885e1cdfeccee4ff4f9c85491baec6b9013 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Fri, 21 Nov 2014 14:04:17 +0000 Subject: [PATCH 05/19] Correct package name, probably now redundant --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 457357c8df..00e8e6c801 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ compiler: before_install: - sudo apt-get update -qq - sudo apt-cache search microhttpd - - sudo apt-get install -qq gcov 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 + - sudo apt-get install -qq gcc 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 - sudo pip install cpp-coveralls script: From 83b1c83c22e4f908b87f9886358aa47bb21a18be Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Fri, 21 Nov 2014 18:04:38 +0000 Subject: [PATCH 06/19] Fix a typo that broke gcov support --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 50915450e2..46cacea7c5 100644 --- a/configure.ac +++ b/configure.ac @@ -463,9 +463,9 @@ 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"]) # Enable HTTP support. This requires libmicrohttpd. AC_ARG_ENABLE( From 49b6b6d3e72a35ddff5678b719d0981090307a43 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Fri, 21 Nov 2014 18:07:45 +0000 Subject: [PATCH 07/19] Don't be verbose --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 00e8e6c801..bab26b5318 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,6 @@ script: - autoreconf -i && ./configure --enable-gcov && make && make check after_success: - - coveralls --verbose --exclude lib --exclude tests --gcov-options '\-lp' + - coveralls --exclude lib --exclude tests --gcov-options '\-lp' cache: apt From 75e64b95b3267ae1b3c0cdf93c22a5eed9771e92 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Fri, 21 Nov 2014 18:39:01 +0000 Subject: [PATCH 08/19] More .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index b06e96be46..4257350d57 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ *.dirstamp *.gcda *.gcno +*.gcov *.la *.lo *.log From 4df5ca61d2d91af1b998730e31b0cb57261043f0 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Fri, 21 Nov 2014 18:40:44 +0000 Subject: [PATCH 09/19] Try and fix a link issue when using gcov --- configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 46cacea7c5..7f5e65adf7 100644 --- a/configure.ac +++ b/configure.ac @@ -465,7 +465,8 @@ AC_ARG_ENABLE( [AS_HELP_STRING([--enable-gcov], [Turn on code coverage analysis tools])]) AS_IF([test "x$enable_gcov" = xyes], [CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage" - CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"]) + CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage" + LIBS="$LIBS -lgcov"]) # Enable HTTP support. This requires libmicrohttpd. AC_ARG_ENABLE( From a24cabd8e8b557b1e60a14b0df50945b93865c0c Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Fri, 21 Nov 2014 19:35:16 +0000 Subject: [PATCH 10/19] Reduce the amount of log output --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index bab26b5318..1376b8dad9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,6 @@ script: - autoreconf -i && ./configure --enable-gcov && make && make check after_success: - - coveralls --exclude lib --exclude tests --gcov-options '\-lp' + - coveralls --exclude lib --exclude tests --gcov-options '\-lp' > /dev/null cache: apt From 41f80188f415f3261de0d7f220b37ea81a0edc61 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Sat, 22 Nov 2014 13:59:46 +0000 Subject: [PATCH 11/19] Revert back to a more traditional build, but still using coveralls --- .travis-ci.sh | 12 +++++------- .travis.yml | 47 ++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 43 insertions(+), 16 deletions(-) diff --git a/.travis-ci.sh b/.travis-ci.sh index 941985990d..55f176f949 100755 --- a/.travis-ci.sh +++ b/.travis-ci.sh @@ -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 distcheck else - if [ "$CXX" = "g++-4.8" ]; then - # Compile with coverage for coveralls - autoreconf -i && ./configure --enable-gcov && make && make check - 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 diff --git a/.travis.yml b/.travis.yml index 1376b8dad9..8126ca125c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,18 +1,47 @@ language: cpp -compiler: - - gcc +script: + - "bash -ex .travis-ci.sh" + +matrix: + fast_finish: true + include: + - compiler: clang + 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 gcc 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 - - sudo pip install cpp-coveralls - -script: - - autoreconf -i && ./configure --enable-gcov && make && make check + - 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 required + - if [ "$TASK" = "coverage" ]; then sudo pip install cpp-coveralls; fi +#Install doxygen if required + - if [ "$TASK" = "doxygen" ]; then sudo apt-get install -qq doxygen; fi after_success: - - coveralls --exclude lib --exclude tests --gcov-options '\-lp' > /dev/null + - if [ "$TASK" = "coverage" ]; then coveralls --gcov-options '\-lp' > /dev/null; fi -cache: apt +notifications: + irc: + channels: + - "chat.freenode.net#openlighting" + on_success: change + on_failure: change From de1465d9bc70e1cf6ec86a1441ea9b4f0022edf6 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Sat, 22 Nov 2014 16:09:23 +0000 Subject: [PATCH 12/19] Ignore some directories for coverage --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8126ca125c..433b84fc9e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,7 +37,7 @@ before_install: - if [ "$TASK" = "doxygen" ]; then sudo apt-get install -qq doxygen; fi after_success: - - if [ "$TASK" = "coverage" ]; then coveralls --gcov-options '\-lp' > /dev/null; fi + - if [ "$TASK" = "coverage" ]; then coveralls -e 'protoc/' -E 'Test.cpp$' --gcov-options '\-lp' > /dev/null; fi notifications: irc: From f017e5e6a382547fbe617b15ed4a0f4cc303eee7 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Sat, 22 Nov 2014 16:21:03 +0000 Subject: [PATCH 13/19] Simplify the coverage build --- .travis-ci.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis-ci.sh b/.travis-ci.sh index 55f176f949..86de6bdf63 100755 --- a/.travis-ci.sh +++ b/.travis-ci.sh @@ -33,7 +33,7 @@ elif [[ $TASK = 'doxygen' ]]; then fi; elif [[ $TASK = 'coverage' ]]; then # Compile with coverage for coveralls - autoreconf -i && ./configure --enable-gcov && make distcheck + autoreconf -i && ./configure --enable-gcov && make && make check else # Otherwise compile and check as normal autoreconf -i && ./configure && make distcheck From 8b8d26a3a9ac524326fdc6b25f95ba40b30d87a3 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Sat, 22 Nov 2014 18:02:49 +0000 Subject: [PATCH 14/19] Add some troubleshooting --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 433b84fc9e..f8cd42795d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,6 +35,9 @@ before_install: - if [ "$TASK" = "coverage" ]; then sudo pip install cpp-coveralls; fi #Install doxygen if required - if [ "$TASK" = "doxygen" ]; then sudo apt-get install -qq doxygen; fi + - ls -al /usr/bin/*-4.8 + - ls -al /usr/bin/gcov* + - which gcov after_success: - if [ "$TASK" = "coverage" ]; then coveralls -e 'protoc/' -E 'Test.cpp$' --gcov-options '\-lp' > /dev/null; fi From 2f6ec08ebe1817708b02eeccc5f30066bca3dfc8 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Sat, 22 Nov 2014 18:06:34 +0000 Subject: [PATCH 15/19] Use the right gcov --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f8cd42795d..fe38f4836a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,7 +40,7 @@ before_install: - which gcov after_success: - - if [ "$TASK" = "coverage" ]; then coveralls -e 'protoc/' -E 'Test.cpp$' --gcov-options '\-lp' > /dev/null; fi + - if [ "$TASK" = "coverage" ]; then coveralls --gcov gcov-4.8 -E 'Test.cpp$' --gcov-options '\-lp' > /dev/null; fi notifications: irc: From 0caf6fb56bf333658b8ac685abe38390e794bef7 Mon Sep 17 00:00:00 2001 From: peternewman Date: Sun, 23 Nov 2014 13:28:57 +0000 Subject: [PATCH 16/19] Update gcov path --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index fe38f4836a..a6672ff6fe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,7 +40,7 @@ before_install: - which gcov after_success: - - if [ "$TASK" = "coverage" ]; then coveralls --gcov gcov-4.8 -E 'Test.cpp$' --gcov-options '\-lp' > /dev/null; fi + - if [ "$TASK" = "coverage" ]; then coveralls --gcov /usr/bin/gcov-4.8 -E 'Test.cpp$' --gcov-options '\-lp' > /dev/null; fi notifications: irc: From 4cc0065881d10b260b92eb531109c35aef41fd47 Mon Sep 17 00:00:00 2001 From: peternewman Date: Sun, 23 Nov 2014 14:28:04 +0000 Subject: [PATCH 17/19] Try and fix coveralls still --- .travis.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index a6672ff6fe..95c4ffc643 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,7 +24,6 @@ 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 @@ -32,15 +31,13 @@ before_install: #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 required - - if [ "$TASK" = "coverage" ]; then sudo pip install cpp-coveralls; fi + - 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 - - ls -al /usr/bin/*-4.8 - - ls -al /usr/bin/gcov* - - which gcov + - pwd after_success: - - if [ "$TASK" = "coverage" ]; then coveralls --gcov /usr/bin/gcov-4.8 -E 'Test.cpp$' --gcov-options '\-lp' > /dev/null; fi + - if [ "$TASK" = "coverage" ]; then pwd; coveralls --gcov /usr/bin/gcov-4.8 -b . -E 'Test.cpp$' --gcov-options '\-lp' > /dev/null; pwd; fi notifications: irc: From a2234d25ffd1601f7199476ce0906ae5db4f866b Mon Sep 17 00:00:00 2001 From: peternewman Date: Sun, 23 Nov 2014 15:03:20 +0000 Subject: [PATCH 18/19] Turn on verbose for coveralls --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 95c4ffc643..8a3cdbf0fe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,7 +37,7 @@ before_install: - pwd after_success: - - if [ "$TASK" = "coverage" ]; then pwd; coveralls --gcov /usr/bin/gcov-4.8 -b . -E 'Test.cpp$' --gcov-options '\-lp' > /dev/null; pwd; fi + - if [ "$TASK" = "coverage" ]; then coveralls --gcov /usr/bin/gcov-4.8 -b . --verbose -E 'Test.cpp$' --gcov-options '\-lp' > /dev/null; fi notifications: irc: From cb12d38c46ad359e4becc676f9585de550087112 Mon Sep 17 00:00:00 2001 From: peternewman Date: Sun, 23 Nov 2014 15:07:10 +0000 Subject: [PATCH 19/19] Undo the coveralls verbose, it's actually working, just a bit slowly. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8a3cdbf0fe..2183385df6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,7 +37,7 @@ before_install: - pwd after_success: - - if [ "$TASK" = "coverage" ]; then coveralls --gcov /usr/bin/gcov-4.8 -b . --verbose -E 'Test.cpp$' --gcov-options '\-lp' > /dev/null; fi + - if [ "$TASK" = "coverage" ]; then coveralls --gcov /usr/bin/gcov-4.8 -b . -E 'Test.cpp$' --gcov-options '\-lp' > /dev/null; fi notifications: irc: