summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2018-09-27 17:53:04 +0200
committerTor Lillqvist <tml@collabora.com>2018-09-27 21:05:27 +0200
commit999a9c183c395a36fbaf35468ace11a625a581f7 (patch)
tree3fdf0693736e81d5b7aa282eff97f3ab4715def5
parent2f9c6940a702da50cf19bc22c3bc85066a27fc3a (diff)
Do build cppunit for iOS, too
I am writing a separate unit test app that will include selected existing unit tests that make sense and are important to run on iOS. Change-Id: I4722f1ed872ba21e181eeba5ed3b58e82d8fed72 Reviewed-on: https://gerrit.libreoffice.org/61049 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
-rwxr-xr-xbin/lo-all-static-libs1
-rw-r--r--configure.ac2
-rw-r--r--external/cppunit/UnpackedTarball_cppunit.mk2
-rw-r--r--vcl/source/app/svmain.cxx83
4 files changed, 4 insertions, 84 deletions
diff --git a/bin/lo-all-static-libs b/bin/lo-all-static-libs
index 2e620ff2a494..738bc58d81fe 100755
--- a/bin/lo-all-static-libs
+++ b/bin/lo-all-static-libs
@@ -58,6 +58,7 @@ ANDROID)
;;
IOS)
oslibs="$WORKDIR/UnpackedTarball/icu/source/stubdata/*.a"
+ oslibs="$oslibs $WORKDIR/UnpackedTarball/cppunit/src/cppunit/.libs/*.a"
;;
*)
oslibs=
diff --git a/configure.ac b/configure.ac
index ec9d8b34d416..86eef4c0c32a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8028,7 +8028,7 @@ fi
dnl ===================================================================
dnl Check for system cppunit
dnl ===================================================================
-if test "$cross_compiling" != "yes"; then
+if test "$_os" != "Android" ; then
libo_CHECK_SYSTEM_MODULE([cppunit],[CPPUNIT],[cppunit >= 1.14.0])
fi
diff --git a/external/cppunit/UnpackedTarball_cppunit.mk b/external/cppunit/UnpackedTarball_cppunit.mk
index dc0adf73bd07..053a6020cd4f 100644
--- a/external/cppunit/UnpackedTarball_cppunit.mk
+++ b/external/cppunit/UnpackedTarball_cppunit.mk
@@ -11,6 +11,8 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,cppunit))
$(eval $(call gb_UnpackedTarball_set_tarball,cppunit,$(CPPUNIT_TARBALL),,cppunit))
+$(eval $(call gb_UnpackedTarball_update_autoconf_configs,cppunit))
+
# gcc9.patch.0 addressed upstream with <https://gerrit.libreoffice.org/58690> "Avoid GCC 9
# -Wdeprecated-copy":
$(eval $(call gb_UnpackedTarball_add_patches,cppunit,\
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index c9f3f056f7e9..0b49311a2051 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -181,85 +181,6 @@ static oslSignalAction VCLExceptionSignal_impl( void* /*pData*/, oslSignalInfo*
}
-#ifdef IOS
-
-#include <cppuhelper/exc_hlp.hxx>
-#include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp>
-
-// Swiped from cppuhelper/qa/misc/test_misc.cxx. Ideally we should
-// have a unit test app for iOS that would somehow include relevant
-// unit tests from source files all over the place.
-
-static void testExceptions()
-{
- css::uno::Any aSavedExceptionAny;
- std::exception_ptr
- aSavedException; /// exception caught during unzipping is saved to be thrown during reading
- try
- {
- throw css::uno::RuntimeException("RuntimeException");
- }
- catch (...)
- {
- aSavedException = std::current_exception();
- }
- assert(bool(aSavedException));
- try
- {
- std::rethrow_exception(aSavedException);
- }
- catch (const css::uno::RuntimeException&)
- {
- // the expected case
- aSavedExceptionAny = cppu::getCaughtException();
- }
- catch (...)
- {
- assert(false);
- }
- assert(aSavedExceptionAny.hasValue());
-
- try
- {
- throw css::ucb::InteractiveAugmentedIOException();
- }
- catch (const css::ucb::InteractiveAugmentedIOException&)
- {
- aSavedExceptionAny = cppu::getCaughtException();
- }
- catch (const css::uno::Exception&)
- {
- assert(false);
- }
- catch (...)
- {
- assert(false);
- }
- assert(aSavedExceptionAny.hasValue());
-
- try
- {
- css::ucb::InteractiveAugmentedIOException iaie;
- css::uno::Any aEx = css::uno::makeAny(iaie);
- // css::uno::Exception e;
- // css::uno::Any aEx = css::uno::makeAny(e);
- cppu::throwException(aEx);
- }
- catch (const css::ucb::InteractiveAugmentedIOException&)
- {
- }
- catch (const css::uno::Exception& e)
- {
- assert(false);
- }
- catch (...)
- {
- assert(false);
- }
-}
-
-#endif
-
int ImplSVMain()
{
// The 'real' SVMain()
@@ -271,10 +192,6 @@ int ImplSVMain()
bool bInit = isInitVCL() || InitVCL();
-#ifdef IOS
- testExceptions();
-#endif
-
if( bInit )
{
// call application main