Add coveralls support to travis builds

This commit is contained in:
Matt Broadstone 2014-09-16 15:10:34 -04:00
parent 98f40f5589
commit f35e939446
3 changed files with 28 additions and 4 deletions

View File

@ -1,14 +1,17 @@
language: cpp
cache: apt
env:
- QT_SELECT=qt4
- QT_SELECT=qt5
services:
- rabbitmq
before_install:
- sudo pip install cpp-coveralls
install:
- tests/test-deps.sh
script:
- mkdir build
- cd build
- qmake ..
- qmake -config gcov
- make
- make check
- make check
after_success:
- coveralls -e tutorials -e tests -E ".moc_*.cpp" -E ".*.moc*" -E ".rcc*" --gcov-options '\-lp'

View File

@ -1,4 +1,5 @@
[![Build Status](https://travis-ci.org/mbroadst/qamqp.svg?branch=master)](https://travis-ci.org/mbroadst/qamqp)
[![Coverage Status](https://img.shields.io/coveralls/mbroadst/qamqp.svg)](https://coveralls.io/r/mbroadst/qamqp?branch=master)
QAMQP
=============

View File

@ -11,6 +11,26 @@ VERSION = $${QAMQP_VERSION}
win32:DESTDIR = $$OUT_PWD
macx:QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/
# for some reason with Travis' qt 5.0.2 you can't chain these with an |
NEED_GCOV_SUPPORT = 0
greaterThan(QT_MAJOR_VERSION, 4):lessThan(QT_MINOR_VERSION, 2) {
NEED_GCOV_SUPPORT = 1
}
lessThan(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 9):lessThan(QT_PATCH_VERSION, 6) {
NEED_GCOV_SUPPORT = 1
}
greaterThan(NEED_GCOV_SUPPORT, 0) {
# NOTE: remove when travis adds a newer ubuntu, or when hell freezes over
gcov {
QMAKE_CFLAGS += -fprofile-arcs -ftest-coverage
QMAKE_CXXFLAGS += -fprofile-arcs -ftest-coverage
QMAKE_OBJECTIVE_CFLAGS += -fprofile-arcs -ftest-coverage
QMAKE_LFLAGS += -fprofile-arcs -ftest-coverage
QMAKE_CLEAN += $(OBJECTS_DIR)*.gcno and $(OBJECTS_DIR)*.gcda
}
}
PRIVATE_HEADERS += \
qamqpchannel_p.h \
qamqpclient_p.h \