[DEV] port CPP unit with lutin

This commit is contained in:
Edouard DUPIN 2016-07-27 21:31:48 +02:00
parent 33c11f12ef
commit 6129918dea
5 changed files with 363 additions and 0 deletions

4
.gitignore vendored
View File

@ -27,3 +27,7 @@
*.exe
*.out
*.app
# python temporary file
*.pyc
__pycache__

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "cppunit"]
path = cppunit
url = https://github.com/generic-library/cppunit.git

1
cppunit Submodule

@ -0,0 +1 @@
Subproject commit 5946699c398159aa6ccc9a0905d3812f642a28da

168
generated/config-auto.h Normal file
View File

@ -0,0 +1,168 @@
#ifndef _INCLUDE_CPPUNIT_CONFIG_AUTO_H
#define _INCLUDE_CPPUNIT_CONFIG_AUTO_H 1
/* include/cppunit/config-auto.h. Generated automatically at end of configure. */
/* config/config.h. Generated from config.h.in by configure. */
/* config/config.h.in. Generated from configure.in by autoheader. */
/* define if library uses std::string::compare(string,pos,n) */
/* #undef CPPUNIT_FUNC_STRING_COMPARE_STRING_FIRST */
/* define if the library defines strstream */
#ifndef CPPUNIT_HAVE_CLASS_STRSTREAM
#define CPPUNIT_HAVE_CLASS_STRSTREAM 1
#endif
/* Define to 1 if you have the <cmath> header file. */
#ifndef CPPUNIT_HAVE_CMATH
#define CPPUNIT_HAVE_CMATH 1
#endif
/* Define if you have the GNU dld library. */
/* #undef CPPUNIT_HAVE_DLD */
/* Define to 1 if you have the `dlerror' function. */
#ifndef CPPUNIT_HAVE_DLERROR
#define CPPUNIT_HAVE_DLERROR 1
#endif
/* Define to 1 if you have the <dlfcn.h> header file. */
#ifndef CPPUNIT_HAVE_DLFCN_H
#define CPPUNIT_HAVE_DLFCN_H 1
#endif
/* Define to 1 if you have the `finite' function. */
#ifndef CPPUNIT_HAVE_FINITE
#define CPPUNIT_HAVE_FINITE 1
#endif
/* define if the compiler supports GCC C++ ABI name demangling */
#ifndef CPPUNIT_HAVE_GCC_ABI_DEMANGLE
#define CPPUNIT_HAVE_GCC_ABI_DEMANGLE 1
#endif
/* Define to 1 if you have the <inttypes.h> header file. */
#ifndef CPPUNIT_HAVE_INTTYPES_H
#define CPPUNIT_HAVE_INTTYPES_H 1
#endif
/* define if compiler has isfinite */
#ifndef CPPUNIT_HAVE_ISFINITE
#define CPPUNIT_HAVE_ISFINITE 1
#endif
/* Define if you have the libdl library or equivalent. */
#ifndef CPPUNIT_HAVE_LIBDL
#define CPPUNIT_HAVE_LIBDL 1
#endif
/* Define to 1 if you have the <memory.h> header file. */
#ifndef CPPUNIT_HAVE_MEMORY_H
#define CPPUNIT_HAVE_MEMORY_H 1
#endif
/* define to 1 if the compiler implements namespaces */
#ifndef CPPUNIT_HAVE_NAMESPACES
#define CPPUNIT_HAVE_NAMESPACES 1
#endif
/* define if the compiler supports Run-Time Type Identification */
#ifndef CPPUNIT_HAVE_RTTI
#define CPPUNIT_HAVE_RTTI 1
#endif
/* Define if you have the shl_load function. */
/* #undef CPPUNIT_HAVE_SHL_LOAD */
/* define if the compiler has stringstream */
#ifndef CPPUNIT_HAVE_SSTREAM
#define CPPUNIT_HAVE_SSTREAM 1
#endif
/* Define to 1 if you have the <stdint.h> header file. */
#ifndef CPPUNIT_HAVE_STDINT_H
#define CPPUNIT_HAVE_STDINT_H 1
#endif
/* Define to 1 if you have the <stdlib.h> header file. */
#ifndef CPPUNIT_HAVE_STDLIB_H
#define CPPUNIT_HAVE_STDLIB_H 1
#endif
/* Define to 1 if you have the <strings.h> header file. */
#ifndef CPPUNIT_HAVE_STRINGS_H
#define CPPUNIT_HAVE_STRINGS_H 1
#endif
/* Define to 1 if you have the <string.h> header file. */
#ifndef CPPUNIT_HAVE_STRING_H
#define CPPUNIT_HAVE_STRING_H 1
#endif
/* Define to 1 if you have the <strstream> header file. */
#ifndef CPPUNIT_HAVE_STRSTREAM
#define CPPUNIT_HAVE_STRSTREAM 1
#endif
/* Define to 1 if you have the <sys/stat.h> header file. */
#ifndef CPPUNIT_HAVE_SYS_STAT_H
#define CPPUNIT_HAVE_SYS_STAT_H 1
#endif
/* Define to 1 if you have the <sys/types.h> header file. */
#ifndef CPPUNIT_HAVE_SYS_TYPES_H
#define CPPUNIT_HAVE_SYS_TYPES_H 1
#endif
/* Define to 1 if you have the <unistd.h> header file. */
#ifndef CPPUNIT_HAVE_UNISTD_H
#define CPPUNIT_HAVE_UNISTD_H 1
#endif
/* Name of package */
#ifndef CPPUNIT_PACKAGE
#define CPPUNIT_PACKAGE "cppunit"
#endif
/* Define to the address where bug reports for this package should be sent. */
#ifndef CPPUNIT_PACKAGE_BUGREPORT
#define CPPUNIT_PACKAGE_BUGREPORT ""
#endif
/* Define to the full name of this package. */
#ifndef CPPUNIT_PACKAGE_NAME
#define CPPUNIT_PACKAGE_NAME ""
#endif
/* Define to the full name and version of this package. */
#ifndef CPPUNIT_PACKAGE_STRING
#define CPPUNIT_PACKAGE_STRING ""
#endif
/* Define to the one symbol short name of this package. */
#ifndef CPPUNIT_PACKAGE_TARNAME
#define CPPUNIT_PACKAGE_TARNAME ""
#endif
/* Define to the version of this package. */
#ifndef CPPUNIT_PACKAGE_VERSION
#define CPPUNIT_PACKAGE_VERSION ""
#endif
/* Define to 1 if you have the ANSI C header files. */
#ifndef CPPUNIT_STDC_HEADERS
#define CPPUNIT_STDC_HEADERS 1
#endif
/* Define to 1 to use type_info::name() for class names */
#ifndef CPPUNIT_USE_TYPEINFO_NAME
#define CPPUNIT_USE_TYPEINFO_NAME CPPUNIT_HAVE_RTTI
#endif
/* Version number of package */
#ifndef CPPUNIT_VERSION
#define CPPUNIT_VERSION "1.12.1"
#endif
/* _INCLUDE_CPPUNIT_CONFIG_AUTO_H */
#endif

