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

2073 Коммитов

Автор SHA1 Сообщение Дата
Martin Baulig 7f15a6173e Comment-out the asserts in the MailX1 and SecRecordTest tests.
The assert message `TestRuntime.AssertNotWatchOS ("X509Certificate (byte[]) doesn't work on watchOS")`
is clearly wrong as `X509Certificate (byte[])` is supposed to work on all platforms.

Still investigating whether the rest of the test will work on watchOS or not (and why if it doesn't).
2018-10-15 11:56:25 -04: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
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
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