summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2012-02-20 23:21:40 +0200
committerTor Lillqvist <tml@iki.fi>2012-02-21 14:19:46 +0200
commit747257231e652b75a3fb2ec63d4df114f0aff37a (patch)
treeb858685ea67becc3ab98c6c8a4e9770996b9660e
parentfcba36f1093935b9bbf0735661bb8e5b4f5a8671 (diff)
Rethink cppunittest "plugins" for iOS, more to come
-rw-r--r--solenv/gbuild/CppunitTest.mk2
-rw-r--r--solenv/gbuild/LinkTarget.mk2
-rw-r--r--solenv/gbuild/Module.mk12
-rw-r--r--solenv/gbuild/extensions/post_DisableIosUnitchecks.mk35
-rw-r--r--solenv/gbuild/platform/IOS_ARM_GCC.mk16
5 files changed, 6 insertions, 61 deletions
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index 15e5aa161b63..e4065bd04189 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -51,7 +51,9 @@ endif
# gb_CppunitTest_TARGETTYPE
# gb_CppunitTest_get_filename
# DBGSV_ERROR_OUT => in non-product builds, ensure that tools-based assertions do not pop up as message box, but are routed to the shell
+ifneq ($(OS),IOS)
gb_CppunitTest_CPPTESTTARGET := $(call gb_Executable_get_target,cppunit/cppunittester)
+endif
gb_CppunitTest__get_linktargetname = CppunitTest/$(call gb_CppunitTest_get_filename,$(1))
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 3edc66fa490e..555a8057f69e 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -830,7 +830,9 @@ endef
define gb_LinkTarget_add_linktarget_objects
$(call gb_LinkTarget_get_target,$(1)) : $(foreach linktarget,$(2),$(call gb_LinkTarget_get_target,$(linktarget)))
+ifneq ($(OS),IOS)
$(call gb_LinkTarget_get_target,$(1)) : EXTRAOBJECTLISTS += $(foreach linktarget,$(2),$(call gb_LinkTarget_get_objects_list,$(linktarget)))
+endif
endef
diff --git a/solenv/gbuild/Module.mk b/solenv/gbuild/Module.mk
index f93b2775e206..64d7d134bcd7 100644
--- a/solenv/gbuild/Module.mk
+++ b/solenv/gbuild/Module.mk
@@ -214,18 +214,6 @@ $(call gb_Module_get_clean_target,$(1)) : $$(gb_Module_CURRENTCLEANTARGET)
endef
-# We don't build normal unit test dynamic libraries (CppUnit
-# "plugins") for iOS, but instead statically linked unit test
-# executables, so make gb_Module_add_check_target a no-op for iOS.
-
-# As such we could build normal "plugins", as dynamic loading of
-# modules presumably does work on iOS, it is just not allowed in apps
-# distributed through the App Store. Unit testing at LO development
-# time obviously is not anything that would be distributed as
-# apps. But let's not, as we have to make this stuff work without
-# dynamic loading anyway if the App Store is an eventual target, and
-# why shouldn't it be.
-
define gb_Module_add_check_target
$(call gb_Module__read_targetfile,$(1),$(2),check target)
diff --git a/solenv/gbuild/extensions/post_DisableIosUnitchecks.mk b/solenv/gbuild/extensions/post_DisableIosUnitchecks.mk
deleted file mode 100644
index 53eb67d563bf..000000000000
--- a/solenv/gbuild/extensions/post_DisableIosUnitchecks.mk
+++ /dev/null
@@ -1,35 +0,0 @@
-# -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-#
-# Version: MPL 1.1 / GPLv3+ / LGPLv3+
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License or as specified alternatively below. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# Major Contributor(s):
-# [ Copyright (C) 2011 Bjoern Michaelsen <bjoern.michaelsen@canonical.com> (initial developer) ]
-#
-# All Rights Reserved.
-#
-# For minor contributions see the git repository.
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
-# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
-# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
-# instead of those above.
-
-# disable check target on IOS
-ifeq ($(OS),IOS)
-gb_Module_add_check_target=
-gb_Module_add_slowcheck_target=
-endif
-
-
-# vim:set shiftwidth=4 softtabstop=4 noexpandtab:
diff --git a/solenv/gbuild/platform/IOS_ARM_GCC.mk b/solenv/gbuild/platform/IOS_ARM_GCC.mk
index 429d7dd221ef..e72c20dff3bc 100644
--- a/solenv/gbuild/platform/IOS_ARM_GCC.mk
+++ b/solenv/gbuild/platform/IOS_ARM_GCC.mk
@@ -183,8 +183,7 @@ endef
define gb_LinkTarget__command
$(call gb_Output_announce,$(2),$(true),LNK,4)
-$(if $(filter CppunitTest Executable,$(TARGETTYPE)),$(call gb_LinkTarget__command_dynamiclink,$(1),$(2)))
-$(if $(filter Library StaticLibrary,$(TARGETTYPE)),$(call gb_LinkTarget__command_staticlink,$(1)))
+$(call gb_LinkTarget__command_staticlink,$(1))
endef
@@ -276,7 +275,7 @@ endef
gb_CppunitTest_CPPTESTPRECOMMAND := :
gb_CppunitTest_SYSPRE := libtest_
-gb_CppunitTest_EXT := .dylib
+gb_CppunitTest_EXT := .a
gb_CppunitTest_LIBDIR := $(gb_Helper_OUTDIRLIBDIR)
gb_CppunitTest_get_filename = $(gb_CppunitTest_SYSPRE)$(1)$(gb_CppunitTest_EXT)
gb_CppunitTest_get_libfilename = $(gb_CppunitTest_get_filename)
@@ -286,17 +285,6 @@ $(call gb_LinkTarget_get_target,$(2)) : LAYER := NONE
endef
-# JunitTest class
-
-define gb_JunitTest_JunitTest_platform
-$(call gb_JunitTest_get_target,$(1)) : DEFS := \
- -Dorg.openoffice.test.arg.soffice="$$$${OOO_TEST_SOFFICE:-path:$(OUTDIR)/installation/opt/LibreOffice.app/Contents/MacOS/soffice}" \
- -Dorg.openoffice.test.arg.env=DYLD_LIBRARY_PATH \
- -Dorg.openoffice.test.arg.user=file://$(call gb_JunitTest_get_userdir,$(1)) \
- -Dorg.openoffice.test.arg.workdir=$(call gb_JunitTest_get_userdir,$(1)) \
-
-endef
-
# Python
gb_PYTHON_PRECOMMAND := DYLD_LIBRARY_PATH=$(OUTDIR_FOR_BUILD)/lib