Skip to content

Commit

Permalink
iOS test builds
Browse files Browse the repository at this point in the history
  • Loading branch information
pepone committed Jan 23, 2025
1 parent 14ab117 commit 8bae624
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 214 deletions.
2 changes: 1 addition & 1 deletion config/Make.project.rules
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ endif

#
# We define a secondary target for component[platform-config]. This is necessary
# to allow dependencies to be used as prerequesties. For example, objects for
# to allow dependencies to be used as prerequisites. For example, objects for
# IceSSL[osx-shared] depend on Ice[osx-shared], see make-objects.
#
.PHONY: $5
Expand Down
48 changes: 46 additions & 2 deletions config/Make.rules.Darwin
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ iphoneos_configs = %static
iphoneos_targetdir = /iphoneos
# TODO: disable all install for this platform
iphoneos_installdir = /iphoneos
iphoneos_components = $(xcframeworks)
iphoneos_components = $(xcframeworks) $(iostest_components)
iphoneos_targetrule = $(iostest_targetrule)
iphoneos_excludes = $(iostest_excludes)

iphonesimulator_ar = libtool
iphonesimulator_cc = xcrun -sdk iphonesimulator clang
Expand All @@ -30,7 +32,10 @@ iphonesimulator_configs = %static
iphonesimulator_targetdir = /iphonesimulator
# TODO: disable all install for this platform
iphonesimulator_installdir = /iphonesimulator
iphonesimulator_components = $(xcframeworks)
iphonesimulator_components = $(xcframeworks) $(iostest_components)
iphonesimulator_targetrule = $(iostest_targetrule)
iphonesimulator_excludes = $(iostest_excludes)


ifneq ($(shell command -v brew 2> /dev/null),)
MCPP_HOME ?= $(shell brew --prefix mcpp)
Expand Down Expand Up @@ -113,3 +118,42 @@ icestormadmin[macosx]_system_libs := -ledit -lncurses
Glacier2CryptPermissionsVerifier[macosx]_system_libs := $(Ice[macosx]_system_libs)
Glacier2CryptPermissionsVerifier[iphoneos]_system_libs := $(Ice[iphoneos]_system_libs)
Glacier2CryptPermissionsVerifier[iphonesimulator]_system_libs := $(Ice[iphonesimulator]_system_libs)

is-iostest-program = $(and $(filter-out macosx,$2),$(filter test/%,$1))
iostest_targetrule = $(if $(is-iostest-program),iostest,)

iostest_components = TestCommon \
test/Ice/% \
test/IceSSL/% \
test/IceDiscovery/% \
test/IceLocatorDiscovery/%

iostest_excludes = $(addprefix test/Ice/,\
background \
faultTolerance \
gc \
logger \
properties \
services \
stringConverter \
threadPoolPriority)


#
# Rule to build an iOS bundle for testing (this is used for packaging client/server programs)
#
define make-iostest-program
$2/$1.bundle/Info.plist:
$(Q)if [ ! -f $2/$1.bundle/Info.plist ] ; \
then \
$(MKDIR) -p $2/$1.bundle ; \
sed "s/NAME/$1/" test/ios/bundles/BundleInfo.plist > $2/$1.bundle/Info.plist ; \
fi

$2/$1.bundle/$1.dylib: $5 $2/$1.bundle/Info.plist $(foreach d,$6,$($d_targets))
$(E) "Linking [$8-$9] $$@"
$(Q)$(RM) $2/$1.bundle/$1.dylib
$(Q)$(or $($8_cxx),$(platform_cxx)) -bundle $(LDFLAGS) -o $2/$1.bundle/$1.dylib $5 $(strip $7)
endef

get-iostest-program-targets = $2/$1.bundle/$1.dylib $2/$1.bundle/Info.plist
109 changes: 0 additions & 109 deletions config/Make.xcodesdk.rules

This file was deleted.

5 changes: 2 additions & 3 deletions cpp/config/Make.rules
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ default-configs = shared

-include $(lang_srcdir)/config/Make.rules.$(os)
ifeq ($(os),Darwin)
include $(lang_srcdir)/config/Make.xcodesdk.rules
include $(lang_srcdir)/config/Make.xcframework.rules
endif

