There can be circular dependencies between Objective-C classes,
so make sure we don't fail compilation when that occurs by
forward declaring any Objective-C classes/protocols.
The test case in question does not contain a circular dependency,
but the same issue occurs due to types not being generated in the
correct order (a correct order could be constructed for the test
case, but there's no general solution since circular dependencies
can exist).
https://bugzilla.xamarin.com/show_bug.cgi?id=42454
Does not affect the Jenkins bots (which don't run classic tests) but
fails on wrench (who still runs them right now). There's a difference
in how equality is checked between classic and unified and that expose
a, not really important, change in iOS10.
Fix issues with monotouch-tests with beta2
* TLSMaximumSupportedProtocol returns Unknown, which also means default,
instead of SslProtocol.Tls_1_2
* Setting NSZone.Name crash the app
* The MDLMesh tests are broken in a different way than beta1
* [callkit] Disable CTCallCenter default ctor as it breaks introspection
> [FAIL] Default constructor not allowed for CoreTelephony.CTCallCenter : SIGILL
The exception, that we catch, puts the process in an unstable state.
This cause weird results and crash later (wrong dispatch queue on main
thread) when testing MapKit.
Crashed Thread: 0 tid_a07 Dispatch queue: CTCallCenter
Exception Type: EXC_BAD_ACCESS (SIGABRT)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000004
Exception Note: EXC_CORPSE_NOTIFY
VM Regions Near 0x4:
-->
__TEXT 0000000000097000-00000000004d2000 [ 4332K] r-x/rwx SM=COW /Users/USER/Library/Developer/CoreSimulator/Devices/9446B344-62A2-42A8-A8EE-9FE7AC6BA5C8/data/Containers/Bundle/Application/81183608-DADF-4226-B7FE-4B43759D679A/introspection.app/introspection
Application Specific Information:
BUG IN CLIENT OF LIBDISPATCH: dispatch_barrier_sync called on queue already owned by current thread
abort() called
CoreSimulator 278 - Device: iPhone 5 - Runtime: iOS 10.0 (14A5297c) - DeviceType: iPhone 5
Some beta2 adjustments (removals) to get green tests and be able to merge it so bindings of beta2 can start
* [tests] NEFlowMetaData conformance to NSSecureCoding and NSCopying is new in beta2 (and check fails on OSX 10.11)
* [uikit] Add [UIScrollView|UITableViewController].refreshControl to fix monotouch-test build
UIRefreshControlHosting was removed in beta2 but we still need the
refreshControl property on UIScrollView and UITableViewController
to build monotouch-test
* Added support in DictionaryContainer for CGRect/CGPoint/CGSize and CMTime
* Added support for [StrongDictionary] using CGRect/CGPoint/CGSize and CMTime
* Added tests using DictionaryContainers for CGRect/CGPoint/CGSize and CMTime
* [Foundation] NSUbiquitousKeyValueStore is not available on watchOS.
Fixes an issue found by the introspection tests when running on a
watchOS device.
* [monotouch-test] Fix watchOS build with regards to NSUbiquitousKeyValueStore changes.
Fixes this warning:
SimpleHttpListener.cs(12,8): warning CS0108: `xharness.SimpleHttpListener.connected' hides inherited member `xharness.SimpleListener.connected'. Use the new keyword if hiding was intended
Also use https instead of http to avoid a network roundtrip
(since http://www.xamarin.com just redirects to https).
This will hopefully fix this random test failure:
[FAIL] UrlSessionTest.CreateDataTaskAsync : CreateUploadTask a
WCSessionDelegate members added in iOS 9.3 were turned into **required**
members in iOS 10 (beta 1). That's a breaking change so it's only enabled
for XAMCORE_4_0
Make sure as much as possible is written to the logs, and not stdout.
Also copy an extra 1024 bytes when fetching the system log (and continue
capturing a while after stopped, since there may be unflushed system log
data in memory).
Split out the code to prepare the simulator from the AppRunner class,
which is now just handling the logic required for each test run.
This way it's easier to handle simulator preparation for multiple
test runs with the same simulator.
Also revamp logging to avoid printing directly to the console, but
instead use the logging classes that permit redirecting logging
to a file. This makes the html report show better logging.
https://bugzilla.xamarin.com/show_bug.cgi?id=41343
* NSDictionary<TKey, TValue>.FromObjectsAndKeys keys and values are twisted up
* Fixed it in XAMCORE_4_0
* Obsoleted the 2 existing methods
* introduced FromObjectsAndKeys (TValue [] objects, TKey [] keys, nint count)
* Added unit tests with different types for TKey and TValue
Also fixed QLPreviewItem::previewItemTitle (not required) for XAMCORE_4_0
reference:
!incorrect-protocol-member! QLPreviewItem::previewItemTitle is OPTIONAL and should NOT be abstract
The two later failure reports (references) were not prefixed with [FAIL]
so they were filtered out by in the bot results.
references:
[FAIL] iOSApiProtocolTest.ApiProtocolTest.GeneralCase : 2 types do not really conform to the protocol interfaces
[FAIL] Could not load UIKit.UICollectionViewDataSourcePrefetching
[FAIL] Could not load UIKit.UIContentSizeCategoryAdjusting
Wrong check for version
[FAIL] Default constructor not allowed for CoreLocation.CLCircularRegion : Can only check iOS system version on iOS.
[FAIL] Default constructor not allowed for AVFoundation.AVAudioSessionDataSourceDescription : Can only check iOS system version on iOS.
[FAIL] Default constructor not allowed for AVFoundation.AVAudioSessionPortDescription : Can only check iOS system version on iOS.
and a change in tvOS 10 SDK
[FAIL] Selector not found for TVMLKit.TVViewElement : setDisabled:
* [tests][monotouch] More adjustments for iOS10 related failures/changes
- some might be Apple bugs and need to be reverted later
* Fix more failures on monotouch-tests wrt iOS 10
* MutableContactTest.cs: Wrong assert was changed (which is why each one
needs it's own unique string)
* TrustTest.cs: Fixed as results vary on < iOS9, iOS9 and iOS10
* NetworkReachabilityTest.cs: Fixed as results vary on < iOS9, iOS9 and iOS10
Those
[FAIL] UserDefaultsTest.Ctor_UserName : System.NullReferenceException : Object reference not set to an instance of an object
[FAIL] UserDefaultsTest.SetString : StringForKey-2
are due to
http://stackoverflow.com/questions/37840288/ios-10-nsuserdefaults-does-not-work
and should disappear once the bots are rebooted.
Fixes NSCharacterSetTest.NSMutableCharacterSet_TestStaticSets when
running with the P/Invoke wrapper (for exceptions) enabled (i.e.
watchOS), since otherwise the wrapper would truncate char parameters
to byte.
Make sure as much as possible is written to the logs, and not stdout.
Also copy an extra 1024 bytes when fetching the system log (and continue
capturing a while after stopped, since there may be unflushed system log
data in memory).
Split out the code to prepare the simulator from the AppRunner class,
which is now just handling the logic required for each test run.
This way it's easier to handle simulator preparation for multiple
test runs with the same simulator.
Also revamp logging to avoid printing directly to the console, but
instead use the logging classes that permit redirecting logging
to a file. This makes the html report show better logging.
- On some machines/mono versions it appears that printing System.Windows.DependencyObject requires System.Xaml for some reason.
- Since the test is testing our resolution from the GAC and we don't care about the specifics, I'm just adding that reference. Which we also get from the GAC.
* Adjust ever changing AddressFormatingTest for iOS 10, which does
not output the country;
* Adjust Contact's ICNKeyDescriptor internal check;
* CLBeaconRegion.ProximityUuid does not return the original instance
anymore, but a different one with the same uuid;
* Add a small delta for Vector3 comparison in ModelIO tests;
* Adjust MapKit tests for pin color change and MapRect corner case;
* SecKeyTest with corner cases now pass (they failed before);
* SecPolicyIdentifier.AppleIDValidation does not report the OID it's
created from (migration?)
Note: some might be bugs that Apple will fix in later seeds
The types are not _publicly_ conforming to the protocols (i.e. the header
files don't mention them). However they do conform at runtime, which is
what the test check (so we must ignore them)
* Added CallKit Bindings
* Ensure CallKit.framework is linked
* Ensure CallKit passes introspection tests
* FIXME: https://trello.com/c/afWXDZ3A
Headers says CallKit is available on macOS 10.12
but uses AVAudioSession and it is iOS only
Opened Radar awaiting response.
The types are not _publicly_ conforming to the protocols (i.e. the header
files don't mention them). However they do conform at runtime, which is
what the test check (so we must ignore them)
Fix a false positive when a .ctor is exposed with paramaters using a
subclass of what the designated initializer is exposing.
reference:
[FAIL] UIKit.UIGraphicsPdfRenderer should re-expose UIGraphicsRenderer::.ctor(CGRect, UIGraphicsRendererFormat)
Taking a screen image does not work unless there's a window server
running, which may not always be the case on bots.
So instead just create an image manually, since these tests do
not seem to be requiring any particular type of image.
* [xharness] Log simulator loading and handle any exceptions.
* [xharness] Add missing tests.
* [xharness] Throw a helpful exception instead of NRE when a simulator can't be found.
* [xharness] Fix null reference exception.
Taking a screen image does not work unless there's a window server
running, which may not always be the case on bots.
So instead just create an image manually, since these tests do
not seem to be requiring any particular type of image.
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
There's a clang bug [2] where if a selector is marked as unavailable,
it's marked as unavailable for every class, not just the class where
the unavailable selector is.
This means that we can't do `[super initWithCoder:x]` anywhere,
because `initWithCoder:` is marked as unavailable for UIActivityViewController.
So instead rewrite the call to super to call objc_msgSendSuper
directly, circumventing clang's broken availability checks.
[1] https://bugzilla.xamarin.com/show_bug.cgi?id=41319
[2] https://llvm.org/bugs/show_bug.cgi?id=28058
[FAIL] Selector not found for AppKit.NSCell : accessibilityNotifiesWhenDestroyed
[FAIL] Selector not found for AppKit.NSView : accessibilityNotifiesWhenDestroyed
Location changed and the duplicated files were removed (but I missed this
change on dontlink-mac)
[XM] Add release value option to msbuild/mmp to resolve XM 4.5 assemblies from system GAC
- This option "reverts" a C7 fix that prevented resovling assemblies from the GAC, which is unsafe
- If you use this option, you need to know what you are doing. The mono BCL and the XM BCL need to be compatible
- Use strictly puts you in the no support "you get to keep the pieces if it breaks" category.
Support binding NSObjects as IntPtr. This is usually not
a problem, because when we fetch the ObjC signature for a
method, we usually get the signature as exported by us,
(in which case a parameter bound as 'IntPtr' would be treated
as 'void *' in the dynamic registrar) *except* when the
selector corresponds with a protocol the type implements,
in which case we get the signature as defined in the protocol.
https://bugzilla.xamarin.com/show_bug.cgi?id=41132
Those tests needs to be run with the linker disabled since they use
reflection for most of their work.
The original dontlink (for linker tests) was becoming too large in
some configuration (e.g. tvOS release with bitcode) but this was
due to other BCL assemblies (not the introspection tests)
Should fix this test error:
warning: failed to load external entity "../../xamarin-macios/tests/HtmlTransform.xslt"
cannot parse ../../xamarin-macios/tests/HtmlTransform.xslt
make[4]: *** [test-ios-tasks] Error 4