2 all: harness.exe appbuilder.exe test-runner.exe
4 BCL_DIR
= ..
/out
/ios-bcl
/monotouch
5 XCODE_ROOT
=$(shell xcode-select
-p
)
6 SYSROOT
=$(XCODE_ROOT
)/Platforms
/iPhoneOS.platform
/Developer
/SDKs
/iPhoneOS.sdk
8 NINJA_PATH
:=$(or
$(shell which ninja
),$(error
"ninja not found, install it using 'brew install ninja'."))
9 IOS_DEPLOY_PATH
:=$(or
$(shell which ios-deploy
),$(error
"ios-deploy not found, install it using 'brew install ios-deploy'."))
11 # Default to add-hoc signing
12 IOS_SIGNING_IDENTITY ?
= -
20 System.Runtime.Serialization \
22 System.IO.Compression \
23 System.IO.Compression.FileSystem \
25 System.ComponentModel.DataAnnotations \
28 System.ServiceModel.Web \
32 # Compiling but has failures
33 TEST_SUITES_COMPILING
= \
39 # Not compiling in monotouch profile
40 TEST_SUITES_NOTCOMPILING
= \
44 SIM_NAME
= xamarin.ios-sdk.sim
46 OPTIONS_CS
= ..
/..
/mcs
/class
/Mono.Options
//Mono.Options
/Options.cs
48 harness.exe
: harness
/harness.cs
$(OPTIONS_CS
)
49 csc
/out
:$@
-r
:System.Json.dll
$^
51 appbuilder.exe
: appbuilder
/appbuilder.cs
$(OPTIONS_CS
)
54 test-runner.exe
: test-runner
/runner.cs
55 csc
/out
:$@
-r
:$(BCL_DIR
)/nunitlite.dll
-r
:$(BCL_DIR
)/Mono.Security.dll test-runner
/runner.cs
63 # Build % from assemblies %_ASSEMBLIES
64 # The end result is in bin/ios-sim/test-%.app
66 TEST_ASSEMBLIES
= $(BCL_DIR
)/mscorlib.dll \
67 $(BCL_DIR
)/System.dll \
68 $(BCL_DIR
)/System.Xml.dll \
69 $(BCL_DIR
)/System.Core.dll \
71 $(BCL_DIR
)/I18N.West.dll \
72 $(BCL_DIR
)/Mono.Simd.dll \
73 $(BCL_DIR
)/Mono.Security.dll \
74 $(BCL_DIR
)/System.Numerics.dll \
75 $(BCL_DIR
)/System.Numerics.Vectors.dll \
76 $(BCL_DIR
)/nunitlite.dll \
79 build-ios-sim-
%: appbuilder.exe test-runner.exe runtime
/runtime
$($*_ASSEMBLIES
)
80 mono appbuilder.exe
--target ios-sim64
--mono-sdkdir
$(abspath ..
/out
) --appdir
$(abspath bin
/ios-sim
/test-
$*.app
) --runtimedir
$(abspath runtime
) --builddir
$(abspath obj
/ios-sim
/test-
$*.app
) --sysroot
$(SYSROOT
) --signing-identity
- --bundle-executable test-
$* --bundle-identifier com.xamarin.mono.ios.test-
$* --bundle-name test-
$* $(patsubst %,-r
%,$(TEST_ASSEMBLIES
) $($*_ASSEMBLIES
))
81 mkdir
-p bin
/ios-sim
/test-
$*.app
82 ninja
-C obj
/ios-sim
/test-
$*.app
-v
85 APPBUILDER_ARGS
+= --llvm
89 APPBUILDER_ARGS
+= --interp-only
93 APPBUILDER_ARGS
+= --interp-mixed
96 ifdef IOS_PROVISIONING_PROFILE
97 APPBUILDER_ARGS
+= --profile
$(abspath
$(IOS_PROVISIONING_PROFILE
))
101 # This enables caching of aot outputs between different apps.
102 # Changes to the assemblies/runtimes etc. are not detected, so this should only
103 # be used when compiling multiple apps with the same assemblies, i.e. the -all
106 ifdef ENABLE_AOT_CACHE
107 APPBUILDER_ARGS
+= --aot-cachedir
$(abspath aot-cache
)
110 build-ios-dev-
%: appbuilder.exe test-runner.exe runtime
/libmonoios.a
$($*_ASSEMBLIES
)
112 mono appbuilder.exe
$(APPBUILDER_ARGS
) --target ios-dev64
--mono-sdkdir
$(abspath ..
/out
) --appdir
$(abspath bin
/ios-dev
/test-
$*.app
) --runtimedir
$(abspath runtime
) --builddir
$(abspath obj
/ios-dev
/test-
$*.app
) --sysroot
$(SYSROOT
) --signing-identity
"$(IOS_SIGNING_IDENTITY)" --bundle-executable test-
$* --bundle-identifier com.xamarin.mono.ios.test-
$* --bundle-name test-
$* --exe test-runner.exe
$(patsubst %,-r
%,$(TEST_ASSEMBLIES
) $($*_ASSEMBLIES
))
113 mkdir
-p bin
/ios-dev
/test-
$*.app
114 ninja
-C obj
/ios-dev
/test-
$*.app
-v
118 $(RM
) -rf obj
/ios-sim
/test-
$*.app bin
/ios-sim
/test-
$*.app
121 $(RM
) -rf obj
/ios-dev
/test-
$*.app bin
/ios-dev
/test-
$*.app
123 # Install and run % on the simulator with args $(ARGS) %_ARGS
124 run-ios-sim-
%: harness.exe
125 mono harness.exe
--start-sim
126 xcrun simctl
install $(SIM_NAME
) bin
/ios-sim
/test-
$*.app
127 mono harness.exe
--run-sim
--logfile ios-sim-
$*.log
--bundle-id com.xamarin.mono.ios.test-
$* --bundle-dir bin
/ios-sim
/test-
$*.app
$(ARGS
) $($*_ARGS
)
129 run-ios-dev-
%: harness.exe test-runner.exe
130 mono harness.exe
--run-dev
--logfile ios-dev-
$*.log
--bundle-dir bin
/ios-dev
/test-
$*.app
$(ARGS
) $($*_ARGS
)
133 $(MAKE
) -C runtime
clean
134 $(RM
) -rf bin obj
*.exe
*.log aot-cache
137 for suite in
$(TEST_SUITES
); do
$(MAKE
) build-ios-sim-
$$suite || exit
1; $(MAKE
) run-ios-sim-
$$suite || exit
1; done
141 for suite in
$(TEST_SUITES
); do
$(MAKE
) clean-ios-dev-
$$suite; $(MAKE
) build-ios-dev-
$$suite ENABLE_AOT_CACHE
=1 || exit
1; done
143 build-ios-dev-llvm-all
:
145 for suite in
$(TEST_SUITES
); do echo
"*** $$suite ***"; $(MAKE
) clean-ios-dev-
$$suite; $(MAKE
) build-ios-dev-
$$suite LLVM
=1 ENABLE_AOT_CACHE
=1 || exit
1; done
147 build-ios-dev-interp-only-all
:
149 for suite in
$(TEST_SUITES
); do echo
"*** $$suite ***"; $(MAKE
) clean-ios-dev-
$$suite; $(MAKE
) build-ios-dev-
$$suite INTERP_ONLY
=1 ENABLE_AOT_CACHE
=1 || exit
1; done
151 build-ios-dev-interp-mixed-all
:
153 for suite in
$(TEST_SUITES
); do echo
"*** $$suite ***"; $(MAKE
) clean-ios-dev-
$$suite; $(MAKE
) build-ios-dev-
$$suite INTERP_MIXED
=1 ENABLE_AOT_CACHE
=1 || exit
1; done
156 for suite in
$(TEST_SUITES
); do
$(MAKE
) run-ios-dev-
$$suite || exit
1; done
158 # Developer targets, ignore
159 # 'launch' doesn't propagate the error code
160 # With ios11, --console doesn't work any more, it makes the app deadlock
161 # Install % on the simulator
163 xcrun simctl
install $(SIM_NAME
) bin
/ios-sim
/test-
$*.app
165 run-ios-sim-direct-
%:
166 xcrun simctl terminate
$(SIM_NAME
) com.xamarin.mono.ios.test-
$*
167 xcrun simctl launch
$(SIM_NAME
) com.xamarin.mono.ios.test-
$* $(ARGS
) $($*_ARGS
)
168 log stream
--level debug
--predicate
'senderImagePath contains "$*"' --style compact
171 xcrun simctl create
$(SIM_NAME
) 'iPhone 7' com.apple.CoreSimulator.SimRuntime.iOS-11-1
174 xcrun simctl boot
$(SIM_NAME
)
177 xcrun simctl shutdown
$(SIM_NAME
)
179 # CONNSTR will be replace by the harness with the real connection string
180 NUNIT
= test-runner.exe CONNSTR
-exclude
:MobileNotWorking
,NotOnMac
,NotWorking
,CAS
,InetAccess
,NotWorkingLinqInterpreter
-labels
181 TESTDIR
= $(BCL_DIR
)/tests
183 # Options for each test
184 Mono.Runtime.Tests_ASSEMBLIES
= $(TESTDIR
)/monotouch_Mono.Runtime.Tests_test.dll
185 Mono.Runtime.Tests_ARGS
= $(NUNIT
) monotouch_Mono.Runtime.Tests_test.dll
186 corlib_ASSEMBLIES
= $(TESTDIR
)/monotouch_corlib_test.dll
187 corlib_ARGS
= $(NUNIT
) monotouch_corlib_test.dll
188 System.Core_ASSEMBLIES
= $(TESTDIR
)/monotouch_System.Core_test.dll
189 System.Core_ARGS
= $(NUNIT
) monotouch_System.Core_test.dll
190 System_ASSEMBLIES
= $(TESTDIR
)/monotouch_System_test.dll
$(BCL_DIR
)/Mono.Security.dll
191 System_ARGS
= $(NUNIT
) monotouch_System_test.dll
192 System.Data_ASSEMBLIES
= $(BCL_DIR
)/System.Data.dll
$(BCL_DIR
)/System.Transactions.dll
$(TESTDIR
)/monotouch_System.Data_test.dll
193 System.Data_ARGS
= $(NUNIT
) monotouch_System.Data_test.dll
194 System.Net.Http_ASSEMBLIES
= $(BCL_DIR
)/System.Net.Http.dll
$(TESTDIR
)/monotouch_System.Net.Http_test.dll
195 System.Net.Http_ARGS
= $(NUNIT
) monotouch_System.Net.Http_test.dll
196 System.Numerics_ASSEMBLIES
= $(TESTDIR
)/monotouch_System.Numerics_test.dll
197 System.Numerics_ARGS
= $(NUNIT
) monotouch_System.Numerics_test.dll
198 System.Runtime.Serialization_ASSEMBLIES
= $(BCL_DIR
)/System.Runtime.Serialization.dll
$(BCL_DIR
)/System.ServiceModel.dll
$(BCL_DIR
)/System.ServiceModel.Internals.dll
$(TESTDIR
)/monotouch_System.Runtime.Serialization_test.dll
199 System.Runtime.Serialization_ARGS
= $(NUNIT
) monotouch_System.Runtime.Serialization_test.dll
200 System.Transactions_ASSEMBLIES
= $(BCL_DIR
)/System.Transactions.dll
$(TESTDIR
)/monotouch_System.Transactions_test.dll
201 System.Transactions_ARGS
= $(NUNIT
) monotouch_System.Transactions_test.dll
202 System.IO.Compression_ASSEMBLIES
= $(BCL_DIR
)/System.IO.Compression.dll
$(TESTDIR
)/monotouch_System.IO.Compression_test.dll
203 System.IO.Compression_ARGS
= $(NUNIT
) monotouch_System.IO.Compression_test.dll
204 System.IO.Compression.FileSystem_ASSEMBLIES
= $(BCL_DIR
)/System.IO.Compression.FileSystem.dll
$(BCL_DIR
)/System.IO.Compression.dll
$(TESTDIR
)/monotouch_System.IO.Compression.FileSystem_test.dll
205 System.IO.Compression.FileSystem_ARGS
= $(NUNIT
) monotouch_System.IO.Compression.FileSystem_test.dll
206 Mono.CSharp_ASSEMBLIES
= $(BCL_DIR
)/Mono.CSharp.dll
$(TESTDIR
)/monotouch_Mono.CSharp_test.dll
207 Mono.CSharp_ARGS
= $(NUNIT
) monotouch_Mono.CSharp_test.dll
208 System.Json_ASSEMBLIES
= $(BCL_DIR
)/System.Json.dll
$(TESTDIR
)/monotouch_System.Json_test.dll
209 System.Json_ARGS
= $(NUNIT
) monotouch_System.Json_test.dll
210 System.ComponentModel.DataAnnotations_ASSEMBLIES
= $(BCL_DIR
)/System.ComponentModel.DataAnnotations.dll
$(TESTDIR
)/monotouch_System.ComponentModel.DataAnnotations_test.dll
211 System.ComponentModel.DataAnnotations_ARGS
= $(NUNIT
) monotouch_System.ComponentModel.DataAnnotations_test.dll
212 Mono.Data.Sqlite_ASSEMBLIES
= $(BCL_DIR
)/Mono.Data.Sqlite.dll
$(TESTDIR
)/monotouch_Mono.Data.Sqlite_test.dll
213 Mono.Data.Sqlite_ARGS
= $(NUNIT
) monotouch_Mono.Data.Sqlite_test.dll
214 Mono.Data.Tds_ASSEMBLIES
= $(BCL_DIR
)/Mono.Data.Tds.dll
$(TESTDIR
)/monotouch_Mono.Data.Tds_test.dll
215 Mono.Data.Tds_ARGS
= $(NUNIT
) monotouch_Mono.Data.Tds_test.dll
216 System.Security_ASSEMBLIES
= $(BCL_DIR
)/System.Security.dll
$(TESTDIR
)/monotouch_System.Security_test.dll
217 System.Security_ARGS
= $(NUNIT
) monotouch_System.Security_test.dll
218 System.Xml_ASSEMBLIES
= $(BCL_DIR
)/System.Xml.dll
$(TESTDIR
)/monotouch_System.Xml_test.dll
219 System.Xml_ARGS
= $(NUNIT
) monotouch_System.Xml_test.dll
220 System.Xml.Linq_ASSEMBLIES
= $(BCL_DIR
)/System.Xml.Linq.dll
$(TESTDIR
)/monotouch_System.Xml.Linq_test.dll
221 System.Xml.Linq_ARGS
= $(NUNIT
) monotouch_System.Xml.Linq_test.dll
222 Mono.Security_ASSEMBLIES
= $(TESTDIR
)/monotouch_Mono.Security_test.dll
223 Mono.Security_ARGS
= $(NUNIT
) monotouch_Mono.Security_test.dll
224 System.ServiceModel.Web_ASSEMBLIES
= $(BCL_DIR
)/System.ServiceModel.Web.dll
$(BCL_DIR
)/System.ServiceModel.dll
$(BCL_DIR
)/System.ServiceModel.Internals.dll
$(BCL_DIR
)/System.IdentityModel.dll
$(BCL_DIR
)/System.Runtime.Serialization.dll
$(TESTDIR
)/monotouch_System.ServiceModel.Web_test.dll
225 System.ServiceModel.Web_ARGS
= $(NUNIT
) monotouch_System.ServiceModel.Web_test.dll
226 System.Web.Services_ASSEMBLIES
= $(BCL_DIR
)/System.Web.Services.dll
$(TESTDIR
)/monotouch_System.Web.Services_test.dll
227 System.Web.Services_ARGS
= $(NUNIT
) monotouch_System.Web.Services_test.dll