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

194 Коммитов

Автор SHA1 Сообщение Дата
Manuel de la Pena 4bdbf3035f
[XHarness] Add ids to the xunit to nunit transformed tests. (#7889)
The NUnit3 xml requires an id for the tests, but xunit does not provide
one. Add an extension object to the xslt that will return a very lame id
so that the test uploader does not complain.

fixes: https://github.com/xamarin/xamarin-macios/issues/7888
2020-02-14 12:45:32 -05:00
Manuel de la Pena 89d21f959c
[Harness] Add support for NUnit V3 in the new bcl tests. (#7870)
Add the required changes in the xunit runner to write NUnit V3 xml
result files so that we can have attachments in VSTS.
2020-02-12 18:17:11 -05:00
Manuel de la Pena 4544fb8fcd
[XHarness] Add NUnit3 support to the old bcl tests. (#7846)
Move the old bcl tests based on NUnit to use the NUnit V3 output so that
we can add logs to the vsts imported tests.

Follow up of PR: https://github.com/xamarin/xamarin-macios/pull/7844
2020-02-12 07:38:40 -05:00
Manuel de la Pena 0144c3b94f
[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-04 11:03:38 -05:00
Bruno Garcia 455ed695bf fix: Template typos execution, transition (#7723)
* fix: Execution typo

* fix: transiton -> transition
2020-01-20 15:29:23 +01:00
Manuel de la Pena 87cdcf4b3c
[BCL Tests] Make sure that the xUnit runner is not too greedy. (#7653)
The tests in xunit are ran in parallel, the default number of threads is
to large which is making the iOS watchdog kill the process before we are
done with the tests.

The default value is either 0 (use as many as possible) of the
Enviroment.ProcessorsCount value, in our case we divide that by two to
make sure we do not use too much CPU.

Fixes: https://github.com/xamarin/maccore/issues/2083
2019-12-27 11:15:50 -05:00
Alex Soto 9ac17bdbcf
Merge remote-tracking branch 'xamarin/xcode11.3' into master-xcode11.3 2019-12-17 19:25:11 -05:00
Manuel de la Pena 746d52ef51
[Tests] Ensure that if the TCP connection cannot be done, test are run. (#7605)
TouchUnit uses Console.Out as the writer when the TCP connection cannot
be performed. The BCL tests were not doing so and were crashing.

With this change, when ran locally, if the TCP connection is not done,
we will use Console.Out as TouchUnit and the file will be parsed by
xharness correctly.
2019-12-16 22:05:20 -05:00
Jo Shields 5d4ada34c7 Bump to mono:2019-10 (#7192)
## Miscellaneous fixes

* Fixed
`/Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/builds/mono-ios-sdk-destdir/ios-sources/external/linker/src/linker/Linker.Steps/OutputStep.cs(110,15): error CS0246: The type or namespace name ‘OutputException’ could not be found (are you missing a using directive or an assembly reference?) [/Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tools/mmp/mmp.csproj]`
* Changed the name of the method that is used from linker. Because of this commit 6be26771b9
* Added `OutputException.cs` file on `mtouch.csproj`.
* Removing enter_gc_safe and exit_gc_safe because now it's already gc_safe in this part of code, after a mono change.
* Added known exceptions to LLVM exception list.
* Needs `ifdef` because of this https://github.com/mono/mono/pull/17260.
* Bump MIN_MONO_VERSION to 6.8.0.41 and point MIN_MONO_URL to the PR.
* Add ENABLE_IOS=1 and ENABLE_MAC=1.
* Added switch to disable packaged mono build
* [Tests] Ignore tests that fail on 32b.
    Ignore the test on 32b, and filled issue: https://github.com/mono/mono/issues/17752
* [Tests] Ignore a couple of tests causing OOM.
    Hopefully fixes https://github.com/xamarin/maccore/issues/1659 for good.
* Ignore `MM0135` test on Catalina+ because it needs Xcode 9.4.
* [monotouch-test] Add null checks for teardown when test didn't run because of a too early OS version.
* [CFNetwork]: Http 2.0 requires OS X 10.11 or later.
    Check whether `_HTTPVersion2_0` is available and fallback to HTTP 1.1 otherwise.

## Bring HttpClient from CoreFX

* #7346 
* This bumps Mono to use https://github.com/mono/mono/pull/17645 (which is the 2019-10 backport
of https://github.com/mono/mono/pull/17628).
* The big user-visible change is in regards to certificate validation, everything below are just
some minor adjustments to tests.

### SocketsHttpHandler

CoreFX uses a completely new `HttpClientHandler` implementation called `SocketsHttpHandler`,
which you can find at https://github.com/dotnet/corefx/tree/release/3.0/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler.

Since this is not based on the web stack anymore, it does not use any of the related APIs such
as `ServicePointManager` or `WebException`.

### Certificate Validation Changes

There is a new API called `HttpClientHandler.ServerCertificateCustomValidationCallback`.
- https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclienthandler.servercertificatecustomvalidationcallback?view=netframework-4.8
- c1778515a3/src/System.Net.Http/src/System/Net/Http/HttpClientHandler.Unix.cs (L154)
- c1778515a3/src/System.Net.Http/src/System/Net/Http/HttpClientHandler.Windows.cs (L383)

The `ServicePointManager.ServerCertificateValidationCallback` is no longer invoked and on
certificate validation failure, `AuthenticationException` (from `System.Security.Authentication`)
is thrown instead of `WebException`.

At the moment, the `NSUrlSessionHandler` still uses it's own validation callback and also still
throws `WebException` on failure; we should probably look into making this consistent with the
other handlers.

### Minor adjustments related to internal Mono APIs

* `HttpContent.SerializeToStreamAsync()` is now `protected` (changed from `protected internal`).
  - src/Foundation/NSUrlSessionHandler.cs: changed overload accordingly.
  - src/System.Net.Http/CFContentStream.cs: likewise.

* `HttpHeaders.GetKnownHeaderKind()` is an internal Mono API.
   There is a new internal API called `System.Net.Http.PlatformHelper.IsContentHeader(key)`
   which exists in both the old as well as the new implementation.
   The correct way of doing it with the CoreFX handler is
   `HeaderDescriptor.TryGet (key, out var descriptor) && descriptor.HeaderType == HttpHeaderType.Content`

### Minor adjustments to tests.

* `HttpClientHandler.MaxRequestContentBufferSize` is now longer supported, you can set it to
  any non-negative value, the getter will always return 0.
  See c1778515a3/src/System.Net.Http/src/System/Net/Http/HttpClientHandler.Core.cs (L18).
  - tests/linker/ios/link sdk/HttpClientHandlerTest.cs: removed assertion from test.

* `HttpMessageInvoker.handler` is a `protected private` field - in the CoreFX handler, it is
  called `_handler` and `private`.  This is accessed via reflection by some of the tests, which are
  now using the new name.
  - tests/mmptest/src/MMPTest.cs: here
  - tests/mtouch/MTouch.cs: here

* tests/monotouch-test/System.Net.Http/MessageHandlers.cs:
  Adjust `RejectSslCertificatesServicePointManager` to reflect the certificate validation
  changes described above.
  - FIXME: There was an `Assert.Ignore()` related to `NSUrlSessionHandler` and macOS 10.10;
    I removed that to reenable the test because the description linked to an old issue in
    the private repo that was referenced by several "Merged" PR's, so it looked to me that
    this might have already been fixed - and I also didn't see why it would fail there.
2019-12-04 15:10:32 -05:00
Manuel de la Pena e4268e83f2
[Tests] Ignore BCL tests on 32b that fail due to threads failing to be created. (#7318)
Related mono issue: https://github.com/mono/mono/issues/17588
2019-10-29 08:20:23 -04:00
Vincent Dondain 4b3a6a79fa [d16-4] Bump mono 2019-08@ef75d4be (#7269)
New commits in mono/mono:

* mono/mono@ef75d4bef7 [2019-08]   BeginConnect complete to early when not using callback. (#17416)

Diff: 01dbbb746f..ef75d4bef7
2019-10-22 10:59:47 +02:00
Vincent Dondain 307dc86f6f [tests] Ignore mscorlib test that runs out of memory
See mono issue: https://github.com/mono/mono/issues/17375

```
[PASS] System.Reflection.Tests.RuntimeReflectionExtensionsTests.GetMethodInfo
Test name: System.Reflection.Tests.RuntimeReflectionExtensionsTests.GetRuntimeMethod
Exception messages: System.OutOfMemoryException : Out of memory
	Handler for event TestFailedEvent failed with exception
	System.Reflection.Tests.RuntimeReflectionExtensionsTests 0 ms
```
2019-10-16 19:50:20 -04:00
Vincent Dondain a3076f29a3 Merge branch 'xcode11.1' into d16-4 2019-10-07 21:46:13 -04:00
monojenkins c7830a082f [bcl-tests] Ignore test that's running out of memory (#7138)
- First appeared here: https://github.com/xamarin/xamarin-macios/pull/7127#issuecomment-536688551
- Mono issue filed here: https://github.com/mono/mono/issues/17129
2019-10-04 14:57:22 -04:00
Rolf Bjarne Kvinge 303aa0a649 Merge remote-tracking branch 'origin/xcode11' into master-xcode11 2019-09-13 18:35:18 +02:00
Rolf Bjarne Kvinge f6e0531197 Merge xcode11 into d16-3. 2019-09-12 08:29:02 +02:00
Jo Shields 926372c940 Bump to mono:2019-08 (#6723)
Included changes are:

* New Cecil API in 2019-08
* Permit new symbols from networkable AOT profiler in symbols test
* Bump Mono to include fix for zlib linking, and new Cecil API
* We need to link against zlib now, if using libmono.a
* [Tests] Ignore memory hungry tests in old devices. (#6913)
* Ignore certain tests that use too many resources in old devices.
* Add missing tests that use too much memory on 32b devices.
2019-09-09 09:44:03 -04:00
Manuel de la Pena 342560faeb [Tests] Ignore memory hungry tests in old devices. 2019-09-05 02:34:17 +00:00
Manuel de la Pena 8a4c85863a
[Tests] Ignore memory hungry tests in old devices. (#6913) 2019-09-04 22:33:37 -04:00
Rolf Bjarne Kvinge 344dadb212
Bump the minimum iOS version to 7.0. Fixes #6213. (#6878)
Xcode 11 doesn't support anything below iOS 7.0 (the linker will automatically
change the deployment target to 7.0), so we need to drop support as well
(since our native bits will be targetting iOS 7.0, and we can't change that).

https://github.com/xamarin/xamarin-macios/issues/6213
2019-08-30 01:07:30 -07:00
Manuel de la Pena 9b6705bbe3
Bump mono to match android to cc0632 (#6811) 2019-08-21 10:52:40 +02:00
Manuel de la Pena 0bd656d33a
Bump mono to match android to cc0632 (#6812) 2019-08-21 10:51:41 +02:00
Alex Soto 778348e26f [master] Bump mono to head of 2019-06 (#6795)
Mono issues have been reported for each of the new ignores:

https://github.com/mono/mono#15983
https://github.com/mono/mono#14761
https://github.com/mono/mono#16360
2019-08-20 15:37:13 -04:00
Alex Soto 189981e2dc [d16-3] Bump mono to head of 2019-06 (#6794)
Mono issues have been reported for each of the new ignores:

https://github.com/mono/mono/issues/15983
https://github.com/mono/mono/issues/14761
https://github.com/mono/mono/issues/16360
2019-08-20 15:35:48 -04:00
monojenkins deeeb3f407 [Tests] Ignore tests that only fail on tvOS devices. (#6709) 2019-08-02 20:35:41 +02:00
Manuel de la Pena b2f8db0682
[Tests] Ignore tests that only fail on tvOS devices. (#6707) 2019-08-02 17:26:05 +02:00
Manuel de la Pena a12e76f370
[d16-3] Bump mono to head (17ac7d) (#6682) 2019-08-01 01:25:03 +02:00
Manuel de la Pena 8dbf2c3598
Bump mono to head of 2019-06 (17ac7d) (#6681) 2019-08-01 01:08:30 +02:00
Jo Shields a29ae8e6df Bump to mono:2019-06 (#6196)
* Use the commonly used casing for `MSBuildSDKsPath` property

Handle "incorrectly" cased msbuild property names

msbuild property names are case insensitive. While generating the custom
app.config, in `SetToolsetProperty(..)` we try to update the property if
it already exists. But the name lookup was case sensitive, thus causing
the lookup to fail, resulting in two entries for the same property name
differing only in case. Eg. `MSBuildSDKsPath` vs `MSBuildSdksPath`.

* [mtouch] Whitelist new Brotli native symbols in Xamarin.Tests.Misc.PublicSymbols test

* [mtouch] Better assert in NoLLVMFailuresInWatchOS() test

We'd list the "LLVM failed" messages before even though the AOT might've crashed and the list is meaningless. Assert the exit code before that.

* [mtouch] Use new LLVM even for 32bit targets

See https://github.com/mono/mono/issues/14841 and https://github.com/mono/mono/issues/9621

* [mtouch] Work around slow LLVM in "don't link" test

See https://github.com/mono/mono/issues/14843

* Remove useless conditional

* Remove LLVM36 from Makefile

* [watch4] set right min version for arm64_32 based watch devices (#6307)

Fixes the confusion around `libmono-native*` (see for example ce5ba1e41d (commitcomment-33834491) ) when building with `MONO_BUILD_FROM_SOURCE=1`.

* reflect watchos64_32_version_min change from mono sdk

* Move mono hash info to mk/mono.mk so that existing scripts work.

* Add Makefile dependency on mono.mk where necessary

With 3e7bc29ade the Mono hash was moved from Make.config to mono.mk.

We need to add a Makefile dependency on this file wherever Make.config was used to track a Mono dependency.

* [tests] Copy mk/mono.mk to the XM test package.

* [tests] Update minOS version test after consolidating min watchOS versions everywhere.

Fixes this mtouch and mmptest failure:

    1) Failed : Xamarin.Tests.ProductTests.MinOSVersion(watchOS,MinwatchOS,WatchOSSimulator,False)
      Failures
      Expected: <empty>
      But was:  < "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (mono-runtime-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (bindings-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (bindings-generated-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (shared-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (runtime-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (trampolines-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (trampolines-invoke-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (xamarin-support-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (nsstring-localization-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (trampolines-varargs-debug.arm64_32.o)."... >

* [mmp] Fix make clean target

It needs an -r to remove directories:

```
rm: bin: is a directory
rm: obj: is a directory
```

* Add new xamarin_timezone_get_local_name() to a few more places
2019-07-16 17:24:00 +02:00
Manuel de la Pena 1d541fea71
[XHarness] Re-enable ignored corlib tests. (#6395) 2019-06-24 21:31:34 +02:00
Manuel de la Pena e57e1ff92a
[XHarness] Reneable tests in Mac OS X Full and ignore them in modern. (#6403)
After PR https://github.com/xamarin/xamarin-macios/pull/6291 there are
some tests that can be ran but had to be ignored.

Mono issue: https://github.com/mono/mono/issues/15329
2019-06-24 13:42:10 +02:00
Manuel de la Pena 82a1f814b3
[XHarness] Re-enable ignored test in Mac OS from xammac_net_4_5_System_xunit-test.dll (#6398)
After PR https://github.com/xamarin/xamarin-macios/pull/6291 we can run
the ignored tests.
2019-06-21 19:54:52 +02:00
Manuel de la Pena a60f3778c9
[Xharness][32b] Ignore a number of tests that fail on old devices. (#6372)
There are a number of test failures on old devices. The commit does
mainly two things:

1. Add suppor to ignore methods just in the 32b devices.
2. Ignore the failing tests from the BCL Test App 4.

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

Mono related issues:

https://github.com/mono/mono/issues/15261
https://github.com/mono/mono/issues/15262
https://github.com/mono/mono/issues/15263
2019-06-20 11:09:49 +02:00
Manuel de la Pena 4e4eccacc9
[XHarness] Re-enable tests from System-xunit-tests.dll (#6373)
After PR https://github.com/xamarin/xamarin-macios/pull/6291 we can run
the test that blocked the test app.
2019-06-20 00:19:26 +02:00
Martin Baulig 992fc70156 [XHarness]: Convert xUnit / nUnit tests to run async. (#6291)
Make `TestRunner.Run()` async as we cannot sync-block on the UI thread.
2019-06-19 18:03:01 +02:00
Manuel de la Pena 6fd9af50eb
[Xharness] Do use the traits provided by the mono sdk. (#6160)
Rather than hardcoding the tests ignored categories and traits, use the
ones that are provided by the mono sdk for each runner.
2019-06-12 23:51:08 +02:00
Manuel de la Pena c9963ba686
[XHanress] Move ignore file to the correct dir. (#6220)
There was a merge issue (two diff PRs landing at diff times) which made
the file to be added to the wrong dir.

Fixes: https://github.com/xamarin/maccore/issues/1689
2019-06-07 13:06:36 +02:00
Vlad Brezae 5f5a584f1e [Tests] [BCL] Avoid converting from IEnumerable to IList (#6211)
Casting is wrong and can throw exception.

Fixes: https://github.com/mono/mono/issues/14729
2019-06-06 20:50:55 +02:00
Manuel de la Pena 26a3394623
[XHarness] Clean the bcl-tests directory. (#6165)
The change is a pre step to fix https://github.com/xamarin/xamarin-macios/issues/6162

We are removing the not longer child directory bcl-test/BCLTests since
there is not longer any reason for it to exist. The changes make sure
that the tests work as expected in the new directory.

Next step, move all the test apps to their own directory.
2019-05-31 13:05:22 +02:00
Manuel de la Pena d8b7580849
[XHarness] Re-enable tvOS tests. (#6174)
After mono fixed issues https://github.com/mono/mono/issues/14497 and
https://github.com/mono/mono/issues/14496 re-enable the ignored tests.

Fixes: https://github.com/xamarin/maccore/issues/1610
Fixes: https://github.com/xamarin/maccore/issues/1611
2019-05-30 19:14:45 +02:00
Rolf Bjarne Kvinge b5958e89c4 Merge remote-tracking branch 'origin/master' into binary-artifacts 2019-05-29 08:27:24 +02:00
Manuel de la Pena 0346e71213 [xharness] Remove mono tests built locally in favor of binary archive binaries (#6141)
* [XHarness] Remove the old style mscorlib tests.

Remove the old style test and replace it with the xunit equivalent which
has more tests and is provided by the mono package.

* Only skip the mscorlib tests on watchOS devices with 32b. Run them anywhere else.
2019-05-28 23:25:01 -07:00
Alexander Köplinger b8b79b03cb Merge remote-tracking branch 'upstream/master' into binary-artifacts 2019-05-28 21:43:52 +02:00
Manuel de la Pena f1c7d1e3fd
[Harness] Pass extra arguments to configure the linker for certain tests (#6143)
Some tests need a special linker configuration. Add the extra arguments
so that tests do pass on device.

Fixes: https://github.com/xamarin/maccore/issues/1608
2019-05-28 07:04:42 -07:00
Manuel de la Pena 2892c1b03a
[XHarness] Ignore threadpool tests that make tests deadlock. (#6142)
Ignore the threadpool tests that block our testing applications.

The following mono issue was created: https://github.com/mono/mono/issues/14666
Fixes: https://github.com/xamarin/maccore/issues/1651
2019-05-28 01:16:15 -07:00
Alexander Köplinger 8627c4311a Merge remote-tracking branch 'upstream/master' into binary-artifacts 2019-05-24 20:27:09 +02:00
Manuel de la Pena 9fa35569d1
[XHarness] Re-enable corlbi tests on Mac Full and Modern (#6121)
Tests are readded from the test dll from mono (xunit)

Fixes: https://github.com/xamarin/maccore/issues/1203
2019-05-24 01:29:30 -07:00
Rolf Bjarne Kvinge 25b5d36ddd
[tests] Don't make the mscorlib tests exit upon suspend. (#6115)
It means that on watchOS they'll exit if the screen turns off.

I have no idea why we set it up like this in the first place, it's been like
this since we created the mscorlib tests ([1]).

[1]: 76e15036e8
2019-05-24 00:37:25 -07:00
Alexander Köplinger 42b4b383b7 Fix BCLTests projects to use xunit.execution.dotnet.dll from mono 2019-05-24 01:36:37 +02:00
Alexander Köplinger 776d40550c Merge remote-tracking branch 'upstream/master' into binary-artifacts 2019-05-23 20:19:27 +02:00