Expand Down Expand Up @@ -110,8 +109,8 @@ $1[static]_cppflags += -DICE_STATIC_LIBS $(if $(IceBT_system_libs),-DICE_HAS
$1[static]_dependencies := $(if $(IceBT_system_libs),IceBT)

# Dependencies and target dirs for Xcode SDK test projects
$1[iphoneos-xcodesdk]_targetdir := test/ios/bundles/Bundles-iphoneos/$(subst /,_,$1)
$1[iphonesimulator-xcodesdk]_targetdir := test/ios/bundles/Bundles-iphonesimulator/$(subst /,_,$1)
$1[iphoneos-static]_targetdir := test/ios/bundles/Bundles-iphoneos/$(subst /,_,$1)
$1[iphonesimulator-static]_targetdir := test/ios/bundles/Bundles-iphonesimulator/$(subst /,_,$1)

$(create-test-project)
endef
Expand Down
80 changes: 0 additions & 80 deletions cpp/config/Make.xcodesdk.rules

This file was deleted.

4 changes: 0 additions & 4 deletions cpp/test/IceSSL/configuration/Makefile.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,4 @@ ifeq ($(os),Linux)
$(project)_cppflags += $(if $(filter yes,$(OPTIMIZE)),-fno-var-tracking-assignments)
endif

# Need to load certificates with functions from src/IceSSL/SSLUtil.h
$(test)[iphoneos]_cppflags := -Isrc
$(test)[iphonesimulator]_cppflags := -Isrc

tests += $(project)
Original file line number Diff line number Diff line change
Expand Up @@ -371,21 +371,20 @@
DEVELOPMENT_TEAM = U4TBVKNQ7F;
ENABLE_BITCODE = NO;
GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
);
GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1";
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
HEADER_SEARCH_PATHS = (
../../include,
"../../../../sdk/$(PLATFORM_NAME).sdk/usr/include",
../../../include,
../../../include/generated,
);
INFOPLIST_FILE = Bundle/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles";
LIBRARY_SEARCH_PATHS = "../../../../sdk/$(PLATFORM_NAME).sdk/usr/lib";
LIBRARY_SEARCH_PATHS = "../../../lib/$(PLATFORM_NAME)";
MACOSX_DEPLOYMENT_TARGET = 10.12;
MTL_ENABLE_DEBUG_INFO = YES;
OTHER_LDFLAGS = (
"-L../../Common/build/$(PLATFORM_NAME)/xcodesdk",
"-L../../Common/build/$(PLATFORM_NAME)/static",
"-lTestCommon",
"-lIceDiscovery",
"-lIce",
Expand All @@ -411,15 +410,16 @@
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
HEADER_SEARCH_PATHS = (
../../include,
"../../../../sdk/$(PLATFORM_NAME).sdk/usr/include",
../../../include,
../../../include/generated,
);
INFOPLIST_FILE = Bundle/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles";
LIBRARY_SEARCH_PATHS = "../../../../sdk/$(PLATFORM_NAME).sdk/usr/lib";
LIBRARY_SEARCH_PATHS = "../../../lib/$(PLATFORM_NAME)";
MACOSX_DEPLOYMENT_TARGET = 10.12;
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_LDFLAGS = (
"-L../../Common/build/$(PLATFORM_NAME)/xcodesdk",
"-L../../Common/build/$(PLATFORM_NAME)/static",
"-lTestCommon",
"-lIceDiscovery",
"-lIce",
Expand Down Expand Up @@ -447,10 +447,10 @@
"$(inherited)",
"@executable_path/Frameworks",
);
LIBRARY_SEARCH_PATHS = "../../../../sdk/$(PLATFORM_NAME).sdk/usr/lib";
LIBRARY_SEARCH_PATHS = "../../../lib/$(PLATFORM_NAME)";
OTHER_CFLAGS = "-fobjc-arc-exceptions";
OTHER_LDFLAGS = (
"-L../../Common/build/$(PLATFORM_NAME)/xcodesdk",
"-L../../Common/build/$(PLATFORM_NAME)/static",
"-lTestCommon",
"-lIce",
"-lIceDiscovery",
Expand All @@ -477,10 +477,10 @@
"$(inherited)",
"@executable_path/Frameworks",
);
LIBRARY_SEARCH_PATHS = "../../../../sdk/$(PLATFORM_NAME).sdk/usr/lib";
LIBRARY_SEARCH_PATHS = "../../../lib/$(PLATFORM_NAME)";
OTHER_CFLAGS = "-fobjc-arc-exceptions";
OTHER_LDFLAGS = (
"-L../../Common/build/$(PLATFORM_NAME)/xcodesdk",
"-L../../Common/build/$(PLATFORM_NAME)/static",
"-lTestCommon",
"-lIce",
"-lIceDiscovery",
Expand All @@ -499,7 +499,7 @@
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LANGUAGE_STANDARD = "c++20";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
Expand Down Expand Up @@ -552,7 +552,7 @@
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LANGUAGE_STANDARD = "c++20";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
Expand Down

0 comments on commit 8bae624

Please sign in to comment.