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

6503 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 9a5c0cc432
[tests] Run tests on watchOS in a background thread. (#6170)
Otherwise watchOS might terminate the process if we lock up the UI too long
while running tests.

It's also nice to see the progress as the tests are running.
2019-05-30 08:40:30 -07:00
Rolf Bjarne Kvinge 2a842e1265
[xharness] Look for HE0038 anywhere in a log file. (#6175)
Most log files now have timestamps, which means that looking for 'HE00380' at
the start of each line won't work anymore.

Fixes an issue where the HE0038 issue isn't detected properly.
2019-05-30 08:37:41 -07:00
Rolf Bjarne Kvinge 93b5a0ca23
[generator] Forward more [return: Release] attributes to generated code. (#6171) 2019-05-30 08:36:56 -07:00
Rolf Bjarne Kvinge e89c3271f3
Merge pull request #6097 from xamarin/binary-artifacts
Replace Mono submodule with binary artifacts from mono sdks download
2019-05-30 05:12:41 -07:00
Rolf Bjarne Kvinge dfc75ff72c Merge remote-tracking branch 'origin/master' into binary-artifacts 2019-05-30 14:11:19 +02:00
Manuel de la Pena ccda5a5508
Bump mono. (#6166)
Bumping mono to get the correct traits from the mono sdk.

Commits are:

* mono/mono@bab25c0 Ensure monotouch[_runtime] API are identical
* mono/mono@bc9ab2e [bcl] Add nunit exclude categories for monotouch/monodroid profiles
* mono/mono@a2088cb [sdks] Only package android-sources on macOS

Diff: mono/mono@f3a302c...bab25c0
2019-05-30 11:00:54 +02:00
Rolf Bjarne Kvinge 72d7a8ad9b Merge remote-tracking branch 'origin/master' into binary-artifacts 2019-05-30 07:25:03 +02:00
Manuel de la Pena 76c2804298 [XHarness] Do clean after mtouch build tests. (#6161)
The BCL projects do share the directory. This means that if we do not
clean before building we could have unknown side effects.

Fixes: https://github.com/xamarin/xamarin-macios/issues/6157
2019-05-29 22:24:52 -07:00
Rolf Bjarne Kvinge 0ce0010824
[Metal] Sprinkle [return: Release] on all 'new*' selectors. Fixes #5941. (#6159)
* [Metal] Sprinkle [return: Release] on all 'new*' selectors. Fixes #5941.

Also add tests for all the API I could figure out how to use.

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

* [tests] MTLFunctionConstantValues didn't have a default ctor until Xcode 9.

* [tests] Use a higher offset when calling MTLBuffer.CreateTexture to try to comply with the requirements for the API.

Hopefully fixes this assertion:

> 07:42:06.7701360 validateStrideTextureParameters:1512: failed assertion `Linear texture: bytesPerRow (64) must be aligned to 256 bytes'

which doesn't happen on my machine.

* Fix whitespace.

* Simplify nested usings.

* Fix availability correctly.
2019-05-29 22:06:14 -07:00
Rolf Bjarne Kvinge 28fab7bdba
[xtro] Implement support for auto-sanitizing the .ignore files by defining an environment variable. (#6158)
Going through each failure one-by-one after fixing something that fixed many
entries is annoying, so automate the process.
2019-05-29 08:58:48 -07:00
Rolf Bjarne Kvinge 0029417b31
[apidiff] Create the directory for the stamp file before trying to create files in it. (#6156)
Fixes this:

	[...]
    Updating apidiff references...
    /Applications/Xcode102.app/Contents/Developer/usr/bin/make -C ../../builds download
    Downloading https://xamjenkinsartifact.azureedge.net/mono-sdks/ios-release-Darwin-dfd4224fdd40dfa8bfdad092c7d75d235ca37a8d.zip...
    Downloading https://xamjenkinsartifact.azureedge.net/mono-sdks/mac-release-Darwin-dfd4224fdd40dfa8bfdad092c7d75d235ca37a8d.zip...
    Downloaded https://xamjenkinsartifact.azureedge.net/mono-sdks/mac-release-Darwin-dfd4224fdd40dfa8bfdad092c7d75d235ca37a8d.zip
    Unzipping mac-release-Darwin-dfd4224fdd40dfa8bfdad092c7d75d235ca37a8d...
    Unzipped mac-release-Darwin-dfd4224fdd40dfa8bfdad092c7d75d235ca37a8d.
    Downloaded https://xamjenkinsartifact.azureedge.net/mono-sdks/ios-release-Darwin-dfd4224fdd40dfa8bfdad092c7d75d235ca37a8d.zip
    Unzipping ios-release-Darwin-dfd4224fdd40dfa8bfdad092c7d75d235ca37a8d...
    Unzipped ios-release-Darwin-dfd4224fdd40dfa8bfdad092c7d75d235ca37a8d.
    touch: /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tools/comparison/apidiff/.download-dfd4224fdd40dfa8bfdad092c7d75d235ca37a8d.stamp: No such file or directory
    make: *** [/Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tools/comparison/apidiff/.download-dfd4224fdd40dfa8bfdad092c7d75d235ca37a8d.stamp] Error 1
    Failed to update apidiff references

from https://jenkins.mono-project.com/job/xamarin-macios-pr-builder/10093/consoleText.
2019-05-29 05:58:38 -07:00
Rolf Bjarne Kvinge 215bda500e
Show better error when the mono archive isn't available. Fixes xamarin-macios/maccore#1655. (#6155)
* Show better error when the mono archive isn't available. Fixes xamarin-macios/maccore#1655.

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

* [jenkins] Show better build failure in the build report PR comment.
2019-05-29 05:57:49 -07:00
Rolf Bjarne Kvinge 2ac3008237 [jenkins] Ignore the 7z dependency when running tests on older macOS versions.
We don't need 7z installed to just run the tests.
2019-05-29 12:56:44 +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
Sebastien Pouliot e0f1dfd831 Bump to head of mono/2019-02 (#6153)
Commit list for mono/mono:

* mono/mono@f3a302ccb7 [2019-02][mscorlib] Ensure monotouch[_runtime] API are identical (#14682)
* mono/mono@56f5d55f62 [sdks] Don't package android-sources on Windows
* mono/mono@c96878fb16 [sdks] Add linker sources to android sdks archive (#14686)
* mono/mono@6c8340e4c0 [bcl] Write newline-separated nunit/xunit excludes file for sdks archive (#14681)
* mono/mono@a980e7fcb1 [sdks] Build static binaries for Android SDK and LLVM with MXE (#14668)
* mono/mono@6d50c16b8c Bump corefx to fix submodule pointing to a branch
* mono/mono@5dc820c052 [sdks] Correctly set mac/watchos sdks version too
* mono/mono@d38a5b80e8 [sdks] Fix build
* mono/mono@c615501f72 [sdks] Explicitly set version of the mac/ios/watchos/tvos platform SDKs
* mono/mono@6d59480417 [2019-02] Bump corefx to get p/invoke fix (#14661)

Diff: dfd4224fdd...f3a302ccb7
2019-05-28 23:21:51 -07:00
Alexander Köplinger 550a340d4e Bump mono 2019-05-29 00:43:54 +02:00
Alexander Köplinger b8b79b03cb Merge remote-tracking branch 'upstream/master' into binary-artifacts 2019-05-28 21:43:52 +02:00
Rolf Bjarne Kvinge 1766a8daed Add symlink that points to current mono sdks dir (#6146)
Use that instead of an msbuild variable that won't work in VSMac.

Also bump maccore to get an equivalent fix there.

Diff: 34725fe136..104656b890
2019-05-28 15:01:38 -04:00
Manuel de la Pena c4a89496fc
[XHarness] Remove the mini tests since they are not longer needed. (#6152)
The tests in the mini project are the same ones found in
monotouch_Mono.Runtime.Tests_test.dll which is already ran via the
autogenerated bcl tests.

Mini tests therefore are redundant and require the mono sources which
will be removed.
2019-05-28 11:52:31 -07:00
Rolf Bjarne Kvinge 18edb17083
[xtro] Update csproj debug configurations. (#6150) 2019-05-28 08:21:08 -07:00
Rolf Bjarne Kvinge 885efcc624
[xtro] Add new checker for '[return: Release]' attributes. Fixes #6014. (#6149)
Also add a 'u2ignore' tool that can copy the resulting unclassified (all 1612
of them) to the ignore files.

Fixes https://github.com/xamarin/xamarin-macios/issues/6014.
2019-05-28 08:19:30 -07:00
Rolf Bjarne Kvinge 9db4115452
[Metal] Obsolete and fix MTLDevice.CreateBufferNoCopy. (#6147)
MTLDevice.CreateBufferNoCopy must be called with memory allocated with
vm_allocate or mmap, which will hardly be the case for managed arrays, so
obsolete this overload.

Still, the method might never work, but in the case it actually does for some
reason, don't free the handle to the managed memory until the MTLDevice is
done with it.
2019-05-28 08:04:27 -07:00
Rolf Bjarne Kvinge 7a8da34833
[generator] Check if an object/pointer is null before trying to call release on it. (#6148)
Note that the 'needsPtrZeroCheck' variable is not accurately named anymore,
but given that the code is somewhat impenetrable I wasn't able to come up with
a better name.

Also simplify two consecutive and identical null checks to a single check.
2019-05-28 07:05:47 -07: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
Rolf Bjarne Kvinge 8bd73ed060
[xharness] Timestamp all the things. (#6137)
* [xharness] Timestamp all the things.

I find myself wanting timestamps if I don't have them much more than wanting
them gone when I do.

Worst case scenario: timestamps can still be disabled for specific logs if
such a desire ever becomes overwhelming.

* [xharness] Don't timestamp xml files.
2019-05-28 05:25:50 -07:00
Rolf Bjarne Kvinge 285511b424
[apidiff] Make temporary / stamp paths depend on APIDIFF_DIR. (#6145)
This fixes an issue with the api comparison since the api comparison fails if
it detects unexpected modified files: https://github.com/xamarin/xamarin-macios/pull/6133#issuecomment-496283224.

Putting the temporary files in APIDIFF_DIR makes sure the api comparison
doesn't see those files as unexpectedly modified.
2019-05-28 02:42:57 -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
Rolf Bjarne Kvinge 50149daa1f
[generator] Fix generation of ReturnRelease code for third-party bindings. (#6135)
Don't use internal platform API (the Selector.Release field), and make sure
the void_objc_msgSend function exists in the binding.
2019-05-27 23:08:45 -07:00
Rolf Bjarne Kvinge 74be8cec31
[xharness] Refactor a bit to simplify code. (#6140)
* [xharness] Refactor a bit to use named types for a few unnamed types with numerous fields.

Anonymous types becomes quite unwieldy the more fields they have.

* [xharness] Remove unnecessary field assignments.
2019-05-27 22:59:08 -07:00
Rolf Bjarne Kvinge 05aa58fd9e
[xharness] Order previous test runs so that the last test run show up at the top. (#6139) 2019-05-27 22:58:52 -07:00
Rolf Bjarne Kvinge 5f64e107b0
[xharness] Limit the number of errors/failures in the html report. (#6138)
Avoids creating a multi-gb index.html due to tens of thousands of compiler
errors by showing just a few of them instead.
2019-05-27 22:58:38 -07:00
Rolf Bjarne Kvinge 84dbe476bf
Bump mono. (#6133)
New commits in mono/mono:

* mono/mono@dfd4224fdd [System] Fix monotouch_runtime repl assemblies (#14637)
* mono/mono@86f0cac480 [MacSDK] Trigger redownload of Nuget 5.0.2 (#14632)
* mono/mono@2098efce25 [ci] Build macOS .pkg PR builds on a separate bot (#13600)
* mono/mono@c664b47d2c [2019-02] Throw ObjectDisposedException instead of crashing when Cairo.Context handle == IntPtr.Zero (#14627)
* mono/mono@70e83b66b3 [2019-02] [System.Core] Ensure monotouch[_runtime] API are identical (#14616)
* mono/mono@3dc72cfe51 [sdks] Fix min OSX version of runtime files in Mac SDK
* mono/mono@50254b6bb0 Apply suggestions from code review
* mono/mono@cf33bd3fb3 Plug leak of CustomAttribute initializer name
* mono/mono@8c8b086d93 [tests] Add xunit.execution.dotnet.dll to tests directory
* mono/mono@4c747d34dd [Android] Fix runtime loading of DSOs for 64-bit processes
* mono/mono@f7ad4b2916 [tests] Add Xunit.NetCore.Extensions.dll to tests directory
* mono/mono@0bd00ec588 Bump msbuild to track mono-2019-02 (#14069)

Diff: 16c6ac81b3..dfd4224fdd
2019-05-27 22:37:10 -07:00
Rolf Bjarne Kvinge e12243698d
[tests] Use msbuild, not xibuild, to build the generator tests. (#6136)
The generator tests is a standard C# library, and can use the system msbuild
just fine.

Fixes this build problem when building the tests using the command line:

    xamarin-macios/external/mono/external/ikvm/reflect/Emit/ILGenerator.cs(119,20): error CS0433: The type 'Stack<T>' exists in both 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' and 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
2019-05-27 22:35:10 -07:00
Alexander Köplinger e9e7b835bd Merge remote-tracking branch 'upstream/master' into binary-artifacts 2019-05-28 02:01:28 +02:00
Alexander Köplinger 438813fce3 Bump mono 2019-05-27 20:22:42 +02:00
Manuel de la Pena 1d5fe7118e
[XHarness] Ignore a number of assemblies that do not have any tests. (#6132)
Mono did remove all the tests in a number of assemblies on
ios/tvos/watchos. With a recent change, we report test runs with no
tests as a failure (correctly since it will bring up issues with the
runners).

In this case, the tree assemblies have to be ignored because they trully
do not have tests and the runners are doing the right thing.

Fixes: https://github.com/xamarin/maccore/issues/1652
2019-05-27 09:22:00 -07:00
Alexander Köplinger ebb83d1c28 Set MACOS_VERSION and WATCHOS5_VERSION in the Mono SDKs config
To make sure we correctly propagate the values from xamarin-macios.
2019-05-27 18:16:44 +02:00
Alexander Köplinger 0116641370 Fix source build of Mono
We can't set IGNORE_PROVISION_LLVM=1 anymore
2019-05-27 18:16:44 +02:00
Alexander Köplinger d4f2b02d66 PR feedback, remove unnecessary setting of MONO_IOS_SDK_DESTDIR in csprojs 2019-05-27 18:16:44 +02:00
Manuel de la Pena fb3db66384
[XHarness] If no test are ran, consider it as a failed ran. (#6123)
If the total test run is 0 consider it a fail. Tests that failed after the change were also fixed.

Fixes: https://github.com/xamarin/xamarin-macios/issues/5767
2019-05-25 05:27:58 -07:00
Alexander Köplinger 15a17e21f5 Remove mono-extensions configure args
As discussed with Miguel it's not needed here anymore (and wouldn't work with sdks anyway).
2019-05-25 00:42:14 +02:00
Rolf Bjarne Kvinge d6e8e91073 [introspection] Adjust rules for INParameter. (#6131) 2019-05-24 16:13:58 -05:00
Alexander Köplinger 8a8427fb7b Fixup azure-pipelines.yml 2019-05-24 20:36:53 +02:00
Alexander Köplinger 8627c4311a Merge remote-tracking branch 'upstream/master' into binary-artifacts 2019-05-24 20:27:09 +02:00
Alexander Köplinger f1a2264350 Use some remaining test .cs files from the ios-sources dir in the mono archive
Would be nice to get rid of this, but I don't have time right now.
2019-05-24 20:26:50 +02:00
Alexander Köplinger 581d19527b Add symlink that points to current mono sdks dir
Use that instead of an msbuild variable that won't work in VSMac.
2019-05-24 19:44:57 +02:00
Sebastien Pouliot 224593b46d [mmp] Update (not copy-on-change) the output of lipo
We can't assume that the cached `lipo` output is part of the `.app`
since the directory for the later could be different.

E.g. we build two .csproj in out `mmptest` inside the same directory
and they share the same `obj` directory (used for caching) but have
different output directories

```
./obj/Release/mmp-cache/libmono-native.dylib
./bin/Release/UnifiedExample.app/Contents/MonoBundle/libmono-native.dylib
./bin/Release/XM45Example.app/Contents/MonoBundle/libmono-native.dylib
```

Without an update building the XM45 project would not include the
**required** `libmono-native.dylib` library and would crash when
executed.
2019-05-24 11:51:17 -04:00
Manuel de la Pena 2a42a35ba4
[Tests] Ensure that if trsut exception is not raised we do not get a NRE. (#6130)
This might be a race issue when dealing with the trust of the certs,
there is not much information in
https://github.com/xamarin/maccore/issues/1645 except the fact that we
are getting a null exception.

In this fix, we will first ensure that we did get the exception, later
confirm the exception type. To improve the debugging of the test, next
time it fails, we will get the content string to try and understand what
happened with the validation (did we return part of the stream or
headers when we shouldn't?)
2019-05-24 07:28:08 -07:00
Rolf Bjarne Kvinge 45d93dafd0
[monotouch-test] Adjust expected value for watchOS bundle id. (#6128)
The watchOS bundle ID changed in fc5067ee67, and
the test failure wasn't caught properly.
2019-05-24 06:30:05 -07:00