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

2205 Коммитов

Автор SHA1 Сообщение Дата
Manuel de la Pena 34ca0496fc
[XHarness] Reneable the SystemNetHttpTests on iOS, TvOS and WatchOS. (#5405)
Failing iOS tests are ignored WatchOS is running the iOS tests until we have the tests in the SDK
for the watch runtime.

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

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

Failing tests are ignored.

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

Mono issue https://github.com/mono/mono/issues/12446
2019-01-16 12:11:53 +01:00
Sebastien Pouliot 9baec99be2
[tests] Fix `ARCondigurationTest.GetSupportedVideoFormats` on older devices (#5409)
`ARImageTrackingConfiguration` requires iOS 12 (Xcode 10) so split it in
a separate test case.

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

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

A new mono issue was added: https://github.com/mono/mono/issues/12417
2019-01-14 16:58:36 +01:00
Manuel de la Pena adc9ddccf3
[XHarness] Reenable the System.Data tests from the bcl. (#5379) 2019-01-11 16:56:30 +01:00
Rolf Bjarne Kvinge 0075415c39
[xharness] Add support for GitHub authentication, and use it in Jenkins. (#5380)
This makes it much less probable to hit any rate limits, because authenticated
rate limits are much higher (5000 requests/hour vs 60 requests/hour).
2019-01-11 15:48:16 +01:00
Rolf Bjarne Kvinge e1061ee196
[xharness] Move javascript and css to external files. (#5378)
This makes editing them a bit simpler.

There are no functional changes.
2019-01-11 15:25:36 +01:00
Manuel de la Pena 6a1ecaabb0
[XHarness] Reenable the System.IO.Compression.Filesystem tests and ignore those failing ones. (#5374) 2019-01-11 12:22:48 +01:00
Manuel de la Pena 8e32a07af0
[XHarness] Reneable the System.IO.Compression tests. (#5373) 2019-01-10 19:05:13 +01:00
Manuel de la Pena 81ea2e3e46
[Network] Add test to ensure that auth headers are not fwd on redirects. (#5371) 2019-01-10 17:45:20 +01:00
Rolf Bjarne Kvinge 61bf0db817
[tests] Run tests-docs using xharness. (#5372)
Jenkins has a limitation where you can't mark a step a failure, it has to
*fail* to be reported as such.

This means that running multiple tests, and reporting a failure if any of
those tests fail is not possible.

We run into this with the normal test run + the docs tests; where we currently
don't show a red result in the UI if any of those fail.

So incorporate the test-docs step into xharness, so that we only have one
thing to in the Jenkinsfile, which makes it possible for us to fail the test
run step properly.

This also required a few upgrades to xharness to get more info for pull
requests, since the logic to enable the docs tests is a bit more complicated
than anything else we have (if the current branch (or the target branch for a
PR) is 'master' AND xamarin mode is enabled).
2019-01-10 16:43:02 +01:00
Manuel de la Pena 18035518fb
[XHarness] Reenable System.Xml tests from the mono test dlls. (#5370) 2019-01-10 16:26:54 +01:00
Rolf Bjarne Kvinge 2b4a3b948b
[mtouch] Disable native code sharing if the interpreter settings differ between the main app and app extensions. Fixes #5365. (#5369)
We can't share native code between apps and app extensions if the interpreter
settings differ between them, so detect this scenario and automatically
disable native code sharing.

Fixes https://github.com/xamarin/xamarin-macios/issues/5365.
2019-01-10 15:45:33 +01:00
Rolf Bjarne Kvinge 327c0a8ddf
[xibuild] Add support for /verbose, and use it accordingly. (#5224)
* [xibuild] Add support for /verbose, and use it accordingly.

Also stop using xibuild when it's not needed.

* Use the same verbosity for xibuild as we do for xbuild/msbuild.
2019-01-09 07:43:22 +01:00
Rolf Bjarne Kvinge a42b6b7237
[tests] Add MONO_SDK_DESTDIR to config file when using system XI for tests. (#5355)
Fixes this problem when running the VSTS device tests:

    Unhandled Exception:
    System.Collections.Generic.KeyNotFoundException: The given key 'MONO_SDK_DESTDIR' was not present in the dictionary.
      at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <96207d0baa204f48a53ad6be05f5ecba>:0
      at xharness.Harness.LoadConfig () [0x001a3] in <299e29e4a95f41499aef8f7d9863ca3d>:0
      at xharness.Harness.Execute () [0x00001] in <299e29e4a95f41499aef8f7d9863ca3d>:0
      at xharness.MainClass.Main (System.String[] args) [0x003e3] in <299e29e4a95f41499aef8f7d9863ca3d>:0
2019-01-09 07:30:01 +01:00
Rolf Bjarne Kvinge b7c8fdbedb
[tests] Add test to ensure LLVM succeeds on watchOS for every assembly we ship. (#5295)
* [tests] Add test to ensure LLVM succeeds on watchOS for every assembly we ship.

References:

* https://github.com/mono/mono/issues/12131: LLVM failed for 'UIEdgeInsets.Equals': opcode r4_cneq
* https://github.com/mono/mono/issues/12130: [watchOS] MT3001: Could not AOT the assembly mscorlib.dll
* https://github.com/xamarin/xamarin-macios/issues/4763: [RFC] Improve handling of filter clauses with LLVM/Bitcode
* https://bugzilla.xamarin.com/show_bug.cgi?id=58209: LLVM/bitcode can't handle filter clauses

* LLVM failure in mscorlib.dll is now fixed.

* Revert "LLVM failure in mscorlib.dll is now fixed."

This reverts commit ace3c930a9.

* [tests] Run mtouch tests inprocess.

Fixes a remoting exception:

    System.Runtime.Remoting.RemotingException: Cannot create channel sink to connect to URL fff8ce5c_3219_4dd0_941f_500dd49e02a5/94f23f2_4.rem. An appropriate channel has probably not been registered.

    Server stack trace:
      at System.Runtime.Remoting.RemotingServices.GetClientChannelSinkChain (System.String url, System.Object channelData, System.String& objectUri) [0x00019] in <96207d0baa204f48a53ad6be05f5ecba>:0
      at System.Runtime.Remoting.RemotingServices.GetOrCreateClientIdentity (System.Runtime.Remoting.ObjRef objRef, System.Type proxyType, System.Object& clientProxy) [0x0001d] in <96207d0baa204f48a53ad6be05f5ecba>:0
      at System.Runtime.Remoting.RemotingServices.GetRemoteObject (System.Runtime.Remoting.ObjRef objRef, System.Type proxyType) [0x00000] in <96207d0baa204f48a53ad6be05f5ecba>:0
      at System.Runtime.Remoting.RemotingServices.GetProxyForRemoteObject (System.Runtime.Remoting.ObjRef objref, System.Type classToProxy) [0x0001b] in <96207d0baa204f48a53ad6be05f5ecba>:0
      at System.Runtime.Remoting.RemotingServices.Unmarshal (System.Runtime.Remoting.ObjRef objectRef, System.Boolean fRefine) [0x0007a] in <96207d0baa204f48a53ad6be05f5ecba>:0
      at System.Runtime.Remoting.RemotingServices.Unmarshal (System.Runtime.Remoting.ObjRef objectRef) [0x00000] in <96207d0baa204f48a53ad6be05f5ecba>:0
      at System.Runtime.Remoting.ObjRef.GetRealObject (System.Runtime.Serialization.StreamingContext context) [0x0000f] in <96207d0baa204f48a53ad6be05f5ecba>:0
      at System.Runtime.Serialization.ObjectManager.ResolveObjectReference (System.Runtime.Serialization.ObjectHolder holder) [0x00010] in <96207d0baa204f48a53ad6be05f5ecba>:0
      at System.Runtime.Serialization.ObjectManager.DoFixups () [0x0007f] in <96207d0baa204f48a53ad6be05f5ecba>:0
      at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize (System.Runtime.Remoting.Messaging.HeaderHandler handler, System.Runtime.Serialization.Formatters.Binary.__BinaryParser serParser, System.Boolean fCheck, System.Boolean isCrossAppDomain, System.Runtime.Remoting.Messaging.IMethodCallMessage methodCallMessage) [0x00077] in <96207d0baa204f48a53ad6be05f5ecba>:0
      at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize (System.IO.Stream serializationStream, System.Runtime.Remoting.Messaging.HeaderHandler handler, System.Boolean fCheck, System.Boolean isCrossAppDomain, System.Runtime.Remoting.Messaging.IMethodCallMessage methodCallMessage) [0x000a2] in <96207d0baa204f48a53ad6be05f5ecba>:0
      at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize (System.IO.Stream serializationStream, System.Runtime.Remoting.Messaging.HeaderHandler handler, System.Boolean fCheck, System.Runtime.Remoting.Messaging.IMethodCallMessage methodCallMessage) [0x00000] in <96207d0baa204f48a53ad6be05f5ecba>:0
      at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.DeserializeMethodResponse (System.IO.Stream serializationStream, System.Runtime.Remoting.Messaging.HeaderHandler handler, System.Runtime.Remoting.Messaging.IMethodCallMessage methodCallMessage) [0x00000] in <96207d0baa204f48a53ad6be05f5ecba>:0
      at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage (System.Runtime.Remoting.Messaging.IMessage msg) [0x00083] in <dcf627861d9e44ce818b79d685496eeb>:0

    Exception rethrown at [0]:
      at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_remoting_wrapper(intptr,intptr)
      at (wrapper remoting-invoke) NUnit.Engine.Agents.RemoteTestAgent.Load()
      at NUnit.Engine.Runners.ProcessRunner.LoadPackage () [0x00040] in <28c9cb3cd2594f14ad436553a9b77f5d>:0
      at NUnit.Engine.Runners.AbstractTestRunner.Load () [0x00000] in <28c9cb3cd2594f14ad436553a9b77f5d>:0
      at NUnit.Engine.Runners.MasterTestRunner.LoadPackage () [0x0006b] in <28c9cb3cd2594f14ad436553a9b77f5d>:0
      at NUnit.Engine.Runners.MasterTestRunner..ctor (NUnit.Engine.IServiceLocator services, NUnit.Engine.TestPackage package) [0x0007a] in <28c9cb3cd2594f14ad436553a9b77f5d>:0
      at NUnit.Engine.TestEngine.GetRunner (NUnit.Engine.TestPackage package) [0x0001e] in <28c9cb3cd2594f14ad436553a9b77f5d>:0
      at NUnit.ConsoleRunner.ConsoleRunner.RunTests (NUnit.Engine.TestPackage package, NUnit.Engine.TestFilter filter) [0x00095] in <93782c327b3c4ab5aae551528dfe1cae>:0
      at NUnit.ConsoleRunner.ConsoleRunner.Execute () [0x000b6] in <93782c327b3c4ab5aae551528dfe1cae>:0
      at NUnit.ConsoleRunner.Program.Main (System.String[] args) [0x001b5] in <93782c327b3c4ab5aae551528dfe1cae>:0

* [xharness] Run mtouch tests in-process.

* [tests] Don't run the LLVM watchOS tests if we didn't build for device.

* [tests] Update NoLLVMFailuresInWatchOS known failures according to latest mono bump.
2019-01-08 15:17:21 +01:00
Sebastien Pouliot aa77c673c2
[arkit] Fix crash in ARConfiguration.SupportedVideoFormats. Fixes #5347 (#5348)
Even if 'supportedVideoFormats' is static the type is abstract.

> Important
> ARConfiguration is an abstract base class, so its implementation of
> this property always returns an empty array. Read this property from
> the configuration subclass you plan to use for your AR session, such
> as ARWorldTrackingConfiguration or ARFaceTrackingConfiguration.
https://developer.apple.com/documentation/arkit/arconfiguration/2942261-supportedvideoformats?language=objc

and this behave differently in Objective-C (than .net) as every (static)
method will be different (and not a single implementation like C#).

The existing implementation (as a property) calls `ARConfiguration`
implementation which simply throws a (native) exception

> NSInvalidArgumentException Reason: Supported video formats should be called on individual configuration class

The solution is to obsolete the property (can't be subclassed in .net
since it's static) and add, only on the subclasses, a method that
call the 'supportedVideoFormats' selector on the current (not base)
type.

Added unit test to detect the addition of newer subclasses - since they
will also need to expose this method.

reference: https://github.com/xamarin/xamarin-macios/issues/5347
2019-01-04 17:29:19 -05:00
Sebastien Pouliot fbd63db027
[appkit] Use generated bindings for NS[Open|Save].[Open|Save]Panel. Fixes #5336 (#5341)
Also add [Advice] to help people using writing applications that runs
inside the sandbox.

reference: https://github.com/xamarin/xamarin-macios/issues/5336
2019-01-03 19:26:21 -05:00
Sebastien Pouliot f55db9d7bc
[coretext] Update CTRunDelegate to work on 64 bits. Fixes #5132 (#5302)
Basic fix that does not require a breaking change.

It's _basic_ as it does not fix the performance comments made inside
the issue. Those are different (not a bug, an enhancement) and I'll
file a separate issue to track this.

Reference: https://github.com/xamarin/xamarin-macios/issues/5132
2018-12-21 08:57:32 -05:00
Manuel de la Pena 40921b9924
[XHarness] Reenable Mono.Data.Tds tests on watch os. (#5317)
Ignore the failing tests and run the rest. Fixes xamarin/maccore#1152
2018-12-21 10:38:13 +01:00
Manuel de la Pena 480f786839
[XHarness] Add support for ignore files in the blc tests (#5288)
This PR adds support to the use of *.ignore files for iOS/tvOS/WatchOS. The files are very similar to those that are use in xtro. We have:

* common-{TestProjectName}.ignore: For those tests that fail in all platforms.
* tvOS-{TestProjectName}.ignore: For tvOS specific failures.
* watchOS-{TestProjectName}.ignore: For watchOS specific failures.
* iOS-{TestProjectName}.ignore: for iOS specific projects.

Two test projects that were ignored previously have been added to show that the code does as advertised:

* SystemDataXunit: xUnit test project example. Fixes https://github.com/xamarin/maccore/issues/1131
* SystemServiceModelWebTests: NUnit test project example. Fixes https://github.com/xamarin/maccore/issues/1137

The files take the name of the failing tests, although we do support ignoring by class/namespace and other combinations, that would make the *.ignore files format more complicated and it is not worth it.
2018-12-20 23:13:17 +01:00
Manuel de la Pena ef78b1dbc3
[XHarness] Do not build the test assemblies for the iOS platforms. (#5270)
We now download the ios Mono sdk which means that there is no need for
us to build the test assemblies on iOS, WatchOS and tvOS BUT we need to
do so for the Mac tests.

The change includes:
  1. Use fo the downloaded test assemblies.
  2. Removal of the dependency of building them in the tests.
  3. Move back to using reflection for the project generation.
  4. Remove the cached project details added in the workaround.
2018-12-18 14:21:09 +01:00
Chris Hamons 68049f9180
[tests] Remove NoBindingEmbedding rebuild tests (#5274)
- These tests failed randomly, especially on older macOS without APFS
- They also were rather slow
2018-12-14 09:37:58 -05:00
Manuel de la Pena 20328ca84b
[XHarness] Add filtering support to the NUnit and xUnit runners. (#5262)
First step to get to the point in which we can filter the execution of
the bcl tests via filters. This commit adds the filtering support to the
runners, which later will be used by xharness to pass those tests
filtered.

The end goal is to not skip a complete assembly but just those failing
tests.
2018-12-13 18:04:17 +01:00
Bernhard Urban e154556e16 [tests] fix symbols test for interpreter (#5264)
`ves_pinvoke_method` / `do_icall` moved a frame up, so make the check
more flexible.
2018-12-13 08:52:02 -05:00
Chris Hamons d7c2a45ca9
Add 'NoBindingEmbedding' style binding project support (#5167)
- Existing binding projects embed the native libraries within the assembly as managed resource
- This does not scale well and has performance implications
- This PR creates a new property, NoBindingEmbedding which when true processes the building and consumption of binding projects differently.
- Existing binding projects are not affected, they will continue as is
- I've written a full XM test suite and ported a subset to iOS. Since iOS only supports checked in projects, and I didn't want to make the existing situation worse by adding more, I only wrote tests that could use the existing test projects.
    -When we complete some form of msbuild testing reform, we'll revisit these tests.
- Remove two files in MyiOSFrameworkBinding that are not used (we use copies elsewhere)
- Remove unnecessary sleep and fix broken touch command
- Output failing test log to console instead of test output
    - VSfM does not handle thousands of lines of test failure message well
- Add ability to generate binding projects with LinkWith
2018-12-12 09:55:57 -05:00
Manuel de la Pena ffae762db2
[XHarness] Add support for xunit and nunit tests on Mac OS X. (#5182)
This change adds support to execute the tests provided by mono as assemblies.This includes:

1. App generation to run the bcl tests on modern and full.
2. Needed workaround to delay the compilation of the assemblies until we have them from the SDK.
3. All failing tests are ignored.
2018-12-12 10:38:48 +01:00
Bernhard Urban 4061adc2a4 [interp] fix mixed mode in Release configuration (#5230)
* [mtouch] do not strip assemblies when interpreter is used

* [xharness] add release mixed-mode configuration

* [xharness] enable debug mixed-mode config for mscorlib

* [mtouch] add link to mono issue
2018-12-11 17:51:05 +01:00
Manuel de la Pena fb4147d78d
[Foundation] Make sure we use the cookies from the cookie storage. Fixes #5148 (#5244)
The response object does not have all the cookie values, instead we must
rust the cookie storage which can be used to retrieve ALL the cookies
for a task.

The header value has to be created manually because the native objects
do not expose a valid way to get the header. Tests have been added to
ensure we return the same as the managed client.

Fixes https://github.com/xamarin/xamarin-macios/issues/5148
2018-12-10 22:59:11 +01:00
Rolf Bjarne Kvinge 55837e3d80
[xharness] Handle Process.HasExited throwing exceptions. (#5239)
Apparently Process.HasExited may throw exceptions, so handle those gracefully
(by ignoring them completely):

    Unhandled Exception:
     System.AggregateException: One or more errors occurred. (No process is associated with this object.) ---> System.InvalidOperationException: No process is associated with this object.
       at System.Diagnostics.Process.EnsureState (System.Diagnostics.Process+State state) [0x00018] in <d012d9eca6d14975a47488863de2f4c6>:0
       at System.Diagnostics.Process.get_HasExited () [0x0000b] in <d012d9eca6d14975a47488863de2f4c6>:0
       at (wrapper remoting-invoke-with-check) System.Diagnostics.Process.get_HasExited()
       at xharness.Process_Extensions+<>c__DisplayClass2_0.<RunAsync>b__2 () [0x00001] in <285dbdcf9e034cd496a3fef953fac640>:0
       at System.Threading.CancellationToken.ActionToActionObjShunt (System.Object obj) [0x00000] in <96207d0baa204f48a53ad6be05f5ecba>:0
       at System.Threading.CancellationCallbackInfo.ExecutionContextCallback (System.Object obj) [0x00007] in <96207d0baa204f48a53ad6be05f5ecba>:0
       at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in <96207d0baa204f48a53ad6be05f5ecba>:0
       at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <96207d0baa204f48a53ad6be05f5ecba>:0
       at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x0002b] in <96207d0baa204f48a53ad6be05f5ecba>:0
       at System.Threading.CancellationCallbackInfo.ExecuteCallback () [0x00024] in <96207d0baa204f48a53ad6be05f5ecba>:0
       at System.Threading.CancellationTokenSource.CancellationCallbackCoreWork (System.Threading.CancellationCallbackCoreWorkArguments args) [0x00042] in <96207d0baa204f48a53ad6be05f5ecba>:0
       at System.Threading.CancellationTokenSource.ExecuteCallbackHandlers (System.Boolean throwOnFirstException) [0x000c0] in <96207d0baa204f48a53ad6be05f5ecba>:0
        --- End of inner exception stack trace ---
       at System.Threading.CancellationTokenSource.ExecuteCallbackHandlers (System.Boolean throwOnFirstException) [0x00132] in <96207d0baa204f48a53ad6be05f5ecba>:0
       at System.Threading.CancellationTokenSource.NotifyCancellation (System.Boolean throwOnFirstException) [0x0005f] in <96207d0baa204f48a53ad6be05f5ecba>:0
       at System.Threading.CancellationTokenSource.Cancel (System.Boolean throwOnFirstException) [0x00006] in <96207d0baa204f48a53ad6be05f5ecba>:0
       at System.Threading.CancellationTokenSource.Cancel () [0x00000] in <96207d0baa204f48a53ad6be05f5ecba>:0
       at xharness.AppRunner+<>c__DisplayClass73_0.<RunAsync>b__0 (System.Object v) [0x00029] in <285dbdcf9e034cd496a3fef953fac640>:0
       at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context (System.Object state) [0x00007] in <96207d0baa204f48a53ad6be05f5ecba>:0
       at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in <96207d0baa204f48a53ad6be05f5ecba>:0
       at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <96207d0baa204f48a53ad6be05f5ecba>:0
       at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x00021] in <96207d0baa204f48a53ad6be05f5ecba>:0
       at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00074] in <96207d0baa204f48a53ad6be05f5ecba>:0
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in <96207d0baa204f48a53ad6be05f5ecba>:0
     ---> (Inner Exception #0) System.InvalidOperationException: No process is associated with this object.
       at System.Diagnostics.Process.EnsureState (System.Diagnostics.Process+State state) [0x00018] in <d012d9eca6d14975a47488863de2f4c6>:0
       at System.Diagnostics.Process.get_HasExited () [0x0000b] in <d012d9eca6d14975a47488863de2f4c6>:0
       at (wrapper remoting-invoke-with-check) System.Diagnostics.Process.get_HasExited()
       at xharness.Process_Extensions+<>c__DisplayClass2_0.<RunAsync>b__2 () [0x00001] in <285dbdcf9e034cd496a3fef953fac640>:0
       at System.Threading.CancellationToken.ActionToActionObjShunt (System.Object obj) [0x00000] in <96207d0baa204f48a53ad6be05f5ecba>:0
       at System.Threading.CancellationCallbackInfo.ExecutionContextCallback (System.Object obj) [0x00007] in <96207d0baa204f48a53ad6be05f5ecba>:0
       at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in <96207d0baa204f48a53ad6be05f5ecba>:0
       at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <96207d0baa204f48a53ad6be05f5ecba>:0
       at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x0002b] in <96207d0baa204f48a53ad6be05f5ecba>:0
       at System.Threading.CancellationCallbackInfo.ExecuteCallback () [0x00024] in <96207d0baa204f48a53ad6be05f5ecba>:0
       at System.Threading.CancellationTokenSource.CancellationCallbackCoreWork (System.Threading.CancellationCallbackCoreWorkArguments args) [0x00042] in <96207d0baa204f48a53ad6be05f5ecba>:0
       at System.Threading.CancellationTokenSource.ExecuteCallbackHandlers (System.Boolean throwOnFirstException) [0x000c0] in <96207d0baa204f48a53ad6be05f5ecba>:0 <---
2018-12-07 15:07:21 +01:00
Sebastien Pouliot 7b83195937
Merge pull request #4596 from xamarin/mono-2018-08
* Bump to mono:2018-06

* Bump mono

* Updates compression to work with the public span

* Bump mono

* Fixes pointer check logic in Deflater

* Bump mono

* Fixes pointer check logic in Deflater

* Bump mono

* Bump Mono

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

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

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

* Testing with Zoltan's patch

* Include libmono-system-native on Xamarin.Mac

* Bump Mono

Commit list for mono/mono:

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

Diff: 7d5f4b6136...7bcda192a0

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

* Bump mono

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

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

Adjust the MT0137 test accordingly.

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

Fixes this test:

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

* Bump mono

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

* Bump mono

* Bump to mono:2018-08

* Initialize Dependency Injector.

* Fix typo

* Fix llvm build

* Reflect latest X509CertificateImpl changes

* Use same compile flags also for link

Linking can fail if the minimum versions are different

* Bump mono

* Bump mono

* Assembly.LoadFile accepts only absolute path

* Bump mono

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

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

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

* Assembly.LoadFile accepts only absolute path

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

Fixes these MTouch test failures:

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

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

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

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

Fixes these MTouch test failures:

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

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

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

* [tests] Reference GuiUnit_Net_4_5 using a project reference.

This makes sure GuiUnit is built when the main project is built.

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

* Bump Mono

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

* [mtouch] add --interp-mixed option

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

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

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

* Fix whitespace.

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

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

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

* Bump Mono

* [linker] Updates SDKs facades list

* Bump mono

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

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

* Bump mono to pick up hybrid suspend fixes

Pick up the 2018-08 backport (https://github.com/mono/mono/pull/10551)
of https://github.com/mono/mono/pull/10545

This should fix GC hangs when managed code runs on a GCD threadpool worker
thread.

* [builds] Fix target name in llvm36 provisioning

package-llvm-llvm36-32 isn't defined in external/mono/sdks/builds/llvm.mk,
but package-llvm36-llvm32 is.

* Revert "[builds] Fix target name in llvm36 provisioning"

This reverts commit b2338370cb.

* Revert "Fix llvm build"

This reverts commit f668561761.

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

* Bump mono

* Bump mono

* Revert "Use same compile flags also for link"

This reverts commit cf205396ff.

* Bump mono to pick up mono/mono@1a309a7b45

* [mmptest] System.Core doesn't depend on Mono.Posix in 2018-08

System.Core doesn't depend on Mono.Posix anymore since it's using the corefx
implementation of pipes now 0f0e31842f

* Bump mono and minimum system mono

* [security]: Make `SecCertificate` work with the latest runtime code.

* Fix the `NATIVE_APPLE_CERTIFICATE` logic; it should only be defined when
  using `XAMARIN_APPLETLS` and not on watch.

* It is no longer allowed to construct `X509Certificate` from a native pointer,
  the `X509Certificate(IntPtr)` and `X509Certificate2(IntPtr)` constructors now
  throw an exception.  Use `X509CertificateImplAppl` directly instead.

* Bump mono

* Bump VSmac min version to 7.7.0.1373

To pick up the fix for https://devdiv.visualstudio.com/DevDiv/_workitems/edit/658916/
Should fix the XM classic build failures

* Revert "Bump VSmac min version to 7.7.0.1373"

This reverts commit b2686bb152.

* Bump to a VSfM version that can build XM Classic projects.

* Bump mono system dependency

* Bump mono

Pick up mono/mono@1644a1a0 - fix for https://github.com/mono/mono/issues/10743

* Bump mono

* Bump mono

* [monotouch-test] Disable X509Certificate(byte[]) tests on watchOS (#4942)

* [monotouch-test] Disable X509Certificate(byte[]) tests on watchOS

* [tests] Add TestRuntime.AssertNotWatchOS()

* fixup WatchOS build

* Bump mono

* Bump mono

* [tests] Disable link-preserve-calendar-1 until we can upgrade it to be a Unified test.

See https://github.com/xamarin/xamarin-macios/pull/4596#issuecomment-428562076
for reference: mono's desktop API changed, the linker behavior the test is
verifying is only expected when using XM's Mobile profile.

* Bump mono

* Revert "[monotouch-test] Disable X509Certificate(byte[]) tests on watchOS (#4942)"

This reverts commit d003a9b918.

* Bump Mono.

* [security]: `NATIVE_APPLE_CERTIFICATE` should now be defined on watchOS as well.

* Mono 2018-08 requires macOS 10.9+, so Xamarin.Mac must as well.

* Bump min mono version for XM system apps.

Using a system mono < 5.18 results in a TypeLoadException:

    Could not resolve type with token 01000032 from typeref (expected class 'Mono.ISystemDependencyProvider' in assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')

* Bump guiunit to get updated min macOS version.

Commit list for mono/guiunit:

* mono/guiunit@9f67042 Bump min macOS version to 10.9.
* mono/guiunit@0c3159a [Harness] Fix exit code of 0 being reported in case of exceptions in the harness
* mono/guiunit@9b7497c Merge pull request #15 from mono/fix-more-warnings
* mono/guiunit@a264470 Fix more warnings
* mono/guiunit@dd094e7 Merge pull request #14 from mono/fix-warnings
* mono/guiunit@b3afede Fix build warnings

Diff: 1306b0d420...9f67042498

* [tests] More min macOS version setting to 10.9.

* Remove 10.7 & 10.8 availability attributes, since they're redundant now.

* Bump mono

* [2018-08][watchos] Use mono_dangerous_add_raw_internal_call for watchOS icalls (#5030)

* Add optional mono_dangerous_add_raw_internal_call to exports.t4

* Use mono_dangerous_add_raw_internal_call on watchOS for icall registration

Internal calls added with mono_dangerous_add_raw_internal_call run in GC Unsafe
mode under cooperative and hybrid suspend, whereas internal calls added with
mono_add_internal_call run in GC Safe mode since
mono/mono@5756ba4b46 in order for hybrid suspend
to be a transparent replacement for preemptive suspend (the old default).  The
icalls in GC Unsafe mode have a responsibility not to block indefinitely
without manually performing a thread state transition to GC Safe mode, and in
return they avoid a thread state transition when the icall is invoked from a
managed method.

* [mmptest] Less hardcoding.

* Bump minimum mono one that has 'mono_dangerous_add_raw_internal_call'.

* Bump mono

* Bump system mono dependency

* Fixes building mono tests

* [ImageCaptureCore] Remove redundant availability attribute.

* [mtouch] Clear the MONO_THREADS_SUSPEND environment variable before calling the AOT compiler. Works around mono/mono#11765.

Visual Studio for Mac may set MONO_THREADS_SUSPEND, and this ends up confusing
the AOT compiler when compiling for watchOS.

So unset the environment variable before calling the AOT compiler.

Works around https://github.com/mono/mono/issues/11765.
2018-12-06 10:52:19 -05:00
Rolf Bjarne Kvinge c814ddb567
[monotouch-test] Tweak DnsFailure a bit. (#5208)
* Make it clearer when a timeout happens that a timeout happened by asserting
  exactly that.
* Don't assert after getting the (unexpected) result from the network request,
  since asserting will throw an exception, which will be caught and stored,
  and then later in the test we assert that an exception was thrown. So
  asserting just after a successful network request effectively hides any
  failures, since we're now passing because of the assertion exception. Ops.
2018-12-03 17:43:58 +01:00
Rolf Bjarne Kvinge 544925738d
[xharness] Implement Process.WaitForExitAsync and use it instead of creating background threads. (#5207)
Using fewer threads is always good.
2018-11-30 16:49:03 +01:00
Rolf Bjarne Kvinge 8a81607279
[xharness] No need to spawn to kill, when we can just P/Invoke the corresponding function. (#5199)
* [xharness] No need to spawn to kill, when we can just P/Invoke the corresponding function.

* Revert accidental changes.
2018-11-29 19:36:04 +01:00
Vincent Dondain 9be55e2bf4
[xtro] Report incorrect 'ArgumentSemantic' enum value usage (#5114)
- ⚠️ Rule deactivated until we have an `xcode10.2` branch where we'll fix the issues.
- We only report `copy` mistakes since they're the ones we really care about fixing (we can end up with invalid pointers).
- Fixes #4018: [xtro] Report incorrect 'ArgumentSemantic' enum value usage
  (https://github.com/xamarin/xamarin-macios/issues/4018).
- Performance with the added test:
  - Extrospection.SelectorCheck: Elapsed=00:00:00.7263742
  - Extrospection.SelectorCheck: Elapsed=00:00:01.2136911
  - Extrospection.SelectorCheck: Elapsed=00:00:01.2747602
  - Extrospection.SelectorCheck: Elapsed=00:00:01.7494063
2018-11-29 11:33:37 -05:00
Rolf Bjarne Kvinge ae13240b20
[xharness] Don't recursively print diagnostics for processes when printing diagnostics times out in the first place. Fixes maccore#1163. (#5198)
Recursively printing diagnostics can leave us with _many_ lldb processes, each
pretty much hanging, and the system overloaded, which, in the worst case
scenario, would require a hard reboot.

Most commonly the "only" thing that happens is an OutOfMemoryException when
the OS eventually tells xharness NO to launching new processes.

Fixes https://github.com/xamarin/maccore/issues/1163.
2018-11-29 16:33:57 +01:00
Alex Soto 8bb5ab52b1
[registrar] Validate input to Adopts attribute (#5191)
Fixes xamarin/xamarin-macios#4107

We currently generate invalid registrar code when we get invalid input
in 'Adopts' attribute, this can happen because 'Adopts' can take a
plain string. We now generate a better error MT4177 instead of
generating invalid registrar.m/h code.
2018-11-28 10:06:36 -05:00
Rolf Bjarne Kvinge 8e61569615
[monotouch-test] Require iOS 9+ for the ActionTest.TimingFunction_* tests. (#5194)
Require iOS 9+ for the ActionTest.TimingFunction_* tests because Apple's
implementation was broken in iOS 8 and causes us to crash.
2018-11-28 15:09:03 +01:00
Rolf Bjarne Kvinge 95a4b9a2a1
[xharness] Write intermediate html reports to disk when running in server mode too. (#5193)
That way the report is still available even if xharness dies.

Also improve report generation to write directly to a temporary file on disk,
instead of writing to memory and then writing to disk (improves memory usage).
2018-11-28 15:02:30 +01:00
Rolf Bjarne Kvinge 170711596d
[xharness] Create a timestamped log directory instead of timestamping every file inside it. (#5192)
Only for server mode right now, since otherwise it would break links for CI builds.
2018-11-28 11:59:01 +01:00
Rolf Bjarne Kvinge 4e3dec7894 Merge remote-tracking branch 'origin/master' into mono-2018-08 2018-11-27 19:10:48 +01:00
Rolf Bjarne Kvinge 8618db251c
[xharness] Show device/simulator loading in progress in the web UI. (#5186) 2018-11-27 17:02:39 +01:00
Rolf Bjarne Kvinge 943e7eafd5
[xharness] Add support for stopping queued tasks in the web UI. (#5185) 2018-11-27 14:59:44 +01:00
Sebastien Pouliot acf8357ece [macos] Fix Constants.mac.cs.in for backward compatibility (#5181)
On macOS the path changes are forward but not backward compatible.

This means we need to keep older values, as they will work on newer OS,
while the new path won't work (on older OS).

The test are updated to add exceptions for such cases - in order to
give us a better chance to spot typos (since they were some).

This should fix
https://github.com/xamarin/maccore/issues/1174
https://github.com/xamarin/maccore/issues/1175
https://github.com/xamarin/maccore/issues/1176
https://github.com/xamarin/maccore/issues/1177
2018-11-27 14:34:47 +01:00
Rolf Bjarne Kvinge 23b7847066 Merge remote-tracking branch 'origin/master' into mono-2018-08 2018-11-26 08:05:36 +01:00
Sebastien Pouliot 930e37232f
[tests][intro] Fix CoreImage location check for older macOS versions (#5176)
addendum to https://github.com/xamarin/xamarin-macios/pull/5159

failure on internal bots 4f1c39a00f (commitcomment-31401007)
2018-11-23 18:25:31 -05:00
Manuel de la Pena 61b2038b3d
[Xharness] Add a workaround to not build the xunit tests when not needed. (#5156)
* [Xharness] Add a workaround to not build the xunit tests when not needed.

This is a workaround that does not use reflection to build the bcl test
projects. We need this until we have complete support of using mono as
an SDK.
2018-11-23 16:02:15 +01:00