diff --git a/lutin_etk-test.py b/lutin_etk-test.py index 49f3fe0..04522b6 100644 --- a/lutin_etk-test.py +++ b/lutin_etk-test.py @@ -3,22 +3,33 @@ import lutin.module as module import lutin.tools as tools import datetime + +def get_type(): + return "BINARY" + +def get_sub_type(): + return "TEST" + def get_desc(): return "e-tk test software" +def get_licence(): + return "APACHE-2" -def create(target): - # module name is 'edn' and type binary. - my_module = module.Module(__file__, 'etk-test', 'BINARY') - - # add the file to compile: +def get_compagny_type(): + return "com" + +def get_compagny_name(): + return "atria-soft" + +def get_maintainer(): + return ["Mr DUPIN Edouard "] + +def create(target, module_name): + my_module = module.Module(__file__, module_name, get_type()) my_module.add_src_file([ - 'test/main.cpp']) - - my_module.add_module_depend(['etk', 'gtest']) - - #my_module.compile_flags_XX(["-nostdinc++"]); - - # add the currrent module at the system + 'test/main.cpp' + ]) + my_module.add_module_depend(['etk', 'gtest', 'test-debug']) return my_module diff --git a/lutin_etk.py b/lutin_etk.py index 7c46d42..22d95a0 100644 --- a/lutin_etk.py +++ b/lutin_etk.py @@ -2,14 +2,30 @@ import lutin.module as module import lutin.tools as tools + +def get_type(): + return "LIBRARY" + def get_desc(): - return "e-tk : Ewol tool kit" + return "Ewol tool kit" +def get_licence(): + return "APACHE-2" -def create(target): - # module name is 'edn' and type binary. - my_module = module.Module(__file__, 'etk', 'LIBRARY') - # add extra compilation flags : +def get_compagny_type(): + return "com" + +def get_compagny_name(): + return "atria-soft" + +def get_maintainer(): + return ["Mr DUPIN Edouard "] + +def get_version(): + return [0,0,0] + +def create(target, module_name): + my_module = module.Module(__file__, module_name, get_type()) my_module.add_extra_compile_flags() # add the file to compile: my_module.add_src_file([ @@ -64,8 +80,7 @@ def create(target): if target.name != "Windows": my_module.add_export_flag('link', "-ldl -rdynamic") - my_module.compile_version_XX(2011) - # name of the dependency + my_module.compile_version("c++", 2011) my_module.add_optionnal_module_depend('minizip', ["c++", "-DETK_BUILD_MINIZIP"]) my_module.add_optionnal_module_depend('linearmath', ["c", "-DETK_BUILD_LINEARMATH"], export=True) @@ -77,8 +92,6 @@ def create(target): my_module.add_export_flag('link', "-lpthread") my_module.add_path(tools.get_current_path(__file__)) - - # add the currrent module at the return my_module diff --git a/test/main.cpp b/test/main.cpp index b05aded..a00e14f 100644 --- a/test/main.cpp +++ b/test/main.cpp @@ -7,7 +7,7 @@ */ #include -#include +#include #include #include #include diff --git a/test/testColor.hpp b/test/testColor.hpp index 3a75ea4..5c111a0 100644 --- a/test/testColor.hpp +++ b/test/testColor.hpp @@ -23,7 +23,7 @@ TEST(TestEtkColor, RGBA8) { void testColor() { - TK_INFO("==> test of COLOR (START)"); + TEST_INFO("==> test of COLOR (START)"); etk::Color colorRGBA8(0x52,0x0F, 0x65, 0x44); etk::Color colorRGBA16(0x52,0x0F, 0x65, 0x44); etk::Color colorRGBA32(0x52,0x0F, 0x65, 0x44); @@ -56,20 +56,20 @@ void testColor() { etk::Color colorRGBAf__(colorRGBA8); etk::Color colorXX332__(colorRGBA8); - TK_INFO("Create a color : RGBA 8 : " << colorRGBA8); - TK_INFO("Create a color : RGBA 8 : " << colorRGBAf__ << " (converted)"); - TK_INFO("Create a color : XX 32 : " << colorXX332__ << " (converted)"); - TK_INFO("Create a color : RGBA 16 : " << colorRGBA16); - TK_INFO("Create a color : RGBA 32 : " << colorRGBA32); - TK_INFO("Create a color : RGBA float : " << colorRGBAF); - TK_INFO("Create a color : RGB 8 : " << colorRGB8); - TK_INFO("Create a color : RGB 16 : " << colorRGB16); - TK_INFO("Create a color : RGB 32 : " << colorRGB32); - TK_INFO("Create a color : RGB float : " << colorRGBF); - TK_INFO("Create a color : MONO 8 : " << colorMono8); - TK_INFO("Create a color : MONO 16 : " << colorMono16); - TK_INFO("Create a color : MONO 32 : " << colorMono32); - TK_INFO("Create a color : MONO float : " << colorMonoF); - TK_INFO("Create a color : MONO double : " << colorMonoD); - TK_INFO("==> test of Color (STOP)"); + TEST_INFO("Create a color : RGBA 8 : " << colorRGBA8); + TEST_INFO("Create a color : RGBA 8 : " << colorRGBAf__ << " (converted)"); + TEST_INFO("Create a color : XX 32 : " << colorXX332__ << " (converted)"); + TEST_INFO("Create a color : RGBA 16 : " << colorRGBA16); + TEST_INFO("Create a color : RGBA 32 : " << colorRGBA32); + TEST_INFO("Create a color : RGBA float : " << colorRGBAF); + TEST_INFO("Create a color : RGB 8 : " << colorRGB8); + TEST_INFO("Create a color : RGB 16 : " << colorRGB16); + TEST_INFO("Create a color : RGB 32 : " << colorRGB32); + TEST_INFO("Create a color : RGB float : " << colorRGBF); + TEST_INFO("Create a color : MONO 8 : " << colorMono8); + TEST_INFO("Create a color : MONO 16 : " << colorMono16); + TEST_INFO("Create a color : MONO 32 : " << colorMono32); + TEST_INFO("Create a color : MONO float : " << colorMonoF); + TEST_INFO("Create a color : MONO double : " << colorMonoD); + TEST_INFO("==> test of Color (STOP)"); } \ No newline at end of file diff --git a/test/testFSNode.hpp b/test/testFSNode.hpp index 3485de1..3165e95 100644 --- a/test/testFSNode.hpp +++ b/test/testFSNode.hpp @@ -19,70 +19,70 @@ TEST(TestEtkFSNode, checkType) { EXPECT_EQ(myNodeTest1.getNameFile(), "myFileTest.txt"); EXPECT_EQ(myNodeTest1.exist(), false); /* - TK_INFO(" GetNameFolder() ='" << myNodeTest1.getNameFolder() << "'"); - TK_INFO(" GetName() ='" << myNodeTest1.getName() << "'"); - TK_INFO(" GetNameFile() ='" << myNodeTest1.getNameFile() << "'"); - TK_INFO(" GetRelativeFolder() ='" << myNodeTest1.getRelativeFolder() << "'"); - TK_INFO(" getFileSystemName() ='" << myNodeTest1.getFileSystemName() << "'"); - TK_INFO(" exist =" << myNodeTest1.exist()); + TEST_INFO(" GetNameFolder() ='" << myNodeTest1.getNameFolder() << "'"); + TEST_INFO(" GetName() ='" << myNodeTest1.getName() << "'"); + TEST_INFO(" GetNameFile() ='" << myNodeTest1.getNameFile() << "'"); + TEST_INFO(" GetRelativeFolder() ='" << myNodeTest1.getRelativeFolder() << "'"); + TEST_INFO(" getFileSystemName() ='" << myNodeTest1.getFileSystemName() << "'"); + TEST_INFO(" exist =" << myNodeTest1.exist()); */ } void testFSNode() { - TK_INFO("==> Start test of FSNode"); + TEST_INFO("==> Start test of FSNode"); std::string fileName("USERDATA:myFileTest.txt"); etk::FSNode myNodeTest1(fileName); - TK_INFO("********************************************"); - TK_INFO("** Filename=\"" << fileName << "\""); - TK_INFO("********************************************"); - TK_INFO(" GetNameFolder() ='" << myNodeTest1.getNameFolder() << "'"); - TK_INFO(" GetName() ='" << myNodeTest1.getName() << "'"); - TK_INFO(" GetNameFile() ='" << myNodeTest1.getNameFile() << "'"); - TK_INFO(" GetRelativeFolder() ='" << myNodeTest1.getRelativeFolder() << "'"); - TK_INFO(" getFileSystemName() ='" << myNodeTest1.getFileSystemName() << "'"); - TK_INFO(" exist =" << myNodeTest1.exist()); + TEST_INFO("********************************************"); + TEST_INFO("** Filename=\"" << fileName << "\""); + TEST_INFO("********************************************"); + TEST_INFO(" GetNameFolder() ='" << myNodeTest1.getNameFolder() << "'"); + TEST_INFO(" GetName() ='" << myNodeTest1.getName() << "'"); + TEST_INFO(" GetNameFile() ='" << myNodeTest1.getNameFile() << "'"); + TEST_INFO(" GetRelativeFolder() ='" << myNodeTest1.getRelativeFolder() << "'"); + TEST_INFO(" getFileSystemName() ='" << myNodeTest1.getFileSystemName() << "'"); + TEST_INFO(" exist =" << myNodeTest1.exist()); if (true==myNodeTest1.exist()) { - TK_ERROR(" ==> remove the file ==> bad for the test"); + TEST_ERROR(" ==> remove the file ==> bad for the test"); } else { - TK_INFO(" Display time when file does not exist :"); - TK_INFO(" TimeCreatedString() ='" << myNodeTest1.timeCreatedString() << "'"); - TK_INFO(" TimeModifiedString() ='" << myNodeTest1.timeModifiedString() << "'"); - TK_INFO(" TimeAccessedString() ='" << myNodeTest1.timeAccessedString() << "'"); + TEST_INFO(" Display time when file does not exist :"); + TEST_INFO(" TimeCreatedString() ='" << myNodeTest1.timeCreatedString() << "'"); + TEST_INFO(" TimeModifiedString() ='" << myNodeTest1.timeModifiedString() << "'"); + TEST_INFO(" TimeAccessedString() ='" << myNodeTest1.timeAccessedString() << "'"); } myNodeTest1.touch(); if (false==myNodeTest1.exist()) { - TK_ERROR(" ==> Error, can not create the file ...."); + TEST_ERROR(" ==> Error, can not create the file ...."); } else { - TK_INFO(" Display time when file does exist :"); - TK_INFO(" TimeCreatedString() ='" << myNodeTest1.timeCreatedString() << "'"); - TK_INFO(" TimeModifiedString() ='" << myNodeTest1.timeModifiedString() << "'"); - TK_INFO(" TimeAccessedString() ='" << myNodeTest1.timeAccessedString() << "'"); + TEST_INFO(" Display time when file does exist :"); + TEST_INFO(" TimeCreatedString() ='" << myNodeTest1.timeCreatedString() << "'"); + TEST_INFO(" TimeModifiedString() ='" << myNodeTest1.timeModifiedString() << "'"); + TEST_INFO(" TimeAccessedString() ='" << myNodeTest1.timeAccessedString() << "'"); } etk::FSNode myNodeTest2(fileName); - TK_INFO("********************************************"); - TK_INFO("** Filename2=\"" << myNodeTest2<< "\""); - TK_INFO("********************************************"); - TK_INFO(" GetNameFolder() ='" << myNodeTest2.getNameFolder() << "'"); - TK_INFO(" GetName() ='" << myNodeTest2.getName() << "'"); - TK_INFO(" GetNameFile() ='" << myNodeTest2.getNameFile() << "'"); - TK_INFO(" GetRelativeFolder() ='" << myNodeTest2.getRelativeFolder() << "'"); - TK_INFO(" getFileSystemName() ='" << myNodeTest2.getFileSystemName() << "'"); - TK_INFO(" exist =" << myNodeTest2.exist()); + TEST_INFO("********************************************"); + TEST_INFO("** Filename2=\"" << myNodeTest2<< "\""); + TEST_INFO("********************************************"); + TEST_INFO(" GetNameFolder() ='" << myNodeTest2.getNameFolder() << "'"); + TEST_INFO(" GetName() ='" << myNodeTest2.getName() << "'"); + TEST_INFO(" GetNameFile() ='" << myNodeTest2.getNameFile() << "'"); + TEST_INFO(" GetRelativeFolder() ='" << myNodeTest2.getRelativeFolder() << "'"); + TEST_INFO(" getFileSystemName() ='" << myNodeTest2.getFileSystemName() << "'"); + TEST_INFO(" exist =" << myNodeTest2.exist()); if (false==myNodeTest1.exist()) { - TK_ERROR(" ==> Error, can not create the file ...."); + TEST_ERROR(" ==> Error, can not create the file ...."); } else { - TK_INFO(" Display time when file does exist :"); - TK_INFO(" TimeCreatedString() ='" << myNodeTest2.timeCreatedString() << "'"); - TK_INFO(" TimeModifiedString() ='" << myNodeTest2.timeModifiedString() << "'"); - TK_INFO(" TimeAccessedString() ='" << myNodeTest2.timeAccessedString() << "'"); + TEST_INFO(" Display time when file does exist :"); + TEST_INFO(" TimeCreatedString() ='" << myNodeTest2.timeCreatedString() << "'"); + TEST_INFO(" TimeModifiedString() ='" << myNodeTest2.timeModifiedString() << "'"); + TEST_INFO(" TimeAccessedString() ='" << myNodeTest2.timeAccessedString() << "'"); } // Try remove the file : myNodeTest1.remove(); if (true==myNodeTest1.exist()) { - TK_ERROR(" ==> The file might be removed ==> but it is not the case ..."); + TEST_ERROR(" ==> The file might be removed ==> but it is not the case ..."); } else { - TK_INFO(" ==> The file is removed"); + TEST_INFO(" ==> The file is removed"); } - TK_INFO("********************************************"); - TK_INFO("==> Stop test of FSNode"); + TEST_INFO("********************************************"); + TEST_INFO("==> Stop test of FSNode"); } \ No newline at end of file diff --git a/tools/lutin_test-debug.py b/tools/lutin_test-debug.py index b23ca51..7d474e9 100644 --- a/tools/lutin_test-debug.py +++ b/tools/lutin_test-debug.py @@ -3,17 +3,38 @@ import lutin.module as module import lutin.tools as tools import lutin.debug as debug + +def get_type(): + return "LIBRARY" + +def get_sub_type(): + return "TEST" + def get_desc(): return "basic debug log for test" +def get_licence(): + return "APACHE-2" -def create(target): - my_module = module.Module(__file__, 'test-debug', 'LIBRARY') +def get_compagny_type(): + return "com" + +def get_compagny_name(): + return "atria-soft" + +def get_maintainer(): + return ["Mr DUPIN Edouard "] + +def create(target, module_name): + my_module = module.Module(__file__, module_name, get_type()) my_module.add_src_file([ 'test-debug/debug.cpp' ]) + my_module.add_header_file([ + 'test-debug/debug.h' + ]) my_module.add_module_depend('etk') - my_module.add_export_path(tools.get_current_path(__file__)) + my_module.add_path(tools.get_current_path(__file__)) return my_module