Added code coverage badge

This commit is contained in:
Benoit Blanchon
2014-11-30 15:11:19 +01:00
parent d6974127b4
commit 160ce092ff
3 changed files with 14 additions and 3 deletions

View File

@ -2,5 +2,11 @@ language: c++
compiler:
- gcc
- clang
before_script: cmake .
script: make && make test
before_install:
- sudo pip install cpp-coveralls
before_script:
- cmake -DCOVERAGE=true .
script:
- make && make test
after_success:
- coveralls --include include --include src --gcov-options '\-lp'

View File

@ -11,5 +11,10 @@ if(MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS -W4)
endif()
if(${COVERAGE})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -coverage")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -coverage")
endif()
add_subdirectory(src)
add_subdirectory(test)

View File

@ -1,7 +1,7 @@
Arduino JSON library
====================
[![Build Status](https://travis-ci.org/bblanchon/ArduinoJson.svg?branch=master)](https://travis-ci.org/bblanchon/ArduinoJson)
[![Build Status](https://travis-ci.org/bblanchon/ArduinoJson.svg?branch=master)](https://travis-ci.org/bblanchon/ArduinoJson) [![Coverage Status](https://img.shields.io/coveralls/bblanchon/ArduinoJson.svg)](https://coveralls.io/r/bblanchon/ArduinoJson?branch=master)
*An elegant and efficient JSON library for embedded systems.*