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

6431 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 40096a1eaf [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.
2019-05-31 06:32:58 +00:00
Rolf Bjarne Kvinge 16e1b85289 [tests] MTLFunctionConstantValues didn't have a default ctor until Xcode 9. 2019-05-31 06:32:58 +00:00
Rolf Bjarne Kvinge 96517671f6 [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.
2019-05-31 06:32:58 +00:00
Rolf Bjarne Kvinge 7856797b6a [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-30 07:13:47 +02:00
Rolf Bjarne Kvinge ff86152ecc [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-30 07:12:38 +02:00
Rolf Bjarne Kvinge 26d10477ec Fix availability correctly. 2019-05-29 19:27:21 +00:00
Rolf Bjarne Kvinge b3c3ad8724 Simplify nested usings. 2019-05-29 19:27:21 +00:00
Rolf Bjarne Kvinge cf4e9e45df Fix whitespace. 2019-05-29 19:27:21 +00:00
Rolf Bjarne Kvinge b88015eabc [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.
2019-05-29 19:27:21 +00:00
Rolf Bjarne Kvinge b79d5e89cc [tests] MTLFunctionConstantValues didn't have a default ctor until Xcode 9. 2019-05-29 19:27:21 +00:00
Rolf Bjarne Kvinge 6a4cdb6a6d [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.
2019-05-29 19:27:21 +00:00
monojenkins 72c4a8ab90 [xtro] Add new checker for '[return: Release]' attributes. Fixes #6014. (#6151)
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 10:10:39 -07:00
Rolf Bjarne Kvinge 4400ca4ac0
Bump mono. (#6134)
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-28 10:03:52 -07:00
monojenkins aab104dd1a [d16-2] [xharness] Don't use a dash in the bundle identifer for watchOS projects. (#6118)
* [xharness] Don't use a dash in the bundle identifer for watchOS projects.

It causes problems with the mscorlib test project, which can't be launched properly.

I'm not sure what's the underlying cause, but here are some of the symptoms:

* The watch app actually shows up fine on the device, but:
* mlaunch isn't notified about the new process, so it thinks the app didn't
  launch.
* The new process doesn't receive any environment variables we try to give it,
  which for instance means that it won't auto-start the tests upon launch.
* If we ask mlaunch to attach with lldb, mlaunch will ask watchOS to launch
  the process in a suspended state while lldb attaches. Yet the watch app
  shows up on the device as if not asked to be suspended upon launch.

It seems that the dash (I assume, because I haven't investigated this very
deeply, I just happened to find a solution that worked) makes watchOS launch
the app as if tapped, instead of launched from an IDE.

The strangest part is that this only happens with the mscorlib test project,
not any of the other test projects we run on the watch, and they all have
dashes in their bundle identifiers... yet replacing the dash with another
character (underscore, letter, removing it altogether) all made things work as
expected.

* [monotouch-test] Adjust expected value for watchOS bundle id.

The watchOS bundle ID changed in fc5067ee67, and
the test failure wasn't caught properly.
2019-05-24 08:47:02 -07:00
monojenkins 4aaa1858c8 [Jenkins] Do not run device tests in the internal jenkins instance. (#6111) 2019-05-24 08:46:37 -07:00
monojenkins f08d4e3ea8 [d16-2] [foundation] Add custom trust/certificate validation to NSUrlSessionHandler. Fix #4170 (#6110)
Basic application (size) for doing an `HttpClient.GetAsync`, release/llvm, 64bits only

- NSUrlSessionHandler (master): 6.4 MB
- NSUrlSessionHandler (PR#5936): 7.7 MB
- NSUrlSessionHandler (this PR): 6.4 MB

The size increase occurs because of the reference to .net `X509*` types.
This brings a lot of additional code, including managed cryptographic
code, inside the application - even when the feature is **not** used.

The solution is to expose an API that only use native (OS) types, which
are mostly already part of the application. This has a very low impact
on existing applications.

It's still possible to hook back to .NET validation if needed (it should
not in most cases) but, in this case, the extra price will only be
_paid_ if used (and can be lower if the code is needed by something else
from the application).

In comparison using other `HttpClient` handler produce app sizes of

- HttpClientHandler (managed): 10.4 MB
- CFNetworkHandler: 6.8 MB

Based on/supersede https://github.com/xamarin/xamarin-macios/pull/5733
Fix https://github.com/xamarin/xamarin-macios/issues/4170
2019-05-23 09:51:42 -05:00
Rolf Bjarne Kvinge 48430a7876
Merge pull request #6100 from rolfbjarne/arm64_32-d16-2
[d16-2] Implement support for ARM64_32. Fixes #4864.
2019-05-22 22:50:50 -07:00
Rolf Bjarne Kvinge 67eb2bce82 Bump mono.
New commits in mono/mono:

* mono/mono@16c6ac81b3 [interp] disable inlining for built-in types (#14531)
* mono/mono@1ce13bb09d [arm] one more attempt to fix slotsize issue on llvmonly (#14444) (#14535)
* mono/mono@bb3c9db497 [2019-02] [monodroid] Introduce 'win32 host' BCL build (#14504)
* mono/mono@ca17767758 [sdks] Set PATH in Android Windows SDK pipeline job (#14519)
* mono/mono@1cb80e7ecf [sdks] Set win-amd64 CI_TAGS for windows pipeline step (#14516)
* mono/mono@c857c27d2e [2019-02][sdks] Build Android SDK on Windows (#14472)
* mono/mono@ab378434b9 [2019-02][ci] Add Android Windows (Release) archive job to pipeline (#14503)

Diff: 06c3f55312..16c6ac81b3
2019-05-22 08:14:05 +02:00
Rolf Bjarne Kvinge 6228e49554 [tests] Link NUnit/XUnit watchOS extensions.
Makes them much smaller.
2019-05-22 08:13:31 +02:00
Rolf Bjarne Kvinge 2782ad3482 [tests] Fix reporting back to xharness for watchOS NUnit/XUnit tests.
* Choose the first hostname for the HttpTextWriter if there are multiple hosts.
* Open the HttpTextWriter before writing to it.
* Don't overwrite the http writer with another writer immediately after creating it.
* Close the HttpTextWriter when done writing.
* Wait for the HttpTextWriter to complete the final http request before exiting.
2019-05-22 08:13:25 +02:00
Rolf Bjarne Kvinge 3d0398f915 [monotouch-test] Don't go completely overboard when trying to fill the GC's nursery. 2019-05-22 08:13:22 +02:00
Rolf Bjarne Kvinge 99fddda71b Fix whitespace. 2019-05-22 08:13:17 +02:00
Rolf Bjarne Kvinge d2c4e4ac96 [xharness] Rework arm64_32 variations a bit so that they're not always enabled.
We don't want to try to run arm64_32 tests on bots that don't have devices
attached, so make sure they follow the logic of other device tests.
2019-05-22 08:12:56 +02:00
Rolf Bjarne Kvinge 281ea5f97d [xharness] Don't run the mono-native-compat test on ARM64_32.
ARM64_32 only supports the unified native mode.
2019-05-22 08:12:14 +02:00
Rolf Bjarne Kvinge c870d3303d [tests][mtouch] Adjust Xamarin.Tests.ProductTests.MinOSVersion for watchOS/arm64_32 slices. 2019-05-22 08:12:10 +02:00
Rolf Bjarne Kvinge 5cab1e8d57 [tests][mtouch] Adjust minOS version test for arm64_32. 2019-05-22 08:12:06 +02:00
Rolf Bjarne Kvinge 4fe3ce9ae9 [monotouch-test] LLVM's too smart for our tests, so ignore Symbols.FunctionNames when LLVM is enabled. 2019-05-22 08:12:03 +02:00
Rolf Bjarne Kvinge ab37943c84 [tests][mtouch] Add abi/architecture tests for arm64_32. 2019-05-22 08:11:59 +02:00
Rolf Bjarne Kvinge af1a8db426 [monotouch-test] Adjust for arm64_32 abi. 2019-05-22 08:11:56 +02:00
Rolf Bjarne Kvinge e4d01fee7f [introspection] ARM64_32 adjustments. 2019-05-22 08:11:52 +02:00
Rolf Bjarne Kvinge 969c8b8251 [xharness] Don't add Debug variations for arm64_32, we don't support it yet. 2019-05-22 08:11:44 +02:00
Rolf Bjarne Kvinge 4e9b69e870 [xharness] Add ARM64_32 support. 2019-05-22 08:06:44 +02:00
Rolf Bjarne Kvinge 0378b33aa6 [generator] Treat arm64_32 as arm64 when dealing with objc_msgSend behavior. 2019-05-22 08:06:41 +02:00
Rolf Bjarne Kvinge 2696403bd6 [CoreGraphics] Fix CGColorConversionInfo on arm64_32. 2019-05-22 08:06:38 +02:00
Rolf Bjarne Kvinge 4d87a74d8a [ObjCRuntime] The NSLog_arm64 P/Invoke is now needed on watchOS (ARM64_32) too. 2019-05-22 08:06:34 +02:00
Rolf Bjarne Kvinge 8face92f47 [msbuild] Make using the fake watchOS 4.3 SDK disabled by default.
Since we now have support for ARM64_32.
2019-05-22 08:06:30 +02:00
Bernhard Urban 06fcf59b78 [build/runtime] Add build rules for arm64_32 2019-05-22 08:05:40 +02:00
Bernhard Urban d26208422c [mtouch] Add support for arm64_32 2019-05-22 08:04:50 +02:00
Rolf Bjarne Kvinge 722b8e3864 Add an 'arm64_32' capability. 2019-05-22 08:04:47 +02:00
monojenkins a07ee9a973 [xharness] 'Skipped' really meant 'DeviceNotFound', so rename things to avoid confusion. (#6070) 2019-05-17 14:47:51 -07:00
monojenkins 987c309647 [xharness] Don't run monotouch-test/interpreter for now. (#6071)
Works around https://github.com/xamarin/maccore/issues/1613.
2019-05-17 14:47:08 -07:00
monojenkins d62978945d [d16-2] [linker] Add the custom attributes removal step as an configurable optimization. Fix #3655 (#6058)
This allows the optimization to be disabled in cases where one, or
many, a custom attribute(s) are required by the application at runtime.

While not ideal disabling this single step is much better than disabling
linking for the whole application.

A better approach is described in https://github.com/xamarin/xamarin-macios/issues/6048
but this configuration optimization makes sense independently of it.

Fix https://github.com/xamarin/xamarin-macios/issues/3655
2019-05-16 16:55:10 -05:00
Sebastien Pouliot b34393e680
[d16-2] Bump mono to head of 2019-02 (#6053)
New commits in mono/mono:

* mono/mono@06c3f55312 [sdks] Lipo arm64_32 binaries for watchOS
* mono/mono@0f69e27153 [sdks] Use -pathmap CSC option for iOS/Mac
* mono/mono@69fae70242 [WinForms] Related Forms closing issue (#13717)
* mono/mono@4fa246df3f [2019-02] [WinForms] fix EditingCellFormattedValue getter and setter for bool value (#14437)
* mono/mono@a55d1c9377 [2019-02] TextInfo.ChangeCase should not use CultureInfo.CurrentCulture (#14438)
* mono/mono@b41578079e [2019-02] Revert "[System] Add FSEvent FileSystemWatcher to monotouch BCL profile" (#14448)
* mono/mono@09429597dc [metadata] use handle stack in mono_runtime_object_init_handle (#14445)
* mono/mono@77ddc3abc1 [arm64] set MONO_ARCH_HAVE_UNWIND_BACKTRACE for watch4 (#14452)
* mono/mono@f1aa58d9a9 [2019-02] Do not allocate handles in ReleaseMutex. (#14428)
* mono/mono@382c836e7f Mutex memory leak on sgen GC (nursery, major).
* mono/mono@6ab15f2529 Usually do not create a handle in mono_runtime_invoke_handle. (#14423)
* mono/mono@7361a4f01c [llvmonly] make local copy of trace_ips pointer from exception object (#14409)
* mono/mono@7daf13e0d4 [2019-02] [runtime] Use MAP_JIT automatically when running under a hardened runtime on osx. (#14413)
* mono/mono@ca78977b31 [sdks] Add .cs source files to ios archive
* mono/mono@7814ea810c [sdks] Make sure the mono-version.txt directory exists
* mono/mono@f9cdf7b986 Bump helix-binaries
* mono/mono@238d4a71db A deadlock happens when during a process_suspend there is a pending invoke and then when it's calling the invoke there is another call to process_suspend in the same thread. (#14387)
* mono/mono@189b0c5c35 [sdks] Add Mono version to ios/mac archive
* mono/mono@ff46d6e49e [sdks] Fix wrong path
* mono/mono@2397d41abf [sdks] Add Mono binaries to mac archive

Diff: bc3791b0ff..06c3f55312
2019-05-16 16:54:36 -05:00
monojenkins 71334a51b3 [VSTS] Ensure that the corrent tests are run on devices. (#6052)
The change allows to state the tests that have to be ran. ATM with these
changes, the vsts pipeline must add the following to the env vars:

* tvOS device pipelines: Must add run-tvos-tests to the labels.
* iOS device pipelines: Must add run-ios-tests to the labels.

This will ensure that only the tests for the devices are ran and if the
tests pass we get a green build with no unexpected skips.
2019-05-16 12:57:45 -07:00
monojenkins daf5006281 [d16-2] [msbuild] Add reference to `System.Drawing.Common.dll` to XI projects. (#6035)
* [msbuild] Add reference to `System.Drawing.Common.dll` to XI projects.

Fixes https://github.com/mono/mono/issues/13483 :

```
@akoeplinger: Since we moved types from Mono.Android.dll and
Xamarin.iOS/WatchOS/TVOS.dll to System.Drawing.Common.dll user projects
would fail to compile. We need to add some msbuild logic to add a
reference to the assembly automatically.
```

* [msbuild] Implement the same fix for XM projects as well.

* [msbuild] Update Xamarin.iOS.Tasks.TargetTests.GetReferencedAssemblies_* tests.

We're including a new assembly, which means the
Xamarin.iOS.Tasks.TargetTests.GetReferencedAssemblies_* must be updated
accordingly.

Also modify these tests so that test assert that fails lists the actual
assembly that's missing, i.e. instead of this:

    1) Test Failure : Xamarin.iOS.Tasks.TargetTests.GetReferencedAssemblies_Executable
         #1
      Expected: 6
      But was:  7

we now print:

    1) Test Failure : Xamarin.iOS.Tasks.TargetTests.GetReferencedAssemblies_Executable
         References
      Expected: equivalent to < "mscorlib.dll", "MyLibrary.dll", "System.Core.dll", "System.dll", "System.Xml.dll", "Xamarin.iOS.dll" >
      But was:  < "mscorlib.dll", "MyLibrary.dll", "System.Core.dll", "System.dll", "System.Drawing.Common.dll", "System.Xml.dll", "Xamarin.iOS.dll" >

* [tests] Adjust Xamarin.MMP.Tests.AssemblyReferencesTests.ShouldNotAllowReference_ToSystemDrawing.

The test was verifying that referencing System.Drawing.dll and trying to use
System.Drawing.RectangleF would fail to compile (because System.Drawing.dll
shouldn't be resolved in this case).

The addition of System.Drawing.Common.dll breaks this assumption, because now
we ship System.Drawing.RectangleF, so the code that was supposed to fail to
compile works just fine instead.

So modify the test to verify that there's no System.Drawing.dll in the final
bundle.

* Remove workarounds for mono/mono#13483.

* [msbuild] Create a way out if automatically referencing System.Drawing.Common.dll causes problems.

* [msbuild] Adjust variable name and boolean logic according to review.
2019-05-10 16:16:01 +02:00
Rolf Bjarne Kvinge 557d435844
Fix mlaunch build. (#6038)
An mlaunch fix in master required a code change in xamarin-macios; when
backporting this mlaunch fix to d16-2 the corresponding xamarin-macios fix was
not, causing the build to break.

Fixes this:

    [...]
    Build FAILED.

    "/Users/builder/jenkins/workspace/xamarin-macios/maccore/tools/mlaunch/Xamarin.Hosting/Xamarin.Hosting.sln" (default target) (1) ->
    "/Users/builder/jenkins/workspace/xamarin-macios/maccore/tools/mlaunch/Xamarin.Hosting/Xamarin.Hosting.csproj" (default target) (2) ->
    (CoreCompile target) ->
      /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/tools/common/MachO.cs(10,15): error CS0234: The type or namespace name 'Bundler' does not exist in the namespace 'Xamarin' (are you missing an assembly reference?) [/Users/builder/jenkins/workspace/xamarin-macios/maccore/tools/mlaunch/Xamarin.Hosting/Xamarin.Hosting.csproj]

        0 Warning(s)
        1 Error(s)

    Time Elapsed 00:00:03.63
    make[3]: *** [Xamarin.Hosting/Xamarin.Launcher/bin/Debug/mlaunch.app] Error 1
2019-05-10 15:40:51 +02:00
monojenkins 2d8396d0a0 [mtouch/mmp] Make the mono native mode a Target-specific variable. (#6037)
The arm64_32 slice for watchOS apps will always use the 'unified' mode, while
the armv7k can be both 'unified' and 'compat' depending on the deployment
target, so we need to keep track of this per Target.

This PR does not change anything related to arm64_32, that will come in a
later PR.
2019-05-10 15:40:17 +02:00
Rolf Bjarne Kvinge 7348c3f27d
Merge pull request #6024 from rolfbjarne/xharness-old-simulators-d16-2
[d16-2] Add support for running tests with the earliest possible simulator, and use it for introspection tests.

* Add support for running tests with the earliest possible simulator
  (currently iOS 8.1, tvOS 9.1 and watchOS 2.0).
* Make the introspection tests run with the earliest possible simulator.
* Fix several binding issues (mostly missing availability attributes), and a
  couple of issues in the introspection tests themselves.

Reference: https://github.com/xamarin/xamarin-macios/issues/3668.

This is a backport of #6004, since it will probably be useful for the next Xcode release.
2019-05-10 08:23:57 +02:00
Rolf Bjarne Kvinge 55df161d6a Merge remote-tracking branch 'origin/d16-2' into xharness-old-simulators-d16-2 2019-05-09 21:44:26 +02:00
monojenkins f5561c2a24 [xharness] Fix finding labels in pull requests. (#6025)
Looks like this regressed in
61bf0db817 (diff-b01110f512ec4a442e37213063a11758R39);
since then no manual labels have been applied to test runs in public jenkins.
2019-05-09 21:44:07 +02:00