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

1614 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge ed886f6181 [tests] Refactor several tests to use new-style syntax.
Failure are reported much better, and the testing is more accurate and extensive.
2018-02-14 01:13:17 +01:00
Rolf Bjarne Kvinge 564e433bbd [tests] Adjust tests after new optimization was implemented. 2018-02-14 01:12:26 +01:00
Rolf Bjarne Kvinge 9e9e479ab2 [monotouch-test] Adjust new test to not try to reference IMDLComponent on watchOS (where it doesn't exist). 2018-02-14 01:11:44 +01:00
Manuel de la Pena 7472c8237d
[Foundation] Add not bound NSDateComponentUndefined. Fixes 60740 (#3471)
Added the value and provided tests that show the API usage. Value was
inferred from the headers:

NSDateComponentUndefined = NSIntegerMax
2018-02-13 20:38:24 +01:00
Rolf Bjarne Kvinge 5b53c134d8 [xharness] Run monotouch-test with all optimizations enabled as well. 2018-02-13 19:38:35 +01:00
Rolf Bjarne Kvinge 1de94d444b [static registrar] Create a table of interface -> protocol in the static registrar.
Create a table of interface -> protocol in the static registrar, since we need
to be able to look up a protocol given a managed type without looking at the
(possibly linked away) [Protocol] attribute.
2018-02-13 19:38:35 +01:00
Rolf Bjarne Kvinge 0af9a6744d [xharness] Add a new test variation for xammac tests: release with all optimizations enabled. 2018-02-13 19:38:34 +01:00
Rolf Bjarne Kvinge ea3316465b [tests] Add a test to make sure the protocol attributes are properly removed. 2018-02-13 19:38:34 +01:00
Rolf Bjarne Kvinge 1c77da63cf [tests][mtouch] Update a few tests according to recent changes. 2018-02-13 19:38:34 +01:00
Rolf Bjarne Kvinge 883038788a
[tests] Fix relative paths in mmptest and make cloned XM nunit projects work properly. (#3464)
* [tests] Fix relative paths in mmptest and make cloned XM nunit projects work properly.

Fixes this build problem with mmptest:

    /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/mmptest/CustomBuildActions.targets: error : Command 'make bin/SimpleClassDylib.dylib bin/SimpleClassStatic.a bin/Mobile-static/MobileBinding.dll' exited with code: 255.

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

* [mmp] Improve Driver.IsDefaultMarshalingManagedExceptionMode to work before MarshalManagedException has been initialized.

Fixes this test failure:

    1) Failed : Xamarin.MMP.Tests.MMPTests.UnifiedDebugBuilds_ShouldLinkToPartialStatic_UnlessDisabled
      Debug build should use partial static registrar
      Expected: True
      But was:  False

This regressed in 0561618460, where we wouldn't
properly select the partial static registrar because the initialization order
changed and we'd do it before selecting the default exception marshaling mode.

Changing Driver.IsDefaultMarshalingManagedExceptionMode to work before
MarshalManagedException has been initialized to its default value fixes the
problem.
2018-02-13 17:19:31 +01:00
Rolf Bjarne Kvinge 86753c8276
[tests] Produce a better test failure message when verifying the number of warnings. (#3465) 2018-02-13 15:01:34 +01:00
Sebastien Pouliot 7c45477e40
[foundation][uikit] Add missing [DesignatedInitializer] on default constructor (#3454)
Like reported by xtro (data files updated)
using the new, simpler `[DesignatedDefaultCtor]` attribute
2018-02-12 22:52:33 -05:00
Rolf Bjarne Kvinge a2afb8597f
[xharness] Don't try to connect to unusable devices. (#3456) 2018-02-12 14:43:16 +01:00
Rolf Bjarne Kvinge 4422045626
[xharness] Fixing cloning of XM projects with custom elements. (#3458)
Fixes various build errors in the System.IdentityModel,
System.IO.Compression[.FileSystem], System.Security and System.ServiceModel
tests.
2018-02-12 14:15:55 +01:00
Rolf Bjarne Kvinge 8da06d7c55
[xharness] Adjust (add) which files cause the generator tests to execute slightly. (#3457) 2018-02-12 14:15:30 +01:00
Manuel de la Pena d0037ddc42
[Tests] Ensure that tests do not fail due to the locale. Fixes #3445 (#3448) 2018-02-09 21:14:57 +01:00
Alex Soto a97cb69cc2 [StoreKit] Update to Xcode 9.3 Beta 2 (#3436) 2018-02-09 14:11:12 -05:00
Alex Soto 13b196ec6b [Appkit] Update to Xcode 9.3 beta 2 (#3433) 2018-02-09 14:10:41 -05:00
Manuel de la Pena 62480fb0e2
[Metal] If the device is not supported, skip certain tests. Fixes #3389 (#3444)
* [Metal] If the device is not supported, skip certain tests. Fixes #3389
2018-02-09 18:21:22 +01:00
Sebastien Pouliot 1c3f56b926
[src] Add a few missing [RequiresSuper] attributes. Fix #3253 (#3429)
Those were missed because xtro did not scan ObjC categories for
`objc_requires_super` attributes.

Fixing the naming mapping (to consider inlined categories) also
uncovered a few API with extraneous [DesignatedInitializer] attributes
Those were deprecated (API) and moved into categories so xtro missed
the designated initializer was removed.

All your `base`, well `super` in ObjC, now belong to us :)

https://github.com/xamarin/xamarin-macios/issues/3253
2018-02-08 08:44:36 -05:00
Sebastien Pouliot 8c73211776
[webkit] Add NSUserInterfaceValidations conformance to WebView and WKWebView (#3431)
Fix remaining xtro todo on webkit
2018-02-08 08:35:53 -05:00
Sebastien Pouliot ec5b1b7a32
[xtro][passkit] Clean xtro todo for a missing designated initializer (#3432)
it's already fixed in master
2018-02-08 08:35:06 -05:00
Rolf Bjarne Kvinge 0e66298a15
[xharness] Clone XM projects. (#3427)
* [tests][xammac] Fix a few path calculations to not be hardcoded.

* [xharness] Clone XM projects.

Cloning projects before building them will also clone project references,
which will make it possible to build multiple projects in parallel, when those
projects have common project references.

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

* [xharness] Fix XM project cloning

* Don't clone Classic projects (they're solutions, and xharness doesn't understand them).
* Clonee projects properly when cloning execution tasks.

* [xharness] GuiUnit needs specialized cloning.

The GuiUnit project uses relative paths to write to files outside the project
directory, which means that multiple GuiUnit project files may write to the
same location.

So special-case GuiUnit cloning to make those paths subdirectories of the
project's directory instead.

* [xharness] Process imported targets when cloning projects.

Also make the msbuild-mac's custom targets file independent of the location of
the project file by making all paths relative to the custom targets file.
2018-02-08 14:32:48 +01:00
Sebastien Pouliot 8e9284f355
Bump ObjectiveSharpie to a version that supports choosing its Xcode. (#3409) (#3428)
Bump ObjectiveSharpie to a version that supports choosing which Xcode to use,
and also change xtro to do exactly that.

Fixes https://github.com/xamarin/maccore/issues/627.
2018-02-07 23:19:48 -05:00
Sebastien Pouliot bc80460409
[imageio] Update for xcode 9.3 beta 2 (#3411)
Two constants with `__IPHONE_NA` were changed to `__IPHONE_11_3`.

Also decorate with [TV] and [Watch] attributes since they are implicit,
i.e. not in the headers but available in tvOS 11.3+ and WatchOS 4.3+
and, without our attributes, would seems to have been available much
earlier
2018-02-07 21:35:56 -05:00
Rolf Bjarne Kvinge 337335a5dd
[xharness] Run xtro tests when Make.config changes. (#3408) 2018-02-07 22:09:06 +01:00
Alex Soto 5bf7f0c542
[SceneKit] Adds NullAllowed to ISCNSceneRenderer.OverlayScene (#3410) (#3423)
Fixes xamarin/xamarin-macios#3392

It seems swift has this property listed as an optional[0] and
an Apple sample[1] sets this to null so `ISCNSceneRenderer.OverlayScene`
needs to have `[NullAllowed]` even if ObjC headers do not have
nullability information.

[0]: https://developer.apple.com/documentation/scenekit/scnscenerenderer/1524051-overlayskscene
[1]: https://github.com/xamarin/xamarin-macios/issues/3392
2018-02-07 15:02:30 -06:00
Alex Soto 8dbd20000c
[SceneKit] Adds NullAllowed to ISCNSceneRenderer.OverlayScene (#3410)
Fixes xamarin/xamarin-macios#3392

It seems swift has this property listed as an optional[0] and
an Apple sample[1] sets this to null so `ISCNSceneRenderer.OverlayScene`
needs to have `[NullAllowed]` even if ObjC headers do not have
nullability information.

[0]: https://developer.apple.com/documentation/scenekit/scnscenerenderer/1524051-overlayskscene
[1]: https://github.com/xamarin/xamarin-macios/issues/3392
2018-02-07 12:36:41 -06:00
Rolf Bjarne Kvinge 44041f6863
Bump ObjectiveSharpie to a version that supports choosing its Xcode. (#3409)
Bump ObjectiveSharpie to a version that supports choosing which Xcode to use,
and also change xtro to do exactly that.

Fixes https://github.com/xamarin/maccore/issues/627.
2018-02-07 19:21:49 +01:00
Rolf Bjarne Kvinge 838f31f522
[tests] Tweak the new IntPtrSizeTest for release builds. Fixes #3395. (#3397)
Fixes https://github.com/xamarin/xamarin-macios/issues/3395.
2018-02-07 12:05:18 +01:00
Vincent Dondain 60a17f1c11 Bump Xcode to 9.3 beta 2 (#3405) 2018-02-07 04:44:58 -05:00
Chris Hamons 46382d86b8
[ImageIO] Update to Xcode 9.3 Beta 1 (#3339) 2018-02-06 11:51:06 -06:00
Rolf Bjarne Kvinge 97230c28e1
Optimize calls to BlockLiteral.SetupBlock to inject the block signature. (#3391)
* [linker] Optimize calls to BlockLiteral.SetupBlock to inject the block signature.

Optimize calls to BlockLiteral.SetupBlock[Unsafe] to calculate the block
signature at build time, and inject it into the call site.

This makes block invocations 10-15x faster (I've added tests that asserts at
least an 8x increase).

It's also required in order to be able to remove the dynamic registrar code in
the future (since calculating the block signature at runtime requires the
dynamic registrar).

* [mtouch/mmp] Add support for reporting errors/warnings that point to the code line causing the error/warning.

Add support for reporting errors/warnings that point to the code line causing
the error/warning by adding ErrorHelper overloads that take the exact
instruction to report (previously we defaulted to the first line/instruction
in a method).

* [tests] Add support for asserting filename/linenumber in warning messages.

* Make all methods that manually create BlockLiterals optimizable.

* [tests] Create a BaseOptimizeGeneratedCodeTest test that's included in both XI's and XM's link all test.

* [tests] Add link all test (for both XI and XM) to test the BlockLiteral.SetupBlock optimization.

* [tests] Add mtouch/mmp tests for the BlockLiteral.SetupBlock optimization.

* [tests][linker] Make the base test class abstract, so tests in the base class aren't executed twice.

* [tests][linker] Don't execute linkall-only tests in linksdk.

The optimization tests only apply when the test assembly is linked, and that
only happens in linkall, so exclude those tests in linksdk.

* [tests][mmptest] Update test according to mmp changes.

Fixes these test failures:

    1) Failed : Xamarin.MMP.Tests.MMPTests.MM0132("inline-runtime-arch")
    The warning 'MM0132: Unknown optimization: 'inline-runtime-arch'. Valid optimizations are: remove-uithread-checks, dead-code-elimination, inline-isdirectbinding, inline-intptr-size.' was not found in the output:
    	Message #1 did not match:
    		actual:   'Unknown optimization: 'inline-runtime-arch'. Valid optimizations are: remove-uithread-checks, dead-code-elimination, inline-isdirectbinding, inline-intptr-size, blockliteral-setupblock.'
    		expected: 'Unknown optimization: 'inline-runtime-arch'. Valid optimizations are: remove-uithread-checks, dead-code-elimination, inline-isdirectbinding, inline-intptr-size.'
    	Message #2 did not match:
    		actual:   'Unknown optimization: 'inline-runtime-arch'. Valid optimizations are: remove-uithread-checks, dead-code-elimination, inline-isdirectbinding, inline-intptr-size, blockliteral-setupblock.'
    		expected: 'Unknown optimization: 'inline-runtime-arch'. Valid optimizations are: remove-uithread-checks, dead-code-elimination, inline-isdirectbinding, inline-intptr-size.'

    2) Failed : Xamarin.MMP.Tests.MMPTests.MM0132("foo")
    The warning 'MM0132: Unknown optimization: 'foo'. Valid optimizations are: remove-uithread-checks, dead-code-elimination, inline-isdirectbinding, inline-intptr-size.' was not found in the output:
    	Message #1 did not match:
    		actual:   'Unknown optimization: 'foo'. Valid optimizations are: remove-uithread-checks, dead-code-elimination, inline-isdirectbinding, inline-intptr-size, blockliteral-setupblock.'
    		expected: 'Unknown optimization: 'foo'. Valid optimizations are: remove-uithread-checks, dead-code-elimination, inline-isdirectbinding, inline-intptr-size.'
    	Message #2 did not match:
    		actual:   'Unknown optimization: 'foo'. Valid optimizations are: remove-uithread-checks, dead-code-elimination, inline-isdirectbinding, inline-intptr-size, blockliteral-setupblock.'
    		expected: 'Unknown optimization: 'foo'. Valid optimizations are: remove-uithread-checks, dead-code-elimination, inline-isdirectbinding, inline-intptr-size.'

* [tests][linker] Fix typo.

Fixes this test failure:

    1) SetupBlock_CustomDelegate (Linker.Shared.BaseOptimizeGeneratedCodeTest.SetupBlock_CustomDelegate)
         Counter
      Expected: 1
      But was:  2

* [registrar] Minor adjustment to error message to match previous (and better) behavior.

Fixes this test failure:

    1) Failed : Xamarin.Registrar.GenericType_WithInvalidParameterTypes
    The error 'MT4136: The registrar cannot marshal the parameter type 'System.Collections.Generic.List`1<U>' of the parameter 'arg' in the method 'Open`1.Bar(System.Collections.Generic.List`1<U>)'' was not found in the output:
    	Message #1 did not match:
    		actual:   'The registrar cannot marshal the parameter type 'System.Collections.Generic.List`1<Foundation.NSObject>' of the parameter 'arg' in the method 'Open`1.Bar(System.Collections.Generic.List`1<U>)''
    		expected: 'The registrar cannot marshal the parameter type 'System.Collections.Generic.List`1<U>' of the parameter 'arg' in the method 'Open`1.Bar(System.Collections.Generic.List`1<U>)''

* [docs] mmp shows MM errors/warnings.

* [docs] Improve according to reviews.

* [tests] Fix merge failure causing test duplication.
2018-02-06 07:08:15 +01:00
Alex Soto dca6d79881
[generator] Teach generator about WrapAttribute on Getters and Setters (#3388)
* [generator] Teach generator about WrapAttribute on Getters and Setters

https://bugzilla.xamarin.com/show_bug.cgi?id=57870

`WrapAttribute` can now be used in property getters and setters,
this allows to Wrap virtually anything the way you need, for example
smart enums, consider the following API definition:

```csharp
// Smart enum.
enum PersonRelationship {
	[Field (null)]
	None,

	[Field ("FMFather", "__Internal")]
	Father,

	[Field ("FMMother", "__Internal")]
	Mother
}
```

```csharp
// Property definition.

[Export ("presenceType")]
NSString _PresenceType { get; set; }

PersonRelationship PresenceType {
	[Wrap ("PersonRelationshipExtensions.GetValue (_PresenceType)")]
	get;
	[Wrap ("_PresenceType = value.GetConstant ()")]
	set;
}
```

* Fix Feedback

* Fix doc error

* Update error message
2018-02-05 21:14:08 -06:00
Sebastien Pouliot e390fefe08
[linker] Mark all TypeConverter if TypeDescriptor is used. Fixes #3372 (#3396)
Moving to reference sources added a few, new converters so the existing
logic to preserve them was not complete.

This update the list of converters, sorted like the reference sources
(RS) for easier reviews.

It also adds:
* a canary test in "dont link" that will fail it the RS code change
or is replaced;
* more complete unit tests to ensure all cases works

https://github.com/xamarin/xamarin-macios/issues/3372
2018-02-05 21:19:46 -05:00
Rolf Bjarne Kvinge 9c2010e440
[registrar] Register models in the static registrar. (#3386)
* [registrar] Register models in the static registrar.

This also means we need to quiet a few types of warnings:.

* Models declares virtual methods of required protocol members. We don't
  export virtual methods (only when they're overridden are they exported),
  which results in numerous warnings about protocol members not being
  implemented:

        Xamarin.Mac.registrar.mobile.x86_64.m:37827:17: warning: method 'deviceBrowserView:selectionDidChange:' in protocol 'IKDeviceBrowserViewDelegate' not implemented [-Wprotocol]
        @implementation ImageKit_IKDeviceBrowserView__IKDeviceBrowserViewDelegate {
                        ^
        /Applications/Xcode92.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Quartz.framework/Frameworks/ImageKit.framework/Headers/IKDeviceBrowserView.h:29:1: note: method 'deviceBrowserView:selectionDidChange:' declared here
        - (void)deviceBrowserView: (IKDeviceBrowserView *)deviceBrowserView selectionDidChange: (ICDevice *)device;

* These two are the same as above, just for properties instead of methods.

        Xamarin.Mac.registrar.mobile.x86_64.m:31988:17: warning: auto property synthesis will not synthesize property 'boundingMapRect' declared in protocol 'MKOverlay' [-Wobjc-protocol-property-synthesis]
        @implementation MKOverlay {
                        ^
        /Applications/Xcode92.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/MapKit.framework/Headers/MKOverlay.h:24:43: note: property declared here
        @property (nonatomic, readonly) MKMapRect boundingMapRect;
                                                  ^
        Xamarin.Mac.registrar.mobile.x86_64.m:32002:1: note: add a '@synthesize' directive
        @end
        ^

        Xamarin.Mac.registrar.mobile.i386.m:28957:17: warning: property 'repeatCount' requires method 'repeatCount' to be defined - use @synthesize, @dynamic or provide a method implementation in this class implementation [-Wobjc-property-implementation]
        @implementation CAMediaTiming {
                        ^
        /Applications/Xcode92.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAMediaTiming.h:58:17: note: property declared here
        @property float repeatCount;
                ^

* [AVFoundation] Special-case AVCaptureDataOutputSynchronizer[Delegate] in the registrar for macOS.

This class and protocol were incorrectly added to our macOS bindings, but
since we can't remove them because it would break backwards compatibility, we
must skip them manually in the registrar, since the registrar would otherwise
produce uncompilable code:

    In file included from Xamarin.Mac.registrar.full.x86_64.m:2:
    ./Xamarin.Mac.registrar.full.x86_64.h:2929:63: error: 'AVCaptureDataOutputSynchronizerDelegate' is unavailable: not available on macOS
    @interface AVCaptureDataOutputSynchronizerDelegate : NSObject<AVCaptureDataOutputSynchronizerDelegate> {
                                                                  ^
    /Applications/Xcode92.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVCaptureDataOutputSynchronizer.h:101:11: note: 'AVCaptureDataOutputSynchronizerDelegate' has been explicitly marked unavailable here
    @protocol AVCaptureDataOutputSynchronizerDelegate <NSObject>
              ^
    In file included from Xamarin.Mac.registrar.mobile.x86_64.m:2:
    ./Xamarin.Mac.registrar.mobile.x86_64.h:3370:63: error: 'AVCaptureDataOutputSynchronizerDelegate' is unavailable: not available on macOS
    @interface AVCaptureDataOutputSynchronizerDelegate : NSObject<AVCaptureDataOutputSynchronizerDelegate> {

* [AVFoundation] Stub out AVCaptureDataOutputSynchronizer[Delegate] on macOS.

AVCaptureDataOutputSynchronizer[Delegate] were incorrectly added to our macOS
bindings, which makes the static registrar's life difficult. So remove those
bindings, and re-implemented them as normal classes, without any attributes,
which makes the static registrar ignore them (to a certain extent: enough to
not generate uncompilable code at least).

* [registrar] Remove more model exclusion code.

* [xtro] Update ignored entries.
2018-02-05 22:19:34 +01:00
Rolf Bjarne Kvinge 6b5870d668
[tests] Move linker tests to match introspection directory layout. (#3365)
* [tests] Move linker tests to match introspection directory layout.

Move linker tests to match introspectio directory layout: tests/linker/ios and
tests/linker/mac instead of tests/linker-ios and tests/linker-mac.

This creates a logical place for shared linker files (tests/linker).

* [tests] Fix path to GuiUnit_NET_4_5.csproj in sln as well.

This is the path used to find referenced projects when building Classic.

Fixes this build problem:

    warning: Referenced project 'GuiUnit_NET_4_5' not found in the solution.
    /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/common/mac/MacTestMain.cs(11,7) : error CS0246: The type or namespace name `GuiUnit' could not be found. Are you missing an assembly reference?
    /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/common/mac/MacTestMain.cs(64,42) : error CS0246: The type or namespace name `IMainLoopIntegration' could not be found. Are you missing an assembly reference?
    /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/common/mac/MacTestMain.cs(75,34) : error CS0246: The type or namespace name `InvokerHelper' could not be found. Are you missing an assembly reference?
2018-02-05 15:09:04 +01:00
Rolf Bjarne Kvinge 98edb545c9
[xharness] Store a computed make variable in a temporary variable to avoid computing it many times. (#3382)
This makes `make` in (with nothing to do) run 18x faster in tests/ (from 1.3s to 0.07s).
2018-02-02 17:17:59 +01:00
Rolf Bjarne Kvinge 1a260e542b
[tests] Build the native test library for macOS and create a binding project for it. (#3373)
* [tests] Build the native test library for macOS and create a binding project for it.

Also add the new binding project to the xammac and link all XM test projects,
which allows us to stop excluding tests that require the native library and
the corresponding bindings.

* [tests] Include more tests in xammac_tests.

* [tests] Correctly ignore the ObjC exception tests in release mode.
2018-02-02 11:14:44 +01:00
Rolf Bjarne Kvinge f905427739
[tests] Share supporting code between the mtouch and mmp tests. (#3374)
* [tests] Share supporting code between the mtouch and mmp tests.

Create a new class 'BundlerTool', which now contains most of the code in
MTouchTool that's also applicable to mmp (and the new MmpTool class).

This will make it easier to share tests between the mtouch and mmp tests.

Some tweaks are still probably required, but this should get us most of the
way.

* [tests] Fix generator tests after changes in shared test code.

* [tests] Add new file to the MSBuild/XM tests.
2018-02-02 07:09:04 +01:00
Rolf Bjarne Kvinge 32ea9bd930
[tests] Fix compiler warning. (#3375)
This file is included in several projects, some projects use property, some
don't (and report the warning). There's no harm in not setting this property
(it's expected), ignore the warning.
2018-02-01 19:07:23 +01:00
Rolf Bjarne Kvinge 83c8ba688a
[tests] Enable LLVM for all Release|Device configurations. (#3376)
This won't affect device tests on the bots (because those already set LLVM
manually when testing Release), but it becomes less confusing when trying to
reproduce any problems locally, since now the project configuration on disk
matches the tested configuration.
2018-02-01 17:59:40 +01:00
Rolf Bjarne Kvinge c3560bf726
[mmptest] Fix compiler warning by not including code we get from a reference. (#3366)
Fixes this:

    tests/common/mac/ProjectTestHelpers.cs(154,22): warning CS0436: The type 'StringUtils' in 'tests/mmptest/../../tools/common/StringUtils.cs' conflicts with the imported type 'StringUtils' in 'mmp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/mmptest/../../tools/common/StringUtils.cs'.
    tests/common/Configuration.cs(162,53): warning CS0436: The type 'StringUtils' in 'tests/mmptest/../../tools/common/StringUtils.cs' conflicts with the imported type 'StringUtils' in 'mmp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/mmptest/../../tools/common/StringUtils.cs'.
2018-02-01 07:35:35 +01:00
Rolf Bjarne Kvinge 83b81ca9f4
[Foundation] Simplify NSValue code to use [No*] instead of ifdefs. (#3364)
* [Foundation] Simplify NSValue code to use [No*] instead of ifdefs.

Also enable the MKCoordinateSpan and CLLocationCoordinate2D values for NSValue
in macOS, since they're now available (since macOS 10.9).

    Type Changed: Foundation.NSValue

    Added properties:

        public virtual MapKit.MKCoordinateSpan CoordinateSpanValue { get; }
        public virtual CoreLocation.CLLocationCoordinate2D CoordinateValue { get; }

* [Foundation] Mark the new NSValue selectors as 64-bit only.
2018-02-01 07:31:52 +01:00
Rolf Bjarne Kvinge 6fc7b1ea89
[tests] Run dont link, link all and link sdk tests in both Debug and Release in the simulator. Fixes #53181. (#3363)
* [xharness] Add support for running XI projects with different platform configurations.

* [xharness] Run dont link, link all and link sdk tests in both Debug and Release in the simulator. Fixes #53181.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=53181.

* [tests] Fix dont link to always optimize C# code in release mode.

* [tests] No need to weak link GameController anymore in dont link.

This was removed long ago from the Debug configurations, so remove it from the
Release configuration as well.
2018-01-31 14:56:22 +01:00
Chris Hamons 418f1a9590
[VideoToolbox] Update to Xcode 9.3 Beta 1 (#3313) 2018-01-31 08:51:50 -05:00
Vincent Dondain 4c25aa94bd
[arkit] Update for Xcode 9.3 beta 1 (#3343)
- Obsolete `ARFaceAnchor`'s default constructor because it's marked as unavailable.
- Obsolete `CreateFaceGeometry` in `ARSCNFaceGeometry` in favor of `Create` (same as `ARSCNPlaneGeometry`).
2018-01-30 17:09:16 -05:00
Rolf Bjarne Kvinge b632c2348e
[xharness] Don't discriminate iPods, they can be useful too. (#3355) 2018-01-30 17:11:04 +01:00
Rolf Bjarne Kvinge f786a88636
[tests] Make linker-ios tests look like they're from this century. (#3356) 2018-01-30 17:10:54 +01:00
Manuel de la Pena a49b01143f
[HomeKit] Update for Xcode 9.3 beta 1. (#3322)
* [HomeKit] Update for Xcode 9.3 beta 1.
2018-01-30 11:49:48 +01:00
Vincent Dondain 5cc720ff37
[backport][arkit] Fix 'Vertices', 'TextureCoordinates' and 'TriangleIndices' in 'ARFaceGeometry' (#3090) (#3342)
- Fixes bug #61056: [ARKit] TriangleIndices, Vertices and TextureCoordinates should be respectively short [], Vector3 [] and Vector2 []
(https://bugzilla.xamarin.com/show_bug.cgi?id=61056)
- Obsolete `short TriangleIndices`.
- Obsolete `Vector3 Vertices`.
- Obsolete `Vector2 TextureCoordinates`.
- Introduced new `short [] GetTriangleIndices ()`.
- Introduced new `Vector3 [] GetVertices ()`.
- Introduced new `Vector2 [] GetTextureCoordinates ()`.
2018-01-29 11:07:52 -05:00
Rolf Bjarne Kvinge 018f715344
[xharness] Ask mono to not attach gdb/ldb when XM tests crash. (#3307)
* [xharness] Ask mono to not attach gdb/ldb when XM tests crash.

Attaching gdb/ldb usually hangs, thus causing the test run to time out instead
of finishing early (due to the crash).

Also bump the timeout for finding crash reports to 60 seconds when the tests
crash, since macOS can be quite slow to create the crash report.

* [xharness] Timestamp mac logs to aid diagnostics.
2018-01-29 11:27:43 +01:00
Rolf Bjarne Kvinge 7a1eab513c
[xharness] Call VerifyRun for each subtest in the aggregated simulator test run. Fixes maccore #623. (#3331)
We must call VerifyRun for each subtest in the aggregated simulator test run
in order to mark those subtests as failed if there's no available device.

Fixes https://github.com/xamarin/maccore/issues/623.
2018-01-29 07:42:12 +01:00
Rolf Bjarne Kvinge a3b425bf97
[AVFoundation] Remove AVCaptureDataOutputSynchronizer[Delegate] from macOS. (#3336)
This class and protocol were incorrectly added to our macOS bindings.

The catch is that we can't remove them because it would break backwards
compatibility, so mark them for removal in XAMCORE_4_0.
2018-01-29 07:39:06 +01:00
Alex Soto a6204f2aa5
[Security] Update to Xcode 9.3 Beta 1 (#3344)
* [Security] Update to Xcode 9.3 Beta 1

Api diff:
- https://github.com/xamarin/xamarin-macios/wiki/Security-iOS-xcode9.3-beta1
- https://github.com/xamarin/xamarin-macios/wiki/Security-tvOS-xcode9.3-beta1
- https://github.com/xamarin/xamarin-macios/wiki/Security-watchOS-xcode9.3-beta1
- https://github.com/xamarin/xamarin-macios/wiki/Security-macOS-xcode9.3-beta1

* Update the xtro files

* Add SecCopyErrorMessageString binding
2018-01-27 16:26:43 -06:00
Chris Hamons 72d91566de [WKWebKit] Update to Xcode 9.3 Beta 1 (#3312)
* [WKWebKit] Update to Xcode 9.3 Beta 1

* Add onlyOn64 on new APIs
2018-01-27 13:38:42 -06:00
Alex Soto 805fcf2d49
[VideoSubscriberAccount] Update bindings to Xcode 9.3 Beta 1 (#3348) 2018-01-27 10:51:56 -06:00
Alex Soto 371decb6da
[SafariServices] Update to Xcode 9.3 Beta 1 (#3347)
* [SafariServices] Update to Xcode 9.3 Beta 1

Api diff:
- https://github.com/xamarin/xamarin-macios/wiki/SafariServices-macOS-xcode9.3-beta1

* Add onlyOn64:true
2018-01-27 10:50:47 -06:00
Alex Soto d07afb5fbc
[PassKit] Update bindings to Xcode 9.3 Beta 1 (#3340)
* [PassKit] Update bindings to Xcode 9.3 Beta 1

Diff files:
- https://github.com/xamarin/xamarin-macios/wiki/PassKit-iOS-xcode9.3-beta1
- https://github.com/xamarin/xamarin-macios/wiki/PassKit-watchOS-xcode9.3-beta1

* Adds DisableDefaultCtor to PKTransitPassProperties and PKSuicaPassProperties

Both `PKTransitPassProperties` and `PKSuicaPassProperties` have getter only props and a factory method.

* Fix intro tests
2018-01-27 10:46:16 -06:00
Sebastien Pouliot 98a1928144
[xharness] Backport the xharness changes needed to produce html reports by xtro on bots (#3328)
Partial backport/adaptation of
https://github.com/xamarin/xamarin-macios/commit/8d854a0f3d
2018-01-26 21:40:15 -05:00
Rolf Bjarne Kvinge b2bcad7a94
Add a BindingImpl attribute and use to to teach the linker look for it to search for optimizable code. (#3299)
* [ObjCRuntime] Add a BindingImplAttribute.

* [linker] Make ProviderToString an extension method on ICustomAttributeProvider to make it more discoverable.

* [generator] Use [BindingImpl] instead of [CompilerGenerated].

The entire diff is big (89MB), so it can't be gisted. However, most of it is
either removal of `using System.Runtime.CompilerServices;` or the change from
`[CompilerGenerated]` to `[BindingImpl (...)]` like this:
https://gist.github.com/rolfbjarne/8bfda3ed37b956d0342a1c1e9b079244

If I remove those parts of the diff, there's nothing significant left:
https://gist.github.com/rolfbjarne/4156164d6bdb1376366200394eb8a091

* [linker] Teach the linker about the new [BindingImpl] attribute.

In addition to the existing logic where the linker would optimize some
[CompilerGenerated] code (sometimes with additional requirements), it will now
also optimize all [BindingImpl (Optimizable)] code (without any additional
requirements).

* [tests] Add tests to make sure [BindingImpl (Optimizable)] works as expected.

* [linker] Check for [BindingImpl] before [CompilerGenerated] and stop checking for [CompilerGenerated] in XAMCORE_4_0.

Check for [BindingImpl] before checking for [CompilerGenerated], since the
former is more common.

Also stop checking for [CompilerGenerated] (at least to mean that code is
optimizable) in our next non-compatible evolutionary leap (XAMCORE_4_0):

* [introspection] Impl a better typo check.
2018-01-26 18:38:23 +01:00
Sebastien Pouliot fdc70c6526
[tests] Adjust monotouch-test so it does not crash/fail on simulator and devices running 11.3 (#3319)
* Only skip broken tests when using Xcode9.3 SDK
2018-01-26 11:17:46 -05:00
Rolf Bjarne Kvinge 7d0c4d5b09
[tests] Skip High Sierra image filters in Classic tests. Fixes #622. (#3308)
Skip High Sierra image filters in Classic introspection tests, since the
Classic bindings won't be updated.

https://github.com/xamarin/maccore/issues/622
2018-01-26 07:46:54 +01:00
Rolf Bjarne Kvinge 61d3d399c8
[xharness] Don't try to parse inexistent or empty files. (#3306) 2018-01-26 07:39:05 +01:00
Vincent Dondain da89edb3f6 [harness] Update mlaunch_url link (w/Xcode 9.3 fix) (#3317) 2018-01-25 22:46:52 -05:00
Vincent Dondain 263e714f5c [xtro] Fix .todo that were addressed during Xcode 9.3 beta 1 bump (#3315) 2018-01-25 19:28:47 -05:00
Alex Soto 4a40d12a6f
[CoreImage] Update to Xcode 9.3 Beta 1 (#3311) 2018-01-25 15:50:51 -06:00
Alex Soto b7f6f57336
[AVFoundation] Update to Xcode 9.3 Beta 1 (#3305)
* [AVFoundation] Update to Xcode 9.3 Beta 1

* Fix sharpie AVFoundation TODO
2018-01-25 13:45:35 -06:00
Alex Soto 5683c91a14
[AVKit] Update to Xcode 9.3 Beta 1 (#3310)
Diff files:
- https://github.com/xamarin/xamarin-macios/wiki/AVKit-tvOS-xcode9.3-beta1
2018-01-25 13:44:07 -06:00
Rolf Bjarne Kvinge 8fb757fec6
[tests] Allow 11 frameworks in linked XM apps. Fixes maccore GH #615. (#3302)
Fixes this test failure:

    1) Failed : Xamarin.MMP.Tests.MMPTests.UnifiedWithLinking_ShouldHaveFewFrameworkClangLines
      Found more framework entries in clang invocation then expected - Foundation AppKit QuartzCore CoreData Quartz CoreFoundation CoreServices Security Carbon CloudKit
    		xcrun -sdk macosx clang -mmacosx-version-min=10.7 -arch x86_64 -fobjc-runtime=macosx -Wno-unguarded-availability-new -ObjC -framework Foundation -framework AppKit -framework QuartzCore -framework CoreData -framework Quartz -framework CoreFoundation -framework CoreServices -framework Security -framework Carbon -weak_framework CloudKit -u _xamarin_timezone_get_data -u _xamarin_get_block_descriptor /work/maccore/master/xamarin-macios/_mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/libxammac.a -o /work/maccore/master/xamarin-macios/tests/mmptest/bin/Debug/tmp-test-dir/Xamarin.MMP.Tests.MMPTests.RunMMPTest/bin/Debug/UnifiedExample.app/Contents/MacOS/UnifiedExample -D_THREAD_SAFE -I/work/maccore/master/xamarin-macios/_mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/pkgconfig/../../include/mono-2.0   /work/maccore/master/xamarin-macios/_mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/pkgconfig/../../lib/libmonosgen-2.0.a -liconv -x objective-c++ -I/work/maccore/master/xamarin-macios/_mac-build/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/include /work/maccore/master/xamarin-macios/tests/mmptest/bin/Debug/tmp-test-dir/Xamarin.MMP.Tests.MMPTests.RunMMPTest/obj/Debug/mmp-cache/registrar.m -fno-caret-diagnostics -fno-diagnostics-fixit-info -isysroot /Applications/Xcode92.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk /work/maccore/master/xamarin-macios/tests/mmptest/bin/Debug/tmp-test-dir/Xamarin.MMP.Tests.MMPTests.RunMMPTest/obj/Debug/mmp-cache/main.m
      Expected: less than 10
      But was:  10

This regressed in 4da8016db4, where new API is
partially unremovable by the linker, and as such causes XM to link with more
frameworks at build time.

This is expected, so change the test to accept more frameworks (11).

Fixes https://github.com/xamarin/maccore/issues/615.
2018-01-25 17:59:19 +01:00
Rolf Bjarne Kvinge 3910c7943a
[tests] Fix apitest to ignore CoreSpotlight on 32-bit since it's 64-bit only. (#3300)
Fixes this test failure on High Sierra:

    Xamarin.Mac.Tests.EveryFrameworkSmokeTests.ExpectedLibrariesAreLoaded: CoreSpotlightLibrary (/System/Library/Frameworks/CoreSpotlight.framework/CoreSpotlight) failed to load but this was not expected
2018-01-25 17:55:51 +01:00
Sebastien Pouliot af3e249cb7
[tests][xtro] Copy xtro from master + update data files to show appropriate todo for beta 1 (#3298) 2018-01-25 09:12:41 -05:00
Sebastien Pouliot d6dcbbf37f
[tests][macos] RoundtripRSAMinPKCS1 public/GetPublicKey should be false on 10.13 (#3116) (#3297) 2018-01-25 09:01:32 -05:00
Manuel de la Pena b35b479cea
[Harness] Add the System.IdentityModel bcl tests. (#3295) 2018-01-25 10:19:41 +01:00
Vincent Dondain 04f4a4bbea Bump Xcode and versions for 9.3 beta 1 (#3296)
- Bump maccore for mlaunch fix.
- Add new Xcode 9.3 protocol conformances.
2018-01-25 00:20:11 -05:00
Manuel de la Pena 35806edb5a
[Harness] Add System.ServiceModel tests to the bcl tests. (#3238)
* [Harness] Add System.ServiceModel tests from the bcl.
2018-01-24 12:56:20 +01:00
Rolf Bjarne Kvinge 03d78d13f3
[tests][mtouch] Simplify code to fetch symbols from a binary (nm). (#3286)
Simplify/refactor code to fetch symbols from a binary to reuse an existing
function instead of manually calling `nm` every time.
2018-01-24 00:31:32 +01:00
Rolf Bjarne Kvinge 77aac2ceef
[tests] Package linker tests too for the packaged XM tests. (#3287)
Make sure to package the linker tests when packaging XM tests (this broke
recently because the dontlink tests were moved).

Fixes this problem when running the packaged tests:

    make[2]: linker-mac/dont link/bin/x86/Debug/dont link.app/Contents/MacOS/dont link: No such file or directory
    make[2]: *** [exec-mac-classic-dont link] Error 1
    make[2]: linker-mac/dont link/bin/x86/Debug-unified/dont link.app/Contents/MacOS/dont link: No such file or directory
    make[2]: *** [exec-mac-unified-dont link] Error 1
    make[2]: linker-mac/dont link/bin/x86/Debug-unifiedXM45/dont link.app/Contents/MacOS/dont link: No such file or directory
    make[2]: *** [exec-mac-unifiedXM45-dont link] Error 1
    make[2]: linker-mac/dont link/bin/x86/Debug-unified-32/dont link.app/Contents/MacOS/dont link: No such file or directory
    make[2]: *** [exec-mac-unified32-dont link] Error 1
    make[2]: linker-mac/dont link/bin/x86/Debug-unifiedXM45-32/dont link.app/Contents/MacOS/dont link: No such file or directory
    make[2]: *** [exec-mac-unifiedXM4532-dont link] Error 1
    exec-mac-classic-dont\ link failed
    exec-mac-unified-dont\ link failed
    exec-mac-unifiedXM45-dont\ link failed
    exec-mac-unified32-dont\ link failed
    exec-mac-unifiedXM4532-dont\ link failed
    make[1]: *** [exec-mac-dontlink] Error 1
2018-01-23 23:47:53 +01:00
Sebastien Pouliot ca06526793
[tests][monotouch] Remove the ignore on MPVolumeView added in xcode9 beta 3 - it seems to work fine now (#3284) 2018-01-23 08:27:18 -05:00
Rolf Bjarne Kvinge af03020eef
[mtouch/mmp] Give users more control over optimizations, and share more code between mtouch and mmp. (#3242)
* [mtouch/mmp] Give users more control over optimizations, and share more code between mtouch and mmp.

1. Add an --optimize flag to mtouch/mmp that allows users to select which
   optimizations to apply (or not). This makes it easier to add future
   optimizations, and allow users to disable any optimization that causes
   problems without having to disable many other features.

2. Share as much optimization code as possible between mtouch and mmp. This
   immediately gives a benefit to mmp, which has three new optimizations only
   mtouch had: NSObject.IsDirectBinding inlining, IntPtr.Size inlining and
   dead code elimination.

   This results in ~6kb of disk space saved for a linked Xamarin.Mac app:

   * link sdk: [Debug][1], [Release][2]
   * link all: [Debug][3], [Release][4]

Testing also verifies that monotouchtest ([Debug][5], [Release][6]) has not
changed size at all, which means that no default optimizations have changed
inadvertedly.

[1]: https://gist.github.com/rolfbjarne/6b731e3b5ca6170355662e6505c3d492#link-sdk-mac--debug
[2]: https://gist.github.com/rolfbjarne/6b731e3b5ca6170355662e6505c3d492#link-sdk-mac--release
[3]: https://gist.github.com/rolfbjarne/6b731e3b5ca6170355662e6505c3d492#link-all-mac--debug
[4]: https://gist.github.com/rolfbjarne/6b731e3b5ca6170355662e6505c3d492#link-all-mac--release
[5]: https://gist.github.com/rolfbjarne/6b731e3b5ca6170355662e6505c3d492#monotouchtest-iphonedebug64
[6]: https://gist.github.com/rolfbjarne/6b731e3b5ca6170355662e6505c3d492#monotouchtest-iphonerelease64

* [tools] Don't enable the IsDirectBinding optimization by default for Xamarin.Mac apps, it's not safe.

* Fix whitespace issues.

* [doc] Document optimizations.

* Officially support optimizations by adding them to the Versions.plist.

* [linker] Improve IntPtr.Size inliner + dead code eliminatior and add tests.

* Properly handle operands for the ldc_i4_s instruction (they're sbyte).
* Fix less-than condition to actually do a less-than comparison.
* Make sure to look up the bitness in the Target, not the Application, since
  the Application's value will be incorrect when building fat apps (both
  Is32Build and Is64Build will be true).
* Remove unnecessary checks for the IntPtr.Size inliner: this optimization
  does not depend on other instructions than the IntPtr.get_Size call, so
  remove the checks that verify surrounding instructions. This makes the
  IntPtr.Size inliner kick in in more scenarios (such as the new tests).
* Add tests.

* [tests] Add mmp tests for optimizations.

* [tests] Fix XM optimization tests.

* [tests] Fix test build error.
2018-01-23 11:33:48 +01:00
Rolf Bjarne Kvinge dadf5ca6e6
[mtouch] Make sure the xamarin_localized_string_format* functions are available in simlauncher. Fixes #3265. (#3269)
* [mtouch] Make sure the xamarin_localized_string_format* functions are available in simlauncher. Fixes #3265.

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

* [mtouch] Add test for simlauncher symbols, add add more missing symbols.
2018-01-22 14:21:24 +01:00
Rolf Bjarne Kvinge 64e85fac75
[xharness] Fixup paths in the Exclude attribute of Include nodes in csprojs as well. (#3267)
Fixes this rather puzzling build problem when building monotouch-test using xharness:

    obj/iPhoneSimulator/Debug-unified/Xamarin.iOS,Version=v1.0.AssemblyAttribute.cs(2,12): error CS0579: Duplicate 'global::System.Runtime.Versioning.TargetFrameworkAttribute' attribute

It happens only on Wrench (where it consistently fails), but it didn't happen
in the PR when this broke, nor could I reproduce it locally at first.

Initial investigation proved frustrating (searching for the file name
`Xamarin.iOS,Version=v1.0.AssemblyAttribute.cs` in the build log confirmed
that it was included multiple times on Wrench, but not locally), but after a
while I realized that there were multiple files with the same file name in the
build log:

     /Users/builder/data/lanes/1381/daf07005/source/xamarin-macios/tests/monotouch-test/obj/iPhone/Release64-unified/Xamarin.iOS,Version=v1.0.AssemblyAttribute.cs
     obj/iPhoneSimulator/Debug-unified/Xamarin.iOS,Version=v1.0.AssemblyAttribute.cs

One full path, and one relative, and one is obviously wrong.

Even more so once I realized that the full path's Platform/Configuration
(`iPhone/Release64-unified`) doesn't match the relative path's
Platform/Configuration (`iPhoneSimulator/Debug-unified`).

It's not even a test configuration we execute on Wrench, so how come the file
got there in the first place?

But it made it possible to reproduce locally: I just had to build monotouch-
test for device first, using tests.sln. Then I could reproduce the build error
when executing monotouch-test from xharness, since now I had the extraneous
file on my file system.

xharness will clone project files (to avoid parallel issues when building
multiple projects in parallel, all projects are built in their own
directories), and it turns out we didn't properly fixup all paths.

In particular the following:

    <Compile Include="**\*.cs" Exclude="obj\**">
      <Link>%(RecursiveDir)%(Filename).cs</Link>
    </Compile>

would be transformed into:

    <Compile Include="\Users\builder\data\lanes\1381\daf07005\source\xamarin-macios\tests\monotouch-test\**\*.cs" Exclude="obj\**">
      <Link>%(RecursiveDir)%(Filename).cs</Link>
    </Compile>

which meant that we'd include all files recursively in the monotouch-test
directory, excluding files from the project file's obj sub directory. And
since the project file was cloned, it would be in a different directory, and
thus not able to exclude files from the original monotouch-test/obj directory.

And with this knowledge the simple oneliner to fix it was trivial.

One mystery remained though: how was the extraneous
`Xamarin.iOS,Version=v1.0.AssemblyAttribute.cs` file generated when we don't
execute device tests on Wrench? After a while I remembered that the MTouch
tests build monotouch-test for device, even though they're not executed.

And this explains why the problem happens on wrench only: Jenkins didn't
execute the MTouch tests.
2018-01-22 10:49:38 +01:00
Sebastien Pouliot f5df902049
[foundation] Add NSBundle.GetLocalizedString returning an NSString. Fixes #41292 (#3266)
The original, now obsoleted, `LocalizedString` API returned a .net
`string` which does not work in most cases.

Different versions of iOS seems to return different (public or internal)
subclasses of `NSString` that are understood by other API (like NSString
`localizedStringWithFormat:`) for further customization.

Our logic to convert NSString to string is correct but it cannot
recreate the custom, required subclass to continue the localization.

So the new API return an `NSString` publicly (which is actually a
subclass) that can do the required job.

Adding a test in monotouch-test is presently blocked by #3265 [2]

[1] https://bugzilla.xamarin.com/show_bug.cgi?id=41292
[2] https://github.com/xamarin/xamarin-macios/issues/3265

* Add tests for new (and old) NSBundle API and adjust old ones since adding a Base.lproj directories changes things

* Add localization to xammac_tests since it shares the same, updated tests
2018-01-20 14:00:01 -05:00
Sebastien Pouliot 431cad0311
[tests] Confirm a device/sim support Metal before running MetalPerformanceShaders tests. Fixes #3237 (#3268) (#3270)
https://github.com/xamarin/xamarin-macios/issues/3237
2018-01-19 16:45:04 -05:00
Sebastien Pouliot dc7b19ce15
[tests] Confirm a device/sim support Metal before running MetalPerformanceShaders tests. Fixes #3237 (#3268)
https://github.com/xamarin/xamarin-macios/issues/3237
2018-01-19 11:21:21 -05:00
Rolf Bjarne Kvinge daf0700543
[xharness] No need to try to run (or even show) non-executable projects. (#3264) 2018-01-19 07:08:13 +01:00
Rolf Bjarne Kvinge 86a51076ed
[xharness] Adjust colors a bit. (#3263)
When determining the color for a collection of tests, first check if the
execution result is identical for all tests in the collection, in which case
just use the corresponding color for a single test.
2018-01-19 07:06:50 +01:00
Vincent Dondain 4da8016db4
[xtro] Report missing-protocol-conformance when protocols are defined… (#3187)
- Fixes bug #59272: [xtro] Report !missing-protocol-conformance! when protocols are defined in categories
(https://bugzilla.xamarin.com/show_bug.cgi?id=59272)
- Implemented missing protocol conformances based on tool's new data.
- Remove Internal check from VisitObjCCategoryDecl and VisitObjCInterfaceDecl
- Ignore previewItemTitle failure (normal since it's optional)
- Only skip UIStateRestoring for subclasses of UIViewController
- Ignore UIStateRestoring test on watchOS (UIViewController not available)
- Remove protocol conformances that generated wrong availability attributes (https://github.com/xamarin/xamarin-macios/issues/3213)
- Avoid new virtual or virtual when adding protocol conformance (https://github.com/xamarin/xamarin-macios/issues/3217)
2018-01-18 13:41:09 -05:00
Rolf Bjarne Kvinge 75e851fdda
[install-source] Add console runner from Nuget and fix xharness to restore nugets before attempting to build. (#3251)
xharness needs a solution in order to ask for a nuget restore, so make sure to
provide the path to the solution.

This fixes a build issue where the install source tests would fail to build
due to picking up the system's nunit.framework.dll because the nuget one
wasn't found/restored:

    MonoPathManglerTest.cs(8,3): error CS0619: 'TestFixtureAttribute' is obsolete: 'The NUnit framework shipped with Mono is deprecated and will be removed in a future release. It was based on NUnit 2.4 which is long outdated. Please move to the NUnit NuGet package or some other form of acquiring NUnit.'
    XamarinSourcesPathManglerTest.cs(8,3): error CS0619: 'TestFixtureAttribute' is obsolete: 'The NUnit framework shipped with Mono is deprecated and will be removed in a future release. It was based on NUnit 2.4 which is long outdated. Please move to the NUnit NuGet package or some other form of acquiring NUnit.'
    OpenTKManglerTest.cs(8,3): error CS0619: 'TestFixtureAttribute' is obsolete: 'The NUnit framework shipped with Mono is deprecated and will be removed in a future release. It was based on NUnit 2.4 which is long outdated. Please move to the NUnit NuGet package or some other form of acquiring NUnit.'
    PathManclerFactoryTests.cs(8,3): error CS0619: 'TestFixtureAttribute' is obsolete: 'The NUnit framework shipped with Mono is deprecated and will be removed in a future release. It was based on NUnit 2.4 which is long outdated. Please move to the NUnit NuGet package or some other form of acquiring NUnit.'
    OpenTKManglerTest.cs(29,4): error CS0616: 'TestCase' is not an attribute class
    OpenTKManglerTest.cs(30,4): error CS0616: 'TestCase' is not an attribute class
    MonoPathManglerTest.cs(29,4): error CS0616: 'TestCase' is not an attribute class
    MonoPathManglerTest.cs(30,4): error CS0616: 'TestCase' is not an attribute class
    MonoPathManglerTest.cs(31,4): error CS0616: 'TestCase' is not an attribute class
    XamarinSourcesPathManglerTest.cs(33,4): error CS0616: 'TestCase' is not an attribute class
    XamarinSourcesPathManglerTest.cs(35,4): error CS0616: 'TestCase' is not an attribute class
    XamarinSourcesPathManglerTest.cs(37,4): error CS0616: 'TestCase' is not an attribute class
    OpenTKManglerTest.cs(36,4): error CS0616: 'TestCase' is not an attribute class
    OpenTKManglerTest.cs(37,4): error CS0616: 'TestCase' is not an attribute class
    MonoPathManglerTest.cs(37,4): error CS0616: 'TestCase' is not an attribute class
    MonoPathManglerTest.cs(38,4): error CS0616: 'TestCase' is not an attribute class
    MonoPathManglerTest.cs(39,4): error CS0616: 'TestCase' is not an attribute class
    XamarinSourcesPathManglerTest.cs(47,4): error CS0616: 'TestCase' is not an attribute class
2018-01-18 16:58:56 +01:00
Rolf Bjarne Kvinge eefdd17e15
[xharness] Fix Makefile generation of grouped targets with spaces. (#3250)
These targets will already be properly escaped (using backslash), so adding
quotes will cause make to treat the backslashes literally (and break).

Fixes an issue with package-tests:

    $ make package-tests
    [...]
    build-mac-classic-dont\ link failed
    build-mac-unified-dont\ link failed
    build-mac-unifiedXM45-dont\ link failed
    build-mac-unified32-dont\ link failed
    build-mac-unifiedXM4532-dont\ link failed
    build-mac-unified-link\ all failed
    build-mac-unified-link\ sdk failed
    make[4]: *** [build-mac] Error 1
    make[3]: *** [mac-test-package.zip] Error 2
    make[2]: *** [package-tests] Error 2
2018-01-18 09:08:20 +01:00
Rolf Bjarne Kvinge 034ce91212
[xharness] Add project configuration to run Jenkins-style tests. (#3249) 2018-01-18 07:16:24 +01:00
Rolf Bjarne Kvinge dee0fd984a
[xharness] Run monotouch-test both with and without the static registrar in the simulator. (#3236)
* [xharness] Run monotouch-test both with and without the static registrar in the simulator.

This way we catch (some) problems with the static registrar without having to run on device.

* [xharness] Add comments to explain extra test configurations.

* [xharness] Fix how projects are cloned.

Fix how projects are cloned so that xharness doesn't end up confused when
multiple test tasks share the same build task.

Previously xharness would iterate over all test tasks and modifying their
build tasks, now it will create the build tasks correctly in the first place.
2018-01-18 07:14:07 +01:00
Rolf Bjarne Kvinge 580ad2b826
[ImageKit] Fix a few protocols to be informal. (#3235)
* [ImageKit] Fix a few protocols to be informal.

Both of these protocols have been informal (categories) since their
introduction in macOS 10.5 (and they've not been made real protocols either).

    $ git grep interface.*IKImageBrowserDataSource
    MacOSX10.5.sdk/System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/ImageKit.framework/Versions/A/Headers/IKImageBrowserView.h:@interface NSObject (IKImageBrowserDataSource)
    MacOSX10.6.sdk/System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/ImageKit.framework/Versions/A/Headers/IKImageBrowserView.h:@interface NSObject (IKImageBrowserDataSource)
    MacOSX10.7.sdk/System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/ImageKit.framework/Versions/A/Headers/IKImageBrowserView.h:@interface NSObject (IKImageBrowserDataSource)
    MacOSX10.8.sdk/System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/ImageKit.framework/Versions/A/Headers/IKImageBrowserView.h:@interface NSObject (IKImageBrowserDataSource)
    MacOSX10.9.sdk/System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/ImageKit.framework/Versions/A/Headers/IKImageBrowserView.h:@interface NSObject (IKImageBrowserDataSource)
    MacOSX10.10.sdk/System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/ImageKit.framework/Versions/A/Headers/IKImageBrowserView.h:@interface NSObject (IKImageBrowserDataSource)
    MacOSX10.11.sdk/System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/ImageKit.framework/Versions/A/Headers/IKImageBrowserView.h:@interface NSObject (IKImageBrowserDataSource)
    MacOSX10.12.sdk/System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/ImageKit.framework/Versions/A/Headers/IKImageBrowserView.h:@interface NSObject (IKImageBrowserDataSource)
    MacOSX10.13.sdk/System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/ImageKit.framework/Versions/A/Headers/IKImageBrowserView.h:@interface NSObject (IKImageBrowserDataSource)

    $ git grep interface.*IKImageBrowserItem
    MacOSX10.5.sdk/System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/ImageKit.framework/Versions/A/Headers/IKImageBrowserView.h:@interface NSObject (IKImageBrowserItem)
    MacOSX10.6.sdk/System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/ImageKit.framework/Versions/A/Headers/IKImageBrowserView.h:@interface NSObject (IKImageBrowserItem)
    MacOSX10.7.sdk/System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/ImageKit.framework/Versions/A/Headers/IKImageBrowserView.h:@interface NSObject (IKImageBrowserItem)
    MacOSX10.8.sdk/System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/ImageKit.framework/Versions/A/Headers/IKImageBrowserView.h:@interface NSObject (IKImageBrowserItem)
    MacOSX10.9.sdk/System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/ImageKit.framework/Versions/A/Headers/IKImageBrowserView.h:@interface NSObject (IKImageBrowserItem)
    MacOSX10.10.sdk/System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/ImageKit.framework/Versions/A/Headers/IKImageBrowserView.h:@interface NSObject (IKImageBrowserItem)
    MacOSX10.11.sdk/System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/ImageKit.framework/Versions/A/Headers/IKImageBrowserView.h:@interface NSObject (IKImageBrowserItem)
    MacOSX10.12.sdk/System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/ImageKit.framework/Versions/A/Headers/IKImageBrowserView.h:@interface NSObject (IKImageBrowserItem)
    MacOSX10.13.sdk/System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/ImageKit.framework/Versions/A/Headers/IKImageBrowserView.h:@interface NSObject (IKImageBrowserItem)

* [xtro] Update ignored data.
2018-01-16 23:32:37 +01:00
Rolf Bjarne Kvinge b699a0b29c
[tests] Create 'link all' and 'link sdk' tests for XM. (#3234)
* [tests] Add 'link all' test for XM.

* [tests] Add 'link sdk' test for XM.

* [tests] Move dontlink-mac tests to linker-mac directory to have the same directory layout as linker-ios.
2018-01-16 19:15:59 +01:00
Sebastien Pouliot 761a382f01
[macos][mediatoolbox] Add a macOS specific API for XM (#3220)
- added unit test (not much to test)
- xtro data updated
2018-01-16 08:42:11 -05:00
Alex Soto 76dcf100b3 [generator] Support [Async] inside categories, fixes bugzilla #57531 (#3229)
https://bugzilla.xamarin.com/show_bug.cgi?id=57531

Adds support for [Async] inside categories.
2018-01-16 08:41:25 -05:00
Sebastien Pouliot d1d4446060
[CoreGraphics] Fix issue with the MakeMutable in CGPath where ref count was leaking. (#3228) (#3231) 2018-01-16 08:40:40 -05:00
Manuel de la Pena a52748277d [CoreGraphics] Fix issue with the MakeMutable in CGPath where ref count was leaking. (#3228) 2018-01-15 16:35:05 -05:00
Rolf Bjarne Kvinge 7079a0581f
[tests] Disable some old-style tests on wrench, long live the new-style tests. (#3226)
These were accidentally not disabled when we started running tests on Wrench
like we do on Jenkins.

So disable them, to avoid duplicate work on Wrench.
2018-01-15 18:53:52 +01:00
Sebastien Pouliot 1c3c899933
[foundation] Reduce duplication inside NSData.FromString methods (#3221)
and ensure the temporary `NSString` instance is disposed asap.

Found will debugging something else. Unit tests added to confirm there
is no behavior change when the API are used.
2018-01-15 09:08:17 -05:00
Sebastien Pouliot 3a851e2a63
[mtouch][mmp] Report invalid debug symbols files. Fixes #3200 (#3203)
* [mtouch][mmp] Report invalid debug symbols files. Fixes #3200

Try to read the assembly with symbols and, if that fails, warn and
fallback to loading them without symbols.

This fixes cases were it's not easy to update or delete (e.g. nuget)
bad symbols files - so this cannot be an error without causing a lot
of pain.

However it needs to be reported, otherwise it wont be fixed (by the
publisher) and it can limit the debugability of the application and
the usefulness of the stacktraces.

Finally merge most of the resolver's code between mtouch and mmp so
we don't have to fix such issue twice anymore.

note: this needs to be slightly updated once we get a version of cecil
that can give us a more precise error message.

Also bring Rolf's tests from
https://github.com/xamarin/xamarin-macios/pull/3079

reference:
https://github.com/xamarin/xamarin-macios/issues/3200
2018-01-12 17:39:38 -05:00
Sebastien Pouliot 3a6d87940a
[coreanimation] Add [Protocol] to CAAnimationDelegate (#3204)
This now formal `CAAnimationDelegate` protocol had to be reverted [1]
because we did not support `FormalSince` at the time - and this broke the
static registrar when used with older SDK. Support was added in [2] but
did not include `CAAnimationDelegate` (but `CALayerDelegate` was fixed).

Because this was not a protocol the `Delegate` property expose it as a
`CAAnimationDelegate`, the concrete/model type, and not an interface.

The workaround so `ICAAnimationDelegate` can be used, thru the
`WeakDelegate`, requires to manually re-bind some API because the
generator won't allow this anymore (it's bad to expose a [Model]
when a [Protocol] exists).

xtro data updated

[1] https://github.com/xamarin/xamarin-macios/pull/698
[2] https://github.com/xamarin/xamarin-macios/pull/2130
2018-01-12 13:56:00 -05:00
Rolf Bjarne Kvinge d059dfce56
[xharness] Run mtouch and mmp tests when there are MSBuild changes. (#3209)
In particular the mmp tests build a lot of project files, which means they can
find issues whenever something in the MSBuild logic changes, so run them.

They would have caught https://github.com/xamarin/maccore/issues/612 for instance.
2018-01-12 17:05:54 +01:00
Rolf Bjarne Kvinge 8c4a6ce1f4
[xharness] Don't hardcode the project configuration in the generated Makefile. (#3208)
Fixes this:

    $ make run-mac-xammac_tests CONFIG=Release
    [... building release configuration ...]
    make[2]: xammac_tests/bin/x86/Debug/xammac_tests.app/Contents/MacOS/xammac_tests: No such file or directory
    make[2]: *** [exec-mac-unified-xammac_tests] Error 1
    make[1]: *** [run-mac-unified-xammac_tests] Error 2
    run-mac-unified-xammac_tests failed
2018-01-12 17:05:40 +01:00
Alex Soto 879a61faa7
[SceneKit] Add AddAnimation overload that takes a SCNAnimation (#3192)
Fixes xamarin/xamarin-macios#3166

Apple broke `addAnimation:forKey:` API by changing `CAAnimation` parameter into a
`ISCNAnimationProtocol` that was introduced in Xcode 9 (iOS 11 and company).

We can't break the existing API but we can add an extension method that
reuses the `CAAnimation` overload but takes a `SCNAnimation` and we
turn the `SCNAnimation` into a `CAAnimation` behind the scenes.

For XAMCORE_4_0 we corrected the protocol signature to take `ISCNAnimationProtocol` so there won't be a need for the extension method anymore.
2018-01-12 09:11:46 -06:00
Sebastien Pouliot 07c24949c0
[tests][macos] Enable more tests to be executed on macOS (XM) (#3191)
Largely related to somewhat recent frameworks/API additions to XM

ExternalAccessory was added to macOS 10.13 (Xcode9) and can't be run before that (including on the jenkins sierra bots). Also enable that test on tvOS (which added support in Xcode8)
2018-01-10 20:58:49 -05:00
Sebastien Pouliot b3b967e985
[macos][gameplaykit] Add missing 'unapplyGameModelUpdate:' API for XM (#3190)
xtro data updated
2018-01-10 11:31:35 -05:00
Sebastien Pouliot f9ceb5c39d
[metalperformanceshaders] Fix MPSImageLanczosScale base class change (#3170)
Sadly this creates a breaking change since the `ScaleTransform`
property was re-introduced with an incorrect signature in the new
base class `MPSImageScale`

Unless someone has an idea how to avoid it (I don't see an option)
then we'll have to document it in the 15.7 release notes.

Also add missing _SetScaleTransform call and related unit tests
2018-01-09 12:03:18 -05:00
Sebastien Pouliot caa1e702a9
[macos][photos] Add some missing error codes and constants for XM (#3181)
xtro data updated
2018-01-09 09:17:42 -05:00
Jeffrey Stedfast 30ae7d3d32 [msbuild] Tweak the codesign logic for iOS Simulator builds (#3180)
Don't *always* codesign, especially for Xcode 8 which seems to break.

iOS Simulator builds should only be codesigned if they require
Entitlements (signified by RequireProvisionProfile).
2018-01-08 15:59:26 -05:00
Jeffrey Stedfast fc723647c7 [msbuild] Repack all iOS Task assemblies into Xamarin.iOS.Tasks.dll (#3179) 2018-01-08 15:57:58 -05:00
Jeffrey Stedfast cfdf59dce4 [msbuild] Tweak the codesign logic for iOS Simulator builds (#3114)
Don't *always* codesign, especially for iOS8 which seems to break.

iOS Simulator builds should only be codesigned if they require
Entitlements (signified by RequireProvisionProfile).
2018-01-08 14:32:00 -05:00
Jeffrey Stedfast 316948e5d0 [msbuild] Repack all iOS Task assemblies into Xamarin.iOS.Tasks.dll (#3168) 2018-01-08 14:29:52 -05:00
Sebastien Pouliot 8db4cee7f2
[tests][xtro] Don't generate empty (0 length) files (#3169)
Empty results/files are common when things goes well - but are just
noisy, never helpful.
2018-01-08 11:54:59 -05:00
Sebastien Pouliot 52d0483bfe
[foundation] Remove iOS 5.0.1 specific code from NSFileManager (#3167)
This was short-lived (changed in iOS 5.1) and it's now below our
minimum support (iOS 6)
2018-01-05 15:01:15 -05:00
Sebastien Pouliot 1a7f90aef3
[tests][xtro] Add annotations after auditing some unknowns for ExternalAccessory.framework (#3163) 2018-01-05 08:53:11 -05:00
Timothy Risi 6ff74c5854 [MMP][60534] MMP Should check that Deployment Target is not below min version (#3122)
Return a build error if Deployment Target is too low
Add an mmptest for the change
2018-01-04 15:19:44 -05:00
Sebastien Pouliot ec744533b9
[generator] Add support for [RequiresSuper] attribute. Fixes #58350 (#3147)
* Add new attribute;
* Add generator support (re-copy attribute);
* Add xtro rule to detect missing/extra [RequiresSuper] attributes;
* Add attributes to the required API;

The generated code changes (reversed) can be verified with
https://gist.github.com/spouliot/1c91d6ee7c084a06890e5f3f2a475001

Reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=58350
2018-01-04 11:48:00 -05:00
Sebastien Pouliot a9788a480b
[macos][corespotlight] Enable CoreSpotlight for XM (#3157)
First shown (incorrectly) in El Capitan headers it finally made it's way
in High Sierra!
2018-01-04 10:53:52 -05:00
Chris Hamons 4c5161a446
Create classic snapshot of bgen and update tests/scripts (#3153)
Previous PMCS removal changes froze XamMac.BindingAttributes.dll but not bgen.exe which causes interesting issues when we make changes there and run classic XM tests.

This can be seen here: #3147

This PR freezes bgen-classic in macios-binaries (which will need to be added to master and bumped before this goes in) and update various scripts/tests.
2018-01-03 15:41:49 -06:00
Sebastien Pouliot 09e346142e
[avfoundation] Add some missing API detected by xtro. Also fix #60924 (#3154)
https://bugzilla.xamarin.com/show_bug.cgi?id=60924
2018-01-03 15:09:38 -05:00
Sebastien Pouliot d2c7084f72
[macos][notificationcenter] Fix extraneous setter on NCWidgetProviding.WidgetAllowsEditing (#3150)
Before XAMCORE_4_0 the setter will throw an `NotImplementedException`
which is better, and more accurate, than a native exception.

Found by xtro. Data file updated.
2018-01-03 08:50:36 -05:00
Sebastien Pouliot 3df75b7baa
[macos][audiotoolbox] Enable some existing API for XM (#3149)
and this allows adding (missing) `AVAudioEngine.MusicSequence` for
AVFoundation.

Updated xtro files.
2018-01-02 21:53:12 -05:00
Sebastien Pouliot 07c81479e2
[tests][intro] Clean up old and some non-required availability attributes (#3141)
We normally frown on large scale _cosmetic_ changes, mostly because it breaks git's history (very useful) and makes merging branches harder and more error prone (very annoying).

However we require, right now, such changes to remove our old, mcs-based, pre-processor (pmcs) so it's a _good_ time to address the old, unneeded availability attributes - since most of them are re-written for our next milestone.

This won't change the final application size in most cases, as the linker removes them, but it will make the (unlinked) platform assemblies smaller. This means they will load faster (e.g. by mtouch, mmp, IDE, workbooks...) and will reduce the time/memory needed to reflect them.
2018-01-02 11:28:55 -05:00
Sebastien Pouliot 3ea8ad4041
[tests][xtro] Annotation update (#3143) 2018-01-02 08:18:32 -05:00
Sebastien Pouliot a69e161d59
[src] Properly annotate designated initializers in many frameworks (#3142)
Correspond to xtro `!missing-designated-initializer!` errors
2017-12-28 16:37:13 -05:00
Sebastien Pouliot dcf8b1110c
[social] Enable SLComposeServiceViewController on macOS and fix other xtro reported issues (#3132)
* SLComposeServiceViewController has [Mac] specific stuff but was
excluded under a (too large) `#if !MONOMAC`

* SLComposeSheetConfigurationItem::init is a designated initializer

* SLRequest::addMultipartData:withName:type: is macOS-only and missing

xtro results:
!missing-designated-initializer! SLComposeSheetConfigurationItem::init is missing an [DesignatedInitializer] attribute
!missing-selector! SLComposeServiceViewController::charactersRemaining not bound
!missing-selector! SLComposeServiceViewController::contentText not bound
!missing-selector! SLComposeServiceViewController::placeholder not bound
!missing-selector! SLComposeServiceViewController::setCharactersRemaining: not bound
!missing-selector! SLComposeServiceViewController::setPlaceholder: not bound
!missing-selector! SLComposeServiceViewController::textView not bound
!missing-selector! SLRequest::addMultipartData:withName:type: not bound
!missing-type! SLComposeServiceViewController not bound
2017-12-28 13:14:23 -05:00
Sebastien Pouliot 02042741db
[macos][photosui] Make PHLivePhotoView available on macOS (#3136)
* PHLivePhotoView only available on 64 bits

xtro results:
!missing-enum! PHLivePhotoViewContentMode not bound
!missing-enum! PHLivePhotoViewPlaybackStyle not bound
!missing-protocol! PHLivePhotoViewDelegate not bound
!missing-selector! PHLivePhotoView::audioVolume not bound
!missing-selector! PHLivePhotoView::contentMode not bound
!missing-selector! PHLivePhotoView::delegate not bound
!missing-selector! PHLivePhotoView::isMuted not bound
!missing-selector! PHLivePhotoView::livePhoto not bound
!missing-selector! PHLivePhotoView::livePhotoBadgeView not bound
!missing-selector! PHLivePhotoView::setAudioVolume: not bound
!missing-selector! PHLivePhotoView::setContentMode: not bound
!missing-selector! PHLivePhotoView::setDelegate: not bound
!missing-selector! PHLivePhotoView::setLivePhoto: not bound
!missing-selector! PHLivePhotoView::setMuted: not bound
!missing-selector! PHLivePhotoView::startPlaybackWithStyle: not bound
!missing-selector! PHLivePhotoView::stopPlaybackAnimated: not bound
!missing-type! PHLivePhotoView not bound

* [xtro] Sort earlier in EnumCheck so we don't have to duplicate checks (or get random failures)
2017-12-28 08:51:34 -05:00
Sebastien Pouliot 9c375c614a
[xtro] Don't assume a nested type when no namespace is available (#3133)
That fix a NRE while running xtro

12:55:31.4682580 System.NullReferenceException: Object reference not set to an instance of an object
12:55:31.4682960   at Extrospection.Helpers.GetFramework (Mono.Cecil.TypeReference type) [0x00012] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/xtro-sharpie/Helpers.cs:284
12:55:31.4683110   at Extrospection.EnumCheck.VisitManagedType (Mono.Cecil.TypeDefinition type) [0x0006c] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/xtro-sharpie/EnumCheck.cs:28
12:55:31.4683210   at Extrospection.AssemblyReader.ProcessType (Extrospection.BaseVisitor v, Mono.Cecil.TypeDefinition type) [0x00001] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/xtro-sharpie/Runner.cs:78
12:55:31.4683320   at Extrospection.AssemblyReader.Load (System.String filename) [0x00079] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/xtro-sharpie/Runner.cs:71
12:55:31.4684210   at Extrospection.Runner.Execute (System.String pchFile, System.Collections.Generic.IEnumerable`1[T] assemblyNames) [0x000f2] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/xtro-sharpie/Runner.cs:41
12:55:31.4684400   at Extrospection.MainClass.Main (System.String[] args) [0x00046] in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/xtro-sharpie/Program.cs:20

https://jenkins.mono-project.com/job/xamarin-macios-pr-builder/5845/Test_Report/

Short story: PR #3096 adds **non public** attributes without a namespace
so they take precedence over existing ones.

xtro enum check also needed to discard them.
2017-12-22 15:40:19 -05:00
Chris Hamons 734850d416
Remove PMCS processing of availability attributes (#3096)
- XamarinPreprocessorVisitor handled processing/generating availability
  attributes but needs to be removed as it depends on PMCS
- Because processing was handled at a preprocessor/token level before and
  now inside generator.cs a number of changes were needed avoid checking
  in a million line diff (literally)
- This commit creates a "shadow" set of availability attributes, with
  the desired names [Mac] [Watch] [NoTV], etc when not in existence before
- Instead of adding hundreds of using statements to force resolution of these
  shadow types, I abuse C# type resolution by storing them in the root
  (not namespaced) so they are resolved first.
- generator-attributes-manager was taught how to process the multitude of
  old-style attributes and how to generate the new-style attributes
- Generator's bug57070 is no longer valid, since we _can_ and do convert [iOS]
2017-12-22 13:03:21 -06:00
Sebastien Pouliot 82e38cd165
[mtouch] Fix Xamarin.Sdk not to link with private frameworks. Fixes #61039 (#3118) (#3130)
We can't trust Apple's native linker to pick the right (non private)
framework when an older TargetVersion is used. It just prefer what's
available - even if specified with a WeakFramework :(

That was already dealt with for applications. However the native linking
of the Xamarin.Sdk.framework (code sharing with extensions) is done with
the `LinkTask` instead of the `NativeLinkTask` so it did not have the
"auto correct" code.

Unit test added.

reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=61039
2017-12-22 13:11:25 -05:00
Sebastien Pouliot 3d58e360e5
[xtro] Fix macOS Intent sanity warning (#3131)
PR3119 was done (and tested on bots) before PR3120 that checked for
such mistakes. They were committed in the reverse order too
2017-12-22 13:08:43 -05:00
Timothy Risi 6ad9014c9f [Xammac_tests] RoundtripRSAMinPKCS1 public/GetPublicKey should be false on 10.13 (#3116) 2017-12-22 10:29:59 -05:00
Sebastien Pouliot 4509e66168
[mtouch] Fix Xamarin.Sdk not to link with private frameworks. Fixes #61039 (#3118)
We can't trust Apple's native linker to pick the right (non private)
framework when an older TargetVersion is used. It just prefer what's
available - even if specified with a WeakFramework :(

That was already dealt with for applications. However the native linking
of the Xamarin.Sdk.framework (code sharing with extensions) is done with
the `LinkTask` instead of the `NativeLinkTask` so it did not have the
"auto correct" code.

Unit test added.

reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=61039
2017-12-22 10:28:29 -05:00
Sebastien Pouliot 76ea46e347
[tests][xtro] Migration of annotation (WIP) (#3119) 2017-12-22 09:29:37 -05:00
Sebastien Pouliot 81381c3ee6
[watchos][accelerate] Enable Accelerate framework on watchOS (#3127)
According to documentation this was added in watchOS 4.0

xtro reported:
!missing-pinvoke! vImageBoxConvolve_ARGB8888 is not bound
!missing-pinvoke! vImageBoxConvolve_Planar8 is not bound
!missing-pinvoke! vImageConvolve_ARGB8888 is not bound
!missing-pinvoke! vImageConvolve_ARGBFFFF is not bound
!missing-pinvoke! vImageConvolve_Planar8 is not bound
!missing-pinvoke! vImageConvolve_PlanarF is not bound
!missing-pinvoke! vImageConvolveMultiKernel_ARGB8888 is not bound
!missing-pinvoke! vImageConvolveMultiKernel_ARGBFFFF is not bound
!missing-pinvoke! vImageConvolveWithBias_ARGB8888 is not bound
!missing-pinvoke! vImageConvolveWithBias_ARGBFFFF is not bound
!missing-pinvoke! vImageConvolveWithBias_Planar8 is not bound
!missing-pinvoke! vImageConvolveWithBias_PlanarF is not bound
!missing-pinvoke! vImageMatrixMultiply_ARGB8888 is not bound
!missing-pinvoke! vImageRichardsonLucyDeConvolve_ARGB8888 is not bound
!missing-pinvoke! vImageRichardsonLucyDeConvolve_ARGBFFFF is not bound
!missing-pinvoke! vImageRichardsonLucyDeConvolve_Planar8 is not bound
!missing-pinvoke! vImageRichardsonLucyDeConvolve_PlanarF is not bound
!missing-pinvoke! vImageTentConvolve_ARGB8888 is not bound
!missing-pinvoke! vImageTentConvolve_Planar8 is not bound
2017-12-22 09:09:39 -05:00
Sebastien Pouliot b546a20256
[src] Use a single, shared declaration for the 'close' p/invoke (#3126)
Beside eliminating a bit of code duplication this solve the random
(metadata order) xtro report

> ?unknown-entry? !unknown-pinvoke! close bound in 'macOS-ObjCRuntime.ignore'

because it was reported against two namespaces and we don't check
for duplicate p/invokes (largely because there's tons of them in
OpenTK)

Fixes https://github.com/xamarin/maccore/issues/602
2017-12-21 15:18:06 -05:00
Sebastien Pouliot ae061822ac
[tests][xtro] Warn if entries in *.todo files seems fixed (not in corresponding .raw files) (#3120) 2017-12-21 13:10:34 -05:00
Sebastien Pouliot 48530bcd8d
[tests][security] Update TrustTest to run faster (without timeouts) (#3108)
The original test was to cover both X509Certificate and X509Certiicate2
when using with SecTrust. However the code diverged over time. That and
the different certificates used caused the `*2` tests to hit a time
loop (designed to reduce incorrect errors randomly reported).

We want to keep the "delay" logic for it's intended purpose - but it
should not be needed normally.

The tests have been refactored to reuse the same logic (between both
types of certificates) which solve this (when used with the same
certificates)

Replace https://github.com/xamarin/xamarin-macios/pull/3068
2017-12-18 11:14:31 -05:00
Sebastien Pouliot fffaba2414
[xtro] Add sanity tests to keep the entries up to date (avoid invalid, dupes and out of date entries) (#3110) 2017-12-18 10:49:07 -05:00
Alex Soto f8d7c54a0f [generator] Disallow the use of [Async] when the signature contains ref/out parameters, fixes bug 58792. (#3059)
When a method signature contains any ref/out parameters
it is a hint that this method is not a candidate to be
used with [Async] we now error BI1062 in the generator.

The reason of an error instead of a warning is that we
currently generate not compilable code when ref/out is
used on the method signature or in the signature of the
delegate (completion handler), it is very unlikely we are
breaking someone now that we emit an error instead of broken
code.

* Fix Anchor and Clarify the addition of BI1117 Warning into docs/website/generator-errors.md

BI1117 Warning documentation was missing from docs/website/generator-errors.md
so I added it.
2017-12-18 09:21:23 -05:00
Sebastien Pouliot 8d854a0f3d
[xtro] Split results by framework and add an HTML report (#3093)
* Not every old annotations have been migrated (work in progress, to be completed in another PR);

* Sanitation of the data files (e.g. removal of dupes and fixed, by Apple, entries) is done, but not automated (also a work in progress)

Even then this is immediately useful, i.e. better merged before 15.6 gets branched.
2017-12-15 14:08:09 -05:00
Manuel de la Pena cb688be5c4
[CoreAnimation] Ensure that we increase the handle refenrece count in MakeMutable. Fixes #3089 (#3099)
* [CoreAnimation] Ensure that we increate the handle referene in MakeMutable. Fixes 3089

Fixes https://github.com/xamarin/xamarin-macios/issues/3089
2017-12-15 16:13:42 +01:00
Vincent Dondain 8899158260
[arkit] Fix 'Vertices', 'TextureCoordinates' and 'TriangleIndices' in 'ARFaceGeometry' (#3090)
- Fixes bug #61056: [ARKit] TriangleIndices, Vertices and TextureCoordinates should be respectively short [], Vector3 [] and Vector2 []
(https://bugzilla.xamarin.com/show_bug.cgi?id=61056)
- Obsolete `short TriangleIndices`.
- Obsolete `Vector3 Vertices`.
- Obsolete `Vector2 TextureCoordinates`.
- Introduced new `short [] GetTriangleIndices ()`.
- Introduced new `Vector3 [] GetVertices ()`.
- Introduced new `Vector2 [] GetTextureCoordinates ()`.
2017-12-12 12:33:48 -05:00
Vincent Dondain 18378d752e Fix merge mistake in monotouch-test.csproj 2017-12-06 15:18:11 -05:00
Vincent Dondain d7b7a6ea02 Merge branch 'xcode9.2' 2017-12-06 14:41:13 -05:00
Manuel de la Pena 8ed3f85c07
[Debugger] Allow to step into Xamarin code. (#1663)
* [Debugger] Allow to step into Xamarin code.

The tool now detects the different sources and mangles the path to
ensure that the correct paths are installed in the following location:

/Library/Frameworks/Xamarin.iOS/Versions/Current/src
/Library/Frameworks/Xamarin.Mac/Versions/Current/src

The tool will detect if the path map command was used in the mdb and pub files, will point to the correct source code and will copy it to the installation dir. 

Tests have been added that will be ran both by wrench and jenkins ensuring that changes in the manglers do not change it behaviour.
2017-12-05 14:13:59 +01:00
Chris Hamons 4c966e3e71 Fix macOS 10.13 test failures (#3066) 2017-12-03 19:45:28 -05:00
Rolf Bjarne Kvinge 9a5d952678
[xtro] Fix broken build with Mono.Cecil 0.9.6.4. (#3076)
Facts:

* xtro-sharpie references Mono.Cecil 0.9.6 from a nuget.
* If a local Mono.Cecil.dll can't be found (according to the HintPath in the
  csproj, which points to the nuget), then msbuild will look in the system
  Mono.
* Mono 5.8 ships Mono.Cecil 0.10.
* Mono.Cecil 0.10 is not source compatible with 0.9.6 (there's a small issue
  with interfaces).
* xtro-sharpie's source code works with v0.10.

This all means that xtro-sharpie will build fine as long as the 0.9.6 nuget
has *not* been restored. This can manifest itself confusingly ("msbuild xtro-
sharpie.sln" works fine from the command line, open the solution in VSfM and
it doesn't build anymore, not even from the command line, because VSfM
automatically restored nugets in the background).

Update the source code to work with Mono.Cecil 0.9.6 because there's no 0.10
nuget yet (yet keeping the code for v0.10 clearly marked as such for future
updates to v0.10).

Also bump from 0.9.6.1 to 0.9.6.4 since that's the latest available.
2017-12-01 19:31:46 +01:00
Rolf Bjarne Kvinge 113e518d9d
[monotouch-test] Update permission checks. (#3071)
Apparently iOS 11 shows system dialogs for more API, so sprinkle permission
checks in more places.
2017-12-01 17:46:47 +01:00