187
lutin_cppunit.py Normal file
View File

@ -0,0 +1,187 @@
#!/usr/bin/python
import lutin.module as module
import lutin.tools as tools
import os
def get_type():
return "LIBRARY"
def get_desc():
return "cpp-unit test framework"
def get_licence():
return "lgpl-2"
def get_compagny_type():
return "com"
def get_compagny_name():
return "unknow"
def get_maintainer():
return [
"Michael Feathers <mfeathers@objectmentor.com>",
"Jerome Lacoste <lacostej@altern.org>",
"E. Sommerlade <eric@sommerla.de>",
"Baptiste Lepilleur <gaiacrtn@free.fr> <blep@sourceforge.net>",
"Bastiaan Bakker <bastiaan.bakker@lifeline.nl>",
"Steve Robbins <smr99@sourceforge.net>"
]
def get_version():
return [2008,2,7]
def create(target, module_name):
my_module = module.Module(__file__, module_name, get_type())
my_module.add_src_file([
"cppunit/src/cppunit/TestSuiteBuilderContext.cpp",
"cppunit/src/cppunit/TestLeaf.cpp",
"cppunit/src/cppunit/XmlOutputter.cpp",
"cppunit/src/cppunit/TestPath.cpp",
"cppunit/src/cppunit/TextTestProgressListener.cpp",
"cppunit/src/cppunit/XmlElement.cpp",
"cppunit/src/cppunit/BeOsDynamicLibraryManager.cpp",
"cppunit/src/cppunit/CompilerOutputter.cpp",
"cppunit/src/cppunit/TestSetUp.cpp",
"cppunit/src/cppunit/TestFactoryRegistry.cpp",
"cppunit/src/cppunit/TestComposite.cpp",
"cppunit/src/cppunit/TextOutputter.cpp",
"cppunit/src/cppunit/TestAssert.cpp",
"cppunit/src/cppunit/PlugInParameters.cpp",
"cppunit/src/cppunit/TestResultCollector.cpp",
"cppunit/src/cppunit/AdditionalMessage.cpp",
"cppunit/src/cppunit/Test.cpp",
"cppunit/src/cppunit/TestResult.cpp",
"cppunit/src/cppunit/DefaultProtector.cpp",
"cppunit/src/cppunit/TextTestResult.cpp",
"cppunit/src/cppunit/Asserter.cpp",
"cppunit/src/cppunit/SynchronizedObject.cpp",
"cppunit/src/cppunit/TestNamer.cpp",
"cppunit/src/cppunit/TextTestRunner.cpp",
"cppunit/src/cppunit/Win32DynamicLibraryManager.cpp",
"cppunit/src/cppunit/UnixDynamicLibraryManager.cpp",
"cppunit/src/cppunit/TestSuite.cpp",
"cppunit/src/cppunit/BriefTestProgressListener.cpp",
"cppunit/src/cppunit/TestSuccessListener.cpp",
"cppunit/src/cppunit/XmlOutputterHook.cpp",
"cppunit/src/cppunit/PlugInManager.cpp",
"cppunit/src/cppunit/TestDecorator.cpp",
"cppunit/src/cppunit/XmlDocument.cpp",
"cppunit/src/cppunit/Message.cpp",
"cppunit/src/cppunit/TestCase.cpp",
"cppunit/src/cppunit/DynamicLibraryManagerException.cpp",
"cppunit/src/cppunit/TestFailure.cpp",
"cppunit/src/cppunit/Exception.cpp",
"cppunit/src/cppunit/SourceLine.cpp",
"cppunit/src/cppunit/DynamicLibraryManager.cpp",
"cppunit/src/cppunit/TypeInfoHelper.cpp",
"cppunit/src/cppunit/ProtectorChain.cpp",
"cppunit/src/cppunit/RepeatedTest.cpp",
"cppunit/src/cppunit/TestRunner.cpp",
"cppunit/src/cppunit/ShlDynamicLibraryManager.cpp",
"cppunit/src/cppunit/StringTools.cpp",
"cppunit/src/cppunit/TestCaseDecorator.cpp",
"cppunit/src/cppunit/Protector.cpp",
"cppunit/src/cppunit/TestPlugInDefaultImpl.cpp",
])
my_module.add_header_file([
"cppunit/include/cppunit/TextOutputter.h",
"cppunit/include/cppunit/TestSuccessListener.h",
"cppunit/include/cppunit/Protector.h",
"cppunit/include/cppunit/Asserter.h",
"cppunit/include/cppunit/TestSuite.h",
"cppunit/include/cppunit/TestListener.h",
"cppunit/include/cppunit/TestPath.h",
"cppunit/include/cppunit/TestComposite.h",
"cppunit/include/cppunit/TextTestResult.h",
"cppunit/include/cppunit/Outputter.h",
"cppunit/include/cppunit/XmlOutputter.h",
"cppunit/include/cppunit/Message.h",
"cppunit/include/cppunit/SynchronizedObject.h",
"cppunit/include/cppunit/TestCase.h",
"cppunit/include/cppunit/CompilerOutputter.h",
"cppunit/include/cppunit/TestCaller.h",
"cppunit/include/cppunit/TestResult.h",
"cppunit/include/cppunit/TextTestRunner.h",
"cppunit/include/cppunit/BriefTestProgressListener.h",
"cppunit/include/cppunit/Exception.h",
"cppunit/include/cppunit/TestLeaf.h",
"cppunit/include/cppunit/TestResultCollector.h",
"cppunit/include/cppunit/AdditionalMessage.h",
"cppunit/include/cppunit/XmlOutputterHook.h",
"cppunit/include/cppunit/SourceLine.h",
"cppunit/include/cppunit/TestFixture.h",
"cppunit/include/cppunit/TextTestProgressListener.h",
"cppunit/include/cppunit/TestRunner.h",
"cppunit/include/cppunit/Test.h",
"cppunit/include/cppunit/Portability.h",
"cppunit/include/cppunit/TestAssert.h",
"cppunit/include/cppunit/TestFailure.h",
], destination_path='cppunit')
my_module.add_header_file([
"cppunit/include/cppunit/portability/CppUnitMap.h",
"cppunit/include/cppunit/portability/CppUnitSet.h",
"cppunit/include/cppunit/portability/Stream.h",
"cppunit/include/cppunit/portability/CppUnitStack.h",
"cppunit/include/cppunit/portability/CppUnitDeque.h",
"cppunit/include/cppunit/portability/CppUnitVector.h",
"cppunit/include/cppunit/portability/FloatingPoint.h",
], destination_path='cppunit/portability')
my_module.add_header_file([
"cppunit/include/cppunit/ui/mfc/MfcTestRunner.h",
"cppunit/include/cppunit/ui/mfc/TestRunner.h",
], destination_path='cppunit/ui/mfc')
my_module.add_header_file([
"cppunit/include/cppunit/ui/qt/Config.h",
"cppunit/include/cppunit/ui/qt/TestRunner.h",
"cppunit/include/cppunit/ui/qt/QtTestRunner.h",
], destination_path='cppunit/ui/qt')
my_module.add_header_file([
"cppunit/include/cppunit/ui/text/TextTestRunner.h",
"cppunit/include/cppunit/ui/text/TestRunner.h",
], destination_path='cppunit/ui/text')
my_module.add_header_file([
"cppunit/include/cppunit/config/config-evc4.h",
"cppunit/include/cppunit/config/config-msvc6.h",
"cppunit/include/cppunit/config/config-bcb5.h",
"cppunit/include/cppunit/config/SelectDllLoader.h",
"cppunit/include/cppunit/config/SourcePrefix.h",
"cppunit/include/cppunit/config/config-mac.h",
"cppunit/include/cppunit/config/CppUnitApi.h",
], destination_path='cppunit/config')
my_module.add_header_file([
"cppunit/include/cppunit/tools/XmlElement.h",
"cppunit/include/cppunit/tools/Algorithm.h",
"cppunit/include/cppunit/tools/XmlDocument.h",
"cppunit/include/cppunit/tools/StringTools.h",
], destination_path='cppunit/tools')
my_module.add_header_file([
"cppunit/include/cppunit/extensions/TestSetUp.h",
"cppunit/include/cppunit/extensions/TypeInfoHelper.h",
"cppunit/include/cppunit/extensions/TestSuiteBuilderContext.h",
"cppunit/include/cppunit/extensions/ExceptionTestCaseDecorator.h",
"cppunit/include/cppunit/extensions/AutoRegisterSuite.h",
"cppunit/include/cppunit/extensions/TestDecorator.h",
"cppunit/include/cppunit/extensions/TestNamer.h",
"cppunit/include/cppunit/extensions/TestFixtureFactory.h",
"cppunit/include/cppunit/extensions/TestSuiteFactory.h",
"cppunit/include/cppunit/extensions/RepeatedTest.h",
"cppunit/include/cppunit/extensions/TestFactoryRegistry.h",
"cppunit/include/cppunit/extensions/HelperMacros.h",
"cppunit/include/cppunit/extensions/Orthodox.h",
"cppunit/include/cppunit/extensions/TestCaseDecorator.h",
"cppunit/include/cppunit/extensions/TestFactory.h",
], destination_path='cppunit/extensions')
my_module.add_header_file([
"cppunit/include/cppunit/plugin/TestPlugInDefaultImpl.h",
"cppunit/include/cppunit/plugin/DynamicLibraryManager.h",
"cppunit/include/cppunit/plugin/DynamicLibraryManagerException.h",
"cppunit/include/cppunit/plugin/PlugInManager.h",
"cppunit/include/cppunit/plugin/TestPlugIn.h",
"cppunit/include/cppunit/plugin/PlugInParameters.h",
], destination_path='cppunit/plugin')
my_module.add_header_file([
"generated/config-auto.h",
], destination_path='cppunit')
return my_module