Kaydet (Commit) 74725723 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Rethink cppunittest "plugins" for iOS, more to come

üst fcba36f1
......@@ -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))
......
......@@ -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
......
......@@ -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)
......
# -*- 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:
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment