update cppunit to 1.13.0

Change-Id: If3896361c31a84b77e4c446dac75aeb9268605a0
This commit is contained in:
Markus Mohrhard
2012-06-27 18:41:54 +02:00
parent 887fc099c1
commit fa0fd16526
16 changed files with 31 additions and 299 deletions

View File

@@ -46,7 +46,7 @@ copy-stuff:
#
# The cppunit library
#
$(call COPY,$(OUTDIR)/lib/libcppunit-1.12.so)
$(call COPY,$(OUTDIR)/lib/libcppunit-1.13.so)
#
# The tests we run here
#

View File

@@ -44,7 +44,7 @@ copy-stuff:
$(call COPY,$(OUTDIR)/bin/cppunit/cppunittester,libcppunittester.so)
#
# The cppunit library
$(call COPY,$(OUTDIR)/lib/libcppunit-1.12.so)
$(call COPY,$(OUTDIR)/lib/libcppunit-1.13.so)
#
# cppunit "plug-ins", first ones from sal
#

View File

@@ -1,21 +0,0 @@
--- misc/cppunit-1.12.1.orig/config/config.guess 2010-09-15 10:25:54.000000000 -0500
+++ misc/build/cppunit-1.12.1/config/config.guess 2010-09-15 10:26:50.000000000 -0500
@@ -532,7 +532,7 @@
echo rs6000-ibm-aix3.2
fi
exit ;;
- *:AIX:*:[456])
+ *:AIX:*:[4567])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
@@ -544,6 +544,9 @@
else
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi
+ if [ "$IBM_REV" == "V7BETA" ]; then
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
echo ${IBM_ARCH}-ibm-aix${IBM_REV}
exit ;;
*:AIX:*:*)

View File

@@ -1,5 +1,5 @@
--- misc/cppunit-1.12.1/config/config.sub
+++ misc/build/cppunit-1.12.1/config/config.sub
--- misc/cppunit-1.13.0/config/config.sub
+++ misc/build/cppunit-1.13.0/config/config.sub
@@ -120,7 +120,7 @@
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
@@ -18,8 +18,8 @@
| -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
--- misc/cppunit-1.12.1/config/ltmain.sh
+++ misc/build/cppunit-1.12.1/config/ltmain.sh
--- misc/cppunit-1.13.0/config/ltmain.sh
+++ misc/build/cppunit-1.13.0/config/ltmain.sh
@@ -3228,6 +3228,12 @@
fi
else
@@ -33,8 +33,8 @@
# Parse the version information argument.
save_ifs="$IFS"; IFS=':'
set dummy $vinfo 0 0 0
--- misc/cppunit-1.12.1/src/cppunit/UnixDynamicLibraryManager.cpp
+++ misc/build/cppunit-1.12.1/src/cppunit/UnixDynamicLibraryManager.cpp
--- misc/cppunit-1.13.0/src/cppunit/UnixDynamicLibraryManager.cpp
+++ misc/build/cppunit-1.13.0/src/cppunit/UnixDynamicLibraryManager.cpp
@@ -13,7 +13,15 @@
DynamicLibraryManager::LibraryHandle
DynamicLibraryManager::doLoadLibrary( const std::string &libraryName )

View File

