From 0c11a92789b0c7846fbe92d906f7b3fff9d67ff4 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Thu, 27 Aug 2015 22:41:41 +0200 Subject: [PATCH] [CI] add integration of the atria-soft coverage --- .travis.yml | 26 ++++++++++++++++++-------- README.md | 6 ++++++ test/test.cpp | 39 +++++---------------------------------- 3 files changed, 29 insertions(+), 42 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0d3ff3d..b11a2cc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,10 +3,6 @@ language: sudo: false -compiler: - - clang - - gcc - os: - linux - osx @@ -26,19 +22,33 @@ addons: install: - pip install --user lutin +env: + - CONF=debug BOARD=Linux BUILDER=clang GCOV= + - CONF=release BOARD=Linux BUILDER=clang GCOV= + - CONF=debug BOARD=Linux BUILDER=gcc GCOV= + - CONF=release BOARD=Linux BUILDER=gcc GCOV= + - CONF=debug BOARD=Linux BUILDER=gcc GCOV=--gcov + before_script: - cd .. + - wget http://atria-soft.com/ci/coverage_send.py + - wget http://atria-soft.com/ci/test_send.py + - wget http://atria-soft.com/ci/warning_send.py - git clone https://github.com/atria-soft/etk.git - git clone https://github.com/generic-library/gtest-lutin.git --recursive - pwd - ls -l - - if [ "$CXX" == "clang++" ]; then BUILDER=clang; else BUILDER=gcc; fi - - if [ "$CXX" == "g++" ]; then COMPILATOR_OPTION="--compilator-version=4.9"; else COMPILATOR_OPTION=""; fi + - if [ "$BUILDER" == "gcc" ]; then COMPILATOR_OPTION="--compilator-version=4.9"; else COMPILATOR_OPTION=""; fi script: - - lutin -C -P -c$BUILDER $COMPILATOR_OPTION -mdebug -p ejson-test - - ./out/Linux_x86_64/debug/staging/$BUILDER/ejson-test/usr/bin/ejson-test + - lutin -w -j4 -C -P -c $BUILDER $COMPILATOR_OPTION -m $CONF $GCOV -p ejson-test +after_script: + - if [ "$GCOV" != "" ]; then python ./warning_send.py --find-path ./out/Linux_x86_64/$CONF/build/$BUILDER/ejson/ ; fi + - ./out/Linux_x86_64/$CONF/staging/$BUILDER/ejson-test/usr/bin/ejson-test | tee out_test.txt + - if [ "$GCOV" != "" ]; then python ./test_send.py --file=out_test.txt; fi + - if [ "$GCOV" != "" ]; then lutin -C -P -c $BUILDER $COMPILATOR_OPTION -m $CONF -p ejson?gcov; fi + - if [ "$GCOV" != "" ]; then python ./coverage_send.py --json=out/Linux_x86_64/$CONF/build/$BUILDER/ejson/ejson_coverage.json; fi notifications: email: - yui.heero@gmail.com diff --git a/README.md b/README.md index edbe211..f2c980b 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,12 @@ ejson [![Build Status](https://travis-ci.org/atria-soft/ejson.svg?branch=master)](https://travis-ci.org/atria-soft/ejson) +[![Coverage Status](http://atria-soft.com/ci/coverage/atria-soft/ejson.svg?branch=master)](http://atria-soft.com/ci/atria-soft/ejson) + +[![Test Status](http://atria-soft.com/ci/test/atria-soft/ejson.svg?branch=master)](http://atria-soft.com/ci/atria-soft/ejson) + +[![Warning Status](http://atria-soft.com/ci/warning/atria-soft/ejson.svg?branch=master)](http://atria-soft.com/ci/atria-soft/ejson) + Instructions ============ diff --git a/test/test.cpp b/test/test.cpp index d32f1ef..44a5d4a 100644 --- a/test/test.cpp +++ b/test/test.cpp @@ -7,6 +7,7 @@ */ #include +#include #include #include #include @@ -27,41 +28,11 @@ int main(int argc, const char *argv[]) { // init Google test : ::testing::InitGoogleTest(&argc, const_cast(argv)); - // the only one init for etk: - etk::log::setLevel(etk::log::logLevelNone); - for (int32_t iii=0; iii