diff options
author | tezeb <tezeb+github@outoftheblue.pl> | 2017-03-10 21:44:37 +0100 |
---|---|---|
committer | tezeb <tezeb+github@outoftheblue.pl> | 2017-03-12 01:40:54 +0100 |
commit | 0869c3dde588d2e7aac0e834d77d9fa1755b3bc2 (patch) | |
tree | 4211e3251a89e70e8ff8662ad009c7a9f7a36a2d /qtpass.pro | |
parent | 5cc0b28a3d2b0c3f73c16c502383cf7b15110750 (diff) |
coverage on release build with coveralls
Diffstat (limited to 'qtpass.pro')
-rw-r--r-- | qtpass.pro | 41 |
1 files changed, 23 insertions, 18 deletions
@@ -1,11 +1,7 @@ !include(qtpass.pri) { error("Couldn't find the qtpass.pri file!") } -SUBDIRS += src - -CONFIG(debug, debug|release) { - SUBDIRS += tests - tests.depends = src -} +SUBDIRS += src tests +tests.depends = src OTHER_FILES += LICENSE \ README.md \ @@ -15,14 +11,13 @@ RESOURCES += resources.qrc # add Makefile target to generate code coverage using gcov gcov.target = gcov -gcov.commands += cd src/debug && gcov "*.gcda" 1>/dev/null $$escape_expand(\\n\\t) +gcov.commands += cd src/$$OBJECTS_DIR && gcov "*.gcda" 1>/dev/null $$escape_expand(\\n\\t) gcov.commands += $$escape_expand(\\n) gcov.depends = check # add Makefile target to generate code coverage using codecov codecov.target = codecov -codecov.commands += cd src/ && gcov -o debug *.cpp *.h debug/*.gcda 1>/dev/null $$escape_expand(\\n\\t) -codecov.commands += codecov -X gcov $$escape_expand(\\n\\t) +codecov.commands += cd src/ && codecov $$escape_expand(\\n\\t) codecov.commands += $$escape_expand(\\n) codecov.depends = check @@ -32,21 +27,31 @@ lcov_initial.target = lcov_initial #lcov_initial.commands = $$escape_expand(\\n\\t) lcov_initial.commands += rm -rf $$LCOV_OUTPUT_DIR $$escape_expand(\\n\\t) lcov_initial.commands += mkdir $$LCOV_OUTPUT_DIR $$escape_expand(\\n\\t) -lcov_initial.commands += lcov --quiet --initial --capture --base-directory ./src --directory ./src/debug/ -o $${LCOV_OUTPUT_DIR}/.lcov.base1 $$escape_expand(\\n\\t) +lcov_initial.commands += lcov --quiet --initial --capture --base-directory ./src --directory ./src/$$OBJECTS_DIR/ -o $${LCOV_OUTPUT_DIR}/.lcov.base1 $$escape_expand(\\n\\t) lcov_initial.commands += $$escape_expand(\\n) lcov_initial.depends += sub-src +lcov_prepare.target = lcov_prepare +lcov_prepare.commands += lcov -q -c -b ./src -d ./src/$$OBJECTS_DIR/ -o $${LCOV_OUTPUT_DIR}/.lcov.run1 $$escape_expand(\\n\\t) +lcov_prepare.commands += lcov -q -e $${LCOV_OUTPUT_DIR}/.lcov.base1 -o $${LCOV_OUTPUT_DIR}/.lcov.base $$PWD/src/* $$escape_expand(\\n\\t) +lcov_prepare.commands += lcov -q -e $${LCOV_OUTPUT_DIR}/.lcov.run1 -o $${LCOV_OUTPUT_DIR}/.lcov.run $$PWD/src/* $$escape_expand(\\n\\t) +lcov_prepare.commands += lcov -q -a $${LCOV_OUTPUT_DIR}/.lcov.base -a $${LCOV_OUTPUT_DIR}/.lcov.run -o $${LCOV_OUTPUT_DIR}/.lcov.total $$escape_expand(\\n\\t) +lcov_prepare.commands += $$escape_expand(\\n) +lcov_prepare.depends = lcov_initial check + lcov.target = lcov -lcov.commands += lcov -q -c -b ./src -d ./src/debug/ -o $${LCOV_OUTPUT_DIR}/.lcov.run1 $$escape_expand(\\n\\t) -lcov.commands += lcov -q -e $${LCOV_OUTPUT_DIR}/.lcov.base1 -o $${LCOV_OUTPUT_DIR}/.lcov.base $$PWD/src/* $$escape_expand(\\n\\t) -lcov.commands += lcov -q -e $${LCOV_OUTPUT_DIR}/.lcov.run1 -o $${LCOV_OUTPUT_DIR}/.lcov.run $$PWD/src/* $$escape_expand(\\n\\t) -lcov.commands += lcov -q -a $${LCOV_OUTPUT_DIR}/.lcov.base -a $${LCOV_OUTPUT_DIR}/.lcov.run -o $${LCOV_OUTPUT_DIR}/.lcov.total $$escape_expand(\\n\\t) lcov.commands += genhtml --demangle-cpp -o $${LCOV_OUTPUT_DIR}/ $${LCOV_OUTPUT_DIR}/.lcov.total $$escape_expand(\\n\\t) lcov.commands += @echo -e "xdg-open file:///$${PWD}/$${LCOV_OUTPUT_DIR}/index.html" lcov.commands += $$escape_expand(\\n) -lcov.depends = lcov_initial check +lcov.depends = lcov_prepare + +coveralls.target = coveralls +coveralls.commands += coveralls-lcov $${LCOV_OUTPUT_DIR}/.lcov.total $$escape_expand(\\n\\t) +coveralls.commands += $$escape_expand(\\n) +coveralls.depends = lcov_prepare -CONFIG(debug, debug|release) { - QMAKE_EXTRA_TARGETS += gcov codecov lcov lcov_initial - QMAKE_CLEAN += 'src/debug/*.gc??' 'src/*.gcov' +CONFIG(coverage) { + QMAKE_EXTRA_TARGETS += gcov codecov lcov_initial lcov_prepare lcov coveralls + QMAKE_CLEAN += src/$$OBJECTS_DIR/*.gc?? src/*.gcov + QMAKE_DISTCLEAN += -r src/$$OBJECTS_DIR/lcov/ } |