lib

morphux C utility library
Log | Files | Refs | Submodules | README | LICENSE | git clone https://git.ne02ptzero.me/git/lib

commit 68354b85b32b4eb6dc6f3dca3a893e0c5e012d1a
parent beffa010496877c3b1f5d5fae1eec3674b879d7f
Author: Ne02ptzero <louis@ne02ptzero.me>
Date:   Tue, 24 Jan 2017 14:49:29 +0100

Add(Coverage): Add coverage tests in Makefiles:

And codecov callback in travis.yml

Diffstat:
M.gitignore | 5+++++
M.travis.yml | 4++++
MMakefile | 8++++++++
Mtests/Makefile | 3+++
4 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -32,6 +32,11 @@ *.dSYM/ *.su +# Coverage +*.gcov +*.gcno +*.gcda + # Test tests/test tests/.gdb_history diff --git a/.travis.yml b/.travis.yml @@ -11,6 +11,10 @@ script: - make -C tests - make -C tests check - make -C tests valgrind + - make coverage + +after_success: + - bash <(curl -s https://codecov.io/bash) env: global: diff --git a/Makefile b/Makefile @@ -33,8 +33,16 @@ check: all doc: doxygen docs/doxyfile +coverage: + $(MAKE) fclean all CFLAGS="-Wall -Wextra -Werror -Wno-unused-result -I inc/ -std=c99 -g -O0 -coverage -lgcov" + make -C tests coverage check + gcov $(SRCS) + clean: rm -f $(OBJS) + rm -f *.gcov + rm -f src/*.gcno + rm -f src/*.gcda fclean: clean rm -f $(NAME) diff --git a/tests/Makefile b/tests/Makefile @@ -15,6 +15,9 @@ check: $(NAME) valgrind: $(NAME) valgrind --leak-check=full --error-exitcode=1 ./$(NAME) +coverage: + $(MAKE) fclean all CFLAGS="-Wall -Wextra -Wno-unused-result -g -O0 -coverage -I../inc -lmorphux -lgcov" + clean: rm -f $(OBJS)