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

4380 Коммитов

Автор SHA1 Сообщение Дата
Sebastien Pouliot 189075bb3e
[tests] Skip High Sierra image filters in Classic tests. Fixes #622. (#3308) (#3671)
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-03-06 15:16:19 -05:00
Rolf Bjarne Kvinge 796a2ae71c
Bump mono to get fix for xamarin/maccore#629. (#3669)
Fixes https://github.com/xamarin/maccore/issues/629.

Commit list for mono/mono:

* mono/mono@becded2606 [2017-12] [corlib] Ignore TimeZoneTest.TestCtors on iOS under certain conditions due to an Apple bug. (#7427)
* mono/mono@d21cb0853b Don't throw NotImplementedException in Dispose()
* mono/mono@f7f359a2dd IOS SDK fixes. (#7417)
* mono/mono@607cbde47a Reenable HttpRequestIgnoreBadCookies in monotouch. (#7392)
* mono/mono@85fb6bce10 [appdomain] Fix path clobbering when trying to shadow copy siblings
* mono/mono@78136c4a90 Use attribute(deprecated) instead of attribute(error). (#7370)
* mono/mono@b4c45099fb [sdks] Add watch device build.
* mono/mono@70837feda9 [sdks] Add watch simulator build.
* mono/mono@c2728d29f7 [sdks] Add tv simulator build.
* mono/mono@54b2e194f3 [runtime] Don't assert in mono_class_is_assignable_from on iface gtd
* mono/mono@10f1f84138 [test] System.Type.IsAssignableFrom of gtd array special interfaces.
* mono/mono@e1ff841329 [ci] Consistently use CI_TAGS instead of label (#6782)
* mono/mono@46912f8f80 Fix errors in cpu-s390x.md which are exposed by the new genmdesc. (#7323)
* mono/mono@3f4f070d3d disable test_42_arm64_dyncall_vtypebyval

Diff: 331f927bfe...becded2606
2018-03-06 17:43:04 +01:00
Sebastien Pouliot fc346b7cde
Bump Xcode to beta 4 (#3667) 2018-03-06 10:25:40 -05:00
Sebastien Pouliot f44c371d71
Merge pull request #3663 from spouliot/xcode93-15-6-merge
Merge d15-6 into xcode9.3
2018-03-06 07:57:02 -05:00
Sebastien Pouliot 9f3f7bf4ed Fix merge 2018-03-05 23:40:02 -05:00
Sebastien Pouliot 29676a3662 Merge 15.6 into xcode9.3 2018-03-05 17:16:28 -05:00
Vincent Dondain 97ef51bf8b
[msbuild] Use a response file in 'MTouchTaskBase' (#3635)
The main cause of the warning: "warning MSB6002: The command-line for the 'MTouch' task is too long" was the number of references that can be passed to `mtouch`.
Now all the arguments are written in a response file which in turn is passed to `mtouch`.

- Fixes bug #56501: MSB6002 command-line for MTouch task is too long, > 32000 characters
(https://bugzilla.xamarin.com/show_bug.cgi?id=56501)
- The response file is created in the device specific folder, as `response-file.rsp`. It is re-created every time.
- Added an msbuild test to ensure the response file is created by `GenerateCommandLineCommands` and that it includes all the references.
- Introduce `AddLine` and `AddQuotedLine` which we use to populate the response file (and go to the next line).
- Move to C# 7 syntax for string replacement.
- Update all tests in `MTouchTaskTests` to use the response file since the arguments are no longer passed directly to `mtouch`.
- Update MT0018's documentation for response files.
2018-03-05 11:59:53 -05:00
Rolf Bjarne Kvinge 5fc4fc66af
[registrar] Don't throw NRE when finding methods that almost implement optional protocol members. (#3658)
If a class implements a protocol with optional members, and that class also exports methods whose selectors match an optional member, but the signature doesn't match, we must show a useful warning instead of erroring out due to a NullReferenceException.

Fixes this:

    System.NullReferenceException: Object reference not set to an instance of an object
      at Registrar.StaticRegistrar.GetBlockProxyAttributeMethod (Mono.Cecil.MethodDefinition method, System.Int32 parameter) [0x00001] in /Users/builder/data/lanes/1381/9de35b83/source/xamarin-macios/tools/common/StaticRegistrar.cs:4113
      at Registrar.StaticRegistrar.GetBlockWrapperCreator (Registrar.Registrar+ObjCMethod obj_method, System.Int32 parameter) [0x001e1] in /Users/builder/data/lanes/1381/9de35b83/source/xamarin-macios/tools/common/StaticRegistrar.cs:4101
      at Registrar.StaticRegistrar.Specialize (Registrar.AutoIndentStringBuilder sb, Registrar.Registrar+ObjCMethod method, System.Collections.Generic.List`1[T] exceptions) [0x0216b] in /Users/builder/data/lanes/1381/9de35b83/source/xamarin-macios/tools/common/StaticRegistrar.cs:3683

when building the msbuild/tests/MyWatchKit2IntentsExtension project.
2018-03-05 15:26:16 +01:00
Rolf Bjarne Kvinge b112cd9e3b
[tests] Use NUnit.Runners v2.6.4 for the install sources tests. (#3645)
Since that's what all the other test suites that use NUnit v2 use, and it's
also what xharness expects (and tries to execute).

This fixes running these tests when other tests haven't already restored the
v2.6.4 nuget.
2018-03-05 14:54:56 +01:00
Rolf Bjarne Kvinge 08f98e9cf8
[xharness] Add UI to expand/collapse all tests. (#3657) 2018-03-05 14:53:14 +01:00
Rolf Bjarne Kvinge f7369e652c
[xharness] Don't try to reload every second, instead wait a second after each reload to reload again. (#3656)
If the browser is slow to update the page, reloading every second can overload the browser.
2018-03-05 14:52:59 +01:00
Rolf Bjarne Kvinge 9de35b835a [xharness] Only run the install source tests if we're including either Mac or Simulator tests. (#3648)
This means we won't be running these tests when running device tests (which is
not needed).
2018-03-02 15:17:36 -05:00
Marius Ungureanu d4d542d051 [MMP] Allow resolving assemblies to the ones passed in command line args (#3575)
* [MMP] Revert recursive search dirs changes
* [MMP] Allow resolving assemblies to the ones passed in command line args

This is what actually makes the MonoMacResolver actually resolve to
assemblies given as arguments.

This mirrors the behaviour of Pack, which is called on the other
code-path (that's not --runregistrar)

3113c5d2b5/tools/mmp/driver.cs (L513)
2018-03-02 12:59:25 -06:00
Rolf Bjarne Kvinge f3055ddd6d
[mtouch] Move native code sharing check for the remove-dynamic-registrar optimization until after checking the linker settings. (#3643)
Fixes this test failure:

1) Failed : Xamarin.MTouch.MT0113_linker
The error 'MT0113: Native code sharing has been disabled for the extension 'testServiceExtension' because the managed linker settings are different between the container app (None) and the extension (All).' was not found in the output:
	Message #1 did not match:
		actual:   'Native code sharing has been disabled for the extension 'testServiceExtension' because the remove-dynamic-registrar optimization differ between the container app (default) and the extension (false).'
		expected: 'Native code sharing has been disabled for the extension 'testServiceExtension' because the managed linker settings are different between the container app (None) and the extension (All).'

which happens because:

* Removing the dynamic registrar requires the linker, so removal of the dynamic registrar is disabled if the linker is not disabled
* This results in the app and appex having different values for the remove-dynamic-registrar option
* Thus the error message.

Technically either error is correct, but I prefer the previous one (about the
linker), because it directly assigns blame (the linker setting). Figuring out
what has to change (the linker setting) when the error message complains about
an optimization is not so straight forward for users.
2018-03-02 18:28:07 +01:00
Rolf Bjarne Kvinge b131a54be5
[static registrar] Optimize creation of delegates for blocks. (#3623)
* [static registrar] Optimize creation of delegates for blocks.

Optimize creation of delegates for blocks so that it doesn't require the
dynamic registrar.

This is done by getting the metadata token for the Create method that creates
the delegate, and embed that metadata token in the generated code from the
static registrar.

Also add tests, since this scenario was not covered by tests already.

* [mmptest] Fix test after recent changes.

* [test-libraries] Avoid duplicate symbols.

* [tests] Update according to changes.
2018-03-02 14:30:18 +01:00
Manuel de la Pena a5929d560b [AVFoundation] Backport AVFoundation master changes in Xcode 9.3 and add missing API. (#3583) 2018-03-02 08:06:48 -05:00
Sebastien Pouliot b4a59931fb
[xtro] Avoid duplicate 'close' p/invoke across frameworks (#3632)
Depending on the metadata order the symbol will be reported against a
different framework and cause false positives.

Re-using one of the declaration solves this - even if they should,
ideally, be moved to a separated/shared type (like one per fx)

Fixes https://github.com/xamarin/maccore/issues/638
2018-03-02 08:00:19 -05:00
Rolf Bjarne Kvinge 4be1cd723b
[runtime] Enable signal chaining for Xamarin.Mac apps. (#3631)
Reported in the forums: https://forums.xamarin.com/discussion/122594/xamarin-mac-signal-handling
2018-03-02 09:42:16 +01:00
Rolf Bjarne Kvinge a106cd7520
[mtouch] Bundle duplicated assemblies in the container app. Fixes #58873. (#3626)
Assemblies that satisfy all of these conditions:

* Are not in the container project.
* Are in multiple app extensions.

can (and should) be bundled in the container app.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=58873
2018-03-02 09:39:42 +01:00
Rolf Bjarne Kvinge aa9243f528
[introspection] Put type-based exception in the type-based switch. (#3636) 2018-03-02 09:38:53 +01:00
Rolf Bjarne Kvinge 3ce723e577
[ObjCRuntime] Fix error message to show the assembly name instead of a pointer to the assembly name. (#3625) 2018-03-02 09:38:01 +01:00
Rolf Bjarne Kvinge 699d3ed582
[tests] Don't run mmp regression tests in parallel. Fixes maccore #645. (#3638)
* [tests] Don't run mmp regression tests in parallel. Fixes maccore #645.

For some reason vstool becomes confused and starts erroring out if multiple
vstools are running at the same time.

So work around this by executing the MMP regression tests serialized.

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

* [xharness] Upload the logs from the mmp regression tests.
2018-03-02 07:48:41 +01:00
Rolf Bjarne Kvinge 573c8ae30b Bump maccore to get a few mlaunch fixes. (#3628)
Commit list for xamarin/maccore:

* xamarin/maccore@689fae7440 Bump maciostools to get a few mlaunch fixes.

Diff: c76baed02b...689fae7440
2018-03-01 14:21:57 -05:00
Chris Hamons c9fac28a8f
Fixes for Embeddinator after header changes (#3607)
- Two locations in our runtime headers were unable to be compiled outside of ObjC++ (Embeddinator)
2018-03-01 11:04:01 -06:00
Rolf Bjarne Kvinge 6c1bdea375
[xharness] Improve html report by formatting newlines and tabs in test failure messages using corresponding html tags. (#3627)
* [xharness] Improve html report by formatting newlines and tabs in test failure messages using corresponding html tags.

* [xharness] Improve nunit test reporting in html report by creating a list of failures.
2018-03-01 17:20:19 +01:00
Chris Hamons ca4360116c
[mmp] Add stripping of 32-bit dylibs to work with new App Store restrictions (#3387)
- https://github.com/xamarin/xamarin-macios/issues/3367
- App Store will now fail builds if you add in a 32-bit dylib
- If you are a 32-bit app you don't need the 64-bit part of your fat
dylib anyway
- Add --optimize=-trim-architectures to allow customization of behavior, as not everyone
uses app store

In addition, while writing tests for this is was noticed that mmp tests did not "really" run Release configuration correctly in most cases. Fixing this turned out to be a bit of a pain, but necessary to correctly test this (and other things).

- Turns out that /p:configuration:debug is not sufficient to tell mmp to
do the right thing
- That, in most projects, sets the DebugSymbols property, which really
is what is checked.
- However, two of our projects did not have that, so we always did
release mmp work.
- Removed configuration property for tests and added real "Release"
configuration option
2018-03-01 09:36:06 -06:00
Matt Ward 78e966d7ee [Security] Fix not being able to change the authorization prompt (#3612)
When asking for user credentials it was not possible to change the
default authorization prompt message so the application name is used
by default. When running an application with Mono this will be
mono-sgen64 or mono-sgen32.

The prompt is now added to the environment authorization item set
passed to AuthorizationCreate. It was being passed as part of the
rights item set. This allows a custom message to be set in the
authorization dialog.
2018-03-01 09:33:30 -06:00
Rolf Bjarne Kvinge de15337f61
[mtouch] Propagate the computed value for removal of the dynamic registrar to code shared app extensions. (#3622)
This fixes a startup crash in code shared app extensions due to having the
wrong value set in the runtime (the dynamic registrar was removed, but the
executable didn't know it).
2018-03-01 14:59:54 +01:00
Rolf Bjarne Kvinge 1a49079ee4
[static registrar] Make sure to include frameworks for linked away protocol types as well. (#3617)
At some point the code wasn't able to figure out the framework for linked away
types (because linked away types don't know which assembly they belong to, and
thus we couldn't verify that the type in question was a platform type or not),
so I skipped checking the namespace for such types.

Some time later I implemented support for storing the assembly for a linked
away type separately, so that it can later be looked up, and thus it's not
necessary to exclude linked away types anymore.

This fixes a build problem with the generated registrar code (which happens
only if the INCWidgetProviding interface is linked away) when building the
linkall extension tests:

    /work/maccore/master/xamarin-macios/tests/xharness/tmp-test-dir/link all1894/obj/iPhone/Debug64-today-extension/mtouch-cache/registrar.h:319:51: error: no type or protocol named 'NCWidgetProviding'
    @interface TodayViewController : UIViewController<NCWidgetProviding> {
                                                      ^
2018-03-01 14:57:58 +01:00
Rolf Bjarne Kvinge d421caeb97
[tests] Run iOS extensions tests on device. (#3618) 2018-03-01 14:57:28 +01:00
Rolf Bjarne Kvinge 514a3de817
[runtime] Fix exception marshalling when the dynamic registrar is removed. (#3616)
This can be reproduced by running monotouch-test with all optimizations in
Debug mode (because some of the exception marshalling tests are only enabled
in debug mode), so add such a configuration to xharness. To avoid bloating PR
builds, this configuration is only enabled when running all tests (either
manually selecting all tests for a PR, or on Wrench, where everything is
always tested).
2018-02-28 22:28:06 +01:00
Rolf Bjarne Kvinge 7ddb263e7d
[xharness] Propagate custom defines to referenced projects as well. Fixes maccore #655. (#3615)
The ProtocolTest test is located in the bindings-test assembly, and it
requires certain conditional compilation defines to be set in order to behave
properly.

With this fix we correctly set these defines when cloning the bindings-test
project (in addition to when we set the defines for the main project, which is
either monotouch-test or linkall for this test).

Fixes https://github.com/xamarin/maccore/issues/655.
2018-02-28 21:55:26 +01:00
Manuel de la Pena fab52e38c4 [AVFoundation] Backport new API from master. (#3605) 2018-02-28 15:46:22 -05:00
Chris Hamons 31f20cfe6d [macos] WKPreferences does not declare NSCopying (#3611) 2018-02-28 08:14:48 -05:00
Sebastien Pouliot 27e757e45e [tests][macos] Fix AuthenticodeDeformatterTest.VerifySignedAssembly failure on modern. Fixes 3207 (#3603)
* [tests][macos] Fix AuthenticodeDeformatterTest.VerifySignedAssembly failure on modern. Fixes 3207

Modern does not, by default/design, ship a machine.config file. This
means it only knowns about the default crypto shipped with .NET.

That's a problem for MD2 for which some old certificates might still
exists in the computer store, like our wrench bots.

That's generally not a problem since XM apps delegate trust to macOS
except for one case: Authenticode.

So verifying an authenticode signature can end up, thru X509Chain,
loading a certificate using MD2 without knowing how to create the
digest algorithm - and fail.

The fix is to register the algorithm manually (if not found).

https://github.com/xamarin/xamarin-macios/issues/3207

* [tests] Only call CryptoConfig on XM modern builds and add a reference to Mono.Security.dll on such projects
2018-02-28 09:35:08 +01:00
Bernhard Urban bc509bd7f1 Bump mono and touchunit (#3610)
* Bump mono

Commit list for mono/mono:

* mono/mono@331f927bfe Bump nunitlite (#7276)
* mono/mono@da6a45a158 Check if we are exceeding the worker count limit
* mono/mono@21d6b331fc Ios sdk changes (#7258)
* mono/mono@e87d1235da Merge mxe-Win32 and mxe-Win64 targets since we are building both in XA anyway (#7280)
* mono/mono@b9fb4d8857 Bump bockbuild to get curl error changes
* mono/mono@b7031bccfc Emit the same instances in hybrid aot mode as in full aot mode.
* mono/mono@3538148a18 [2017-12] [xbuild] add property that is available in msbuild (#7224)
* mono/mono@947e457f0e [sdks] Instead of using a XCODE_VERSION variable, let the caller set the XCODE_DIR variable directly, since x.ios is using a full path. (#7111)
* mono/mono@7f0c97aa03 Bump bockbuild for https://github.com/mono/bockbuild/pull/62 (#7207)
* mono/mono@85cfb9ccab Disable partial sharing during JITting, its only been tested in full aot mode, and doesn't seem to work with JITted methods. Fixes https://github.com/mono/mono/issues/7085.
* mono/mono@22a6ec10b1 Add hybrid aot tests.
* mono/mono@454bd206aa Remove reflection calls for value has to be set

Diff: 4adf8229e8...331f927bfe

* Bump Touch.Unit

Commit list for spouliot/Touch.Unit:

* spouliot/Touch.Unit@1c41c75 Revert "[TouchRunner] do not use FinallyDelegate in Runner, because it requires remoting API to be available (#49)" (#50)

Diff: 4ac4e32500...1c41c75983
2018-02-28 09:33:23 +01:00
Sebastien Pouliot b448fe9d13
[apidiff] Update references to the latest stables (#3606)
XI comes from `xcode9.2`;
XM comes from `d15-5`;
2018-02-27 13:59:41 -05:00
Joel Martinez 3bb0702a45 bump maccore for classic deprecation (#3591) 2018-02-27 15:34:20 +01:00
Manuel de la Pena cfc3cbf6ef
[BusinessChat] Introduction of the new framework on iOS and Mac. (#3569) 2018-02-27 12:53:13 +01:00
Rolf Bjarne Kvinge d973192c57
[xharness] All variants of GuiUnit projects must be special-cased. (#3602)
This fixes an issue where multiple copies of the GuiUnit project would have
the same output directory, causing random problems when building those
projects in parallel.
2018-02-27 10:28:42 +01:00
Rolf Bjarne Kvinge afb6c6cd62
[xharness] Always build the test libraries before doing anything else. (#3601)
Fixes an issue where multiple projects would try to build the test libraries simultaneously.
2018-02-27 07:43:51 +01:00
John Miller 2a29834ba2 Update README.md (#3587)
* Update README.md

New README layout which includes sections to help direct visitors to the appropriate areas.
Adds note about the license

* Adds Gitter Button

Back by popular demand!

* Fixes Vote link
2018-02-26 14:31:49 -05:00
Rolf Bjarne Kvinge bfa4c548ed
[tests] Fix ProtocolTest to work with in both monotouch-test and linkall. (#3598)
The [Protocol] attributes the test checks for are not linked away in
monotouch-test (because monotouch-test only links SDK assemblies), but they
are linked away in link all, so adjust the test accordingly.
2018-02-26 17:37:09 +01:00
Rolf Bjarne Kvinge 346051c5e3
[xharness] Don't try to execute an empty collection of tests. Fixes xamarin/maccore#600. (#3600)
Fixes https://github.com/xamarin/maccore/issues/600.
2018-02-26 17:36:05 +01:00
Rolf Bjarne Kvinge a2676ba064
[introspection] Don't process IKPictureTaker, it may crash at any time. (#3599)
See also https://bugzilla.xamarin.com/show_bug.cgi?id=46624, where the same
logic was applied to apitest.

Ref: https://trello.com/c/T6vkA2QF/62-29311598-ikpicturetaker-crashes-randomly-upon-deallocation?menu=filter&filter=corenfc
2018-02-26 17:31:41 +01:00
Bernhard Urban f5b860cf75 [system-dependencies] simplify mono version check (#3596) 2018-02-26 14:45:26 +01:00
Rolf Bjarne Kvinge 452aeaa59b
[src] Fix csc warnings. (#3589)
Now that we've switched to csc, we're also delighted to get new warnings 🎉

    ObjCRuntime/Blocks.cs(54,26): warning CS0649: Field 'XamarinBlockDescriptor.descriptor' is never assigned to, and will always have its default value
    AudioUnit/AudioUnit.cs(405,19): warning CS0649: Field 'AudioUnit.handle' is never assigned to, and will always have its default value
    ObjCRuntime/Blocks.cs(55,23): warning CS0649: Field 'XamarinBlockDescriptor.ref_count' is never assigned to, and will always have its default value 0
    ObjCRuntime/Blocks.cs(54,26): warning CS0649: Field 'XamarinBlockDescriptor.descriptor' is never assigned to, and will always have its default value
    AudioUnit/AudioUnit.cs(405,19): warning CS0649: Field 'AudioUnit.handle' is never assigned to, and will always have its default value
    ObjCRuntime/Blocks.cs(55,23): warning CS0649: Field 'XamarinBlockDescriptor.ref_count' is never assigned to, and will always have its default value 0

We're so delighted that we want them gone asap 😎
2018-02-26 07:46:32 +01:00
Vincent Dondain c017e5d15a [videotoolbox] Update to Xcode 9.3 beta 3 (#3580) 2018-02-23 09:08:23 -05:00
Vincent Dondain c12c35c7c5
[homekit] Update to Xcode 9.3 beta 3 (#3573) 2018-02-22 17:12:18 -05:00
Vincent Dondain c95557cbb4
[iad] Update to Xcode 9.3 beta 3 (#3576) 2018-02-22 17:10:35 -05:00