[CI] add integration of the atria-soft coverage
This commit is contained in:
parent
eec8db11d7
commit
0c11a92789
26
.travis.yml
26
.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
|
||||
|
@ -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
|
||||
============
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include <vector>
|
||||
#include <etk/etk.h>
|
||||
#include <etk/types.h>
|
||||
#include <etk/archive/Archive.h>
|
||||
#include <ejson/debug.h>
|
||||
@ -27,41 +28,11 @@
|
||||
int main(int argc, const char *argv[]) {
|
||||
// init Google test :
|
||||
::testing::InitGoogleTest(&argc, const_cast<char **>(argv));
|
||||
// the only one init for etk:
|
||||
etk::log::setLevel(etk::log::logLevelNone);
|
||||
for (int32_t iii=0; iii<argc ; ++iii) {
|
||||
std::string data = argv[iii];
|
||||
if (data == "-l0") {
|
||||
etk::log::setLevel(etk::log::logLevelNone);
|
||||
} else if (data == "-l1") {
|
||||
etk::log::setLevel(etk::log::logLevelCritical);
|
||||
} else if (data == "-l2") {
|
||||
etk::log::setLevel(etk::log::logLevelError);
|
||||
} else if (data == "-l3") {
|
||||
etk::log::setLevel(etk::log::logLevelWarning);
|
||||
} else if (data == "-l4") {
|
||||
etk::log::setLevel(etk::log::logLevelInfo);
|
||||
} else if (data == "-l5") {
|
||||
etk::log::setLevel(etk::log::logLevelDebug);
|
||||
} else if (data == "-l6") {
|
||||
etk::log::setLevel(etk::log::logLevelVerbose);
|
||||
} else if ( data == "-h"
|
||||
|| data == "--help") {
|
||||
std::cout << "Help : " <<std::endl;
|
||||
std::cout << " ./xxx [options]" <<std::endl;
|
||||
std::cout << " -l0: debug None" <<std::endl;
|
||||
std::cout << " -l1: debug Critical" <<std::endl;
|
||||
std::cout << " -l2: debug Error" <<std::endl;
|
||||
std::cout << " -l3: debug Warning" <<std::endl;
|
||||
std::cout << " -l4: debug Info" <<std::endl;
|
||||
std::cout << " -l5: debug Debug" <<std::endl;
|
||||
std::cout << " -l6: debug Verbose" <<std::endl;
|
||||
std::cout << " -h/--help: this help" <<std::endl;
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
etk::setArgZero(argv[0]);
|
||||
// init etk log system and file interface:
|
||||
etk::init(argc, argv);
|
||||
// TODO : Check this ...
|
||||
etk::initDefaultFolder("ejson_test");
|
||||
// Run all test with gtest
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user