Граф коммитов

2286 Коммитов

Автор SHA1 Сообщение Дата
Alex Soto 8c207428a9
[ImageCaptureCore] Add ImageCaptureCore Bindings (#5074)
* [ImageCaptureCore] Add ImageCaptureCore Bindings

Fixes xamarin/xamarin-macios#4273

* [ImageCaptureCore] remove not needed `unsafe`

Co-Authored-By: dalexsoto <alex@alexsoto.me>

* Implement feedback
2018-11-07 09:52:39 -05:00
Rolf Bjarne Kvinge 3835e1dafb
[tests] Point MSBuild to the right Xamarin.Mac location when building packaged Xamarin.Mac tests. Fixes maccore#1115. (#5090)
* [tests] Point MSBuild to the right Xamarin.Mac location when building packaged Xamarin.Mac tests. Fixes maccore#1115.

Fixes https://github.com/xamarin/maccore/issues/1115.

* [xharness] Ensure all makefile targets set the proper environment variables.
2018-11-07 09:34:16 +01:00
Rolf Bjarne Kvinge 27688e8d5b
[xharness] Fix the generation of the Mac makefile to export the right variables to use the locally build Xamarin.Mac. (#5087) 2018-11-06 15:06:58 +01:00
Rolf Bjarne Kvinge 012a0650b6
[mtouch] Fix formatting for MT0079 and update the MT4134 test to take into account the warning. Fixes maccore#1116. (#5089)
Fixes https://github.com/xamarin/maccore/issues/1116.
2018-11-06 15:06:10 +01:00
Bernhard Urban b9170ae434 [tests] enable monotouch-test with --interpreter=-mscorlib on Jenkins (#5051)
aka. mixed mode
2018-11-06 13:22:17 +01:00
Rolf Bjarne Kvinge 1b32a8dba5
[monotouch-test] Improve diagnostic output when MessageHandlerTest fails. (#5085)
Reference: https://github.com/xamarin/xamarin-macios/issues/4013
2018-11-06 09:57:35 +01:00
Rolf Bjarne Kvinge ac54b7d065
[monotouch-test] Improve VTDecompressionSessionTests asserts to print better info in case of failure. (#5083)
Showing the actual failed value is much more helpful than just "sorry, it failed".

See https://github.com/xamarin/xamarin-macios/issues/4900.
2018-11-06 09:53:59 +01:00
Sebastien Pouliot 121fe236ba
[scenekit] Fix `SCNAction.TimingFunction` signature to `Func<float,float>`. Fixes #5058 (#5068)
This was incorrectly bound as `Action<float>`.
Added unit test for the API compatibility stubs.

reference: https://github.com/xamarin/xamarin-macios/issues/5058

* [tests] Adjust test not to fail

reference: https://github.com/xamarin/xamarin-macios/issues/5072
2018-11-05 14:20:03 -05:00
Sebastien Pouliot 2dec2c0193 [xtro] Move remaining todo (MPS) to ignore 2018-10-31 17:28:24 -04:00
Sebastien Pouliot 3ab481ea70 Merge xcode10.1 into master
Also update apidiff from d15-9 since it's both frozen and includes xcode10.1
2018-10-31 15:54:48 -04:00
monojenkins 4b89f459a7 [tests] Fix some tests to succeed when run on macOS 10.14 (#5060)
Public bots were updated today.

Fixes https://github.com/xamarin/maccore/issues/1106
Fixes https://github.com/xamarin/maccore/issues/1107
2018-10-31 10:45:46 -04:00
Sebastien Pouliot 0304219723
[tests] Fix some tests to succeed when run on macOS 10.14 (#5057)
Public bots were updated today.

Fixes https://github.com/xamarin/maccore/issues/1106
Fixes https://github.com/xamarin/maccore/issues/1107
2018-10-31 08:32:36 -04:00
Rolf Bjarne Kvinge 7425218c78 Merge remote-tracking branch 'origin/master' into mono-2018-08 2018-10-30 07:42:02 +01:00
Rolf Bjarne Kvinge c69c74b3d3
Clone files if possible whenever it makes sense. (#5049)
Cloning is faster when supported, and it also saves disk space.
2018-10-29 16:09:30 +01:00
Sebastien Pouliot 917214828d
[xharness] Log the environment variables in the execution logs (#5045)
While trying to debug an msbuild unit tests it was not possible to
successfully copy/paste the command from the execution log and
run it in a shell.

It's not that hard to run xharness and figure it out - but the
same can happen on bots (which could be harder).

So that little change prints out the host and xharness changes
to the environment variables to make copy/pasters life even
lazier :)
2018-10-26 13:34:08 -04:00
Rolf Bjarne Kvinge 93e72862f7 [mmptest] Less hardcoding. 2018-10-26 17:15:19 +02:00
Chris Hamons 12262c4cba
[macos] Add NSScrollView.AddFloatingSubview (#5040)
- https://github.com/xamarin/xamarin-macios/issues/5039
2018-10-25 11:56:23 -05:00
Rolf Bjarne Kvinge 35df3a5294
[introspection] Fix a few issues found on iPad Air 2 with iOS 12. (#5034)
* [introspection] MPSCnnBinaryKernel's kernelHeight/kernelWidth are missing on iOS too.

* [introspection] CoreNFC is not even available on all devices.
2018-10-25 17:47:05 +02:00
Rolf Bjarne Kvinge 2b85aaef56
[tests] Only build exactly what's neded for running XM tests on older bots. (#5038)
Also build what we can in parallel (and manually building shared dependencies first).
2018-10-25 17:17:03 +02:00
Rolf Bjarne Kvinge 2755245b91 [tests] More min macOS version setting to 10.9. 2018-10-25 17:12:36 +02:00
Rolf Bjarne Kvinge cca50fe500 Mono 2018-08 requires macOS 10.9+, so Xamarin.Mac must as well. 2018-10-25 09:54:43 +02:00
Rolf Bjarne Kvinge 0ebc514467 Merge remote-tracking branch 'origin/master' into mono-2018-08 2018-10-25 09:54:07 +02:00
Vincent Dondain 51e7a47700 [coregraphics] Make MatrixOrder a normal enum instead of a nested enum (#5036)
This enum might prove useful to other APIs in the future so move outside of `CGAffineTransform`.
2018-10-24 20:10:55 -04:00
Bernhard Urban 9688c42e2d Bump mono and enable monotouch-test with interpreter (#5023)
* Bump Mono 2018-06

Commit list for mono/mono:

* mono/mono@c0fe724379 [aot] Reenable recursion checking when initing shared got entries (#11295)
* mono/mono@f55f7e53e3 [interp] use unsigned conversion for nuint (#11285)
* mono/mono@5986920bdb [2018-06] [arm64] Remove the limitation on the number of nullable arguments for dyncalls (#11266)
* mono/mono@665a308c39 [WinForms] Propagate the flags from DrawTextInternal to MeasureTextInternal (#11251)
* mono/mono@5ed4143b4f [2018-06] Crash Reporter V2 (#11162)
* mono/mono@f0db92c2b6 [interp] Implement interpreter entry trampolines on amd64 (#10978) (#11165)
* mono/mono@c1f1a7bfed [ci] Move OSX .pkg build to a separate bot pool
* mono/mono@d80ced607b [aot] Ensure shared got entries are initialized before loading methods (#11225)
* mono/mono@d07c626a74 [pkg] Add preinstall which removes existing Mono of the same version (#11209)
* mono/mono@cda3acc57c [sdks] futimens and futimes symbols are missing on anything earlier than 10.13 (#11174)
* mono/mono@226e91a064 Bump xunit-binaries

Diff: 2343f26706...c0fe724379

* [tests] enable monotouch-test with --interpreter on Jenkins
2018-10-24 15:24:22 -04:00
Rolf Bjarne Kvinge 545c7bf4ba Merge remote-tracking branch 'origin/master' into mono-2018-08 2018-10-24 13:49:26 +02:00
Sebastien Pouliot b403da0d85
[uikit] Preserve method associated with `updateSearchResultsForSearchController:`. Fixes #5024 (#5027)
This method is called back from iOS (or tvOS) so there's no managed
reference pointing to it. However we know that if it's (private inner)
type is present it's because the callback (from native) is possible so
we can preserve the method conditionally (to the type presence).

https://github.com/xamarin/xamarin-macios/issues/5024
2018-10-22 21:54:54 -04:00
Rolf Bjarne Kvinge d899d4fb70
Remove bitrotted support for a separate mono submodule for watchOS support. (#5022)
Unce upon a time we used a separate mono submodule for watchOS support, to make
development of watchOS support easier (we referenced mono/master, to avoid
backporting fixes for watchOS support through various release branches in
mono).

This only worked until our watchOS support became stable, since then we had to
start using a stable version of mono for watchOS support.

This means that our build support for using a separate mono clone for watchOS
support is no longer needed; and in any case it's broken because of build
changes done later.
2018-10-22 16:14:26 +02:00
Vincent Dondain f87f3b88f8 [coregraphics] Add 'MatrixOrder' overload for Scale, Rotate and Translate (#5011)
- Fixes #4698: CGAffineTransform.Scale does not work like Swift's .scaledBy(x:y:)
  (https://github.com/xamarin/xamarin-macios/issues/4698)
- 'Scale' monotouch-test now covers the new overload for the new multiplication order.
- Changed the Scale test's values so we have different values for 'x0' (it was always 0 before) and so it matches the test case from the bug report.

* Same fix for Rotate and Translate
2018-10-22 08:42:52 -04:00
Sebastien Pouliot 5ad55d603e
[tests][linkall] Add a check that the Makefile produced version number is 'legit'. Fixes #4859 (#5005)
History: a marge conflict caused a version string to become "12.3." and
this was found in the API diff much later.

reference: https://github.com/xamarin/xamarin-macios/issues/4859
2018-10-18 11:16:24 -04:00
Miguel de Icaza dca1f4793f [UIKit] UIGestureRecognizer, support a way of unsubscribing without creating cycles (#4729)
* [UIKit] UIGestureRecognizer, support a way of unsubscribing without creating cycles

This now tracks all the uses of AddTarget with delegates by recording
the Token/Selector pair and making `Dispose()` release all the linkage
as well as providing an enumerator that can be used to get all the
registered Action handlers - this can then be used with .First() and
then passed to `RemoveTarget`.

This addresses https://github.com/xamarin/xamarin-macios/issues/4190

This initial patch is here for discussion of the approach, want to
review and test this before we merge.

* Simplify code a little bit.

* Add test.

* [tests] Add an NSAutoreleasePool to make GestureRecognizerTest.NoStrongCycles happy on 32-bit.
2018-10-18 12:31:39 +02:00
Vincent Dondain 3cf004f817
[gamecontroller] Update for Xcode 10.1 beta 2 (#4996) 2018-10-17 15:13:04 -04:00
Rolf Bjarne Kvinge ee1f7dc33d
[CoreFoundation] Implement missing dispatch API. Fixes #4606. (#4967)
* [CoreFoundation] Add DispatchQueue.DispatchBarrierSync.

* [CoreFoundation] Bind dispatch_queue_[set|get]_specific.

* [CoreFoundation] Bind dispatch_queue_get_qos_class.

* [CoreFoundation] Bind dispatch_queue_create_with_target.

* Add tests.

* Update xtro.

* Add missing availability attributes.

* [tests] Do a version check before testing new API.

* Remove redundant code.
2018-10-17 14:42:29 +02:00
Sebastien Pouliot 6751f27841
[tests][mmp] Move TypeDescriptor (regression) tests to unit tests (#4994)
Also move some tests to share more (now and in future commits)
with iOS linker-related tests.

Part of https://github.com/xamarin/xamarin-macios/issues/4975
2018-10-17 08:25:37 -04:00
Vincent Dondain 910b796bf3 [identitylookup] Update for Xcode 10.1 beta 3 (#4998) 2018-10-16 20:49:01 -04:00
Martin Baulig c30807113c Revert "[monotouch-test] Disable X509Certificate(byte[]) tests on watchOS (#4942)"
This reverts commit d003a9b918.
2018-10-16 15:18:33 -04:00
Bernhard Urban 8e72ea8330 [tests] improve MonoWeakReferenceTest to avoid false pinning (#4961)
Fixes an issue when executed with interpreter. Now, the test is closer
to what we do in the runtime test:

831e73abcd/mono/tests/weak-fields.cs
831e73abcd/mono/mini/TestHelpers.cs
2018-10-16 14:05:19 -04:00
Vincent Dondain fd293b2d25 [coretelephony] Update for Xcode 10.1 beta 2 (#4993)
Filed radar https://trello.com/c/WKIRTcLk for probably incorrect macOS API.
2018-10-16 14:00:52 -04:00
Bernhard Urban 60b06b9c98 [tests] make Symbols.FunctionNames aware of interpreter (#4973) 2018-10-16 11:25:35 -04:00
Vincent Dondain 9e0ab2b5fe Bump for Xcode 10.1 beta 3 (#4987) 2018-10-15 19:57:54 -04:00
Chris Hamons 1082ce7a09
Add xtro test for [Deprecated] attributes and fix up usages (#4966)
- https://github.com/xamarin/xamarin-macios/issues/4431
2018-10-15 10:43:17 -05:00
Sebastien Pouliot 8feb75335e
Merge branch 'master' into mono-2018-08 2018-10-15 11:23:27 -04:00
Sebastien Pouliot e8b87b77d7
[tests][mmp] Convert old mmp calendar regression tests to unit tests (#4983) 2018-10-15 11:15:20 -04:00
Rolf Bjarne Kvinge 250fd976a4
Merge pull request #4111 from radical/msbuild-port
[msbuild] Move from xbuild to msbuild
2018-10-15 16:55:53 +02:00
Rolf Bjarne Kvinge 904be25c25
[xharness] Generate a system variant of dont link, and run it using the oldest mono version we support in Jenkins. Fixes #4121. (#4968)
This is an addition to the tests we already run on older macOS bots (and as such will not execute on our PR bots).

Fixes https://github.com/xamarin/xamarin-macios/issues/4121.
2018-10-15 16:51:46 +02:00
Aleksey Kliger 0249138c44 Merge remote-tracking branch 'origin/master' into mono-2018-08 2018-10-15 10:50:38 -04:00
Rolf Bjarne Kvinge 5fbfacc2a8 [tests] Only restore packages.config, not the mtouch test project.
Restoring the mtouch.csproj makes nuget try to restore Mono.Cecil.csproj as
well, which doesn't work.

So just restore what's listed in our packages.config instead.
2018-10-15 10:41:33 +02:00
Chris Hamons 7c1d23d411
Bind 2 high visibility PrintCore APIs (#4933)
- https://github.com/xamarin/xamarin-macios/issues/4713
2018-10-11 09:14:48 -05:00
Rolf Bjarne Kvinge 4362842b68 [mmptests] Update according to MSBuild changes. 2018-10-11 12:25:47 +02:00
Rolf Bjarne Kvinge 745c18cc73 Merge remote-tracking branch 'origin/master' into msbuild-port 2018-10-11 07:31:58 +02:00
Aleksey Kliger cef512dc41 Merge remote-tracking branch 'origin/master' into mono-2018-08 2018-10-10 17:23:54 -04:00
Jo Shields 6f2ebedb74 Bump to mono:2018-06 (#4277)
* Bump to mono:2018-06

* Bump mono

* Updates compression to work with the public span

* Bump mono

* Fixes pointer check logic in Deflater

* Bump mono

* Fixes pointer check logic in Deflater

* Bump mono

* Bump Mono

* [runtime] always use `mono_jit_set_aot_mode` (#4491)

`mono_jit_set_aot_only` is deprecated and accidentally broke with
https://github.com/mono/mono/pull/7887

This should fix device tests with `mono-2018-06`

* Testing with Zoltan's patch

* Include libmono-system-native on Xamarin.Mac

* Bump Mono

Commit list for mono/mono:

* mono/mono@7bcda192a0 Bump llvm to release_60/fc854b8ec5873d294b80afa3e6cf6a88c5c48886. (#9786). (#9804)
* mono/mono@23e95ec7ad Apply F# portable pdb debug fix for pinvokes & bump (#9797)
* mono/mono@295f6d32af [2018-06] [MacOS] On Mac, use the copyfile API to copy files (#9696)

Diff: 7d5f4b6136...7bcda192a0

* Revert 4bacab3d5c, it doesn't fix the ios aot problems.

* Bump mono

* [tests] Adjust the MT0137 test for mcs change in behavior.

Starting with mono 5.16 mcs will now add assembly references when the assembly
is only used in attributes (this was already the case for csc in both 5.14 and
5.16, so it seems to be a compatibility change).

Adjust the MT0137 test accordingly.

* [msbuild] Fix parsing of json parser errors to handle trailing periods in the error message.

Fixes this test:

    1) Test Failure : Xamarin.iOS.Tasks.Bug60536.TestACToolTaskCatchesJsonException
         ColumnNumber
      Expected: 2
      But was:  0

* Bump mono

* [builds] Install the old llvm binaries into the LLVM36 directory and make the 32 bit builds use that.

* Bump mono

* Bump mono

* [jenkins] Don't give VSTS a fake branch. (#4667)

Something in VSTS changed, and now fake branch names don't work anymore.

So instead use real branch names (and for pull requests I've created a
'pull-request' branch we can use).

* Assembly.LoadFile accepts only absolute path

* [linker] Add new Facade (System.Threading.Tasks.Extensions).

Fixes these MTouch test failures:

    1. Xamarin.Linker.SdkTest.iOS_Unified :   Facades
      Expected:
      But was:  < "System.Threading.Tasks.Extensions" >

    2. Xamarin.Linker.SdkTest.tvOS :   Facades
      Expected:
      But was:  < "System.Threading.Tasks.Extensions" >

    3. Xamarin.Linker.SdkTest.watchOS :   Facades
      Expected:
      But was:  < "System.Threading.Tasks.Extensions" >

* [mono-sdks] Necessary changes to unify the LLVM provisioning for both iOS and Android. (#4732)

* Bump Mono

* [mtouch] add mixed-mode support (#4751)

* [mtouch] add --interp-mixed option

When enabling this option, mtouch will AOT compile `mscorlib.dll`.  At
runtime that means every method that wasn't AOT'd will be executed by
the runtime interpreter.

* [mtouch] Add support to --interpreter to list the assemblies to (not) interpret.

* [msbuild] Simplify interpreter code to use a single variable.

* Fix whitespace.

* [mtouch] Move mtouch-specific code to mtouch-specific file.

* [msbuild] An empty string is a valid value for 'Interpreter', so make it a non-required property.

* [mtouch] Add sanity check for aot-compiling interpreted assemblies.

* Bump Mono

* [linker] Updates SDKs facades list

* Bump mono

* [msbuild] Adds facades which might override default nuget version to framework list

The collision resolver task reads them from here https://github.com/dotnet/sdk/blob/master/src/Tasks/Common/ConflictResolution/FrameworkListReader.cs

* Bump to a VSfM version that can build XM Classic projects.
2018-10-10 11:02:28 -04:00
Rolf Bjarne Kvinge d063c531f6 [tests] Disable link-preserve-calendar-1 until we can upgrade it to be a Unified test.
See https://github.com/xamarin/xamarin-macios/pull/4596#issuecomment-428562076
for reference: mono's desktop API changed, the linker behavior the test is
verifying is only expected when using XM's Mobile profile.
2018-10-10 15:02:52 +02:00
Rolf Bjarne Kvinge ec88393dcf
[CoreFoundation] Simplify DispatchQueue.MainQueue. (#4925)
* The dispatch_get_main_queue function doesn't exist anywhere (tested on iOS 5.1.1 - iOS 12, macOS 10.7 - 10.14), and when called from native code, it's always an inlined function, so just remove the call completely.
    
* Getting the _dispatch_main_q symbol from either the current address space, libSystem or libdispatch works fine everywhere. Looking up something in the current address space is costly (according to 'man dlsym'), so stop doing that: only look in libdispatch (since that's where the symbol actually is according to 'nm').

* I find no reason for the lock in DispatchQueue.MainQueue, nor does history reveal anything helpful, so I removed the lock.
2018-10-10 10:48:22 +02:00
Rolf Bjarne Kvinge 1f5ba0b5c0
[xharness] Improve logging a bit. (#4952)
* [xharness] Improve logging a bit.

* Use timestamp in more log paths.
* Create numbered log subdirectories to make things nicer to look at in a
  terminal (thousands of subdirectories can be annoying to shift through; this
  way there's an additional subdirectory level).

* Avoid string interpolation when not needed.
2018-10-10 08:05:26 +02:00
Rolf Bjarne Kvinge e4db45ed63
[xharness] Add length consistency check when capturing a log file. (#4951)
Sometimes files just shrink, and we must cope.

Two possible causes I can think of:

* System log rotation.
* We erase a simulator when trying to capture its system log.

There are probably many more causes, but two is more than enough to make sure
we don't fail when it happens.
2018-10-09 15:53:51 +02:00
Rolf Bjarne Kvinge 65b21ee48d
[CoreFoundation] Fetch a few static values lazily. (#4924)
* [CoreFoundation] Fetch a few static values lazily.

This avoids using static constructors, and also avoids fetching the values
unless they're needed.

* Generate the code for _dispatch_data_destructor_free instead of using a manual binding.

* [CoreFoundation] Bind kCFBooleanTrue/kCFBooleanFalse using the generator.

Since the generator doesn't know about CFBoolean, bind as IntPtr instead, and
fix most callers to use the handle directly, instead of getting a CFBoolean
object and then immediately getting the handle.

* Add back comment.

* Update xtro.

* Fix typo check.

* Use complete path for the library in the Field attribute.

* Update xtro.
2018-10-09 15:51:17 +02:00
Aleksey Kliger (λgeek) d003a9b918
[monotouch-test] Disable X509Certificate(byte[]) tests on watchOS (#4942)
* [monotouch-test] Disable X509Certificate(byte[]) tests on watchOS

* [tests] Add TestRuntime.AssertNotWatchOS()

* fixup WatchOS build
2018-10-08 11:01:24 -04:00
Rolf Bjarne Kvinge 232f9ecc8b
[xharness] Verify that there's at least 1GB of space left before trying to build or run each test. (#4937)
If there's not enough space, then fail the test.

This might help https://github.com/xamarin/maccore/issues/965 (test run hangs).
2018-10-08 07:32:50 +02:00
Rolf Bjarne Kvinge 28b1978387
Bundle Make.version with the packaged XM tests to fix testing. (#4938) 2018-10-08 07:09:09 +02:00
Chris Hamons c41673dce8
Add mmp error when combining partial static registrar and linking (#4932)
- https://github.com/xamarin/xamarin-macios/issues/4825
2018-10-05 09:43:53 -05:00
Chris Hamons 183cb81583
Disable known failing device tests using xharness (#4884)
- Add the ability to have Build Only tests - https://github.com/xamarin/maccore/issues/1076
- Set mini and the extensions as build only
2018-10-03 08:33:30 -05:00
Sebastien Pouliot 9f23f4b45a
Bump for Xcode 10.1 beta 2 (#4906) 2018-10-03 08:26:31 -04:00
Chris Hamons 8325b083dc
[macos][msbuild] Cache actool results like XI (#4892)
- https://github.com/xamarin/xamarin-macios/issues/3584
- Prevents a 2 second pause on every single launch
- Test added but commented out due to msbuild build machine issue :(
2018-10-02 12:53:19 -05:00
Rolf Bjarne Kvinge 788b63d96f
[NSLayoutManager] Complete bindings for NSLayoutManager. Fixes #4740. (#4853)
Fix numerous issues with NSLayoutManager[Delegate]:

* The classes are available in both AppKit and UIKit, but the bindings are
  duplicated (unsuccessfully) in both appkit.cs and uikit.cs. So create a new
  xkit.cs that is shared between XI and XM, and put a shared version of the
  bindings there.

* Bind everything that hasn't already been bound (or deprecated by Apple).

* Methods that take a nullable NSRangePointer has been bound with three overloads:

	* A protected overridable (exported) method that uses IntPtr.
	* A public method without the parameter.
	* A public method with the parameter typed as 'ref NSRange'.

	This makes sure the native method can be overridden if needed, while at
	the same time making it possible to call without providing the nullable
	parameter.

* Fix numerous ugly bindings:

	* There's a great nint/nuint confusion for parameters referring to
	  'character index' and 'glyph index'. XI seems to prefer nuint, while XM
	  seems to prefer nint. Standardize on nuint, since that's how Apple
	  created them.

	* Many methods have names than sound like Objective-C. Fix them all,
	  either right away when possible, or for XAMCORE_4_0.

	* Several parameter names have been modified to comply with our naming
	  guidelines (no abbreviations).

Fixes https://github.com/xamarin/xamarin-macios/issues/4740.
2018-10-01 14:17:28 +02:00
Aleksey Kliger de86392b6c [mmptest] System.Core doesn't depend on Mono.Posix in 2018-08
System.Core doesn't depend on Mono.Posix anymore since it's using the corefx
implementation of pipes now 0f0e31842f
2018-09-26 12:41:06 -04:00
Chris Hamons 4d7bd304e7
Update tests/README to document XM_TEST_NAME (#4880)
- https://github.com/xamarin/xamarin-macios/issues/3609
2018-09-26 10:24:49 -05:00
Rolf Bjarne Kvinge 8b7db1382d
[xtro] Only return 1 in case of failure in reporter. (#4877)
This solves two problems:

* xharness thinks it crashed if the exit code is neither 0 nor 1, and
  helpfully says so and tries to collect crash reports, which only ends up
  being confusing.

* The exit code is byte-sized on macOS. This means that trying to return 256
  actually returns 0 (success).
2018-09-25 20:32:22 +02:00
Manuel de la Pena ea63e4559c
[CoreMedia] Expose the CMSampleAttachmentKey interface. Fixes #4688 (#4841)
* [CoreMedia] Expose the CMSampleAttachmentKey interface. Fixes #4688

We have an issue when the user wants to use the CMAttachmentSample,
ideally, the user will want to do:

var cameraIntrinsicData = CMAttachmentBearer.GetAttachment(CMSampleAttachmentKey.CameraIntrinsicMatrixKey, sampleBuffer );

Instead of the current workaround:

var att = new CMSampleBufferAttachmentSettings (sampleBuffer.GetAttachments (CMAttachmentMode.ShouldNotPropagate));
var matrix = att.CameraIntrinsicMatrix;

With this push, we can allow the user use the first example provided in
this commit.

Fixes https://github.com/xamarin/xamarin-macios/issues/4688
2018-09-25 16:24:41 +02:00
Rolf Bjarne Kvinge 11d9fe68db
[mtouch/mmp/docs] Improve MT0091 to include how to enable the linker. Fixes #4549. (#4852)
Fixes https://github.com/xamarin/xamarin-macios/issues/4549.
2018-09-21 16:51:23 +02:00
Manuel de la Pena ddb0948376 [Metal] Fixe the size of structures. Fixes #4611 (#4838)
The structs MTLQuadTessellationFactorsHalf and
MTLTriangleTessellationFactorsHalf are wrong as per the header
definition:

```c
typedef struct {
    /* NOTE: edgeTessellationFactor and insideTessellationFactor are interpreted as half (16-bit floats) */
    uint16_t edgeTessellationFactor[4];
    uint16_t insideTessellationFactor[2];
} MTLQuadTessellationFactorsHalf;

typedef struct {
    /* NOTE: edgeTessellationFactor and insideTessellationFactor are interpreted as half (16-bit floats) */
    uint16_t edgeTessellationFactor[3];
    uint16_t insideTessellationFactor;
} MTLTriangleTessellationFactorsHalf;
```

We set the arrays size to be the correct one.

Fixes https://github.com/xamarin/xamarin-macios/issues/4611

* Add tests that ensure that the size of the managed structs is the same
as the native ones.

The values used have been checked against a native app compiled on 32
and 64 (iphone 5 and iphone X).
2018-09-21 09:33:27 -04:00
Aleksey Kliger 8eaf097104 Merge remote-tracking branch 'origin/master' into mono-2018-08 2018-09-20 16:40:54 -04:00
Aleksey Kliger 16481d4ec1 Merge remote-tracking branch 'origin/mono-2018-06' into mono-2018-08 2018-09-20 12:09:07 -04:00
Michał Żołnieruk 59a1cfbfa4 Added two missing NSString method bindings for splitting text (#4828)
* Added 2 missing NSString methods bindings (componentsSeparatedByString, componentsSeparatedByCharactersInSet)

* Removed redundant methods API versions, changed method names (to include verb), modified NET types to objC types

* Removed binded methods from sharpie tests

* Add whitespace to conform to coding guidelines.
2018-09-20 16:01:49 +02:00
Vincent Dondain 49ef936701
Merge pull request #4833 from VincentDondain/master-merge-xcode10
Merge branch 'xcode10' into master
2018-09-19 18:19:35 -04:00
Sebastien Pouliot c53b64da1d
Bump for Xcode 10.1 beta 1 (#4836) 2018-09-19 08:56:43 -04:00
Rolf Bjarne Kvinge 7354052e96
[NSLayoutManager] Fix potential NRE in NSLayoutManager.GetGlyphs when one of the parameters is null, (#4832) 2018-09-19 07:37:26 +02:00
Vincent Dondain 2174ec41a2 Merge branch 'xcode10' 2018-09-18 14:12:39 -04:00
Marek Safar ec02eb8f9f Merge remote-tracking branch 'origin/master' into mono-2018-06 2018-09-18 14:41:28 +02:00
Rolf Bjarne Kvinge 8e32ace58e
[Foundation] Bind NSMutableDictionary's addEntriesFromDictionary:. Fixes #4813. (#4819)
Fixes https://github.com/xamarin/xamarin-macios/issues/4813
2018-09-17 16:14:46 +02:00
Manuel de la Pena 422da1f8d4 [Tests] Remove IPV6 flaky test with an ignore. (#4815) 2018-09-14 10:05:17 -04:00
Sebastien Pouliot a94382d880 [xtro] Cleanup non used .todo files (#4811) 2018-09-14 07:38:01 +02:00
Manuel de la Pena eeca0b8780 [Tests] force the IP version to fix tests on bots. (#4805) 2018-09-13 14:13:21 -04:00
Aleksey Kliger fc7cba2ebc Merge remote-tracking branch 'origin/master' into mono-2018-08 2018-09-13 13:37:43 -04:00
Sebastien Pouliot 872ccd5a1d
[watchos][clockkit] Update for GM (#4801) 2018-09-13 05:54:08 -04:00
Sebastien Pouliot 121212ed37 [tests] Fix flaky SecProtocolMetadata.EarlyDataAccepted result (#4804)
Result is mostly, but not always, `false` and that _might_ be due
to how we're testing the API.

ref: https://github.com/xamarin/maccore/issues/1026
2018-09-13 11:41:27 +02:00
Sebastien Pouliot d3decb2117
[ios][coretelephony] Update for GM (#4803) 2018-09-13 03:56:20 -04:00
Chris Hamons c248d05c56 AppKit for Xcode 10 GM (#4795) 2018-09-13 02:45:47 -04:00
Chris Hamons fc70e46947 Add AVFoundation from Xcode 10 GM (#4796) 2018-09-13 01:38:55 -04:00
Vincent Dondain 68f28f680e [metal] Update for Xcode 10 GM (#4802) 2018-09-13 00:37:59 -04:00
Sebastien Pouliot 2be5eec4bf
[macos][adsupport] Update for GM (#4800) 2018-09-13 00:37:33 -04:00
Sebastien Pouliot ae064b89fe
[watchos][watchkit] Update for GM (#4799) 2018-09-12 23:03:19 -04:00
Vincent Dondain 535a1f39c6 [arkit] Update for Xcode 10 GM (#4797) 2018-09-12 22:14:00 -04:00
Sebastien Pouliot aa622c481a
Bump for Xcode10 GM (#4794)
Note that it included 173 new API so xtro files were updated to
- include new API in .todo
- add some backlog to .ignore files
2018-09-12 19:27:11 -04:00
Manuel de la Pena bed3770bae [Tests] Add missing tests for NWProtocolStack and fix NWParameters tests. (#4793) 2018-09-12 19:15:33 -04:00
Sebastien Pouliot 2c8f882896
[security] SecProtocolMetadata update and tests (#4792)
* Avoid `ArgumentNullException` in default/empty `SecProtocolMetadata.PeerPublicKey`
* Add two `SecProtocolMetadata.CreateSecret` API - disabled as the current tests (incomplete?) crash in unit tests
* Add basic unit tests for `[Sec|NW]ProtocolMetadata`
* Update xtro
2018-09-12 13:07:10 -04:00
Rolf Bjarne Kvinge 239d9031d6 [HealthKit] Use generated NSString-backed enums. Fixes #4183. (#4786)
This means less (duplicated) manual code, which means less errors, which also
means we're now getting some new members that previously weren't duplicated
correctly.

Fixes https://github.com/xamarin/xamarin-macios/issues/4183.
2018-09-12 11:23:02 -04:00
Manuel de la Pena e43ca080c7
[Tests] Add missing tests for NWPath. (#4765) 2018-09-12 12:35:40 +02:00
Sebastien Pouliot 6af77f3fbe
[security] Add new SecCertificateCopyKey and SecTrustEvaluateWithError API with unit tests (#4784) 2018-09-11 12:08:05 -04:00
Sebastien Pouliot 46fb26efc8
[security] Fix 'SecCertificate2.Certificate' call and add some tests (#4783) 2018-09-11 08:41:38 -04:00
Sebastien Pouliot 0841238e29
[naturallanguage] Fix helper API for `NLTagger.GetTag` and cleanup/fix other API. Fixes #4774 (#4782)
* Move `NLTag` to static class (instead of enum) since it's not used in API, except along NSString. Fixes https://github.com/xamarin/xamarin-macios/issues/4774
* Add new member to `NLLanguage` to avoid `ArgumentNullException` when it has not been evaludated (API returns `null`), see unit tests;
* Add `[Params]` to `NLTagger` constructors so they are easier to use (no need to create the array in source);
* Fix `GetTag` so it returns (`out`) the `NSRange`, it's natively a `NSRangePointer`;
* Fix `GetTag[s]` API with changes to `NLTag` de-enumification;
* Add unit tests
2018-09-11 08:40:42 -04:00
Bernhard Urban cdbf1227d2 [mtouch] add mixed-mode support (#4751)
* [mtouch] add --interp-mixed option

When enabling this option, mtouch will AOT compile `mscorlib.dll`.  At
runtime that means every method that wasn't AOT'd will be executed by
the runtime interpreter.

* [mtouch] Add support to --interpreter to list the assemblies to (not) interpret.

* [msbuild] Simplify interpreter code to use a single variable.

* Fix whitespace.

* [mtouch] Move mtouch-specific code to mtouch-specific file.

* [msbuild] An empty string is a valid value for 'Interpreter', so make it a non-required property.

* [mtouch] Add sanity check for aot-compiling interpreted assemblies.
2018-09-11 14:06:53 +02:00
Rolf Bjarne Kvinge 93c672fbf1 Disable the GC pump by default. Fixes #4772. (#4781)
Fixes https://github.com/xamarin/xamarin-macios/issues/4772
2018-09-10 16:42:42 -04:00
Sebastien Pouliot f9cc0ec6d6
[msbuild] Set 'CopyNuGetImplementations' to true for app extensions. Fixes #4235 and #4237. (#4512) (#4648) (#4773)
In Xamarin.iOS.Common.targets, just before the _CompileToNative target, we
modify the mtouch references to ensure that we get the lib assemblies for
nugets, and not the ref references:

9e31d07ecc/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.Common.targets (L784-L791)

This logic removes nuget references, and then re-adds any copy-local dll
references.

This works fine in executable projects, but not in library projects (aka
extensions), because nugets aren't copied for library projects:

cf4b0a12cf/src/Microsoft.NuGet.Build.Tasks/Microsoft.NuGet.targets (L86)

So we need to set the CopyNuGetImplementations variable to 'true' for our
library projects.

Fixes https://github.com/xamarin/xamarin-macios/issues/4235.
Fixes https://github.com/xamarin/xamarin-macios/issues/4237.

* [tests] Redirect MSBuildExtensionsPath to MSBuildExtensionsPathFallbackPathsOverride when running msbuild for package reference tests.

This fixes a problem where nuget restore would fail for projects with
PackageReferences, because a variable would be empty and msbould would try to
write to /:

    nuget restore ../MyAppWithPackageReference/MyAppWithPackageReference.csproj
    MSBuild auto-detection: using msbuild version '15.0' from '/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/msbuild/15.0/bin/'.
    Restoring packages for /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/msbuild/tests/MyAppWithPackageReference/MyAppWithPackageReference.csproj...
    Committing restore...
    Generating MSBuild file /MyAppWithPackageReference.csproj.nuget.g.props.
    Path / is a directory

This will become unnecessary when PR #4111 is merged.

* Add Xamarin.Mac test showing that fix is not needed (?!?)

* Add AppExtension test with packagereference

* Make extension actually have json code generated

* Fix ProjectTypeGuids of checked in extension projects, as they were not openable in VSfM

* XM extension test now correctly fails

* Now that we have a failing test, fix XM same as rest of platforms

* Disable XM tests due to msbuild redirect sadness

* Disable iOS tests as well due to #4110

* Disable iOS tests by using the Ignore attribute.

Disable tests by using the Ignore attribute, because just commenting out the
TestCase attributes makes the test fail:

    1) NotRunnable : Xamarin.iOS.Tasks.ProjectReferenceTests.BasicTest
       No suitable constructor was found
2018-09-10 08:29:23 -04:00
Rolf Bjarne Kvinge 385592b128
[runtime] Throw a managed exception instead of trying to call a null function pointer if the runtime tries to call a function that has been linked away. (#4770)
* [runtime] Throw a managed exception instead of trying to call a null function pointer if the runtime tries to call a function that has been linked away.

* [tests] Add new file for Xamarin.Mac tests.

* Direct people to file issues in github.
2018-09-10 10:56:02 +02:00
Sebastien Pouliot ce207d263f
Order additional arguments after response file (#4607) (#4612) (#4769)
- https://github.com/xamarin/xamarin-macios/issues/4594
- There were being adding _before_ the response file which meant options that were overriding defaults were not being honored
2018-09-07 08:52:38 -04:00
Rolf Bjarne Kvinge 28347f9167 Merge remote-tracking branch 'origin/master' into mono-2018-06 2018-09-06 16:37:37 +02:00
Rolf Bjarne Kvinge bd32b74347
Add support for delegates as return values in protocol members. Fixes #4102. (#4758)
* Add support for delegates as return values in protocol members. Fixes #4102.

This required a few changes:

* The generator now emits the DelegateProxy attribute for property getters in
  protocol interfaces.
* The generator now emits the DelegateProxy attribute in ProtocolMember
  attributes (and the ProtocolMember attribute has been extended with
  additional properties for this purpose).
* The generator now emits the BlockProxy attribute for the parameter in
  property setters.
* The generator now emits the BlockProxy attribute in ProtocolMember
  attributes for property setters.
* The static registrar now emits the metadata token for the
  DelegateProxy.DelegateType property into the generated code so that the
  DelegateProxy attribute itself isn't needed at runtime. This is required
  when the dynamic registrar has been optimized away.

Fixes https://github.com/xamarin/xamarin-macios/issues/4102.

* [tests] Update MX4105 test to expect new warnings.
2018-09-06 16:20:23 +02:00
Rolf Bjarne Kvinge 5a75130899
[xharness] Implement getting a reader for captured logs. (#4764)
Fixes an exception that might occur if the code that generates the html report
tries to process such logs (by trying to read them).
2018-09-06 16:13:49 +02:00
Manuel de la Pena 136f994470
[Security] Add missing SecProtocolMetadata missing API. (#4727)
* [Security] Add missing SecProtocolMetadata missing API.

This is a partial commit that contains most of the missing methods for
the handlers API on SecProtocolMetadata. The not added ones are more
complicated and will be added in a later commit.
2018-09-06 12:17:00 +02:00
Rolf Bjarne Kvinge bbb8a41ef8
[xharness] Automatically pass -Os to the native linker when building watchOS extensions with the linker disabled. (#4757)
This works around https://github.com/xamarin/xamarin-macios/issues/4689 for our own unit tests.

This also requires bumping the build timeout, because unfortunately using -Os
makes builds *much, much* slower.
2018-09-06 10:16:53 +02:00
Sebastien Pouliot 0057b7c58e
[imageio] Add availability attributes to `Maker*Dictionary` fields (#4753)
and remove custom test that introspection already cover (based on
the availability attributes)
2018-09-05 13:27:46 -04:00
Sebastien Pouliot d3cf710e15
[coremidi] Enable some API for iOS (only for macOS right now) and simplity xtro files (#4752) 2018-09-05 11:52:04 -04:00
Manuel de la Pena fb9ae90937 [Network] Small change in NWParameters to use a property for RequiredInterface. (#4742)
Added missing tests. Also modified the Interface property in
NWParameters and fix a small typo in NWProtocolMetadata.
2018-09-05 08:07:10 -04:00
Rolf Bjarne Kvinge e5ee9606f0
[tests] Ignore RuntimeTest.MainThreadDeallocationTest if all optimizations are enabled and not linking everything. Fixes #4566. (#4744)
This test contains code that requires the dynamic registrar unless the code is
optimized, and it's only optimized if the assembly is linked, which only
happens if linking all assemblies.

So disable the test if dynamic registrar is removed (which happens when all
optimizations are enabled) and the assembly isn't linked.

Fixes https://github.com/xamarin/xamarin-macios/issues/4566.
2018-09-05 12:47:52 +02:00
Vincent Dondain 982074c42c [tests] Fix System.Net.Http and link sdk tests (#4731)
* [bcl-test] Fix System.Net.Http tests after new NSUrlSession default

The tests did not like the new HttpClient default option. See: 6cfc8b5a60

* [link-sdk] Use https for AsyncTest

Potential fix for https://github.com/xamarin/maccore/issues/977.
2018-09-03 11:08:35 +02:00
Rolf Bjarne Kvinge 1a6e382ee9
[tests] Skip LinkSdkRegressionTest.ForeignKey_650402 on watchOS because it uses features not supported with bitcode. (#4738) 2018-09-03 08:05:30 +02:00
Rolf Bjarne Kvinge f0ac7594a8
[xharness] Add project configurations to run & debug Makefile generation. (#4739)
This also required a minor fix to allow relative directories as the root
directory.
2018-09-03 07:56:44 +02:00
Rolf Bjarne Kvinge ce5331f2c9 Merge remote-tracking branch 'origin/master' into mono-2018-06 2018-08-31 17:26:03 +02:00
Rolf Bjarne Kvinge 0a456544b6 [tests] Reference GuiUnit_Net_4_5 using a project reference.
This makes sure GuiUnit is built when the main project is built.
2018-08-31 14:48:15 +02:00
Rolf Bjarne Kvinge bd1ddd5b9d Merge remote-tracking branch 'origin/master' into mono-2018-08 2018-08-31 12:40:37 +02:00
Vlad Brezae d491fd46b6 Assembly.LoadFile accepts only absolute path 2018-08-30 09:24:06 +02:00
Vincent Dondain 9754d505ff [ObjCRuntime] Add missing .ctor to 'Class' (#4726)
- Fixes #4441: [generator] Binding with return value of Class [] do not do the right thing
  (https://github.com/xamarin/xamarin-macios/issues/4441)
- Turns out the logic to put INativeObjects into NSArrays was already in place. We simply needed to add the missing (IntPtr handle, bool owns) overload to `Class`.
- Uncommented AppKit `registeredImageRepClasses` since it was using `Class []`. Tested locally and it works fine.
- Reimplemented `Foundation`'s `NSSecureUnarchiveFromDataTransformer` and its test which were also using `Class []`.
2018-08-29 16:23:36 -04:00
Vincent Dondain 6cfc8b5a60
[msbuild] Change MtouchHttpClientHandler default (#4172)
If the Http Client value isn't set in the csproj, we should default to `NSUrlSessionHandler` which is also what the Xamarin.iOS Analysis rules try to enforce.
2018-08-29 15:16:19 -04:00
Manuel de la Pena bae5a202b4 [Network] Add missing handlers on NWPathMonitor. (#4722) 2018-08-29 14:20:32 -04:00
Sebastien Pouliot 807efadf38
[coreimage] Add generator support for CIVector[] and enable it in CIMeshGenerator. Fix #4226 (#4715) 2018-08-29 13:29:34 -04:00
Rolf Bjarne Kvinge 6f686a7729
[xharness] Don't try to run aggregated tasks when none of the contained tasks built successfully. (#4706)
Fixes this HarnessException when all simulator tasks for an aggregated run
simulator task fails to build (i.e. there is nothing to run):

    Harness exception for 'Tests for iOS_Unified32': System.InvalidOperationException: Sequence contains no elements
        at System.Linq.Enumerable.First[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x0000b] in /Users/builder/jenkins/workspace/build-package-osx-mono/2018-04/external/bockbuild/builds/mono-x64/external/corefx/src/System.Linq/src/System/Linq/First.cs:16
        at xharness.AggregatedRunSimulatorTask+<ExecuteAsync>d__9.MoveNext () [0x00312] in /work/maccore/master/xamarin-macios/tests/xharness/Jenkins.cs:3582
        --- End of stack trace from previous location where exception was thrown ---
        at xharness.TestTask+<RunInternalAsync>d__92.MoveNext () [0x00113] in /work/maccore/master/xamarin-macios/tests/xharness/Jenkins.cs:2352
2018-08-29 17:42:28 +02:00
Sebastien Pouliot c1593fbd1f
[tests][intro] Adjust introspection to run without failure on iOS 6.1.6 (#4720) 2018-08-29 09:10:03 -04:00
Sebastien Pouliot bc2dfe335f
[tests] Add missing availability attribute and adjust tests to run on iOS 7 devices. Fix #4437 (#4719)
Fix https://github.com/xamarin/xamarin-macios/issues/4437 where the Mac check
always returns `true` on iOS so the `||` condition was always `true`.
2018-08-29 09:09:43 -04:00
Marek Safar c844903be5 Merge remote-tracking branch 'origin/master' into mono-2018-06 2018-08-29 14:52:33 +02:00
Vlad Brezae 6fdcb8d036 Assembly.LoadFile accepts only absolute path 2018-08-29 12:28:42 +03:00
Manuel de la Pena 2838b988b9 [Network] Update to Xcode 10 beta 3. (#4686)
Adds the new functions added in beta 3 and cleans some of the xtro
files.
2018-08-28 15:11:25 -04:00
Rolf Bjarne Kvinge 41c719d2ab
[xharness] Fix failure message when nunit test times out. (#4708)
Fixes an issue where MTouch test would seemingly fail immediately:

    Failure: Execution timed out after 0 minutes.

when it's just saying that it failed out after [2 hours and] 0 minutes.

Fix it by showing the total number of minutes in the failure message.
2018-08-28 17:18:02 +02:00
Sebastien Pouliot e407a403d2
Merge pull request #4672 from spouliot/xcode10-xtro-fix-4407
[xtro] Fix xtro to report some missing API. Fix #4407
2018-08-28 10:16:30 -04:00
Rolf Bjarne Kvinge bf4015bfbd
[xharness] Detect another scenario where failing to pair devices, and try again with a new watch device. Fixes maccore#961. (#4702)
Fixes https://github.com/xamarin/maccore/issues/961.
2018-08-28 07:41:22 +02:00
Sebastien Pouliot 115f6fbaa7 [xtro] Update API information for Intents 2018-08-27 14:34:34 -04:00
Rolf Bjarne Kvinge 144ebda1e6
[tests] Update MT4134 with new iOS 12 frameworks. Fixes maccore#954. (#4701)
Fixes https://github.com/xamarin/maccore/issues/954.
2018-08-27 16:44:20 +02:00
Sebastien Pouliot 0f888f0c66 [xtro][foundation] Ignore 'new' missing API found by xtro 2018-08-27 08:51:51 -04:00
Sebastien Pouliot 45221e68e3 [xtro][macos] Ignore, at least temporarily, some missing API found by (fixed) xtro 2018-08-27 08:42:13 -04:00
Sebastien Pouliot c244b5cafb [mediaplayer] Add missing API found by xtro 2018-08-24 16:05:43 -04:00
Sebastien Pouliot 9697898932 [xtro][notificationcenter] Annotate missing API found by xtro 2018-08-24 14:44:37 -04:00
Sebastien Pouliot b6f2058a13 [watchkit] Comment missing API found by xtro 2018-08-24 11:25:43 -04:00
Sebastien Pouliot 8dd288925b [uikit] Fix/comment missing API reported by xtro 2018-08-24 11:24:47 -04:00
Rolf Bjarne Kvinge 5da88bfbc7
[mmp] Show an error if trying to build a 32-bit app with Xcode 10. Fixes #4569. (#4684)
Fixes https://github.com/xamarin/xamarin-macios/issues/4569.
2018-08-24 12:28:10 +02:00
Sebastien Pouliot b2677889ca [xtro][vision] Ignore VNRequest::init since it's an abstract type and not a designated initializer 2018-08-23 15:51:27 -04:00
Sebastien Pouliot e970cd75b4 [xtro][modelio] Ignore a deprecated API (not needed) 2018-08-23 15:28:52 -04:00
Sebastien Pouliot 707334f95e [spritekit] Enable missing API in watchOS (found by xtro) 2018-08-23 15:26:44 -04:00
Sebastien Pouliot 0e785e3668 [coredata] NSCoreDataCoreSpotlightDelegate is 64bits only
causing
```
Introspection.MacApiCtorInitTest.ApiCtorInitTest.DefaultCtorAllowed: 1 potential errors found in 925 default ctor validated:
Default constructor not allowed for CoreData.NSCoreDataCoreSpotlightDelegate : Could not create an native instance of the type 'CoreData.NSCoreDataCoreSpotlightDelegate': the native class hasn't been loaded.
It is possible to ignore this condition by setting ObjCRuntime.Class.ThrowOnInitFailure to false.
```
when running intro for mac unified 32 bits
2018-08-23 15:23:26 -04:00
Manuel de la Pena c60397c984
[Gamekit] Re-enable introspection tests in the skipped selectors. (#4682) 2018-08-23 17:16:12 +02:00
Sebastien Pouliot ffaa5d61ce [xtro][mapkit][watchos] Ignore MKErrorDomain since the enum for errors is not available 2018-08-23 10:59:13 -04:00
Sebastien Pouliot 29f7fbadc7 [xtro][iads] Comment category/static members bound manually 2018-08-23 10:51:37 -04:00
Sebastien Pouliot 0dc94fd73c [gamekit] Ignore some additional (deprecated) API on watchOS 2018-08-23 10:44:13 -04:00
Sebastien Pouliot d0ecdc9c42 [corewlan] Add missing API found by xtro 2018-08-23 10:21:27 -04:00
Sebastien Pouliot 5adbf19400 [coreimage] Add missing API found by xtro 2018-08-23 09:47:05 -04:00
Sebastien Pouliot 216966ee87 [coredata] Add some missing API spotted by xtro 2018-08-22 16:51:24 -04:00
Sebastien Pouliot beeb0021c5 [coreanimation][macos] Update for xtro 2018-08-22 15:46:26 -04:00
Sebastien Pouliot 387e45093d [cloudkit] Add back (an updated) watchOS-CloudKit.ignore 2018-08-22 15:42:55 -04:00
Sebastien Pouliot b348cc56b6 [contacts] Add comment why 'CNPhoneNumber::init' is not bound (since it's reported by xtro) 2018-08-22 15:42:07 -04:00
Sebastien Pouliot 10d13cc986 [cloudkit] Review missing 'init' on some types, in particular allow them outside watchOS 2018-08-22 14:56:51 -04:00
Rolf Bjarne Kvinge 2ba60926a5
[introspection] Fix typo test on Mojave. (#4677)
Fixes:

    [FAIL] Typo in METHOD name: TcpSetDisableAckStretching - Ack, Type: NWProtocolOptions
    [FAIL] Typo in METHOD name: get_DrmProtected - Drm, Type: ITLibMediaItem
    [FAIL] Typo in FIELD name: DistinguisedKind - Distinguised, Type: ITLibPlaylistProperty
    [FAIL] Typo in FIELD name: IsDrmProtected - Drm, Type: MediaItemProperty
2018-08-22 16:54:43 +02:00
Rolf Bjarne Kvinge ea4909034b
[xharness] Be resilient when trying to copying contents from an inexistent file. (#4676)
Should fix this (or at the very least not prevent xharness from writing out the report):

    21:07:30.3947450 Failed to write log: System.IO.FileNotFoundException: Could not find file '/Users/builder/Library/Logs/CoreSimulator/6DA2ED3C-B1FA-4D0B-9DD6-113E5F9A1381/system.log'.
    File name: '/Users/builder/Library/Logs/CoreSimulator/6DA2ED3C-B1FA-4D0B-9DD6-113E5F9A1381/system.log'
        at System.IO.__Error.WinIOError (System.Int32 errorCode, System.String maybeFullPath) [0x00207] in /Users/builder/jenkins/workspace/build-package-osx-mono/2018-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/io/__error.cs:188
        at System.IO.FileInfo.get_Length () [0x00038] in /Users/builder/jenkins/workspace/build-package-osx-mono/2018-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/io/fileinfo.cs:171
        at xharness.CaptureLog.Capture () [0x0004a] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tests/xharness/Log.cs:334
        at xharness.CaptureLog.Flush () [0x00008] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tests/xharness/Log.cs:373
        at xharness.Jenkins.GenerateReportImpl (System.IO.Stream stream, System.IO.StreamWriter markdown_summary) [0x017db] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tests/xharness/Jenkins.cs:2012
        at xharness.Jenkins.GenerateReport (System.Boolean only_if_ci) [0x00075] in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tests/xharness/Jenkins.cs:1313
2018-08-22 16:54:19 +02:00
Sebastien Pouliot 19683847c2 [avfoundation] Add missing API (previously missed by xtro) 2018-08-22 09:14:10 -04:00
Sebastien Pouliot 885ee6f3c1 [corebluetooth] Update xtro (we provided something else, enabling events) 2018-08-21 16:59:51 -04:00
Sebastien Pouliot 5ee10601d9 [xtro] Add new todo 2018-08-21 16:04:28 -04:00
Sebastien Pouliot b8e50117f9 [xtro] Remove duplicated filter method from reporter and share the new common one 2018-08-21 16:03:37 -04:00
Sebastien Pouliot 75b146b9d2 [xtro] Update u2todo not to create todo files for non supported frameworks 2018-08-21 15:42:36 -04:00
Sebastien Pouliot b8d1a8739e [xtro] Skip '+type:new' selectors, we do not bind them 2018-08-21 14:21:12 -04:00
Sebastien Pouliot 4b7d631dba [xtro] Fix how we get selectors so parameter-less are not skipped 2018-08-21 14:20:25 -04:00
Rolf Bjarne Kvinge 1d0e058636
[xharness] Replace existing content in TCC.db. Might fix maccore#951. (#4666)
There seems to be an issue where adding stuff to the TCC.db might fail
partially. In that case we try again, but we try to add every entry once more,
which now might fail due to existing entries.

So always replace when adding new entries in TCC.db. Also dump the database
when done to help debugging if it turns out this doesn't fix maccore#915.

Might fix https://github.com/xamarin/maccore/issues/951.
2018-08-21 19:11:23 +02:00
Sebastien Pouliot d99be7a03e
Merge d15-8 into xcode 10 2018-08-21 09:29:35 -04:00
Sebastien Pouliot d9edf5928d
[avfoundation] Deprecate 'AVMediaTypeTimedMetadata' (#4655)
AVMediaTypeTimedMetadata has been obsoleted since iOS 6 but was totally
removed (returns null) in iOS 12.

Adjust test and provide a (better) deprecation warning for developers.
2018-08-21 08:57:44 -04:00
Manuel de la Pena 92d6e94707 [NaturalLanguage] Change return type to use double instead on nuint. Fixes #4642 (#4654)
The docs or headers do not specify the exact type. Using double to be
sure.

Issue: https://github.com/xamarin/xamarin-macios/issues/4642
2018-08-20 21:44:24 -04:00
Sebastien Pouliot 213590b3c0
[tests] Re-enable AVPlayerViewController.PrepareForPrerollAds test (broken in early betas) (#4656) 2018-08-20 21:15:58 -04:00
Manuel de la Pena 82dfd4fb59 [AppKit] Xcode 10 beta 6 support. (#4653) 2018-08-20 18:00:32 -04:00
Sebastien Pouliot c7e791a514
[tests] Re-enabled CIBarcodeGenerator tests (failed in earlier betas) (#4651) 2018-08-20 15:26:59 -04:00
Manuel de la Pena c5974d94ef [CarPlay] Update for Xcode 10 beta 6. (#4650) 2018-08-20 14:49:02 -04:00
Rolf Bjarne Kvinge 5995833903
[tests] Improve F# test's assert message. (#4649)
Before in case of failure:

    [FAIL] FSharpTest.SprintfTest :   Expected: True
        But was:  False
    	  at fsharp.FSharpTest.SprintfTest () [0x00052] in /work/maccore/mono-master/xamarin-macios/tests/fsharp/FSharpTests.fs:34
    	  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)

After in case of failure:

    [FAIL] FSharpTest.SprintfTest :   String lengths are both 24. Strings differ at index 10.
      Expected: "1111 2222 3333 4444 5555"
      But was:  "1111 2222 4444 3333 5555"
      ---------------------^
    at fsharp.FSharpTest.SprintfTest () [0x00044] in /work/maccore/mono-master/xamarin-macios/tests/fsharp/FSharpTests.fs:33
    at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
2018-08-20 19:06:01 +02:00
Vincent Dondain c2a993e4c9
[IntentsUI] Update for Xcode 10 beta 6 (#4640) 2018-08-20 09:20:01 -04:00
Rolf Bjarne Kvinge a619226b36
[msbuild] Set 'CopyNuGetImplementations' to true for app extensions. Fixes #4235 and #4237. (#4512)
* [msbuild] Set 'CopyNuGetImplementations' to true for app extensions. Fixes #4235 and #4237.

In Xamarin.iOS.Common.targets, just before the _CompileToNative target, we
modify the mtouch references to ensure that we get the lib assemblies for
nugets, and not the ref references:

9e31d07ecc/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.Common.targets (L784-L791)

This logic removes nuget references, and then re-adds any copy-local dll
references.

This works fine in executable projects, but not in library projects (aka
extensions), because nugets aren't copied for library projects:

cf4b0a12cf/src/Microsoft.NuGet.Build.Tasks/Microsoft.NuGet.targets (L86)

So we need to set the CopyNuGetImplementations variable to 'true' for our
library projects.

Fixes https://github.com/xamarin/xamarin-macios/issues/4235.
Fixes https://github.com/xamarin/xamarin-macios/issues/4237.

* [tests] Redirect MSBuildExtensionsPath to MSBuildExtensionsPathFallbackPathsOverride when running msbuild for package reference tests.

This fixes a problem where nuget restore would fail for projects with
PackageReferences, because a variable would be empty and msbould would try to
write to /:

    nuget restore ../MyAppWithPackageReference/MyAppWithPackageReference.csproj
    MSBuild auto-detection: using msbuild version '15.0' from '/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/msbuild/15.0/bin/'.
    Restoring packages for /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/msbuild/tests/MyAppWithPackageReference/MyAppWithPackageReference.csproj...
    Committing restore...
    Generating MSBuild file /MyAppWithPackageReference.csproj.nuget.g.props.
    Path / is a directory

This will become unnecessary when PR #4111 is merged.

* Add Xamarin.Mac test showing that fix is not needed (?!?)

* Add AppExtension test with packagereference

* Make extension actually have json code generated

* Fix ProjectTypeGuids of checked in extension projects, as they were not openable in VSfM

* XM extension test now correctly fails

* Now that we have a failing test, fix XM same as rest of platforms

* Disable XM tests due to msbuild redirect sadness

* Disable iOS tests as well due to #4110

* Disable iOS tests by using the Ignore attribute.

Disable tests by using the Ignore attribute, because just commenting out the
TestCase attributes makes the test fail:

    1) NotRunnable : Xamarin.iOS.Tasks.ProjectReferenceTests.BasicTest
       No suitable constructor was found
2018-08-20 13:43:48 +02:00
Rolf Bjarne Kvinge da436c479b [msbuild] Exclude some code in Metal tasks when building the tests.
Exclude some code in Metal tasks when building the tests to avoid the
significant complexity it would be to add the required source files to the
mtouch test project.
2018-08-20 12:59:55 +02:00
Rolf Bjarne Kvinge 1bbfbd26ff
[F# tests] Default to LinkSdk for device builds. (#4643)
Makes device builds (and uploads) much faster.

I've checked all other tests, and this was the only one not using LinkSdk
(except tests that don't on purpose, such as linker tests).
2018-08-20 07:42:32 +02:00
Rolf Bjarne Kvinge 5f4327ab0f
[CoreGraphics] Fix CGFunction to work after being disposed. (#4644)
We have a test for CGFunction, and in iOS 12 the behavior changed where
previously the CGFunction was invoked immediately when rendering, it's now
retained and only called later.

This is troublesome for the test, because it disposes the managed CGFunction
when it thinks it's completed. Since the function is invoked way later, the
test now crashes. Ops.

The obvious fix is to change the test to dispose the CGFunction later. This
falls flat when finding out that "later" is undetermined. Native code retains
the CGFunction, and can do whatever it wishes with it until it's released, and
there's no way to know when that is.

OK: what about not disposing the CGFunction, and letting the GC do its job?
This also falls flat, because there's a circular reference between the native
CGFunction and the managed wrapper, preventing any of them from being released
automatically by the GC. The only way to break the circular reference is to
dispose the managed wrapper.

So, can we fix the circular reference? Unfortunately not, because we can't
monitor the native CGFunction's retain count, which is required in order to
switch the native->managed link between weak and strong according to the
retain count.

This leaves one solution (that I could come up with at least): make sure
everything works fine after disposing the managed wrapper.

This involves a few things:

* Only break the native->managed connection (the 'gch' GCHandle) when the
  native CGFunction is freed. This is accomplished by using the API provided
  by Apple for exactly that purpose (the 'release' callback field in the
  'CGFunctionCallbacks' struct).

* Use a static variable for the 'CGFunctionCallback' struct and its contents.
  This solves another potential problem: the GC could have collected the
  delegate to the 'EvaluateCallback' function at any point.

* Don't null out the 'evaluate' delegate in Dispose. This leaves the user with
  no way to break a potential circular reference through that delegate (since
  it will never be null), so provide a property that makes it possible for
  users to explicitly null out the delegate ('EvaluateFunction').

* Only call the 'evaluate' callback if it's not null.

This also has the additional advantage that test (and any customer code
running into the same issue) works without modifications.
2018-08-20 07:40:54 +02:00
Sebastien Pouliot b5ef7b134b
Merge branch 'xcode10' into xcode10-rebase-15.8 2018-08-17 14:53:03 -04:00
Vincent Dondain c5169120bf
[msbuild] Update 'metal' binary path for Xcode 10 (#4601)
- Fixes #4576: [xcode10] 'Metal Game' fails to build. (https://github.com/xamarin/xamarin-macios/issues/4576)

In Xcode 10 Apple moved the "metal" binary from `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/usr/bin/metal` to `/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/metal`.
2018-08-17 10:24:02 -04:00
Rolf Bjarne Kvinge 4d30955c7a [tests] Remove some 32-bit XM tests.
32-bit macOS is dying, and keeping these tests running is not worth the effort.
2018-08-17 12:49:41 +02:00
Rolf Bjarne Kvinge c94553f253
[tests] Re-add [Test] attribute accidentally removed in 3f16223deb. (#4626) 2018-08-17 11:07:18 +02:00
Vincent Dondain 185ccbb0ad [xtrp] Fix merge issues
- Re-added unclassified to todo.
2018-08-16 22:57:32 -04:00
Rolf Bjarne Kvinge 965e1f7bcc Merge remote-tracking branch 'origin/xcode10' into xcode10-rebase-15.8 2018-08-16 17:09:30 +02:00
Sebastien Pouliot 878fdffea7
[foundation] Update for beta 6 (#4625) 2018-08-15 21:41:03 -04:00
Sebastien Pouliot 605b992c62
Bump for beta 6 (#4613) 2018-08-15 13:23:31 -04:00
Vincent Dondain 3548c44782
[metal] Update for Xcode 10 beta 1, 2, 3 & 4 (#4562) 2018-08-15 10:09:23 -04:00
Vincent Dondain eec95e881c Merge branch 'd15-8' into xcode10-rebase-15.8 2018-08-13 21:04:56 -04:00
Chris Hamons ecfc5ce917
Order additional arguments after response file (#4607)
- https://github.com/xamarin/xamarin-macios/issues/4594
- There were being adding _before_ the response file which meant options that were overriding defaults were not being honored
2018-08-13 13:09:31 -05:00
Manuel de la Pena 41fe079f9b [Generator] Ensure the correct error is raised when an Export is missing on a Property. (#4604)
The generator had a small bug in which we would get a NRE when a
property missed a Export attribute and had no WrapAttr. The issue is due
to the fact that an || is being used and does not shortcut when the
attribute is missing. In that case, the first Get check would pass and a
second attempt would happen with the set. In the case the set is missing,
we would get a NRE. The correct way is to ensure that we do have the get
and the set BEFORE the attr is checked.

The added test shows an example of the issue.
2018-08-09 16:06:14 -04:00
Sebastien Pouliot f471f9b591
[security] Update for beta 5 (only) change (#4600) 2018-08-09 10:12:07 -04:00
Sebastien Pouliot 0b7265193a
[coreservices] Update up to beta 5 (#4590)
Also avoid creating NSString instances for hidden constants where
only the handle is every used.
2018-08-08 12:38:03 -04:00
Manuel de la Pena 7c7f46da28
[iTunesLibrary] Xcode 10 beta 3 support. (#4462) 2018-08-08 16:34:16 +02:00
Manuel de la Pena 82d21bc211
[Tests] Fix failing tests on iOS 8. Fixes #4437 (#4592)
Some of the tests fail because the assert is looking at the wrong iOS
version. Looking at the API definitions:

* UIStackView - Available in iOS 9, not iOS 8.
* AudioServicesPlayAlertSoundWithCompletion - Available in iOS 9, not
iOS 8.

All the other tests reported in the issue pass.

Issue: https://github.com/xamarin/xamarin-macios/issues/4437
2018-08-08 16:14:04 +02:00
Miguel de Icaza 8960cc0022
Merge pull request #4251 from migueldeicaza/xcode10-network
[Network, Security] Bindings for Network, Security, DispatchIO and some classes needed to port samples
2018-08-08 09:55:06 -04:00
Sebastien Pouliot 4a9b7f1f22
[tests][xtro] Merge MPSRayIntersector results into parent MetalPerformanceShaders framework (#4589) 2018-08-08 08:52:04 -04:00
Manuel de la Pena f4cd485b38 [ImageIO] Add support for Xcode 10 beta 5. (#4587) 2018-08-07 21:06:40 -04:00