Rolf Bjarne Kvinge
d3137d0b95
[tests/link sdk] Fix watchOS version check. ( #1678 )
...
* [tests/link sdk] Remove defines that are set by default.
And these defines varies by platform, which means they're not correct for tvOS/watchOS.
* [tests/link sdk] Fix watchOS version check.
2017-02-10 18:22:46 +01:00
Sebastien Pouliot
e72b654890
[linker] Inline BinaryCompatibility.TargetsAtLeast_Desktop_V4_5[_1] ( #1518 )
...
This is a more interesting case since the inlining of 2 property getters
has a deeper impact and removes other types/methods from the final app.
Here we don't care what's inside the code we replace - only that it
always return a constant boolean after evaluation. That _constant_ is
something we can add tests to ensure we continue to behave identically.
```
--- before 2017-01-16 14:58:12.000000000 -0500
+++ after 2017-01-16 14:58:09.000000000 -0500
@@ -1580,7 +1580,6 @@
System.String System.AppDomain::get_BaseDirectory()
System.String System.AppDomain::get_FriendlyName()
System.String System.AppDomain::getFriendlyName()
-System.String System.AppDomain::GetTargetFrameworkName()
System.String System.AppDomain::ToString()
System.UnhandledExceptionEventHandler System.AppDomain::UnhandledException
System.UnhandledExceptionEventHandler System.AppDomain::UnhandledException
@@ -11949,54 +11948,12 @@
System.Reflection.FieldInfo System.Runtime.Serialization.ValueTypeFixupInfo::ParentField()
System.Runtime.Serialization.ValueTypeFixupInfo
System.Void System.Runtime.Serialization.ValueTypeFixupInfo::.ctor(System.Int64,System.Reflection.FieldInfo,System.Int32[])
-System.Runtime.Versioning.BinaryCompatibility
-System.Boolean System.Runtime.Versioning.BinaryCompatibility/BinaryCompatibilityMap::TargetsAtLeast_Desktop_V4_5
-System.Boolean System.Runtime.Versioning.BinaryCompatibility/BinaryCompatibilityMap::TargetsAtLeast_Desktop_V4_5_1
-System.Boolean System.Runtime.Versioning.BinaryCompatibility/BinaryCompatibilityMap::TargetsAtLeast_Desktop_V4_5_2
-System.Boolean System.Runtime.Versioning.BinaryCompatibility/BinaryCompatibilityMap::TargetsAtLeast_Desktop_V4_5_3
-System.Boolean System.Runtime.Versioning.BinaryCompatibility/BinaryCompatibilityMap::TargetsAtLeast_Desktop_V4_5_4
-System.Boolean System.Runtime.Versioning.BinaryCompatibility/BinaryCompatibilityMap::TargetsAtLeast_Desktop_V5_0
-System.Boolean System.Runtime.Versioning.BinaryCompatibility/BinaryCompatibilityMap::TargetsAtLeast_Phone_V7_1
-System.Boolean System.Runtime.Versioning.BinaryCompatibility/BinaryCompatibilityMap::TargetsAtLeast_Phone_V8_0
-System.Boolean System.Runtime.Versioning.BinaryCompatibility/BinaryCompatibilityMap::TargetsAtLeast_Silverlight_V4
-System.Boolean System.Runtime.Versioning.BinaryCompatibility/BinaryCompatibilityMap::TargetsAtLeast_Silverlight_V5
-System.Boolean System.Runtime.Versioning.BinaryCompatibility/BinaryCompatibilityMap::TargetsAtLeast_Silverlight_V6
-System.Boolean System.Runtime.Versioning.BinaryCompatibility::get_TargetsAtLeast_Desktop_V4_5()
-System.Boolean System.Runtime.Versioning.BinaryCompatibility::get_TargetsAtLeast_Desktop_V4_5_1()
-System.Boolean System.Runtime.Versioning.BinaryCompatibility::ParseTargetFrameworkMonikerIntoEnum(System.String,System.Runtime.Versioning.TargetFrameworkId&,System.Int32&)
-System.Boolean System.Runtime.Versioning.BinaryCompatibility::TargetsAtLeast_Desktop_V4_5()
-System.Boolean System.Runtime.Versioning.BinaryCompatibility::TargetsAtLeast_Desktop_V4_5_1()
-System.Int32 System.Runtime.Versioning.BinaryCompatibility::AppWasBuiltForVersion()
-System.Int32 System.Runtime.Versioning.BinaryCompatibility::get_AppWasBuiltForVersion()
-System.Int32 System.Runtime.Versioning.BinaryCompatibility::s_AppWasBuiltForVersion
-System.Runtime.Versioning.BinaryCompatibility/BinaryCompatibilityMap
-System.Runtime.Versioning.BinaryCompatibility/BinaryCompatibilityMap System.Runtime.Versioning.BinaryCompatibility::s_map
-System.Runtime.Versioning.TargetFrameworkId System.Runtime.Versioning.BinaryCompatibility::AppWasBuiltForFramework()
-System.Runtime.Versioning.TargetFrameworkId System.Runtime.Versioning.BinaryCompatibility::get_AppWasBuiltForFramework()
-System.Runtime.Versioning.TargetFrameworkId System.Runtime.Versioning.BinaryCompatibility::s_AppWasBuiltForFramework
-System.Void System.Runtime.Versioning.BinaryCompatibility/BinaryCompatibilityMap::.ctor()
-System.Void System.Runtime.Versioning.BinaryCompatibility/BinaryCompatibilityMap::AddQuirksForFramework(System.Runtime.Versioning.TargetFrameworkId,System.Int32)
-System.Void System.Runtime.Versioning.BinaryCompatibility::.cctor()
-System.Void System.Runtime.Versioning.BinaryCompatibility::ParseFrameworkName(System.String,System.String&,System.Int32&,System.String&)
-System.Void System.Runtime.Versioning.BinaryCompatibility::ReadTargetFrameworkId()
-System.Runtime.Versioning.CompatibilitySwitch
-System.String System.Runtime.Versioning.CompatibilitySwitch::GetValueInternal(System.String)
System.Runtime.Versioning.TargetFrameworkAttribute
System.String System.Runtime.Versioning.TargetFrameworkAttribute::_frameworkDisplayName
System.String System.Runtime.Versioning.TargetFrameworkAttribute::_frameworkName
System.String System.Runtime.Versioning.TargetFrameworkAttribute::FrameworkDisplayName()
System.Void System.Runtime.Versioning.TargetFrameworkAttribute::.ctor(System.String)
System.Void System.Runtime.Versioning.TargetFrameworkAttribute::set_FrameworkDisplayName(System.String)
-System.Int32 System.Runtime.Versioning.TargetFrameworkId::value__
-System.Runtime.Versioning.TargetFrameworkId
-System.Runtime.Versioning.TargetFrameworkId System.Runtime.Versioning.TargetFrameworkId::NetCore
-System.Runtime.Versioning.TargetFrameworkId System.Runtime.Versioning.TargetFrameworkId::NetFramework
-System.Runtime.Versioning.TargetFrameworkId System.Runtime.Versioning.TargetFrameworkId::NotYetChecked
-System.Runtime.Versioning.TargetFrameworkId System.Runtime.Versioning.TargetFrameworkId::Phone
-System.Runtime.Versioning.TargetFrameworkId System.Runtime.Versioning.TargetFrameworkId::Portable
-System.Runtime.Versioning.TargetFrameworkId System.Runtime.Versioning.TargetFrameworkId::Silverlight
-System.Runtime.Versioning.TargetFrameworkId System.Runtime.Versioning.TargetFrameworkId::Unrecognized
-System.Runtime.Versioning.TargetFrameworkId System.Runtime.Versioning.TargetFrameworkId::Unspecified
System.IntPtr System.RuntimeArgumentHandle::args
System.RuntimeArgumentHandle
System.Boolean System.RuntimeFieldHandle::Equals(System.Object)
```
```
Statistics
Native subtotal 35,729,800 35,728,760 -1,040 0.00 %
Executable 29,270,272 29,270,240 -32 0.00 %
AOT data *.aotdata 6,459,528 6,458,520 -1,008 -0.02 %
Managed *.dll/exe 4,537,344 4,532,736 -4,608 -0.10 %
TOTAL 40,581,685 40,576,037 -5,648 -0.01 %
```
2017-01-19 08:45:19 -05:00
Sebastien Pouliot
00b1c09acb
[linker] Add an well known candidate inliner substep along with tests ( #1513 )
...
TL&DR: This is *how* it should be done and tested, it's not complete
(single, simple case) nor the most interesting case ;-)
The trick is to make sure each case is covered by tests so a mono
_bump_ won't give us a BCL that does not conform to what the linker
expect.
What's the impact ?
1. There is the expected reduction of metadata in mscorlib. Since both
methods don't call other API there's no indirect effect (removal).
--- before 2017-01-15 11:12:44.000000000 -0500
+++ after 2017-01-15 11:12:56.000000000 -0500
@@ -13166,9 +13166,6 @@
System.Void System.Security.SecurityException::.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)
System.Void System.Security.SecurityException::.ctor(System.String)
System.Void System.Security.SecurityException::GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)
-System.Boolean System.Security.SecurityManager::CheckElevatedPermissions()
-System.Security.SecurityManager
-System.Void System.Security.SecurityManager::EnsureElevatedPermissions()
System.Security.SecurityRulesAttribute
System.Security.SecurityRuleSet System.Security.SecurityRulesAttribute::m_ruleSet
System.Void System.Security.SecurityRulesAttribute::.ctor(System.Security.SecurityRuleSet)
2. There is no visible size change (even with #1 ) in mscorlib.dll due to
padding (compiler /filealign)
mscorlib.dll 793,600 793,600 0 0.00 %
3. there's a *very* small reduction of mscorlib.*.aotdata size
mscorlib.armv7.aotdata 717,264 717,216 -48 -0.01 %
mscorlib.arm64.aotdata 712,840 712,704 -136 -0.02 %
AOT data *.aotdata 6,460,064 6,459,880 -184 0.00 %
4. there's no change in executable size - normal as the AOT compiler has
_likely_ already doing the same optimization (before this commit)
Executable 29,270,272 29,270,272 0 0.00 %
Full comparison: https://gist.github.com/spouliot/0464c8fa3a92b6486dfd90595d9eb718
2017-01-17 21:49:44 -05:00
Sebastien Pouliot
1d9356bf94
Bump mono to include fix for #47064 : [linker] Fix marking types inside custom attributes. ( #1376 )
...
* Bump mono to include fix for #47064 : [linker] Fix marking types inside custom attributes.
* Add unit tests for bug #47064
2016-12-21 11:52:43 +01:00
Sebastien Pouliot
c92934eb6d
[mtouch][mmp] Only allow `appletls` for the TLS provider ( #1132 )
...
The old `legacy` option will now be reported as a warning.
That's by design an warning would require manually editing the .csproj
file (when the UI gets removed, as planned, from the IDE).
This is part of
https://trello.com/c/SrgU38DN/647-only-ship-support-appletls
Note: The BCL changes will happen in later stages.
2016-11-08 14:42:40 -05:00
Rolf Bjarne Kvinge
516f764ec4
[tests] Add support for building device tests for 32-bit or 64-bit.
2016-10-11 19:52:36 +02:00
Rolf Bjarne Kvinge
f7447a385c
[tests] Default to fat apps for device configurations.
2016-10-11 19:52:35 +02:00
Rolf Bjarne Kvinge
5fd5b5ae8c
[tests] Remove unused/deprecated variables from project files.
2016-10-11 19:52:35 +02:00
Rolf Bjarne Kvinge
432f7af3ed
[tests] Set OutputPath according to Configuration instead of hardcoding it.
...
This makes c&p a little less error-prone.
2016-10-11 19:52:35 +02:00
Rolf Bjarne Kvinge
228f690469
[tests] Remove unused project configurations (AppStore, Ad-Hoc and DebugStaticRegistrar). ( #974 )
2016-10-11 19:51:58 +02:00
Rolf Bjarne Kvinge
56bbf5e078
[tests] Remove duplicated (and unused) project. ( #963 )
2016-10-07 16:09:47 +02:00
Rolf Bjarne Kvinge
7bcad32ddc
[tests] Tweak link all/sdk tests after API change in watchOS.
2016-10-03 18:31:04 +02:00
Martin Baulig
032e2482e4
[AppleTls]: Make 'OldTlsProvider' derive from 'LegacyTlsProvider'.
...
Ideally, we should just simply use 'Mono.Net.Security.LegacyTlsProvider',
but that would require some tweaks to the linker code.
2016-10-03 18:31:04 +02:00
Sebastien Pouliot
0bc23b379a
Bump mono for an (pre C9/master) alpha refresh ( #902 )
...
* mono revision at fc99fc4313e7afd75a4605a48b47e7d1273aefe4
* watch-mono revision is more recent to include the BCL adjustments
for types not available on that platform
* Update two linksdk test cases that won't work _normally_ for watchOS
2016-09-27 23:45:13 -04:00
Rolf Bjarne Kvinge
9000e48034
[tests] Remove Classic test projects, and make the Unified test projects the master projects. ( #858 )
2016-09-21 22:55:10 +02:00
Sebastien Pouliot
6d5beb61cb
Merge branch 'cycle8' into xcode8
2016-08-26 08:19:33 -04:00
Sebastien Pouliot
2bcd40054f
[linker] Ensure we do not devirtualize methods that needs to be called from a base class to satisfy an interface. Fixes #34308 ( #675 )
...
Update unit tests to catch this case and be more precise in others.
reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=43408
2016-08-26 08:17:01 -04:00
Sebastien Pouliot
b146861389
[tests] Fix LinkSDK DllImportTest on newer OS ( #554 )
...
Latest iOS 10, tvOS 10 and watchOS 3 uses a newer libsqlite version.
It's not clear is macOS 10.12 also does (and that could affect the
test when using the simulators)
2016-08-04 20:00:52 -04:00
Sebastien Pouliot
c37f450a09
Merge branch 'cycle8' into xcode8
2016-07-26 11:41:45 -04:00
Rolf Bjarne Kvinge
abd5d1ba46
Use dlsym for user assemblies on iOS. ( #492 )
...
We tried disabling dlsym for all assemblies on iOS, but it turned
out to break a significant amount of customer code [1].
So re-enable it, but only for user assemblies (since we control
all assemblies we ship and can thus make sure those work with
dlsym disabled).
https://trello.com/c/guig1MF2/623-re-enable-dlsym-for-ios
2016-07-26 11:39:18 -04:00
Sebastien Pouliot
cf27c2e7a8
Merge branch 'cycle8' into xcode8
2016-07-13 16:43:00 -04:00
Rolf Bjarne Kvinge
27ee956142
[link sdk] Update tests to work on watchOS. Fixes #41538 . ( #331 )
...
* [link sdk] Ignore tests that uses our networking stack for watchOS. Partially fixes #41538 .
https://bugzilla.xamarin.com/show_bug.cgi?id=41538
* [link sdk] Update LinkSdkRegressionTest.SpecialFolder to work on watchOS. Fixes #41538 .
https://bugzilla.xamarin.com/show_bug.cgi?id=41538
2016-06-30 02:35:07 -07:00
Rolf Bjarne Kvinge
6c2208734d
[link all] Ignore tests that uses our networking stack for watchOS. Fixes #41539 . ( #330 )
...
https://bugzilla.xamarin.com/show_bug.cgi?id=41539
2016-06-30 01:00:03 -07:00
Sebastien Pouliot
1659e121f0
Merge branch 'master' into xcode8
2016-06-20 20:48:14 -04:00
Sebastien Pouliot
4995f58459
[tests][link sdk] Exclude CFNetwork test from watchOS ( #238 )
...
- framework not supported on watchOS
- fix build of "link sdk" under watchOS
2016-06-20 09:37:06 -04:00
Rolf Bjarne Kvinge
bdf7ca8429
[tests] Bump min deployment target to 6.0. ( #208 )
2016-06-15 19:12:48 -07:00
Sebastien Pouliot
f50b82df3d
[tests][linksdk][watchos] Fix HttpClientHandler tests for CFNetwork/watchOS ( #186 )
...
As noted in PR 177 [1] this does not build on watchOS since CFNetwork
is not supported on that platform. Uncaught as the PR bots don't build,
nor run, the tests yet.
[1] https://github.com/xamarin/xamarin-macios/pull/177
2016-06-14 07:42:41 -07:00
Sebastien Pouliot
d479ed00c7
[tests][link sdk] Add tests to validate default properties for all (3) handlers that we ship ( #177 )
2016-06-12 13:44:37 -04:00
Rolf Bjarne Kvinge
9c01fe6c9d
[tests] Use the right sources for dontlink, linksdk and linkall tests. ( #152 )
2016-06-08 23:39:47 +02:00
Sebastien Pouliot
c126a6e354
[tests] Move linker tests from maccore ( #69 )
2016-05-20 14:07:34 -04:00