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

3160 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge ad15106af4
[msbuild] Add support for Metal in the simulator. Fixes #7392. (#7983) (#7991)
* [msbuild] Provide the correct value for the operating system for tvOS and watchOS to a few tasks. Fixes #6200. (#7226)

The problem with #6200 was that we'd pass -mios-version-min=x.y to the metal
tool even for tvOS apps. This fixes it so that now pass -mtvos-version-min.

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

* [msbuild] Add support for Metal in the simulator. Fixes #7392. (#7983)
2020-02-28 19:59:03 +01:00
monojenkins fe451491f6
[xcode11.4] [tests] Add `.cctor` execution to introspection (#7987)
This will spot cases like https://github.com/xamarin/xamarin-macios/issues/7959
where a type (static) constructor can fail at runtime, leading to
`TypeLoadException`

Ideally it's covered by it's own tests but it's better covered twice
than never :)

On iOS 64bits [1] simulator we hit some failures [2], later, if the
`.cctor` is executed. It's not a big deal to avoid those types since
we it will be executed on devices later.

[1] API not present on 32bits

[2] Fixing the following triggers similar failures for `DCDevice`

```
ApiClassPtrTest.VerifyClassPtr: class_ptr and RegisterAttribute are different: NFCIso15693CustomCommandConfiguration
Expected: 0
But was: 140735471513712

ApiSelectorTest.StaticMethods: 7 errors found in 2788 static selector validated:
CoreNFC.NFCIso15693ReaderSession : readingAvailable
CoreNFC.NFCNdefMessage : ndefMessageWithData:
CoreNFC.NFCNdefPayload : wellKnownTypeURIPayloadWithString:
CoreNFC.NFCNdefPayload : wellKnownTypeURIPayloadWithURL:
CoreNFC.NFCNdefPayload : wellKnownTypeTextPayloadWithString:locale:
CoreNFC.NFCNdefReaderSession : readingAvailable
CoreNFC.NFCReaderSession : readingAvailable
Expected: 0
But was: 7
```

