2 all: harness.exe appbuilder.exe test-runner.exe
4 BCL_DIR
= ..
/..
/mcs
/class
/lib
/monotouch
5 XCODE_ROOT
=$(shell xcode-select
-p
)
6 SYSROOT
=$(XCODE_ROOT
)/Platforms
/iPhoneOS.platform
/Developer
/SDKs
/iPhoneOS.sdk
8 NINJA_PATH
:=$(shell which ninja
)
10 $(error
"ninja not found, install it using 'brew install ninja'.")
13 IOS_DEPLOY_PATH
:=$(shell which ios-deploy
)
14 ifeq ($(IOS_DEPLOY_PATH
),)
15 $(error
"ios-deploy not found, install it using 'brew install ios-deploy'.")
18 # Default to add-hoc signing
19 IOS_SIGNING_IDENTITY ?
= -
27 System.Runtime.Serialization \
29 System.IO.Compression \
30 System.IO.Compression.FileSystem \
32 System.ComponentModel.DataAnnotations \
35 System.ServiceModel.Web \
39 # Compiling but has failures
40 TEST_SUITES_COMPILING
= \
46 # Not compiling in monotouch profile
47 TEST_SUITES_NOTCOMPILING
= \
51 SIM_NAME
= xamarin.ios-sdk.sim
53 OPTIONS_CS
= ..
/..
/mcs
/class
/Mono.Options
//Mono.Options
/Options.cs
55 harness.exe
: harness
/harness.cs
$(OPTIONS_CS
)
56 csc
/out
:$@
-r
:System.Json.dll
$^
58 appbuilder.exe
: appbuilder
/appbuilder.cs
$(OPTIONS_CS
)
61 test-runner.exe
: test-runner
/runner.cs
62 csc
/out
:$@
-r
:$(BCL_DIR
)/nunitlite.dll
-r
:$(BCL_DIR
)/Mono.Security.dll test-runner
/runner.cs
70 # Build % from assemblies %_ASSEMBLIES
71 # The end result is in bin/ios-sim/test-%.app
73 TEST_ASSEMBLIES
= $(BCL_DIR
)/mscorlib.dll \
74 $(BCL_DIR
)/System.dll \
75 $(BCL_DIR
)/System.Xml.dll \
76 $(BCL_DIR
)/System.Core.dll \
78 $(BCL_DIR
)/I18N.West.dll \
79 $(BCL_DIR
)/Mono.Simd.dll \
80 $(BCL_DIR
)/Mono.Security.dll \
81 $(BCL_DIR
)/System.Numerics.dll \
82 $(BCL_DIR
)/System.Numerics.Vectors.dll \
83 $(BCL_DIR
)/nunitlite.dll \
86 build-ios-sim-
%: appbuilder.exe test-runner.exe runtime
/runtime
$($*_ASSEMBLIES
)
87 mono appbuilder.exe
--target ios-sim64
--mono-sdkdir
$(PWD
)/..
/out
--appdir
$(PWD
)/bin
/ios-sim
/test-
$*.app
--runtimedir
$(PWD
)/runtime
--builddir 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
))
88 mkdir
-p
$(PWD
)/bin
/ios-sim
/test-
$*.app
89 ninja
-C obj
/ios-sim
/test-
$*.app
-v
92 APPBUILDER_ARGS
+= --llvm
96 APPBUILDER_ARGS
+= --interp-only
100 APPBUILDER_ARGS
+= --interp-mixed
103 ifdef IOS_PROVISIONING_PROFILE
104 APPBUILDER_ARGS
+= --profile
$(abspath
$(IOS_PROVISIONING_PROFILE
))
108 # This enables caching of aot outputs between different apps.
109 # Changes to the assemblies/runtimes etc. are not detected, so this should only
110 # be used when compiling multiple apps with the same assemblies, i.e. the -all
113 ifdef ENABLE_AOT_CACHE
114 APPBUILDER_ARGS
+= --aot-cachedir
$(PWD
)/aot-cache
117 build-ios-dev-
%: appbuilder.exe test-runner.exe runtime
/libmonoios.a
$($*_ASSEMBLIES
)
118 mkdir
-p
$(PWD
)/aot-cache
119 mono appbuilder.exe
$(APPBUILDER_ARGS
) --target ios-dev64
--mono-sdkdir
$(PWD
)/..
/out
--appdir
$(PWD
)/bin
/ios-dev
/test-
$*.app
--runtimedir
$(PWD
)/runtime
--builddir 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
))
120 mkdir
-p
$(PWD
)/bin
/ios-dev
/test-
$*.app
121 ninja
-C obj
/ios-dev
/test-
$*.app
-v
125 $(RM
) -rf obj
/ios-sim
/test-
$*.app bin
/ios-sim
/test-
$*.app
128 $(RM
) -rf obj
/ios-dev
/test-
$*.app bin
/ios-dev
/test-
$*.app
130 # Install and run % on the simulator with args $(ARGS) %_ARGS
131 run-ios-sim-
%: harness.exe
132 mono harness.exe
--start-sim
133 xcrun simctl
install $(SIM_NAME
) bin
/ios-sim
/test-
$*.app
134 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
)
136 run-ios-dev-
%: harness.exe test-runner.exe
137 mono harness.exe
--run-dev
--logfile ios-dev-
$*.log
--bundle-dir bin
/ios-dev
/test-
$*.app
$(ARGS
) $($*_ARGS
)
140 $(MAKE
) -C runtime
clean
141 $(RM
) -rf bin obj
*.exe
*.log aot-cache
143 # Compile all the test assemblies
145 for suite in
$(TEST_SUITES
) $(TEST_SUITES_COMPILING
); do make
-C ..
/..
/mcs
/class
/$$suite PROFILE
=monotouch
test || exit
1; done
148 for suite in
$(TEST_SUITES
); do make build-ios-sim-
$$suite || exit
1; make run-ios-sim-
$$suite || exit
1; done
152 for suite in
$(TEST_SUITES
); do make clean-ios-dev-
$$suite; make build-ios-dev-
$$suite ENABLE_AOT_CACHE
=1 || exit
1; done
154 build-ios-dev-llvm-all
:
156 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
158 build-ios-dev-interp-only-all
:
160 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
162 build-ios-dev-interp-mixed-all
:
164 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
167 for suite in
$(TEST_SUITES
); do make run-ios-dev-
$$suite || exit
1; done
169 # Developer targets, ignore
170 # 'launch' doesn't propagate the error code
171 # With ios11, --console doesn't work any more, it makes the app deadlock
172 # Install % on the simulator
174 xcrun simctl
install $(SIM_NAME
) bin
/ios-sim
/test-
$*.app
176 run-ios-sim-direct-
%:
177 xcrun simctl terminate
$(SIM_NAME
) com.xamarin.mono.ios.test-
$*
178 xcrun simctl launch
$(SIM_NAME
) com.xamarin.mono.ios.test-
$* $(ARGS
) $($*_ARGS
)
179 log stream
--level debug
--predicate
'senderImagePath contains "$*"' --style compact
182 xcrun simctl create
$(SIM_NAME
) 'iPhone 7' com.apple.CoreSimulator.SimRuntime.iOS-11-1
185 xcrun simctl boot
$(SIM_NAME
)
188 xcrun simctl shutdown
$(SIM_NAME
)
190 # CONNSTR will be replace by the harness with the real connection string
191 NUNIT
= test-runner.exe CONNSTR
-exclude
:MobileNotWorking
,NotOnMac
,NotWorking
,ValueAdd
,CAS
,InetAccess
,NotWorkingLinqInterpreter
-labels
192 TESTDIR
= $(BCL_DIR
)/tests
194 # Options for each test
195 Mono.Runtime.Tests_ASSEMBLIES
= $(TESTDIR
)/monotouch_Mono.Runtime.Tests_test.dll
196 Mono.Runtime.Tests_ARGS
= $(NUNIT
) monotouch_Mono.Runtime.Tests_test.dll
197 corlib_ASSEMBLIES
= $(TESTDIR
)/monotouch_corlib_test.dll
198 corlib_ARGS
= $(NUNIT
) monotouch_corlib_test.dll
199 System.Core_ASSEMBLIES
= $(TESTDIR
)/monotouch_System.Core_test.dll
200 System.Core_ARGS
= $(NUNIT
) monotouch_System.Core_test.dll
201 System_ASSEMBLIES
= $(TESTDIR
)/monotouch_System_test.dll
$(BCL_DIR
)/Mono.Security.dll
202 System_ARGS
= $(NUNIT
) monotouch_System_test.dll
203 System.Data_ASSEMBLIES
= $(BCL_DIR
)/System.Data.dll
$(BCL_DIR
)/System.Transactions.dll
$(TESTDIR
)/monotouch_System.Data_test.dll
204 System.Data_ARGS
= $(NUNIT
) monotouch_System.Data_test.dll
205 System.Net.Http_ASSEMBLIES
= $(BCL_DIR
)/System.Net.Http.dll
$(TESTDIR
)/monotouch_System.Net.Http_test.dll
206 System.Net.Http_ARGS
= $(NUNIT
) monotouch_System.Net.Http_test.dll
207 System.Numerics_ASSEMBLIES
= $(TESTDIR
)/monotouch_System.Numerics_test.dll
208 System.Numerics_ARGS
= $(NUNIT
) monotouch_System.Numerics_test.dll
209 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
210 System.Runtime.Serialization_ARGS
= $(NUNIT
) monotouch_System.Runtime.Serialization_test.dll
211 System.Transactions_ASSEMBLIES
= $(BCL_DIR
)/System.Transactions.dll
$(TESTDIR
)/monotouch_System.Transactions_test.dll
212 System.Transactions_ARGS
= $(NUNIT
) monotouch_System.Transactions_test.dll
213 System.IO.Compression_ASSEMBLIES
= $(BCL_DIR
)/System.IO.Compression.dll
$(TESTDIR
)/monotouch_System.IO.Compression_test.dll
214 System.IO.Compression_ARGS
= $(NUNIT
) monotouch_System.IO.Compression_test.dll
215 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
216 System.IO.Compression.FileSystem_ARGS
= $(NUNIT
) monotouch_System.IO.Compression.FileSystem_test.dll
217 Mono.CSharp_ASSEMBLIES
= $(BCL_DIR
)/Mono.CSharp.dll
$(TESTDIR
)/monotouch_Mono.CSharp_test.dll
218 Mono.CSharp_ARGS
= $(NUNIT
) monotouch_Mono.CSharp_test.dll
219 System.Json_ASSEMBLIES
= $(BCL_DIR
)/System.Json.dll
$(TESTDIR
)/monotouch_System.Json_test.dll
220 System.Json_ARGS
= $(NUNIT
) monotouch_System.Json_test.dll
221 System.ComponentModel.DataAnnotations_ASSEMBLIES
= $(BCL_DIR
)/System.ComponentModel.DataAnnotations.dll
$(TESTDIR
)/monotouch_System.ComponentModel.DataAnnotations_test.dll
222 System.ComponentModel.DataAnnotations_ARGS
= $(NUNIT
) monotouch_System.ComponentModel.DataAnnotations_test.dll
223 Mono.Data.Sqlite_ASSEMBLIES
= $(BCL_DIR
)/Mono.Data.Sqlite.dll
$(TESTDIR
)/monotouch_Mono.Data.Sqlite_test.dll
224 Mono.Data.Sqlite_ARGS
= $(NUNIT
) monotouch_Mono.Data.Sqlite_test.dll
225 Mono.Data.Tds_ASSEMBLIES
= $(BCL_DIR
)/Mono.Data.Tds.dll
$(TESTDIR
)/monotouch_Mono.Data.Tds_test.dll
226 Mono.Data.Tds_ARGS
= $(NUNIT
) monotouch_Mono.Data.Tds_test.dll
227 System.Security_ASSEMBLIES
= $(BCL_DIR
)/System.Security.dll
$(TESTDIR
)/monotouch_System.Security_test.dll
228 System.Security_ARGS
= $(NUNIT
) monotouch_System.Security_test.dll
229 System.Xml_ASSEMBLIES
= $(BCL_DIR
)/System.Xml.dll
$(TESTDIR
)/monotouch_System.Xml_test.dll
230 System.Xml_ARGS
= $(NUNIT
) monotouch_System.Xml_test.dll
231 System.Xml.Linq_ASSEMBLIES
= $(BCL_DIR
)/System.Xml.Linq.dll
$(TESTDIR
)/monotouch_System.Xml.Linq_test.dll
232 System.Xml.Linq_ARGS
= $(NUNIT
) monotouch_System.Xml.Linq_test.dll
233 Mono.Security_ASSEMBLIES
= $(TESTDIR
)/monotouch_Mono.Security_test.dll
234 Mono.Security_ARGS
= $(NUNIT
) monotouch_Mono.Security_test.dll
235 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
236 System.ServiceModel.Web_ARGS
= $(NUNIT
) monotouch_System.ServiceModel.Web_test.dll
237 System.Web.Services_ASSEMBLIES
= $(BCL_DIR
)/System.Web.Services.dll
$(TESTDIR
)/monotouch_System.Web.Services_test.dll
238 System.Web.Services_ARGS
= $(NUNIT
) monotouch_System.Web.Services_test.dll