diff --git a/.travis.yml b/.travis.yml index 6afecb1..522f8ec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: diff --git a/README.md b/README.md index c24a6f1..9da9002 100644 --- a/README.md +++ b/README.md @@ -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 ============ diff --git a/lutin_egami-test.py b/lutin_egami-test.py new file mode 100644 index 0000000..adbd049 --- /dev/null +++ b/lutin_egami-test.py @@ -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 + + + + + + + diff --git a/test/main.cpp b/test/main.cpp new file mode 100644 index 0000000..599bc5f --- /dev/null +++ b/test/main.cpp @@ -0,0 +1,31 @@ +/** + * @author Edouard DUPIN + * + * @copyright 2014, Edouard DUPIN, all right reserved + * + * @license APACHE v2.0 (see license file) + */ + +#include +#include +#include + + +#undef __class__ +#define __class__ "test" + +int main(int argc, const char *argv[]) { + // init Google test : + ::testing::InitGoogleTest(&argc, const_cast(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); +} +