@@ -1,29 +0,0 @@
rhbz#641350 impl. destructor of CppUnit::Message causes segfault when test
is built with debug. STL
diff -up cppunit-1.12.1/include/cppunit/Message.h.dt cppunit-1.12.1/include/cppunit/Message.h
--- misc/build/cppunit-1.12.1/include/cppunit/Message.h.dt 2010-10-08 14:02:26.514477964 +0200
+++ misc/build/cppunit-1.12.1/include/cppunit/Message.h 2010-10-08 14:02:15.411948098 +0200
@@ -57,6 +57,8 @@ public:
const std::string &detail2,
const std::string &detail3 );
+ ~Message();
+
Message &operator =( const Message &other );
/*! \brief Returns the short description.
diff -up cppunit-1.12.1/src/cppunit/Message.cpp.dt cppunit-1.12.1/src/cppunit/Message.cpp
--- misc/build/cppunit-1.12.1/src/cppunit/Message.cpp.dt 2010-10-08 14:02:39.421768852 +0200
+++ misc/build/cppunit-1.12.1/src/cppunit/Message.cpp 2010-10-08 14:02:54.066829633 +0200
@@ -47,6 +47,10 @@ Message::Message( const std::string &sho
addDetail( detail1, detail2, detail3 );
}
+Message::~Message()
+{
+}
+
Message &
Message::operator =( const Message &other )
{

View File

@@ -1,11 +0,0 @@
--- misc/cppunit-1.12.1/include/cppunit/plugin/TestPlugIn.h 2012-01-18 10:28:28.189298501 +0100
+++ misc/build/cppunit-1.12.1/include/cppunit/plugin/TestPlugIn.h 2012-01-18 10:28:06.449450460 +0100
@@ -153,7 +153,7 @@
// Unix
#elif defined(CPPUNIT_HAVE_UNIX_DLL_LOADER) || defined(CPPUNIT_HAVE_UNIX_SHL_LOADER)
#define CPPUNIT_PLUGIN_IMPLEMENT_MAIN() \
- int main( int, char *[] ) \
+ int main() \
{ \
return 0; \
} \

View File

@@ -1,32 +0,0 @@
--- misc/cppunit-1.12.1/include/cppunit/TestAssert.h 2012-02-10 12:34:26.564961982 +0100
+++ misc/build/cppunit-1.12.1/include/cppunit/TestAssert.h 2012-02-10 12:33:57.660131866 +0100
@@ -8,6 +8,12 @@
#include <stdio.h>
#include <float.h> // For struct assertion_traits<double>
+// Work around "passing 'T' chooses 'int' over 'unsigned int'" warnings when T
+// is an enum type:
+#if defined __GNUC__ && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6))
+#pragma GCC system_header
+#endif
+
CPPUNIT_NS_BEGIN
@@ -46,7 +52,16 @@
static std::string toString( const T& x )
{
OStringStream ost;
+// Work around "passing 'T' chooses 'int' over 'unsigned int'" warnings when T
+// is an enum type:
+#if defined __GNUC__ && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wsign-promo"
+#endif
ost << x;
+#if defined __GNUC__ && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4)
+#pragma GCC diagnostic pop
+#endif
return ost.str();
}
};

View File

@@ -1,43 +0,0 @@
--- misc/build/cppunit-1.12.1/configure
+++ misc/build/cppunit-1.12.1/configure
@@ -23273,7 +23273,7 @@
{ echo "$as_me:$LINENO: result: creating $ac_prefix_conf_OUT - prefix $ac_prefix_conf_UPP for $ac_prefix_conf_INP defines" >&5
echo "${ECHO_T}creating $ac_prefix_conf_OUT - prefix $ac_prefix_conf_UPP for $ac_prefix_conf_INP defines" >&6; }
if test -f $ac_prefix_conf_INP ; then
- $as_dirname -- /* automatically generated */ ||
+ $as_dirname -- '/* automatically generated */' ||
$as_expr X/* automatically generated */ : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X/* automatically generated */ : 'X\(//\)[^/]' \| \
X/* automatically generated */ : 'X\(//\)$' \| \
@@ -23318,5 +23318,5 @@
echo "$as_me: error: input file $ac_prefix_conf_IN does not exist, skip generating $ac_prefix_conf_OUT" >&2;}
{ (exit 1); exit 1; }; }
fi
- rm -f conftest.*
+ rm -f -r conftest.*
fi
--- misc/build/cppunit-1.12.1/include/cppunit/plugin/TestPlugIn.h
+++ misc/build/cppunit-1.12.1/include/cppunit/plugin/TestPlugIn.h
@@ -106,7 +106,9 @@
* CppUnitTestPlugIn *CPPUNIT_PLUGIN_EXPORTED_NAME(void);
* \endcode
*/
+#ifndef CPPUNIT_PLUGIN_EXPORTED_NAME
#define CPPUNIT_PLUGIN_EXPORTED_NAME cppunitTestPlugIn
+#endif
/*! \brief Type of the function exported by a plug-in.
* \ingroup WritingTestPlugIn
@@ -143,6 +143,12 @@
#define CPPUNIT_PLUGIN_IMPLEMENT_MAIN() \
typedef char __CppUnitPlugInImplementMainDummyTypeDef
+// Actually this is for iOS where we build the cppunit tests libraries
+// as plain archives and just link them statically into test fixture programs,
+// and don't want any stinking duplicate main(), but shouldn't hurt for MacOSX either.
+#elif defined(__APPLE__)
+#define CPPUNIT_PLUGIN_IMPLEMENT_MAIN() \
+ typedef char __CppUnitPlugInImplementMainDummyTypeDef
// Unix
#elif defined(CPPUNIT_HAVE_UNIX_DLL_LOADER) || defined(CPPUNIT_HAVE_UNIX_SHL_LOADER)
#define CPPUNIT_PLUGIN_IMPLEMENT_MAIN() \

View File

@@ -1,11 +0,0 @@
--- misc/cppunit-1.12.1/src/cppunit/Makefile.in 2008-02-20 06:59:55.000000000 +0100
+++ misc/build/cppunit-1.12.1/src/cppunit/Makefile.in 2010-06-21 17:01:38.324370072 +0200
@@ -300,7 +300,7 @@
libcppunit_la_LDFLAGS = \
-no-undefined -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
- -release $(LT_RELEASE)
+ -release $(LT_RELEASE) $(LIBADD_DL)
all: all-am

View File

@@ -29,36 +29,10 @@ TARGET = cppunit
.INCLUDE: settings.mk
TARFILE_NAME = cppunit-1.12.1
TARFILE_MD5=bd30e9cf5523cdfc019b94f5e1d7fd19
# from <https://sourceforge.net/projects/cppunit/files/cppunit/1.12.1/
# cppunit-1.12.1.tar.gz/download>
TARFILE_NAME=cppunit-1.13.0
TARFILE_MD5=4db5c308c80d04ad8b6839aea5224dea
PATCH_FILES = solarisfinite.patch warnings.patch windows.patch ldflags.patch aix.patch avoid-synthetised-destructor.patch ios.patch cppunit-1.12.1-unused-parameters.patch cppunit-1.12.1-warnings.patch
# solarisfinite.patch: see <https://sourceforge.net/tracker/?func=detail&
# aid=2912590&group_id=11795&atid=311795>; upstreamed as
# <http://cgit.freedesktop.org/libreoffice/cppunit/commit/?id=
# a76125c7dd07f79c82f3fed9be5c0a5627089e00>
# warnings.patch: see <https://sourceforge.net/tracker/?func=detail&
# aid=2912630&group_id=11795&atid=311795>; upstreamed as
# <http://cgit.freedesktop.org/libreoffice/cppunit/commit/?id=
# 9cfcff6c2195ae25be4022654990c9eea6fbb2f8>
# windows.patch: TOOD
# ldflags.patch: upstreamed as <http://cgit.freedesktop.org/libreoffice/
# cppunit/commit/?id=3acfc24e54a9f6d1b2121dda1942e882549870e4>
# aix.patch: TODO
# avoid-synthetised-destructor.patch: upstreamed as
# <http://cgit.freedesktop.org/libreoffice/cppunit/commit/?id=
# 05b202fc3edce92d8343cb0964d9d15134cd8f1d>
# ios.patch: TODO
# cppunit-1.12.1-unused-parameters.patch: help static analysis tools (see
# SAL_UNUSED_PARAMETER in sal/types.h); upstreamed as
# <http://cgit.freedesktop.org/libreoffice/cppunit/commit/?id=
# 7a09bf3a88e99d85c4dec2ad296309dbec2987c3>
# cppunit-1.12.1-warnings.patch: work around additional warnings (found when
# converting module unotest to gbuild); upstreamed as
# <http://cgit.freedesktop.org/libreoffice/cppunit/commit/?id=
# 0f75eaa0b8de3d68e8b5b5447fbc009531183cb5>
PATCH_FILES =
.IF "$(OS)" == "ANDROID"
PATCH_FILES += android.patch
@@ -119,9 +93,9 @@ OUTDIR2INC = ooo-install/include/cppunit
# WTF? A *Cygwin* DLL?
#OUT2BIN = ooo-install/bin/DllPlugInTester.exe \
# ooo-install/bin/cygcppunit-1-12-1.dll
# ooo-install/bin/cygcppunit-1-13-0.dll
OUT2BIN = ooo-install/bin/DllPlugInTester.exe \
ooo-install/bin/libcppunit-1-12-1.dll
ooo-install/bin/libcppunit-1-13-0.dll
OUT2LIB = ooo-install/lib/libcppunit.dll.a
.INCLUDE: set_ext.mk
@@ -187,20 +161,20 @@ OUTDIR2INC = ooo-install/include/cppunit ooo-install/lib/pkgconfig
OUT2BIN = ooo-install/bin/DllPlugInTester
.IF "$(OS)" == "MACOSX"
OUT2LIB = ooo-install/lib/libcppunit-1.12.1.dylib
OUT2LIB = ooo-install/lib/libcppunit-1.13.0.dylib
EXTRPATH = NONE
PACKAGE_DIR = \
$(MISC)/@.__________________________________________________$(EXTRPATH)
.ELIF "$(OS)" == "AIX"
OUT2LIB = ooo-install/lib/libcppunit-1.12.a
OUT2LIB = ooo-install/lib/libcppunit-1.13.a
.ELIF "$(OS)" == "OPENBSD"
OUT2LIB = ooo-install/lib/libcppunit-1.12.so.1.0
OUT2LIB = ooo-install/lib/libcppunit-1.13.so.0.0
.ELIF "$(OS)" == "IOS"
OUT2LIB = ooo-install/lib/libcppunit.a
.ELIF "$(OS)" == "ANDROID"
OUT2LIB = ooo-install/lib/libcppunit-1.12.so
OUT2LIB = ooo-install/lib/libcppunit-1.13.so
.ELSE
OUT2LIB = ooo-install/lib/libcppunit-1.12.so.1
OUT2LIB = ooo-install/lib/libcppunit-1.13.so.0
.END
.INCLUDE: set_ext.mk

View File

@@ -16,23 +16,23 @@ mkdir: %_DEST%\inc\cppunit\ui\text
..\%__SRC%\bin\cppunit_dll.dll %_DEST%\bin\cppunit_dll.dll
..\%__SRC%\lib\icppunit_dll.lib %_DEST%\lib\icppunit_dll.lib
..\%__SRC%\bin\libcppunit-1-12-1.dll %_DEST%\bin\libcppunit-1-12-1.dll
..\%__SRC%\bin\libcppunit-1-13-0.dll %_DEST%\bin\libcppunit-1-13-0.dll
..\%__SRC%\lib\libcppunit.dll.a %_DEST%\lib\libcppunit.dll.a
..\%__SRC%\lib\libcppunit-1.12.1.dylib %_DEST%\lib\libcppunit-1.12.1.dylib
symlink: %_DEST%\lib\libcppunit-1.12.1.dylib %_DEST%\lib\libcppunit.dylib
..\%__SRC%\lib\libcppunit-1.13.0.dylib %_DEST%\lib\libcppunit-1.13.0.dylib
symlink: %_DEST%\lib\libcppunit-1.13.0.dylib %_DEST%\lib\libcppunit.dylib
..\%__SRC%\lib\libcppunit-1.12.so %_DEST%\lib\libcppunit-1.12.so
symlink: %_DEST%\lib\libcppunit-1.12.so %_DEST%\lib\libcppunit.so
..\%__SRC%\lib\libcppunit-1.13.so %_DEST%\lib\libcppunit-1.13.so
symlink: %_DEST%\lib\libcppunit-1.13.so %_DEST%\lib\libcppunit.so
..\%__SRC%\lib\libcppunit-1.12.so.1 %_DEST%\lib\libcppunit-1.12.so.1
symlink: %_DEST%\lib\libcppunit-1.12.so.1 %_DEST%\lib\libcppunit.so
..\%__SRC%\lib\libcppunit-1.13.so.0 %_DEST%\lib\libcppunit-1.13.so.0
symlink: %_DEST%\lib\libcppunit-1.13.so.0 %_DEST%\lib\libcppunit.so
..\%__SRC%\lib\libcppunit-1.12.so.1.0 %_DEST%\lib\libcppunit-1.12.so.1.0
symlink: %_DEST%\lib\libcppunit-1.12.so.1.0 %_DEST%\lib\libcppunit.so
..\%__SRC%\lib\libcppunit-1.13.so.0.0 %_DEST%\lib\libcppunit-1.13.so.0.0
symlink: %_DEST%\lib\libcppunit-1.13.so.0.0 %_DEST%\lib\libcppunit.so
..\%__SRC%\lib\libcppunit-1.12.a %_DEST%\lib\libcppunit-1.12.a
symlink: %_DEST%\lib\libcppunit-1.12.a %_DEST%\lib\libcppunit.a
..\%__SRC%\lib\libcppunit-1.13.a %_DEST%\lib\libcppunit-1.13.a
symlink: %_DEST%\lib\libcppunit-1.13.a %_DEST%\lib\libcppunit.a
..\%__SRC%\lib\libcppunit.a %_DEST%\lib\libcppunit.a

View File

@@ -1,14 +0,0 @@
--- misc/cppunit-1.12.1/include/cppunit/portability/FloatingPoint.h Mon Mar 5 04:16:42 2007
+++ misc/build/cppunit-1.12.1/include/cppunit/portability/FloatingPoint.h Thu Dec 3 16:34:23 2009
@@ -3,6 +3,11 @@
#include <cppunit/Portability.h>
#include <math.h>
+
+#if defined(__sun) && !defined(CPPUNIT_HAVE_ISFINITE) && defined(CPPUNIT_HAVE_FINITE)
+#include <ieeefp.h>
+ // <math.h> is still needed for usage of fabs in TestAssert.cpp
+#endif
CPPUNIT_NS_BEGIN

View File

@@ -1,33 +0,0 @@
--- misc/cppunit-1.12.1/include/cppunit/plugin/TestPlugIn.h 2007-01-12 05:54:34.000000000 +0100
+++ misc/build/cppunit-1.12.1/include/cppunit/plugin/TestPlugIn.h 2009-12-02 15:33:29.639857272 +0100
@@ -151,9 +151,7 @@
#include <windows.h>
#endif
#define CPPUNIT_PLUGIN_IMPLEMENT_MAIN() \
- BOOL APIENTRY DllMain( HANDLE hModule, \
- DWORD ul_reason_for_call, \
- LPVOID lpReserved ) \
+ BOOL APIENTRY DllMain( HANDLE, DWORD, LPVOID ) \
{ \
return TRUE; \
} \
@@ -162,7 +160,7 @@
// Unix
#elif defined(CPPUNIT_HAVE_UNIX_DLL_LOADER) || defined(CPPUNIT_HAVE_UNIX_SHL_LOADER)
#define CPPUNIT_PLUGIN_IMPLEMENT_MAIN() \
- int main( int argc, char *argv[] ) \
+ int main( int, char *[] ) \
{ \
return 0; \
} \
--- misc/cppunit-1.12.1/include/cppunit/extensions/ExceptionTestCaseDecorator.h
+++ misc/build/cppunit-1.12.1/include/cppunit/extensions/ExceptionTestCaseDecorator.h
@@ -92,7 +92,7 @@
*
* Should be overriden to check the exception.
*/
- virtual void checkException( ExpectedExceptionType &e )
+ virtual void checkException( ExpectedExceptionType & )
{
}
};

