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

5546 Коммитов

Автор SHA1 Сообщение Дата
Manuel de la Pena 6c12862d3e
[XHarness] Remove not needed ignore file. (#5456)
Since we support filtering via categories, we do not longer need the
ignore file in these tests.
2019-01-24 13:11:11 +01:00
Manuel de la Pena debcee412c
[XHarness] Clean the System.Net.Http ignore file. (#5459)
Since we support categories, there is a test that does not longer needs
to be ignored in ios and tvos but needs to be in watchos (we do not yet
have the correct test assembly for the platform).
2019-01-24 13:10:40 +01:00
Manuel de la Pena 5165f1cdde
[Xharness] Remove not longer needed System.Service.Model.Web ignore file. (#5460)
Since we support categories, the file is not longer needed since the
failing tests are part of an ignored category.
2019-01-23 12:28:54 +01:00
Manuel de la Pena 99bda10aa4
[XHarness] Clean the System.Data ignore. (#5458)
Since we support filtering there are a number of tests that were ignore
that are part of a ignored category, therefore, they are not needed in
the file.
2019-01-23 10:17:46 +01:00
Manuel de la Pena a63c1c7f62
[XHarness] Fix small typo in test projet name. (#5461)
The small typo made the test projects from mac and ios/tvos/watchos be
in different nodes in the xhanress web page which is ugly. They now wil
appear in the same node.
2019-01-23 10:15:36 +01:00
Manuel de la Pena 02f65cc119
[XHarness] Remove not needed ignore file for System.Transactions. (#5457)
Since we support filtering via categories, we do not longer need the
ignore file in these tests.
2019-01-22 23:24:44 +01:00
Manuel de la Pena a71f421a67
[XHarness] Reneable Sytem.Security tests on iOS, TvOS and WatchOS. (#5421)
Reneable the tests and ignore those failing ones.

Fixes  https://github.com/xamarin/maccore/issues/1139
2019-01-22 23:18:45 +01:00
Manuel de la Pena a97dddf6db
[XHarness] Remove not needed dll from the test templates. (#5454) 2019-01-22 17:49:03 +01:00
Rolf Bjarne Kvinge 52de2ea588
[CoreFoundation] Add UnmanagedFunctionPointer attribute to delegate used for native callbacks. Fixes #5447. (#5453)
Fixes https://github.com/xamarin/xamarin-macios/issues/5447.
2019-01-22 17:41:03 +01:00
Sebastien Pouliot 91250bb615
[generator] Fix BI0000 when no argument semantics are present on a property. Fixes #5444 (#5451)
This can happen if a `[Wrap]` is used on the property getter (and setter)
instead of directly on the property.

In such condition we can safely assume that no dirty check is needed and
can continue with, unmodified, generation (using the wrapped content).

reference: https://github.com/xamarin/xamarin-macios/issues/5444
2019-01-22 09:52:39 -05:00
Sebastien Pouliot 3b098a5019
[appkit] Add missing `[NullAllowed]` on `NSDocument` API. Fixes #5349 (#5443)
That's an old binding, predating the nullability information from
header files.

reference: https://github.com/xamarin/xamarin-macios/issues/5349
2019-01-22 09:20:39 -05:00
Manuel de la Pena d9dcc9ae21
[XHarness] Add support for filtering categories in NUnit. (#5446) 2019-01-22 14:59:36 +01:00
Rolf Bjarne Kvinge ab12d72419
[tests] Adjust DispatchBlock tests according to minimum OS. (#5435)
* [tests] Adjust DispatchBlock tests according to minimum OS.

* [tests] Fix monotouch-test build.
2019-01-21 07:49:28 +01:00
Philippe Creytens 2b271cb997 [coremedia] Add BaseFontSizePercentageRelativeToVideoHeight to CMTextMarkupAttributes. Fixes #5429
reference: https://github.com/xamarin/xamarin-macios/issues/5429
2019-01-18 09:09:42 -05:00
Bernhard Urban 269ccd1495
[xharness] recognize newer watches (#5419)
* [xharness] recognize newer watches

* s/iPod/Watch/
2019-01-18 14:00:01 +01:00
Rolf Bjarne Kvinge 3e9673560f
[xharness] Bump documentation tests timeout. (#5404)
Bump the documentation tests timeout. It can take a while to run the
documentation tests when they're run in parallel with other tests.

Reference: 85130ddbb7 (commitcomment-31935455)

Fixes https://github.com/xamarin/maccore/issues/1350.
2019-01-18 07:51:25 +01:00
Manuel de la Pena 879629bc9d
[XHarness] Reenable the System tests on iOS, WatchOS and TVOs. (#5425)
All the failing tests have been ignored. There are a large number of
tests ignored on the watchOS platform beacuase atm the iOS test dll is
used.

Fixes https://github.com/xamarin/maccore/issues/1135
2019-01-17 22:58:31 +01:00
Manuel de la Pena cf1a034e96
[XHarness] Reenable the NUnit Corlib tests from the iOS Mono SDK. (#5316)
Reenable the tests on iOS/TvOS/WatchOS. Fixes xamarin/maccore#1153
2019-01-17 22:55:06 +01:00
Manuel de la Pena 8b68cdc62f
[XHarness] Report issues with the TestFixtureSetup (#5428)
There are a number of tests that use a TestFixtureSetup method that
fails. While the xml results report these errors, if a user runs xharness locally,
he will not get the errors reported. This issue meant that we had
different errors reported in jenkis and locally.
2019-01-17 22:54:06 +01:00
Sebastien Pouliot b7f1903ca1
[appkit] Allow `null` on `NSAppearanceCustomization.Appearance`. Fixes #5403 (#5431)
> The default value for this property is nil, which means that the
> receiver uses the appearance it inherits from the nearest ancestor that
> has set an appearance. When you set appearance to a non-nil value, the
> receiver and the views it contains use the specified appearance.
> https://developer.apple.com/documentation/appkit/nsappearancecustomization/1533925-appearance?language=objc

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

Unit test added. Without it we would not have found it did not work until
it was reported again (since it would have been silently ignored).

reference: https://github.com/xamarin/xamarin-macios/issues/5408
2019-01-17 16:00:47 -05:00
Miguel de Icaza c9e424c9ab [CoreFoundation, ObjCRuntime] Add DispatchBlock APIs, in particular those that surface QOS (#5389)
* [CoreFoundation, ObjCRuntime] Add DispatchBlock APIs, in particular those that surface QOS

* Make the struct readonly

Co-Authored-By: migueldeicaza <miguel@gnome.org>

* Make the field read-only

Co-Authored-By: migueldeicaza <miguel@gnome.org>

* Add Qos to the list of accepted words

* To add a finalizer that can dispose the object, turn this into a class,
rather than being just a wrapper around the native handle.

* Fix copyright.

* Fix whitespace issues.

* Adjust visibility of existing DispatchBlock method we don't want to make public

* Refactor a bit.

* Make DispatchObject inherit from NativeObject to avoid some code duplication.
* Put all P/Invokes in BlockLiteral.
* Simplify block code somewhat.
* Sprinkle [BindingImpl (Optimizable)] where needed.
* Add both constructors and static Create methods to create DispatchBlocks.
* Add an explicit operator to get an Action delegate from a DispatchBlock, and
  an Invoke method to directly call said delegate.
* Add a few convenience API:
	* Wait with a TimeSpan overload.
	* Cancelled property.
	* Notify with an Action overload.

* Add some DispatchQueue overloads to make DispatchBlock actually usable.

* Seal DispatchBlock.

Users shouldn't subclass DispatchBlock.

* Add tests.

* DispatchBlockFlags is native-sized (nuint).

* Fix a few more nint issues.

* Add availability attributes.

* Fix introspection tests.

* Fix xtro.

* Fix xammac tests.
2019-01-17 18:40:58 +01:00
Chris Hamons 645eef16f7
[macos] Always create new NSFont instance when surfacing (#5423)
- This is similar to what iOS does with UIFont
- Found in iOS originally with https://bugzilla.xamarin.com/show_bug.cgi?id=25511
2019-01-17 09:26:56 -06:00
Sebastien Pouliot 7caea3ef0f
[generator] Flow the `[NullAllowed]` information from properties when generating `_Extensions` methods. Fixes #5408 (#5424)
Otherwise we can end up without argument checks and de-reference null
arguments to get the `Handle` property.

Example from #5403 binding original issue:

```diff
diff --git a/src/appkit.cs b/src/appkit.cs
index daf22b75..48390cb8 100644
--- a/src/appkit.cs
+++ b/src/appkit.cs
@@ -431,6 +431,7 @@ namespace AppKit {
        interface NSAppearanceCustomization {

                [Mac (10,9)]
+               [NullAllowed]
                [Export ("appearance", ArgumentSemantic.Strong)]
                NSAppearance Appearance { get; set; }
```

would generate

```csharp
		[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
		public static void SetAppearance (this INSAppearanceCustomization This, NSAppearance value)
		{
			global::AppKit.NSApplication.EnsureUIThread ();
			global::ObjCRuntime.Messaging.void_objc_msgSend_IntPtr (This.Handle, Selector.GetHandle ("setAppearance:"), value.Handle);
		}
```

which would throw an `NullReferenceException` if `value` is `null`
because the `[NullAllowed]` on the `PropertyInfo` was not considered when
generating the extension method - at least not for the call, the null
check was fine (and removed).

Reviewing the PR **requires** checking the bot-generated "Generator Diff" too.

Tests to be added along the binding fix for #5403

Note: this replace the (now closed) PR https://github.com/xamarin/xamarin-macios/pull/5415

reference: https://github.com/xamarin/xamarin-macios/issues/5408
2019-01-17 09:09:57 -05:00
Manuel de la Pena fea85dc569
[XHarness] Reenable SystemTransactionsTests on iOS, TvOS and WatchOs. (#5411)
Fixes https://github.com/xamarin/maccore/issues/1134
2019-01-16 19:12:20 +01:00
Bernhard Urban cfbb22356c Bump Xamarin.MacDev (#5420)
Commit list for xamarin/Xamarin.MacDev:

* xamarin/Xamarin.MacDev@2e94b6d Add ARM64_32 to the list of supported architectures (#42)
* xamarin/Xamarin.MacDev@0f10d4a Added MacOS v10.13 to the list of known versions

Diff: 2029b1703e...2e94b6d274
2019-01-16 11:16:08 -05:00
Sebastien Pouliot 8757f36ca5
Clarify usage of `[NullAllowed]` in our bindings (#5417)
First part to fix https://github.com/xamarin/xamarin-macios/issues/5416

We currently allow the `[NullAllowed]` attribute anywhere an attribute
can be used on metadata (i.e. no `AttributeUsage` is used).

However the generator only process the attribute in some specific cases,
*silently* ignoring others. This leads to situations such as

```csharp
[NullAllowed, Export ("setInputHandler:")]
void SetInputHandler (AUInputHandler handler);
```

where a `null` argument will throw an `ArgumentNullException` because
`[NullAllowed]` does not mean anything on a method declaration.

To avoid such confusion `[NullAllowed]` should be added on each parameter
(even if all of them requires it) and if a `null` return value is
possible then use `[return: NullAllowed]`.

This PR allows XI/XM bindings to be built, without error, when this
patch is applied.

```diff
diff --git a/src/generator-attributes.cs b/src/generator-attributes.cs
index 965d8469..77162253 100644
--- a/src/generator-attributes.cs
+++ b/src/generator-attributes.cs
@@ -250,6 +250,7 @@ public class IsThreadStaticAttribute : Attribute {

 // When applied to a member, generates the member as static
 // and passes IntPtr.Zero or null if the parameter is null
+[AttributeUsage (AttributeTargets.Property | AttributeTargets.ReturnValue | AttributeTargets.Parameter)]
 public class NullAllowedAttribute : Attribute {
        public NullAllowedAttribute () {}
 }
```

Note that it's unlikely we'll apply this patch _as-is_ to avoid breaking
existing projects. A better approach (in a future PR) is to have the
generator (instead of the C# compiler) issue a warning (instead of an
error) when a `NullAllowed` is ignored.
2019-01-16 09:42:45 -05:00
Manuel de la Pena 34ca0496fc
[XHarness] Reneable the SystemNetHttpTests on iOS, TvOS and WatchOS. (#5405)
Failing iOS tests are ignored WatchOS is running the iOS tests until we have the tests in the SDK
for the watch runtime.

Fixes https://github.com/xamarin/maccore/issues/1144
Fixes https://github.com/xamarin/maccore/issues/1145

Mono issue: https://github.com/mono/mono/issues/12430
2019-01-16 12:16:22 +01:00
Manuel de la Pena c455a1d7b9
[XHarness] Reneable Mono.Security tests on WatchOS. (#5412)
Fixes https://github.com/xamarin/maccore/issues/1142
2019-01-16 12:13:34 +01:00
Manuel de la Pena 293ade0a30
[XHarness] Reneable the SystemSecurity tests on iOS, TvOS and WatchOS (#5410)
Some of the test classes are abstract, and we needed to change the
generator to ignore that fact. Before the change, we would have 0 test
cases.

Failing tests are ignored.

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

Mono issue https://github.com/mono/mono/issues/12446
2019-01-16 12:11:53 +01:00
Miguel de Icaza a2c80ed8e4
Merge pull request #5402 from migueldeicaza/fix-uigesturerecognizer-regression
[UIKit] UIGestureRecognizer's custon OnDispose method needs to queue the actual operation on the main thread
2019-01-15 14:15:44 -05:00
Sebastien Pouliot 9baec99be2
[tests] Fix `ARCondigurationTest.GetSupportedVideoFormats` on older devices (#5409)
`ARImageTrackingConfiguration` requires iOS 12 (Xcode 10) so split it in
a separate test case.

Fixes https://github.com/xamarin/maccore/issues/1335
2019-01-15 13:43:52 -05:00
Manuel de la Pena f63030d267
[XHarness] Remove System.Threading.Tasks.Dataflow_xunit-test from iOS, TvOS and WatchOS. (#5407)
As with other tests, this have been added because they were present when
we built the test assemblies locally, but they are not present in the
Mono SDK.

Fixes https://github.com/xamarin/maccore/issues/1132
2019-01-15 17:38:18 +01:00
Manuel de la Pena d7813b3275
[XHarness] Remove System.Runtime.Serialization.Formatters.Soap_test from iOS, TvOS and WatchOS (#5406)
As with other tests, this assembly was added when we built the tests in
the iOS makefile, but they are not present in the Mono SDK.

Fixes https://github.com/xamarin/maccore/issues/1140
2019-01-15 17:35:05 +01:00
Manuel de la Pena 2ba9a34198
[XHarness] Reenable SystemLinqXunit on watchOS and TvOS. (#5395) 2019-01-15 12:11:09 +01:00
Miguel de Icaza a06b3f25d3 [UIKit] UIGestureRecognizer's custon OnDispose method needs to queue the actual operation on the main thread 2019-01-14 14:51:56 -05:00
Manuel de la Pena 20595ce988
[XHarness] Remove not needed bcl tests for (#5400)
Remove tests that are not provided in the Mono iOS SDK for Mono.Runtime.

Fixes https://github.com/xamarin/maccore/issues/1141
2019-01-14 18:37:57 +01:00
Bernhard Urban 1c60e65423 [tests] fix Symbols test for tvOS with interpreter (#5399)
One more frame must be checked due to different interp2native transition
on that platform.
2019-01-14 11:58:08 -05:00
Manuel de la Pena e53bfac5c0
[XHarness] Reenable System.Core tests on ios/tvos/watchos (#5397)
Fixes https://github.com/xamarin/maccore/issues/1143

Mono issue: https://github.com/mono/mono/issues/12419
2019-01-14 17:16:41 +01:00
Manuel de la Pena 102339ad47
[XHarness] Reenable the System.ServiceModel tests from the bcl. (#5384)
Fixes https://github.com/xamarin/maccore/issues/1138

A new mono issue was added: https://github.com/mono/mono/issues/12417
2019-01-14 16:58:36 +01:00
Manuel de la Pena 392cd4342a
[XHarness] Reneable System.Numerics XUnit tests on TvOS and WatchOS. (#5396) 2019-01-14 16:50:17 +01:00
Bernhard Urban 85130ddbb7
Bump mono (#5393)
Commit list for mono/mono:

* mono/mono@51c4f45402 [2018-08] [merp] Batch of fixes (#12095)
* mono/mono@3bf37058fd [interp] use interp_lmf wrapper for interp2native on platforms with wonky sigcontext (#12348)

Diff: 25a8be9111...51c4f45402
2019-01-14 15:21:27 +01:00
Manuel de la Pena e880c6c156
[XHarness] Remove not longer present bcl tests. (#5382)
As of Mono SDK 25a8be91115255341dd80ce4a225415feec46f56 we do not longer
have the test dll and therefore the test project can be removed.
2019-01-14 13:24:08 +01:00
Vincent Dondain 9d37f9583f
[msbuild/tests] Ensure our FrameworkList files have correct assemblies (#5367)
One mono bump (6f2ebedb74 (diff-e801bb766cbaad95b50b1487b865f971)) changed our `Xamarin.iOS-FrameworkList.xml.in` (and the tvOS and watchOS ones) and added 2 files

```
<File AssemblyName="System.Buffers" Version="4.0.99.0" />
<File AssemblyName="System.Memory" Version="4.0.99.0" />
```

Around the same time this change was made in the IDE: e355f65870/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Assemblies/TargetFramework.cs (L260)
That means that VSMac, when creating a new cache file listing the assemblies, won’t scan the assemblies in those directories `/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS`.
This resulted in an incomplete cache file missing most assemblies leading to the IDE showing red checkmarks for known and installed assemblies.

Ideally the FrameworkList files we ship should have a list of all the assemblies with PublicKeyToken and friends (the framework shouldn't be lazy and expect the IDEs to generate that file for us).

This commit ships a test using the same logic as the IDE to populate the FrameworkList file. The test will report any missing assembly and print the xml element that should be added to the file.
E.g: `<File AssemblyName="FSharp.Core" Version="3.98.4.0" PublicKeyToken="b03f5f7f11d50a3a" ProcessorArchitecture="MSIL" />`
Then it's only a matter of copy/pasting that (:

Note: even though this is the msbuild tests for iOS land I'm also scanning the Xamarin.Mac files here for simplicity.

We also scan all assemblies in `/Facades`.

Discussed in slack but adding all the facades assemblies doesn't compromise the project in the IDE (e.g: we still can't add incorrect assemblies) and it's required for some NuGet conflict resolution.
See: ac8fd9e60a
2019-01-11 13:59:22 -05:00
Sebastien Pouliot 974617d144
[mtouch] Provide a better (and single) error message when the interpreter is enabled in simulator builds. (#5376)
Before

```
clang : error : no such file or directory: '/Users/poupou/git/xamarin/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/MonoTouch.iphonesimulator.sdk/usr/lib/libmono-ee-interp.a'
clang : error : no such file or directory: '/Users/poupou/git/xamarin/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/MonoTouch.iphonesimulator.sdk/usr/lib/libmono-icall-table.a'
clang : error : no such file or directory: '/Users/poupou/git/xamarin/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/MonoTouch.iphonesimulator.sdk/usr/lib/libmono-ilgen.a'
error MT5209 : Native linking error : clang: error: no such file or directory: '/Users/poupou/git/xamarin/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/MonoTouch.iphonesimulator.sdk/usr/lib/libmono-ee-interp.a'
error MT5209 : Native linking error : clang: error: no such file or directory: '/Users/poupou/git/xamarin/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/MonoTouch.iphonesimulator.sdk/usr/lib/libmono-icall-table.a'
error MT5209 : Native linking error : clang: error: no such file or directory: '/Users/poupou/git/xamarin/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/MonoTouch.iphonesimulator.sdk/usr/lib/libmono-ilgen.a'
MTOUCH : error MT5202: Native linking failed. Please review the build log.
    0 Warning(s)
    7 Error(s)
```

After

```
MTOUCH : error MT0141: The interpreter is not supported in the simulator. Do not pass --interpreter when building for the simulator.
    0 Warning(s)
    1 Error(s)
```
2019-01-11 11:38:22 -05:00
Manuel de la Pena adc9ddccf3
[XHarness] Reenable the System.Data tests from the bcl. (#5379) 2019-01-11 16:56:30 +01:00
Rolf Bjarne Kvinge 0075415c39
[xharness] Add support for GitHub authentication, and use it in Jenkins. (#5380)
This makes it much less probable to hit any rate limits, because authenticated
rate limits are much higher (5000 requests/hour vs 60 requests/hour).
2019-01-11 15:48:16 +01:00
Rolf Bjarne Kvinge e1061ee196
[xharness] Move javascript and css to external files. (#5378)
This makes editing them a bit simpler.

There are no functional changes.
2019-01-11 15:25:36 +01:00
Manuel de la Pena 6a1ecaabb0
[XHarness] Reenable the System.IO.Compression.Filesystem tests and ignore those failing ones. (#5374) 2019-01-11 12:22:48 +01:00
Rolf Bjarne Kvinge 0496a39b72
Bump maccore to get fix for maccore#1325. (#5366)
* Bump maccore to get fix for maccore#1325.

Commit list for xamarin/maccore:

* xamarin/maccore@6324465797 [install-qa-provisioning-profiles] Make sure we find ruby and its related tools. (#1324)
[...] Many irrelevant SoM commits [...]

Diff: e3d92b50d6...6324465797

* Bump maccore to get an additional fix.

Commit list for xamarin/maccore:

* xamarin/maccore@83bd122dd3 [install-qa-provisioning-profiles] Make sure we find pencil_pusher. (#1328)
* xamarin/maccore@2df4e9934d Merge pull request #1327 from xamarin/swift-o-matic-override-init
* xamarin/maccore@a95796666b Bump to ignore stubbed constructors.

Diff: 6324465797...83bd122dd3
2019-01-11 07:27:02 +01:00
Sebastien Pouliot c740cdfc26
Bump mono to head of 2018-08 (#5375)
Commit list for mono/mono:

* mono/mono@25a8be9111 Bump CoreFX to bring a fix for #12093
* mono/mono@29e0e642da [Android] Fix build with NDK r18 (#11016) (#12291)
* mono/mono@7b44d5719e [tests] Remove an invalid assertion on System.IO.DriveInfo
* mono/mono@3fad9a7a1c Update DateTimeTest.cs
* mono/mono@6b6fd890ee Update mono/metadata/culture-info-tables.h
* mono/mono@8f50f96e8f Add tests
* mono/mono@1edf795ae0 ko-* specific AM/PM designators

Diff: 9671417e21...25a8be9111
2019-01-10 15:37:07 -05:00