[CI] add integration of the atria-soft coverage & basic test env

This commit is contained in:
Edouard DUPIN 2015-08-27 22:41:41 +02:00
parent 4d1f391f20
commit 839cef4b53
4 changed files with 89 additions and 7 deletions

View File

@ -3,10 +3,6 @@ language:
sudo: false
compiler:
- clang
- gcc
os:
- linux
- osx
@ -26,8 +22,18 @@ 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/atria-soft/esvg.git
- git clone https://github.com/atria-soft/exml.git
@ -38,11 +44,17 @@ before_script:
- git clone https://github.com/generic-library/freetype-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 egami
- lutin -w -j4 -C -P -c $BUILDER $COMPILATOR_OPTION -m $CONF $GCOV -p egami-test
after_script:
- if [ "$GCOV" != "" ]; then python ./warning_send.py --find-path ./out/Linux_x86_64/$CONF/build/$BUILDER/egami/ ; fi
- ./out/Linux_x86_64/$CONF/staging/$BUILDER/egami-test/usr/bin/egami-test -l6 | 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 egami?gcov; fi
- if [ "$GCOV" != "" ]; then python ./coverage_send.py --json=out/Linux_x86_64/$CONF/build/$BUILDER/egami/egami_coverage.json; fi
notifications:
email:

View File

@ -5,6 +5,12 @@ egami
[![Build Status](https://travis-ci.org/atria-soft/egami.svg?branch=master)](https://travis-ci.org/atria-soft/egami)
[![Coverage Status](http://atria-soft.com/ci/coverage/atria-soft/egami.svg?branch=master)](http://atria-soft.com/ci/atria-soft/egami)
[![Test Status](http://atria-soft.com/ci/test/atria-soft/egami.svg?branch=master)](http://atria-soft.com/ci/atria-soft/egami)
[![Warning Status](http://atria-soft.com/ci/warning/atria-soft/egami.svg?branch=master)](http://atria-soft.com/ci/atria-soft/egami)
Instructions
============

33
lutin_egami-test.py Normal file
View File

@ -0,0 +1,33 @@
#!/usr/bin/python
import lutin.module as module
import lutin.tools as tools
def get_desc():
return "Test software for egami"
def get_licence():
return {
"assimilate":"APACHE2",
"type":"APACHE-2.0"
}
def create(target):
myModule = module.Module(__file__, 'egami-test', 'BINARY')
myModule.add_module_depend(['egami', 'gtest', 'test-debug'])
myModule.add_src_file([
'test/main.cpp'
])
myModule.add_export_path(tools.get_current_path(__file__))
# add the currrent module at the
return myModule

31
test/main.cpp Normal file
View File

@ -0,0 +1,31 @@
/**
* @author Edouard DUPIN
*
* @copyright 2014, Edouard DUPIN, all right reserved
*
* @license APACHE v2.0 (see license file)
*/
#include <test-debug/debug.h>
#include <etk/etk.h>
#include <gtest/gtest.h>
#undef __class__
#define __class__ "test"
int main(int argc, const char *argv[]) {
// init Google test :
::testing::InitGoogleTest(&argc, const_cast<char **>(argv));
// init etk log system and file interface:
etk::init(argc, argv);
// Run all test with gtest
return RUN_ALL_TESTS();
}
TEST(TestPng, read) {
// TODO : Do real test ...
EXPECT_EQ(5, 6);
}