View File

@@ -1,48 +0,0 @@
--- misc/cppunit-1.12.1/include/cppunit/plugin/TestPlugIn.h 2010-01-11 14:42:25.084658287 +0100
+++ misc/build/cppunit-1.12.1/include/cppunit/plugin/TestPlugIn.h 2010-01-11 14:42:18.660706180 +0100
@@ -133,9 +133,8 @@
/*! \def CPPUNIT_PLUGIN_IMPLEMENT_MAIN()
* \brief Implements the 'main' function for the plug-in.
*
- * This macros implements the main() function for dynamic library.
- * For example, WIN32 requires a DllMain function, while some Unix
- * requires a main() function. This macros takes care of the implementation.
+ * This macro implements the main() function for dynamic library
+ * on Unix for some weird reason.
*/
// Win32
@@ -149,21 +149,7 @@
// Win32
#if defined(CPPUNIT_HAVE_WIN32_DLL_LOADER)
-#if !defined(APIENTRY)
-#define WIN32_LEAN_AND_MEAN
-#define NOGDI
-#define NOUSER
-#define NOKERNEL
-#define NOSOUND
-#define NOMINMAX
-#define BLENDFUNCTION void // for mingw & gcc
-#include <windows.h>
-#endif
#define CPPUNIT_PLUGIN_IMPLEMENT_MAIN() \
- BOOL APIENTRY DllMain( HANDLE, DWORD, LPVOID ) \
- { \
- return TRUE; \
- } \
typedef char __CppUnitPlugInImplementMainDummyTypeDef
// Unix
--- misc/cppunit-1.12.1/include/cppunit/TestAssert.h
+++ misc/build/cppunit-1.12.1/include/cppunit/TestAssert.h
@@ -76,7 +76,7 @@
const int precision = 15;
#endif // #ifdef DBL_DIG
char buffer[128];
-#ifdef __STDC_SECURE_LIB__ // Use secure version with visual studio 2005 to avoid warning.
+#if defined(_MSC_VER) && defined(__STDC_SECURE_LIB__) // Use secure version with visual studio 2005 to avoid warning.
sprintf_s(buffer, sizeof(buffer), "%.*g", precision, x);
#else
sprintf(buffer, "%.*g", precision, x);

View File

@@ -30,7 +30,7 @@ f101a9e88b783337b20b2e26dfd26d5f-cairo-1.10.2.tar.gz
798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip
ecb2e37e45c9933e2a963cabe03670ab-curl-7.19.7.tar.gz
8294d6c42e3553229af9934c5c0ed997-stax-api-1.0-2-sources.jar
bd30e9cf5523cdfc019b94f5e1d7fd19-cppunit-1.12.1.tar.gz
4db5c308c80d04ad8b6839aea5224dea-cppunit-1.13.0.tar.gz
a169ab152209200a7bad29a275cb0333-seamonkey-1.1.14.source.tar.gz
a4d9b30810a434a3ed39fc0003bbd637-LICENSE_stax-api-1.0-2-sources.html
a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip

View File

@@ -179,7 +179,7 @@ File gid_Test_File_Lib_Cppunit
Styles = (PACKED);
Dir = gid_Test_Brand_Dir_Program;
#ifdef UNX
Name = STRING(CONCAT3(libcppunit-1.12,UNXSUFFIX,.1));
Name = STRING(CONCAT3(libcppunit-1.13,UNXSUFFIX,.0));
#endif
End