Co-authored-by: Sebastien Pouliot <sebastien.pouliot@gmail.com>
2020-02-26 16:16:04 -05:00
Alex Soto dd83fbed2d
[UIKit] Update bindings to Xcode 11.4 Beta 2 (#7963) 2020-02-25 06:50:39 -05:00
Alex Soto 69c19184b1
[WatchKit] Update bindings to Xcode 11.2 Beta 2 (#7965) 2020-02-24 19:36:03 -05:00
Alex Soto cbe129fad0
[xcode11.4] Add support for Xcode 11.4 Beta 2 (#7944) 2020-02-19 18:33:06 -05:00
Manuel de la Pena c68b94bb89
[Tests] Update MT4134 tests for the new Xcode 11.4 (#7931)
New frameworks were added and the test needs to be updated.
2020-02-19 16:13:34 -05:00
Rolf Bjarne Kvinge f9d9f6becf
[tests] Simulator dylibs can either have min OS version 7.0 or 8.0. Fixes xamarin/maccore#2153. (#7895)
Fixes https://github.com/xamarin/maccore/issues/2153.
2020-02-14 20:20:55 +01:00
Rolf Bjarne Kvinge d2f3733a1d
[tests] Ignore Xamarin.MMP.Tests.WarningTests.MM0135 on macOS 10.15+. Fixes xamarin/maccore#2035. (#7896)
Ignore Xamarin.MMP.Tests.WarningTests.MM0135 on macOS 10.15+, because this
test requires Xcode 9.4, which doesn't work on macOS 10.15+.

Fixes https://github.com/xamarin/maccore/issues/2035.
2020-02-14 20:17:04 +01:00
Alex Soto b437313fe0
[UIKit] Update bindings to Xcode 11.4 Beta 1 (#7887) 2020-02-13 16:12:07 -05:00
Alex Soto 91172a80c4
[PassKit] Update bindings to Xcode 11.4 Beta 1 (#7885) 2020-02-13 14:42:14 -05:00
monojenkins 86000d0c3b
[XHarness] Generate TestReorts for NUnit V3. (#7881)
Now that we have NUnit V3 xml results, do generate the test report for
those correctly.

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2020-02-13 11:59:15 -05:00
Alex Soto efe0e25e66
[CallKit] Update bindings to Xcode 11.4 Beta 1 (#7860) 2020-02-13 10:04:24 -05:00
Alex Soto 19e6e07ce2
[CoreLocation] Update to Xcode 11.4 Beta 1 (#7867) 2020-02-13 07:03:00 -05:00
Alex Soto d75b482e59
[GameKit] Update bindings to Xcode 11.4 Beta 1 (#7869)
* [GameKit] Update bindings to Xcode 11.4 Beta 1

* Fix message
2020-02-12 19:26:45 -05:00
Alex Soto d01d9cbb05
[CoreGraphics] Update bindings to Xcode 11.4 Beta 1 (#7865) 2020-02-12 18:35:47 -05:00
Alex Soto 08bb76928f
[AVFoundation] Update bindings to Xcode 11.4 Beta 1 (#7859) 2020-02-12 18:34:17 -05:00
Alex Soto fdba4ebdba
[ClassKit] Update bindings to Xcode 11.4 Beta 1 (#7862) 2020-02-12 18:23:52 -05:00
Alex Soto 56fa148802
[CarPlay] Update bindings to Xcode 11.4 Beta 1 (#7861) 2020-02-12 18:23:32 -05:00
Alex Soto 72e322c3cb
[AuthenticationServices] Update bindings to Xcode 11.4 Beta 1 (#7858) 2020-02-12 18:22:56 -05:00
Alex Soto 278049cdbb
[AppKit] Update bindings to Xcode 11.4 Beta 1 (#7857) 2020-02-12 18:22:24 -05:00
Manuel de la Pena 9303bb2dc5
[Xcode11.4][XHarness] Add logs to VSTS test runs. (#7844) (#7866)
As per the documentation of the VSTS test uploader (https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/test/publish-test-results?view=azure-devops&tabs=yaml#attachments-support)
the tests support the addition of attachments. We want to be able to
access the logs of the different tests runs, this is achieved the
following way:

1. Move TouchUnit to use NUnit V3 which allows to add attachments.
2. Once the tests are ran, add the attachments to the following nodes:
   1. The very first test-suite. This will allow to have the logs for
   succesul tests.
   2. Add logs to failing tests. Reduces the number of clicks to be done
   to access to the logs when a test case fails.
3. Modify the assembly name of the test-suit to match the name of the
application. This ensures two things.
   1. We have a consistent name for the file column in VSTS, that can be
   used to see recurrent failing tests.
   2. The name is more readable, since if not, it will contain the UUID
   of the device.

Logs are not added to succesful tests because it will have the following
problems:

* Larger data storage usage.
* Longer upload time. The addtion of the logs per tests (succesful or
failed) was tested and resulted in an upload time LONGER than 6 hours
for all TouchUnit, NUnit blc tests and xUnit bcl tests.

In order for this to be useful, the task in the pipeline SHOULD NOT
merge test runs. We should have a test run PER application so that we do
not mix the logs.

Co-Authored-By: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-02-12 18:16:30 -05:00
Manuel de la Pena 35c010db63
[XHarness] USe static variables for common test names. (#7837) (#7853)
One of the reason why we lost the TestReport was because the xml added
from the new code did not use the same name for the log as the expected
one (https://github.com/xamarin/xamarin-macios/pull/7835/files#diff-03773861bcef485bf343300f31b60b0eR374).

If we are going to be using the description as a way to decide what is
going to be done with it, lets use static vars so that we do not have
logs added with the wrong name.
2020-02-12 07:36:43 -05:00
Alex Soto cee4b5e5a1
[xcode11.4] Add xcode 11.4 b1 initial support (#7805)
* [xcode11.4] Add xcode 11.4 b1 initial support

* [xtro] re-enable PDFKit

* Disable watchOS and fix xtro

Unfortunately watchOS simulator hangs when we try to deploy to it
and it keeps our tests timing out. Disabling for now until we
can investigate more.

Disables PDFKit on xtro in macOS

* [jenkins] Switch to use the catalina bot group (#7819)

* Bump maccore to get fix for launching the simulator for watch apps.

New commits in xamarin/maccore:

* xamarin/maccore@546270c8f9 [Xamarin.Hosting] Fix the name of the notification we get when the simulator has launched. (#2145)

Diff: 55957e908d..546270c8f9

* [tests] Diable watch due to time out, enable 10,15,4 in intro, fix min version

* Bump macios-binaries to get updated binary mlaunch as well.

New commits in xamarin/macios-binaries:

* xamarin/macios-binaries@f8c6e63 Bump mlaunch to xamarin/maccore@546270c8f9

Diff: eb6980e8b6..f8c6e63228

* [msbuild] Reflect ibtool changes in our tests

Looks like Apple reverted some changes introduces in Xcode 11
in ibtool, for more context see xamarin/xamarin-macios#6970

* [mtouch] Workaround strange behavior of realpath.

Co-authored-by: Sebastien Pouliot <sebastien.pouliot@gmail.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-02-11 20:25:43 -05:00
monojenkins 0c89f403a4
[xcode11.4] [XHarness] Do write the TestReport when we have xUnit results. (#7849)
Add code to write the TestReport when we have xunit results. Also
refactored code for the NUnit format to not use LINQ, it will use less
memory and in the future we can move to async (not now since it might
raise other problems).

fixes: https://github.com/xamarin/xamarin-macios/issues/7826

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2020-02-11 18:43:39 -05:00
Manuel de la Pena 359bbbb50b [XHarness] Refactor xml code to make the AppRunner class cleaner. (#7794)
There is a lot of logic related to xml in the AppRunner making it more
complicated than needed. Move the methods to a hlper class.
2020-02-10 10:58:50 -05:00
Manuel de la Pena 101c944bfc [Xharness] Fix all xml parsing issues and ensure that the xml can be consumed by VSTS. (#7768)
We ping the tcp listener to know that we have a tcp connection, that is
written in the xml logs, which means that parsing will not work. Ignore
the ping, parse xml, and make sure that the xml that will be consume by
vsts is valid.

This PR also fixes https://github.com/xamarin/maccore/issues/827 which does not longer happen.
2020-02-10 10:58:36 -05:00
Manuel de la Pena 9e45badf78 [Xharness] Add workaround when we could not share the internet in bots. (#7755)
Looks like we have issues with the internet sharing in the VSTS bots,
this means that now that we always try to parse the XML on CI, we get an
exception, catch it and do not show the results.

The workaround simply tries to read the xml, if possible, we will parse
it, else deal with the text only log. The fix will show the results, but
it is a workaround for a configuration issue in the CI.
2020-02-10 10:58:25 -05:00
Manuel de la Pena abf9dfc997 [Harness] Unify the CI properties. (#7750)
Unify the harness properties to just look at InCI and remove all the
other ones. There is no real need to have differences between jenkins
and VSTS and Wrench is gone.
2020-02-10 10:58:13 -05:00
Manuel de la Pena 2fb329bc96 [XHarness] If in CI, no matter which, use the Xml output. (#7745)
We used to test only on Jenkins, and if the build version had jenkins on
it, rather than doing so, just check if we are in the CI by looking if
BUILD_REVISION is present in the env.
2020-02-10 10:58:00 -05:00
Manuel de la Pena 829af5eec3 [Harness] Just try to generate the report when is NUnit.
Use the xml parsing helper methods to decide if the xml can be parsed
and if we will be able to generate the report. That way we avoid an
exception that makes the CI noise.
2020-02-08 02:19:40 +00:00
monojenkins db7ccd7d2f [xharness] Do not trace the reflection exceptions used for the BCL. (#7635) 2019-12-20 15:10:15 -05:00
monojenkins 7a22053587 [xcode11.3] [Tests] Split groups so that they work on iOS 32b. (#7617)
After this commit we will have more application but they will be the
appropiate size so that they can be built with the linker for iOS 32b.
It is important to note that the following apps WILL CONTINUE to fail
since the dlls need to be splitted in mono:

* mscorlib tests
* Mono BCL tests group 5 - Which is monotouch_System.Core_xunit-test.dll
and is too large.
2019-12-18 11:16:29 -05:00
monojenkins aaafa2df6f [xharness] Don't try to parse log files that don't exist. (#7614)
Makes xharness throw fewer exceptions, which makes tracing output simpler to read.
2019-12-17 17:04:00 -05:00
monojenkins a6c714fa84 [xcode11.3] [monotouch-test] Simplify NetworkReachabilityTest.CtorIPAddressPair test. (#7613)
* [monotouch-test] Improve reachability test.

Tested on:

* All macOS versions we support (10.9 -> 10.15).
* tvOS device: 13.2
* iOS devices: 8.2, 9.3.5, 10.3.3, 11.4.1, 12.4.1, 13.3
* iOS simulators: 10.3, 11.0, 12.0, 13.2.
* tvOS simulators: 10.2, 13.2

* Yay Apple!

* Give up.

* Revert unneeded change.
2019-12-17 16:07:22 -05:00
monojenkins 380ad56e4d [introspection] Update according to changes that seem to have occurred in macOS 10.15.2. (#7592) 2019-12-13 10:22:16 -05:00
Manuel de la Pena 8abcd9c60c
[Network] Add missing BindingImplAttr. (#7530)
Fixes: https://github.com/xamarin/xamarin-macios/issues/7513
2019-12-04 11:41:29 -05:00
monojenkins 74a94c35d1 [monotouch-test] Make NetworkReachabilityTest.CtorIPAddressPair a bit more permissive. Fixes xamarin/maccore#2047. (#7521)
Try to fix https://github.com/xamarin/maccore/issues/2047 by making the test
accept NetworkReachabilityFlags.Reachable for the loopback address on device.

Fixes https://github.com/xamarin/maccore/issues/2047.
2019-12-02 21:54:33 +01:00
Rolf Bjarne Kvinge e808ad48aa
[xharness] Make sure to always stop log and system capture. (#7506)
This will hopefully stop the runaway mlaunch processes we've seen on the bots.

Ref: https://github.com/xamarin/maccore/issues/1965.
2019-12-02 21:54:07 +01:00
monojenkins 44d411b8de [xharness] Add a timeout to the periodic command. (#7504)
This will hopefully prevent the periodic command from keeping xharness alive longer than it should.
2019-12-02 21:48:22 +01:00
monojenkins bcf3899893 [generator] If forcing a managed type, we must do so even if there's another managed instance of an incompatible type. Fixes #7441. (#7460)
If forcing a managed type for a particular native handle, we must ensure we're
always successful.

This means creating another managed instance even if there already is an
existing instance for the native handle. This is not optimal, but the
alternative is worse: some functionality can be completely broken otherwise
(such as NSSavePanel⁄NSOpenPanel may stop working).

If creating multiple managed instances for the same native handle ends up
being too problematic, we'll probably have to add full support for this
scenario (see #7442).

Fixes https://github.com/xamarin/xamarin-macios/issues/7441.
2019-11-26 13:38:57 -05:00
monojenkins fd7a5360a5 [xcode11.3] [linker] Do not mark NSObject subclasses from Xamarin.Forms.Platform.iOS.dll assembly (#7483)
Turn older #7165 prototype into an experimental feature. It can be
enabled by adding `--optimize=experimental-xforms-product-type` to the
**Additional mtouch arguments** of the project.

ref: https://github.com/xamarin/xamarin-macios/pull/7165
2019-11-26 08:32:02 -05:00
Manuel de la Pena dadf69e97e
[Networking] Add missing Mac OS X APIs. (#7426)
Add missing APIs and complete the bindings for Xcode 11.
2019-11-22 15:21:39 -05:00
monojenkins 88dc8642f0 [xcode11.3] [Tests] Update tests.sln to include all the BCL tests. (#7482)
Update the UUIDs of the projects to ensure that they are all present
in the sln for developers to use.

Fixes: https://github.com/xamarin/xamarin-macios/issues/7475
FIxes: https://github.com/xamarin/xamarin-macios/issues/7476
2019-11-22 10:34:30 -05:00
Rolf Bjarne Kvinge f7212e7dc5
[introspection] UIMenuController's default ctor stopped working in iOS 13.3. Fixes xamarin/maccore#2067. (#7458)
* [introspection] UIMenuController's default ctor stopped working in iOS 13.3. Fixes xamarin/maccore#2067.

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

* [tests] Add support for comparing 3-part system version strings to watchOS.
2019-11-20 13:45:01 -05:00
Rolf Bjarne Kvinge 806404fa51
Keep track of SDK versions and OS versions separately. Fixes xamarin/maccore#2066. (#7454)
The latest SDK version and the latest OS version does not necessarily have to
match (for instance the iOS 13.2 SDK can support both iOS 13.2 and iOS 13.3),
so keep track of them separately.

Also use the latest OS version to determine which simulator to run, instead of
the latest SDK version (Xcode 11.3 ships with the iOS 13.2 SDK but only has an
iOS 13.3 simulator, not an iOS 13.2 simulator).

Fixes https://github.com/xamarin/maccore/issues/2066.
2019-11-15 17:21:10 +01:00
Pramit Mallick 0e394f7e80
CoreFoundation update - adding to ignore (#7448) 2019-11-15 21:16:40 +05:30
Manuel de la Pena d99e3b24f9 [CoreFoundation] Add Clone method for CFArray. (#7403)
When working on https://github.com/xamarin/maccore/issues/940 we noticed
that clone the array would be a better approach.

The CFArrayCreateCopy add some nice things:

* The pointer values from theArray are copied into the new array.
* The values are also retained by the new array.
* The count of the new array is the same as theArray
* The new array uses the same callbacks as theArray. [IMPORTANT]

Whith this in, we can have a better fix for https://github.com/xamarin/maccore/issues/940
2019-11-13 17:28:46 -05:00
monojenkins 83fd5162f2 [xcode11.3] [Tests] If we have server errors. Mark test as inconclusive. (#7415)
If we are getting errors (500,401..) do not mark a link all test as a
failure, but as inconclusive.

Fixes: https://github.com/xamarin/maccore/issues/2056
2019-11-12 15:08:18 -05:00
monojenkins 8536ba6975 [Tests] Fix introspection failing due to a typo. (#7377)
Fixes: https://github.com/xamarin/maccore/issues/2052
2019-11-06 15:21:24 -05:00
Manuel de la Pena 746fd47638
[Networking] Add the NWFramer implementation. (#7338)
Uncommented the sources and update some mistakes after following the
sample provided by Apple. Initially tests were going to be added but
they resulted to be to flacky and would make the CI red too often to be
adding value.

Porting the sample will ensure that it works are the bindings are not
broken.
2019-11-05 15:32:17 -05:00