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

2403 Коммитов

Автор SHA1 Сообщение Дата
Alexander Köplinger 6f206386d8 Consider GSS as a known framework in mmptest 2019-01-31 16:29:31 +01:00
Alexander Köplinger 8b21371437 Merge branch 'master' into mono-2018-10 2019-01-30 13:43:03 +01:00
Manuel de la Pena 40c998e264
[XHarness] Add XUnit category filtering. (#5455)
Provide the ability to filter per categories in the xunit runner and add the default categories for Mac, iOS, TvOS and WatchOS.
2019-01-28 17:47:36 +01:00
Vincent Dondain f2ab1f6daf
[tests] Ignore failing GestureRecognizerTest for now (#5486)
- WIP PR https://github.com/xamarin/xamarin-macios/pull/5462 more investigation needed so ignore test which is preventing green builds
2019-01-28 10:07:06 -05:00
Rolf Bjarne Kvinge af30117abc
[tests] Automatically build the mtouch test assembly when needed. (#5496) 2019-01-28 15:05:42 +01:00
Rolf Bjarne Kvinge be504be9ac
[mtouch] Properly deserialize cached Objective-C class symbols. Fixes #5467. (#5468)
Deserialize cached Objective-C class symbols to match how the objects looked
before serialization. This means storing the Objective-C class name in the
Symbol.ObjectiveCName field, and not the Symbol.Name field.

Fixes https://github.com/xamarin/xamarin-macios/issues/5467.
2019-01-24 15:08:50 +01:00
Sebastien Pouliot 1c881549a3
[generator] Warn if [NullAllowed] is used on methods. Fixes #4416 (#5464)
The `[NullAllowed]` attribute should not be allowed on methods but it
could break existing binding projects.

Historically it was used on property setters. However using the attribute
on _other_ methods can be misleading, e.g. should it apply to all
parameters, the return value... and its presence/action can be
misinterpreted in code reviews leading to binding bugs.

reference: https://github.com/xamarin/xamarin-macios/issues/5416
2019-01-24 08:57:46 -05:00
Manuel de la Pena 6c12862d3e
[XHarness] Remove not needed ignore file. (#5456)
Since we support filtering via categories, we do not longer need the
ignore file in these tests.
2019-01-24 13:11:11 +01:00
Manuel de la Pena debcee412c
[XHarness] Clean the System.Net.Http ignore file. (#5459)
Since we support categories, there is a test that does not longer needs
to be ignored in ios and tvos but needs to be in watchos (we do not yet
have the correct test assembly for the platform).
2019-01-24 13:10:40 +01:00
Manuel de la Pena 5165f1cdde
[Xharness] Remove not longer needed System.Service.Model.Web ignore file. (#5460)
Since we support categories, the file is not longer needed since the
failing tests are part of an ignored category.
2019-01-23 12:28:54 +01:00
Manuel de la Pena 99bda10aa4
[XHarness] Clean the System.Data ignore. (#5458)
Since we support filtering there are a number of tests that were ignore
that are part of a ignored category, therefore, they are not needed in
the file.
2019-01-23 10:17:46 +01:00
Manuel de la Pena 02f65cc119
[XHarness] Remove not needed ignore file for System.Transactions. (#5457)
Since we support filtering via categories, we do not longer need the
ignore file in these tests.
2019-01-22 23:24:44 +01:00
Manuel de la Pena a71f421a67
[XHarness] Reneable Sytem.Security tests on iOS, TvOS and WatchOS. (#5421)
Reneable the tests and ignore those failing ones.

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

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

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

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

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

Reference: 85130ddbb7 (commitcomment-31935455)

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

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

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

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

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

* Make the struct readonly

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

* Make the field read-only

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

* Add Qos to the list of accepted words

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

* Fix copyright.

* Fix whitespace issues.

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

* Refactor a bit.

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

* Add some DispatchQueue overloads to make DispatchBlock actually usable.

* Seal DispatchBlock.

Users shouldn't subclass DispatchBlock.

* Add tests.

* DispatchBlockFlags is native-sized (nuint).

* Fix a few more nint issues.

* Add availability attributes.

* Fix introspection tests.

* Fix xtro.

* Fix xammac tests.
2019-01-17 18:40:58 +01:00
Manuel de la Pena fea85dc569
[XHarness] Reenable SystemTransactionsTests on iOS, TvOS and WatchOs. (#5411)
Fixes https://github.com/xamarin/maccore/issues/1134
2019-01-16 19:12:20 +01:00
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
Alexander Köplinger 929e4623c4 Merge branch 'master' into mono-2018-10
# Conflicts:
#	external/mono
2019-01-14 15:26:56 +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
Alexander Köplinger 25f306461c Fix building and running of BCL tests
BCL tests are now reading test assets from embedded resources instead of from disk.
2019-01-11 14:30:47 +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
Alexander Köplinger f2e5ffba6d Remove SyncTestResources.targets
It's no longer needed now that the BCL tests read test assets from embedded resources.
2019-01-10 22:14:58 +01:00
Alexander Köplinger bf4f4e0022 Improve logging 2019-01-10 22:14:58 +01:00
Alexander Köplinger b6bf3586fb FIXME: fix build, not sure if changing this is the right way 2019-01-10 22:14:58 +01:00
Alexander Köplinger 42a2434271 Fix build broken due to missing using statements in xharness 2019-01-10 22:14:58 +01:00
Alexander Köplinger ca90eb2e19 Merge branch 'master' into mono-2018-10
# Conflicts:
#	external/mono
2019-01-10 22:13:44 +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
Marek Safar c6653167b9 Merge remote-tracking branch 'origin/master' into mono-2018-10 2019-01-07 14:41:25 +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
Marek Safar aa6fefb1c9 Merge remote-tracking branch 'origin/master' into mono-2018-10 2018-12-17 15:28:08 +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
Rolf Bjarne Kvinge 1cdfc65b38 Merge remote-tracking branch 'origin/master' into mono-2018-10 2018-12-07 08:25:46 +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
Marek Safar 60d08b8559 Merge branch 'master' into mono-2018-10 2018-11-29 13:41:32 +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
Sebastien Pouliot 4f1c39a00f
[tests] Add introspection tests for Constants.*.cs.in. Fixes #5047 (#5159)
* Fix mac classic build
* Fix mac 32 bits (can't load 64bits only libraries)
* Check paths too leading to fixes to old (now incorrect) paths and typo
* apitest (Mac) has a similar test - but assumed that a file that did not exists was fine (missing typos and changes);
* tvOS simulator does not (unlike iOS) support loading the MetalPerformanceShaders.framework

reference: https://github.com/xamarin/xamarin-macios/issues/5047
2018-11-22 13:24:55 -05:00
Rolf Bjarne Kvinge 02fe5339a4
[runtime] Clean up public symbols. Fixes #5124. (#5155)
* [runtime] Clean up public symbols. Fixes #5124.

Clean up public symbols, by:

* Symbols that don't need to be public (most of them), can be private.
* Prefix all public symbols with `xamarin_`.
* Add a test to ensure we don't introduce new public symbols.
* Use C symbols instead of mangled C++ symbols, since those are easier to
  handle in the test.

This minimizes the chance of getting into a symbol clash with another native library.

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

* Some test fixes.
2018-11-21 11:48:15 -05:00
Rolf Bjarne Kvinge 37cd57219c
[tests] Use xibuild when building packaged XM tests. Fixes maccore#1169. (#5164)
Fixes https://github.com/xamarin/maccore/issues/1169.
2018-11-21 09:59:10 -05:00
Manuel de la Pena 3618cefc5a
[Harness] Reduce the noise in the make files. Fixes xamarin/maccore#1156 (#5154)
* [Harness] Reduce the noise in the make files.

The Makefile.cs code generates a lot of noise becuase it tries to build
a make rule for the new BCL tests, these rules do not work and can be
ignored.

Fixes issue: https://github.com/xamarin/maccore/issues/1156
2018-11-21 13:28:06 +01:00
Rolf Bjarne Kvinge f91e8fb811
Use a full path to xibuild. (#5140)
* Use a full path to xibuild.

Use a full path to xibuild everywhere, since it's easier than making sure PATH
is correct every time we want to invoke xibuild.

Also remove the xbuild-in-place script, it's not used anymore.

* Fix xibuild path lookup.

* [xammac_tests] Remove unneeded csproj changes.
2018-11-20 12:14:16 -05:00
Rolf Bjarne Kvinge 74b966e403 Merge remote-tracking branch 'origin/master' into mono-2018-08 2018-11-20 13:08:41 +01:00
Rolf Bjarne Kvinge 50bb4912e1
Revert "[xharness] Only build the BCL tests when we need them. (#5139)" (#5149)
This reverts commit 7277bbcd2b, it breaks building & running the new BCL tests.
2018-11-20 07:06:37 -05:00
Marek Safar ece0324f35 Merge remote-tracking branch 'origin/master' into mono-2018-08 2018-11-19 16:57:18 +01:00
Marek Safar 3ef12240ce Fixes building mono tests 2018-11-19 16:53:46 +01:00
Rolf Bjarne Kvinge 7277bbcd2b
[xharness] Only build the BCL tests when we need them. (#5139)
Only build the BCL tests when we need them, because we can't build them when
we're running the device tests (because we don't have a built source tree in
that case).

Since the test assemblies are required when generating the BCL projects, this
means we also delay creating the BCL projects until we need them.
2018-11-19 09:07:35 -05:00
Marek Safar e94ac22ba1 Merge remote-tracking branch 'origin/master' into mono-2018-08 2018-11-19 14:04:38 +01:00
Bernhard Urban f15233f3db [tests] enable msorlib with interpreter (#5122) 2018-11-19 07:18:12 -05:00
Rolf Bjarne Kvinge f8a254d628 Merge remote-tracking branch 'origin/master' into mono-2018-08 2018-11-16 14:26:50 -05:00
Ankit Jain f865694f86 Move tests to use new tool xibuild and thus fix msbuild tests (#5128)
* xibuild: New wrapper tool to run msbuild or managed executables

MSBuild supports fallback paths for projects imported using
`$(MSBuildExtensionsPath)`, but these must be specified explicitly in
the app.config of the main executable. There was a PR to allow use of
properties for this in the app.config, but that was not accepted
upstream.

This is required for being able to:

1. build projects with msbuild against the in-tree XI/XM build output
2. and to run nunit tests against the same.

For this we introduce a new tool, `xibuild`, based on XA's `xabuild`.
This supports the fallback paths to be specified via the environment variable
`MSBuildExtensionsPathFallbackPathsOverride`[1].
It essentially operates in 3 modes:

1. `xibuild -c /path/to/foo.exe`
	Generates /path/to/foo.exe.config with the fallback paths inserted into that.

2. `xibuild -- /v:diag /path/to/project.csproj`
	Runs msbuild with the arguments after `--` with a custom app.config based on
	`MSBuild.dll.config`, with the fallback paths correctly inserted.
	This is in a temporary file and the original config file is not touched.

3. `xibuild -t -- /path/to/managed_tool.exe args`
	Generates `/path/to/managed_tool.exe.config` based on `MSBuild.dll.config` with
	the fallback paths inserted, and runs `managed_tool.exe` with the arguments.
	The default is to overwrite the config file.
	But there is also a switch to merge it with an existing config file.

--
1. Value of the environment variable $MSBuildExtensionsPathFallbackPathsOverride
is prepended to any existing list of search paths in `MSBuild.dll.config`, IOW,
it takes precedence. So, the order of lookup becomes:

  - Value of the property `$(MSBuildExtensionsPath)`
  - Value of the environment variable `$MSBuildExtensionsPathFallbackPathsOverride`
  - /Library/Frameworks/Mono.framework/External/xbuild on macOS

* Integrate use of `xibuild` with the tests

Update all uses of `msbuild` and invocations of tools like nunit that
might depend on using the in-tree builds to use `xibuild`.

* xibuild: Move help descriptions to OptionSet itself.
2018-11-16 14:24:35 -05:00
Manuel de la Pena 505006952c
[Tests] Add a new iOS app to run the xunit and nunit tests (#4914)
Mono know provides a set of testing assemblies that contain the tests to be ran in each of the supported platforms. This commit adds the following:

1. Two different runners that can be used to execute NUnit and xUnit tests.
2. The necessary  glue to get xharness to run the new tests and report the results.
3. A new test that will ensure that if mono adds new tests, xharness will report failures if the tests are not run or not ignored.
2018-11-16 13:31:40 -05:00
Ludovic Henry 1c59076f82 Merge branch 'master' of github.com:xamarin/xamarin-macios into mono-2018-10 2018-11-14 14:20:02 -05:00
Ludovic Henry 54f2bc4569 Revert "Merge pull request #5066 from spouliot/xcode10.1-master"
This reverts commit 72a825fc7d.
2018-11-14 14:17:06 -05:00
Martin Baulig 2a553a003c Handle common test sources via templates. 2018-11-14 13:42:49 -05:00
Martin Baulig e349f0e66e Add mono-native tests to Makefile. 2018-11-14 13:41:36 -05:00
Martin Baulig 5aba492b46 Add missing file. 2018-11-14 13:36:03 -05:00
Martin Baulig 352911975e [tests]: Add mono-native support to the introspection tests. 2018-11-14 13:34:07 -05:00
Martin Baulig 570472e148 [tests]: Add new mtouch tests for mono-native. 2018-11-14 13:32:11 -05:00
Martin Baulig 4835321be3 [tests]: Add new 'mono-native' test suite. 2018-11-14 13:30:25 -05:00
Martin Baulig 6ff0ddd74c [xharness]: Add xharness support for mono-native. 2018-11-14 13:26:30 -05:00
Sebastien Pouliot 72a825fc7d Merge pull request #5066 from spouliot/xcode10.1-master
Merge xcode10.1 into master

(cherry picked from commit f60fcbbb16)
2018-11-14 13:10:46 -05:00
Chris Hamons a278fff887
[mac] Enable various msbuild only tests that were disabled (#5113)
- https://github.com/xamarin/xamarin-macios/issues/4110
2018-11-09 13:38:39 -06:00
Rolf Bjarne Kvinge 3aa7582f4c
[monotouch-test] Add version check to SceneKit.ActionTest. Fixes maccore#1119. (#5099)
Fixes https://github.com/xamarin/maccore/issues/1119.
2018-11-08 18:41:19 +01:00
Rolf Bjarne Kvinge ab2f931da6
[tests] Increase the timeout for 'Mac Binding Projects' from the default 5m to 15m. Fixes maccore#1125. (#5105)
Fixes https://github.com/xamarin/maccore/issues/1125.
2018-11-08 18:22:26 +01:00
Rolf Bjarne Kvinge fa440cf01c
[xharness] Make sure we don't run 'nuget restore' for tests-mac.sln multiple times in parallel. Fixes maccore#1122. (#5104)
Make sure we don't run 'nuget restore' for test-mac.sln multiple times in
parallel by creating a separate make target that runs 'nuget restore', and
making every build-mac-* target depend on that target.

Fixes https://github.com/xamarin/maccore/issues/1122.
2018-11-08 15:36:56 +01:00
Alex Soto 8c207428a9
[ImageCaptureCore] Add ImageCaptureCore Bindings (#5074)
* [ImageCaptureCore] Add ImageCaptureCore Bindings

Fixes xamarin/xamarin-macios#4273

* [ImageCaptureCore] remove not needed `unsafe`

Co-Authored-By: dalexsoto <alex@alexsoto.me>

* Implement feedback
2018-11-07 09:52:39 -05:00
Rolf Bjarne Kvinge 3835e1dafb
[tests] Point MSBuild to the right Xamarin.Mac location when building packaged Xamarin.Mac tests. Fixes maccore#1115. (#5090)
* [tests] Point MSBuild to the right Xamarin.Mac location when building packaged Xamarin.Mac tests. Fixes maccore#1115.

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

* [xharness] Ensure all makefile targets set the proper environment variables.
2018-11-07 09:34:16 +01:00
Rolf Bjarne Kvinge 27688e8d5b
[xharness] Fix the generation of the Mac makefile to export the right variables to use the locally build Xamarin.Mac. (#5087) 2018-11-06 15:06:58 +01:00
Rolf Bjarne Kvinge 012a0650b6
[mtouch] Fix formatting for MT0079 and update the MT4134 test to take into account the warning. Fixes maccore#1116. (#5089)
Fixes https://github.com/xamarin/maccore/issues/1116.
2018-11-06 15:06:10 +01:00
Bernhard Urban b9170ae434 [tests] enable monotouch-test with --interpreter=-mscorlib on Jenkins (#5051)
aka. mixed mode
2018-11-06 13:22:17 +01:00
Rolf Bjarne Kvinge 1b32a8dba5
[monotouch-test] Improve diagnostic output when MessageHandlerTest fails. (#5085)
Reference: https://github.com/xamarin/xamarin-macios/issues/4013
2018-11-06 09:57:35 +01:00
Rolf Bjarne Kvinge ac54b7d065
[monotouch-test] Improve VTDecompressionSessionTests asserts to print better info in case of failure. (#5083)
Showing the actual failed value is much more helpful than just "sorry, it failed".

See https://github.com/xamarin/xamarin-macios/issues/4900.
2018-11-06 09:53:59 +01:00
Sebastien Pouliot 121fe236ba
[scenekit] Fix `SCNAction.TimingFunction` signature to `Func<float,float>`. Fixes #5058 (#5068)
This was incorrectly bound as `Action<float>`.
Added unit test for the API compatibility stubs.

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

* [tests] Adjust test not to fail

reference: https://github.com/xamarin/xamarin-macios/issues/5072
2018-11-05 14:20:03 -05:00
Sebastien Pouliot 2dec2c0193 [xtro] Move remaining todo (MPS) to ignore 2018-10-31 17:28:24 -04:00
Sebastien Pouliot 3ab481ea70 Merge xcode10.1 into master
Also update apidiff from d15-9 since it's both frozen and includes xcode10.1
2018-10-31 15:54:48 -04:00
monojenkins 4b89f459a7 [tests] Fix some tests to succeed when run on macOS 10.14 (#5060)
Public bots were updated today.

Fixes https://github.com/xamarin/maccore/issues/1106
Fixes https://github.com/xamarin/maccore/issues/1107
2018-10-31 10:45:46 -04:00
Sebastien Pouliot 0304219723
[tests] Fix some tests to succeed when run on macOS 10.14 (#5057)
Public bots were updated today.

Fixes https://github.com/xamarin/maccore/issues/1106
Fixes https://github.com/xamarin/maccore/issues/1107
2018-10-31 08:32:36 -04:00
Rolf Bjarne Kvinge 7425218c78 Merge remote-tracking branch 'origin/master' into mono-2018-08 2018-10-30 07:42:02 +01:00
Rolf Bjarne Kvinge c69c74b3d3
Clone files if possible whenever it makes sense. (#5049)
Cloning is faster when supported, and it also saves disk space.
2018-10-29 16:09:30 +01:00
Sebastien Pouliot 917214828d
[xharness] Log the environment variables in the execution logs (#5045)
While trying to debug an msbuild unit tests it was not possible to
successfully copy/paste the command from the execution log and
run it in a shell.

It's not that hard to run xharness and figure it out - but the
same can happen on bots (which could be harder).

So that little change prints out the host and xharness changes
to the environment variables to make copy/pasters life even
lazier :)
2018-10-26 13:34:08 -04:00
Rolf Bjarne Kvinge 93e72862f7 [mmptest] Less hardcoding. 2018-10-26 17:15:19 +02:00
Chris Hamons 12262c4cba
[macos] Add NSScrollView.AddFloatingSubview (#5040)
- https://github.com/xamarin/xamarin-macios/issues/5039
2018-10-25 11:56:23 -05:00
Rolf Bjarne Kvinge 35df3a5294
[introspection] Fix a few issues found on iPad Air 2 with iOS 12. (#5034)
* [introspection] MPSCnnBinaryKernel's kernelHeight/kernelWidth are missing on iOS too.

* [introspection] CoreNFC is not even available on all devices.
2018-10-25 17:47:05 +02:00
Rolf Bjarne Kvinge 2b85aaef56
[tests] Only build exactly what's neded for running XM tests on older bots. (#5038)
Also build what we can in parallel (and manually building shared dependencies first).
2018-10-25 17:17:03 +02:00
Rolf Bjarne Kvinge 2755245b91 [tests] More min macOS version setting to 10.9. 2018-10-25 17:12:36 +02:00
Rolf Bjarne Kvinge cca50fe500 Mono 2018-08 requires macOS 10.9+, so Xamarin.Mac must as well. 2018-10-25 09:54:43 +02:00
Rolf Bjarne Kvinge 0ebc514467 Merge remote-tracking branch 'origin/master' into mono-2018-08 2018-10-25 09:54:07 +02:00
Vincent Dondain 51e7a47700 [coregraphics] Make MatrixOrder a normal enum instead of a nested enum (#5036)
This enum might prove useful to other APIs in the future so move outside of `CGAffineTransform`.
2018-10-24 20:10:55 -04:00
Bernhard Urban 9688c42e2d Bump mono and enable monotouch-test with interpreter (#5023)
* Bump Mono 2018-06

Commit list for mono/mono:

* mono/mono@c0fe724379 [aot] Reenable recursion checking when initing shared got entries (#11295)
* mono/mono@f55f7e53e3 [interp] use unsigned conversion for nuint (#11285)
* mono/mono@5986920bdb [2018-06] [arm64] Remove the limitation on the number of nullable arguments for dyncalls (#11266)
* mono/mono@665a308c39 [WinForms] Propagate the flags from DrawTextInternal to MeasureTextInternal (#11251)
* mono/mono@5ed4143b4f [2018-06] Crash Reporter V2 (#11162)
* mono/mono@f0db92c2b6 [interp] Implement interpreter entry trampolines on amd64 (#10978) (#11165)
* mono/mono@c1f1a7bfed [ci] Move OSX .pkg build to a separate bot pool
* mono/mono@d80ced607b [aot] Ensure shared got entries are initialized before loading methods (#11225)
* mono/mono@d07c626a74 [pkg] Add preinstall which removes existing Mono of the same version (#11209)
* mono/mono@cda3acc57c [sdks] futimens and futimes symbols are missing on anything earlier than 10.13 (#11174)
* mono/mono@226e91a064 Bump xunit-binaries

Diff: 2343f26706...c0fe724379

* [tests] enable monotouch-test with --interpreter on Jenkins
2018-10-24 15:24:22 -04:00
Rolf Bjarne Kvinge 545c7bf4ba Merge remote-tracking branch 'origin/master' into mono-2018-08 2018-10-24 13:49:26 +02:00
Sebastien Pouliot b403da0d85
[uikit] Preserve method associated with `updateSearchResultsForSearchController:`. Fixes #5024 (#5027)
This method is called back from iOS (or tvOS) so there's no managed
reference pointing to it. However we know that if it's (private inner)
type is present it's because the callback (from native) is possible so
we can preserve the method conditionally (to the type presence).

https://github.com/xamarin/xamarin-macios/issues/5024
2018-10-22 21:54:54 -04:00
Rolf Bjarne Kvinge d899d4fb70
Remove bitrotted support for a separate mono submodule for watchOS support. (#5022)
Unce upon a time we used a separate mono submodule for watchOS support, to make
development of watchOS support easier (we referenced mono/master, to avoid
backporting fixes for watchOS support through various release branches in
mono).

This only worked until our watchOS support became stable, since then we had to
start using a stable version of mono for watchOS support.

This means that our build support for using a separate mono clone for watchOS
support is no longer needed; and in any case it's broken because of build
changes done later.
2018-10-22 16:14:26 +02:00
Vincent Dondain f87f3b88f8 [coregraphics] Add 'MatrixOrder' overload for Scale, Rotate and Translate (#5011)
- Fixes #4698: CGAffineTransform.Scale does not work like Swift's .scaledBy(x:y:)
  (https://github.com/xamarin/xamarin-macios/issues/4698)
- 'Scale' monotouch-test now covers the new overload for the new multiplication order.
- Changed the Scale test's values so we have different values for 'x0' (it was always 0 before) and so it matches the test case from the bug report.

* Same fix for Rotate and Translate
2018-10-22 08:42:52 -04:00
Sebastien Pouliot 5ad55d603e
[tests][linkall] Add a check that the Makefile produced version number is 'legit'. Fixes #4859 (#5005)
History: a marge conflict caused a version string to become "12.3." and
this was found in the API diff much later.

reference: https://github.com/xamarin/xamarin-macios/issues/4859
2018-10-18 11:16:24 -04:00
Miguel de Icaza dca1f4793f [UIKit] UIGestureRecognizer, support a way of unsubscribing without creating cycles (#4729)
* [UIKit] UIGestureRecognizer, support a way of unsubscribing without creating cycles

This now tracks all the uses of AddTarget with delegates by recording
the Token/Selector pair and making `Dispose()` release all the linkage
as well as providing an enumerator that can be used to get all the
registered Action handlers - this can then be used with .First() and
then passed to `RemoveTarget`.

This addresses https://github.com/xamarin/xamarin-macios/issues/4190

This initial patch is here for discussion of the approach, want to
review and test this before we merge.

* Simplify code a little bit.

* Add test.

* [tests] Add an NSAutoreleasePool to make GestureRecognizerTest.NoStrongCycles happy on 32-bit.
2018-10-18 12:31:39 +02:00
Vincent Dondain 3cf004f817
[gamecontroller] Update for Xcode 10.1 beta 2 (#4996) 2018-10-17 15:13:04 -04:00
Rolf Bjarne Kvinge ee1f7dc33d
[CoreFoundation] Implement missing dispatch API. Fixes #4606. (#4967)
* [CoreFoundation] Add DispatchQueue.DispatchBarrierSync.

* [CoreFoundation] Bind dispatch_queue_[set|get]_specific.

* [CoreFoundation] Bind dispatch_queue_get_qos_class.

* [CoreFoundation] Bind dispatch_queue_create_with_target.

* Add tests.

* Update xtro.

* Add missing availability attributes.

* [tests] Do a version check before testing new API.

* Remove redundant code.
2018-10-17 14:42:29 +02:00
Sebastien Pouliot 6751f27841
[tests][mmp] Move TypeDescriptor (regression) tests to unit tests (#4994)
Also move some tests to share more (now and in future commits)
with iOS linker-related tests.

Part of https://github.com/xamarin/xamarin-macios/issues/4975
2018-10-17 08:25:37 -04:00
Vincent Dondain 910b796bf3 [identitylookup] Update for Xcode 10.1 beta 3 (#4998) 2018-10-16 20:49:01 -04:00
Martin Baulig c30807113c Revert "[monotouch-test] Disable X509Certificate(byte[]) tests on watchOS (#4942)"
This reverts commit d003a9b918.
2018-10-16 15:18:33 -04:00
Bernhard Urban 8e72ea8330 [tests] improve MonoWeakReferenceTest to avoid false pinning (#4961)
Fixes an issue when executed with interpreter. Now, the test is closer
to what we do in the runtime test:

831e73abcd/mono/tests/weak-fields.cs
831e73abcd/mono/mini/TestHelpers.cs
2018-10-16 14:05:19 -04:00
Vincent Dondain fd293b2d25 [coretelephony] Update for Xcode 10.1 beta 2 (#4993)
Filed radar https://trello.com/c/WKIRTcLk for probably incorrect macOS API.
2018-10-16 14:00:52 -04:00
Bernhard Urban 60b06b9c98 [tests] make Symbols.FunctionNames aware of interpreter (#4973) 2018-10-16 11:25:35 -04:00
Vincent Dondain 9e0ab2b5fe Bump for Xcode 10.1 beta 3 (#4987) 2018-10-15 19:57:54 -04:00
Chris Hamons 1082ce7a09
Add xtro test for [Deprecated] attributes and fix up usages (#4966)
- https://github.com/xamarin/xamarin-macios/issues/4431
2018-10-15 10:43:17 -05:00
Sebastien Pouliot 8feb75335e
Merge branch 'master' into mono-2018-08 2018-10-15 11:23:27 -04:00
Sebastien Pouliot e8b87b77d7
[tests][mmp] Convert old mmp calendar regression tests to unit tests (#4983) 2018-10-15 11:15:20 -04:00
Rolf Bjarne Kvinge 250fd976a4
Merge pull request #4111 from radical/msbuild-port
[msbuild] Move from xbuild to msbuild
2018-10-15 16:55:53 +02:00
Rolf Bjarne Kvinge 904be25c25
[xharness] Generate a system variant of dont link, and run it using the oldest mono version we support in Jenkins. Fixes #4121. (#4968)
This is an addition to the tests we already run on older macOS bots (and as such will not execute on our PR bots).

Fixes https://github.com/xamarin/xamarin-macios/issues/4121.
2018-10-15 16:51:46 +02:00
Aleksey Kliger 0249138c44 Merge remote-tracking branch 'origin/master' into mono-2018-08 2018-10-15 10:50:38 -04:00
Rolf Bjarne Kvinge 5fbfacc2a8 [tests] Only restore packages.config, not the mtouch test project.
Restoring the mtouch.csproj makes nuget try to restore Mono.Cecil.csproj as
well, which doesn't work.

So just restore what's listed in our packages.config instead.
2018-10-15 10:41:33 +02:00
Chris Hamons 7c1d23d411
Bind 2 high visibility PrintCore APIs (#4933)
- https://github.com/xamarin/xamarin-macios/issues/4713
2018-10-11 09:14:48 -05:00
Rolf Bjarne Kvinge 4362842b68 [mmptests] Update according to MSBuild changes. 2018-10-11 12:25:47 +02:00
Rolf Bjarne Kvinge 745c18cc73 Merge remote-tracking branch 'origin/master' into msbuild-port 2018-10-11 07:31:58 +02:00
Aleksey Kliger cef512dc41 Merge remote-tracking branch 'origin/master' into mono-2018-08 2018-10-10 17:23:54 -04:00
Jo Shields 6f2ebedb74 Bump to mono:2018-06 (#4277)
* Bump to mono:2018-06

* Bump mono

* Updates compression to work with the public span

* Bump mono

* Fixes pointer check logic in Deflater

* Bump mono

* Fixes pointer check logic in Deflater

* Bump mono

* Bump Mono

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

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

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

* Testing with Zoltan's patch

* Include libmono-system-native on Xamarin.Mac

* Bump Mono

Commit list for mono/mono:

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

Diff: 7d5f4b6136...7bcda192a0

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

* Bump mono

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

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

Adjust the MT0137 test accordingly.

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

Fixes this test:

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

* Bump mono

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

* Bump mono

* Bump mono

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

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

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

* Assembly.LoadFile accepts only absolute path

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

Fixes these MTouch test failures:

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

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

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

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

* Bump Mono

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

* [mtouch] add --interp-mixed option

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

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

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

* Fix whitespace.

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

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

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

* Bump Mono

* [linker] Updates SDKs facades list

* Bump mono

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

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

* Bump to a VSfM version that can build XM Classic projects.
2018-10-10 11:02:28 -04:00
Rolf Bjarne Kvinge d063c531f6 [tests] Disable link-preserve-calendar-1 until we can upgrade it to be a Unified test.
See https://github.com/xamarin/xamarin-macios/pull/4596#issuecomment-428562076
for reference: mono's desktop API changed, the linker behavior the test is
verifying is only expected when using XM's Mobile profile.
2018-10-10 15:02:52 +02:00
Rolf Bjarne Kvinge ec88393dcf
[CoreFoundation] Simplify DispatchQueue.MainQueue. (#4925)
* The dispatch_get_main_queue function doesn't exist anywhere (tested on iOS 5.1.1 - iOS 12, macOS 10.7 - 10.14), and when called from native code, it's always an inlined function, so just remove the call completely.
    
* Getting the _dispatch_main_q symbol from either the current address space, libSystem or libdispatch works fine everywhere. Looking up something in the current address space is costly (according to 'man dlsym'), so stop doing that: only look in libdispatch (since that's where the symbol actually is according to 'nm').

* I find no reason for the lock in DispatchQueue.MainQueue, nor does history reveal anything helpful, so I removed the lock.
2018-10-10 10:48:22 +02:00
Rolf Bjarne Kvinge 1f5ba0b5c0
[xharness] Improve logging a bit. (#4952)
* [xharness] Improve logging a bit.

* Use timestamp in more log paths.
* Create numbered log subdirectories to make things nicer to look at in a
  terminal (thousands of subdirectories can be annoying to shift through; this
  way there's an additional subdirectory level).

* Avoid string interpolation when not needed.
2018-10-10 08:05:26 +02:00
Rolf Bjarne Kvinge e4db45ed63
[xharness] Add length consistency check when capturing a log file. (#4951)
Sometimes files just shrink, and we must cope.

Two possible causes I can think of:

* System log rotation.
* We erase a simulator when trying to capture its system log.

There are probably many more causes, but two is more than enough to make sure
we don't fail when it happens.
2018-10-09 15:53:51 +02:00
Rolf Bjarne Kvinge 65b21ee48d
[CoreFoundation] Fetch a few static values lazily. (#4924)
* [CoreFoundation] Fetch a few static values lazily.

This avoids using static constructors, and also avoids fetching the values
unless they're needed.

* Generate the code for _dispatch_data_destructor_free instead of using a manual binding.

* [CoreFoundation] Bind kCFBooleanTrue/kCFBooleanFalse using the generator.

Since the generator doesn't know about CFBoolean, bind as IntPtr instead, and
fix most callers to use the handle directly, instead of getting a CFBoolean
object and then immediately getting the handle.

* Add back comment.

* Update xtro.

* Fix typo check.

* Use complete path for the library in the Field attribute.

* Update xtro.
2018-10-09 15:51:17 +02:00
Aleksey Kliger (λgeek) d003a9b918
[monotouch-test] Disable X509Certificate(byte[]) tests on watchOS (#4942)
* [monotouch-test] Disable X509Certificate(byte[]) tests on watchOS

* [tests] Add TestRuntime.AssertNotWatchOS()

* fixup WatchOS build
2018-10-08 11:01:24 -04:00
Rolf Bjarne Kvinge 232f9ecc8b
[xharness] Verify that there's at least 1GB of space left before trying to build or run each test. (#4937)
If there's not enough space, then fail the test.

This might help https://github.com/xamarin/maccore/issues/965 (test run hangs).
2018-10-08 07:32:50 +02:00
Rolf Bjarne Kvinge 28b1978387
Bundle Make.version with the packaged XM tests to fix testing. (#4938) 2018-10-08 07:09:09 +02:00
Chris Hamons c41673dce8
Add mmp error when combining partial static registrar and linking (#4932)
- https://github.com/xamarin/xamarin-macios/issues/4825
2018-10-05 09:43:53 -05:00
Chris Hamons 183cb81583
Disable known failing device tests using xharness (#4884)
- Add the ability to have Build Only tests - https://github.com/xamarin/maccore/issues/1076
- Set mini and the extensions as build only
2018-10-03 08:33:30 -05:00
Sebastien Pouliot 9f23f4b45a
Bump for Xcode 10.1 beta 2 (#4906) 2018-10-03 08:26:31 -04:00
Chris Hamons 8325b083dc
[macos][msbuild] Cache actool results like XI (#4892)
- https://github.com/xamarin/xamarin-macios/issues/3584
- Prevents a 2 second pause on every single launch
- Test added but commented out due to msbuild build machine issue :(
2018-10-02 12:53:19 -05:00
Rolf Bjarne Kvinge 788b63d96f
[NSLayoutManager] Complete bindings for NSLayoutManager. Fixes #4740. (#4853)
Fix numerous issues with NSLayoutManager[Delegate]:

* The classes are available in both AppKit and UIKit, but the bindings are
  duplicated (unsuccessfully) in both appkit.cs and uikit.cs. So create a new
  xkit.cs that is shared between XI and XM, and put a shared version of the
  bindings there.

* Bind everything that hasn't already been bound (or deprecated by Apple).

* Methods that take a nullable NSRangePointer has been bound with three overloads:

	* A protected overridable (exported) method that uses IntPtr.
	* A public method without the parameter.
	* A public method with the parameter typed as 'ref NSRange'.

	This makes sure the native method can be overridden if needed, while at
	the same time making it possible to call without providing the nullable
	parameter.

* Fix numerous ugly bindings:

	* There's a great nint/nuint confusion for parameters referring to
	  'character index' and 'glyph index'. XI seems to prefer nuint, while XM
	  seems to prefer nint. Standardize on nuint, since that's how Apple
	  created them.

	* Many methods have names than sound like Objective-C. Fix them all,
	  either right away when possible, or for XAMCORE_4_0.

	* Several parameter names have been modified to comply with our naming
	  guidelines (no abbreviations).

Fixes https://github.com/xamarin/xamarin-macios/issues/4740.
2018-10-01 14:17:28 +02:00
Aleksey Kliger de86392b6c [mmptest] System.Core doesn't depend on Mono.Posix in 2018-08
System.Core doesn't depend on Mono.Posix anymore since it's using the corefx
implementation of pipes now 0f0e31842f
2018-09-26 12:41:06 -04:00
Chris Hamons 4d7bd304e7
Update tests/README to document XM_TEST_NAME (#4880)
- https://github.com/xamarin/xamarin-macios/issues/3609
2018-09-26 10:24:49 -05:00
Rolf Bjarne Kvinge 8b7db1382d
[xtro] Only return 1 in case of failure in reporter. (#4877)
This solves two problems:

* xharness thinks it crashed if the exit code is neither 0 nor 1, and
  helpfully says so and tries to collect crash reports, which only ends up
  being confusing.

* The exit code is byte-sized on macOS. This means that trying to return 256
  actually returns 0 (success).
2018-09-25 20:32:22 +02:00
Manuel de la Pena ea63e4559c
[CoreMedia] Expose the CMSampleAttachmentKey interface. Fixes #4688 (#4841)
* [CoreMedia] Expose the CMSampleAttachmentKey interface. Fixes #4688

We have an issue when the user wants to use the CMAttachmentSample,
ideally, the user will want to do:

var cameraIntrinsicData = CMAttachmentBearer.GetAttachment(CMSampleAttachmentKey.CameraIntrinsicMatrixKey, sampleBuffer );

Instead of the current workaround:

var att = new CMSampleBufferAttachmentSettings (sampleBuffer.GetAttachments (CMAttachmentMode.ShouldNotPropagate));
var matrix = att.CameraIntrinsicMatrix;

With this push, we can allow the user use the first example provided in
this commit.

Fixes https://github.com/xamarin/xamarin-macios/issues/4688
2018-09-25 16:24:41 +02:00
Rolf Bjarne Kvinge 11d9fe68db
[mtouch/mmp/docs] Improve MT0091 to include how to enable the linker. Fixes #4549. (#4852)
Fixes https://github.com/xamarin/xamarin-macios/issues/4549.
2018-09-21 16:51:23 +02:00
Manuel de la Pena ddb0948376 [Metal] Fixe the size of structures. Fixes #4611 (#4838)
The structs MTLQuadTessellationFactorsHalf and
MTLTriangleTessellationFactorsHalf are wrong as per the header
definition:

```c
typedef struct {
    /* NOTE: edgeTessellationFactor and insideTessellationFactor are interpreted as half (16-bit floats) */
    uint16_t edgeTessellationFactor[4];
    uint16_t insideTessellationFactor[2];
} MTLQuadTessellationFactorsHalf;

typedef struct {
    /* NOTE: edgeTessellationFactor and insideTessellationFactor are interpreted as half (16-bit floats) */
    uint16_t edgeTessellationFactor[3];
    uint16_t insideTessellationFactor;
} MTLTriangleTessellationFactorsHalf;
```

We set the arrays size to be the correct one.

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

* Add tests that ensure that the size of the managed structs is the same
as the native ones.

The values used have been checked against a native app compiled on 32
and 64 (iphone 5 and iphone X).
2018-09-21 09:33:27 -04:00
Aleksey Kliger 8eaf097104 Merge remote-tracking branch 'origin/master' into mono-2018-08 2018-09-20 16:40:54 -04:00
Aleksey Kliger 16481d4ec1 Merge remote-tracking branch 'origin/mono-2018-06' into mono-2018-08 2018-09-20 12:09:07 -04:00
Michał Żołnieruk 59a1cfbfa4 Added two missing NSString method bindings for splitting text (#4828)
* Added 2 missing NSString methods bindings (componentsSeparatedByString, componentsSeparatedByCharactersInSet)

* Removed redundant methods API versions, changed method names (to include verb), modified NET types to objC types

* Removed binded methods from sharpie tests

* Add whitespace to conform to coding guidelines.
2018-09-20 16:01:49 +02:00
Vincent Dondain 49ef936701
Merge pull request #4833 from VincentDondain/master-merge-xcode10
Merge branch 'xcode10' into master
2018-09-19 18:19:35 -04:00
Sebastien Pouliot c53b64da1d
Bump for Xcode 10.1 beta 1 (#4836) 2018-09-19 08:56:43 -04:00
Rolf Bjarne Kvinge 7354052e96
[NSLayoutManager] Fix potential NRE in NSLayoutManager.GetGlyphs when one of the parameters is null, (#4832) 2018-09-19 07:37:26 +02:00
Vincent Dondain 2174ec41a2 Merge branch 'xcode10' 2018-09-18 14:12:39 -04:00
Marek Safar ec02eb8f9f Merge remote-tracking branch 'origin/master' into mono-2018-06 2018-09-18 14:41:28 +02:00
Rolf Bjarne Kvinge 8e32ace58e
[Foundation] Bind NSMutableDictionary's addEntriesFromDictionary:. Fixes #4813. (#4819)
Fixes https://github.com/xamarin/xamarin-macios/issues/4813
2018-09-17 16:14:46 +02:00
Manuel de la Pena 422da1f8d4 [Tests] Remove IPV6 flaky test with an ignore. (#4815) 2018-09-14 10:05:17 -04:00
Sebastien Pouliot a94382d880 [xtro] Cleanup non used .todo files (#4811) 2018-09-14 07:38:01 +02:00
Manuel de la Pena eeca0b8780 [Tests] force the IP version to fix tests on bots. (#4805) 2018-09-13 14:13:21 -04:00
Aleksey Kliger fc7cba2ebc Merge remote-tracking branch 'origin/master' into mono-2018-08 2018-09-13 13:37:43 -04:00