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

6507 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 2d34cb259b Merge remote-tracking branch 'origin/master' into arm64_32-v3 2019-05-17 14:53:15 -07:00
Rolf Bjarne Kvinge 6ff6d313a2
[xharness] Don't run monotouch-test/interpreter for now. (#6067)
Works around https://github.com/xamarin/maccore/issues/1613.
2019-05-17 14:48:31 -07:00
Rolf Bjarne Kvinge 6b650d8364
[sample tests] Fix variable calculation to calculate once. (#6061)
Use simply expanded variable as test result filename, so that it's only
calculated once. This avoids ending up with different filenames when the
timestamp in the filename changes between calculations, such as:

    Results (nunit3) saved as /Users/vsts/agent/2.150.3/work/1/s/tests/sampletester/TestResult-20190511-100657.xml
    warning: failed to load external entity "TestResult-20190511-100658.xml"
    unable to parse TestResult-20190511-100658.xml
    make: *** [run-tests] Error 6
2019-05-17 09:21:00 -07:00
Ankit Jain 7dddfb657c [xibuild] Fix incorrect mscorlib.dll being used (#6068)
* [xibuild] Fix incorrect mscorlib.dll being used

The `GuiUnit_NET_4_5` project, when built with `xibuild` uses the wrong `mscorlib.dll`.

From https://github.com/xamarin/xamarin-macios/issues/5760#issuecomment-472457202 :

```
- mscorlib.dll is being used from mono/4.5 and the other system assemblies are from mono/4.5-api
- GuiNet* project is built with xibuild

What is happening here is:

	xibuild sets[1] `SetToolsetProperty ("TargetFrameworkRootPath", FrameworksDirectory + Path.DirectorySeparatorChar);`
	which points to `/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/xbuild-frameworks`.
	This causes $(FrameworkPathOverride) to be set[2] to `/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/xbuild-frameworks/.NETFramework/v4.5`,
	but that doesn't have a mscorlib.dll, so it gets reset[3] to /Library/Frameworks/Mono.framework/Versions/5.22.0/lib/mono/4.5/.

	If we don't set TargetFrameworkRoothPath, then we get `FrameworkPathOverride = /Library/Frameworks/Mono.framework/Versions/5.22.0/lib/mono/4.5-api`,
	causing `_ExplicitReference=/Library/Frameworks/Mono.framework/Versions/5.22.0/lib/mono/4.5-api/mscorlib.dll`(correct one) to be used.
```

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

1. https://github.com/xamarin/xamarin-macios/blob/master/tools/xibuild/Main.cs#L209
2. https://github.com/mono/msbuild/blob/xplat-master/src/Tasks/Microsoft.Common.CurrentVersion.targets#L79
3. https://github.com/mono/msbuild/blob/xplat-master/src/Tasks/Microsoft.Common.CurrentVersion.targets#L84

* Revert "Workaround https://github.com/xamarin/xamarin-macios/issues/5760 in generator csproj"

This reverts commit 9bd927bb7f.

The previous commit for xibuild removes the need for this.
2019-05-17 09:12:05 -07:00
Rolf Bjarne Kvinge d84c3a0892
[xharness] 'Skipped' really meant 'DeviceNotFound', so rename things to avoid confusion. (#6066) 2019-05-17 08:59:33 -07:00
Manuel de la Pena a1c19733d8
[XHarness] Ignore corlib on tvOS until mono fixes the test dlls. (#6063)
Test dlls are wrong so we will ignore them until mono fixes them.

Fixes: https://github.com/xamarin/maccore/issues/1611
Mono issue: https://github.com/mono/mono/issues/14497
2019-05-17 08:41:18 -07:00
Rolf Bjarne Kvinge 47beab425d Merge remote-tracking branch 'origin/master' into arm64_32-v3 2019-05-16 15:26:15 -07:00
Rolf Bjarne Kvinge b6f735c26b [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-16 15:24:51 -07:00
Chris Hamons 155bb924de
Revert "[launcher] Pass --use-map-jit to mono on XM app startup" (#6051)
- This reverts commit 2278512aba.
- This is no longer necessary due to https://github.com/mono/mono/pull/14395
2019-05-16 15:09:02 -07:00
Sebastien Pouliot 5fbf721957
[mmp] Fix compiler warning (#6064)
```
Tuning.cs(300,8): warning CS0108: 'LoadOptionalReferencesStep.ProcessReferences(AssemblyDefinition)' hides inherited member 'LoadReferencesStep.ProcessReferences(AssemblyDefinition)'. Use the new keyword if hiding was intended. [/Users/poupou/git/master/xamarin-macios/tools/mmp/mmp.csproj]
```

it's not virtual and it's not being called back annyway.
2019-05-16 16:44:08 -05:00
Manuel de la Pena eb64b377bb
[Xharness] Remove the System bcl tests on tvOS (#6062)
Until mono fixes the test dlls, we are ignoring the tests.

Silences: https://github.com/xamarin/maccore/issues/1610
2019-05-16 13:07:38 -07:00
Manuel de la Pena c9692c8e34
[XHarness] Support binlogs for the tests projects. Fixes #1604 (#6056)
Generate binlogs to ensure that we can easily debug msbuild failures.
2019-05-16 13:06:44 -07:00
Manuel de la Pena f2948b268e
[XHarness] Show when we have a watch HE0038 error. (#6060)
To simplify the life of the monitorer, if we get a crash with a HE0038
we will propagate the result to the html and will provide a link to the
issue so that it is easy to report it.
2019-05-16 13:05:19 -07:00
Sebastien Pouliot 4cfca09260
[foundation] Expose AllowsCellularAccess on NSUrlSessionHandler (#6059)
This property was always set to `true` but it can be useful to turn it
off (and that was not easy with the existing implementation)
2019-05-16 14:20:06 -05:00
Manuel de la Pena 762146a95c
[XHarness] Ignore IO flacky tests in devices too. (#6057) 2019-05-16 10:15:11 -07:00
Sebastien Pouliot 2121b703cd
[linker] Add the custom attributes removal step as an configurable optimization. Fix #3655 (#6049)
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 09:16:32 -07:00
Sebastien Pouliot c481aac216
[apidiff] Add q quick'n'dirty script to produce a diff between any two bundle.zip (#6050)
Use for producing API diff for release notes without waiting for a PR,
bots and/or approvals...

Also useful to produce API diff between any versions, not just between
the current revision and a baseline (last stable).
2019-05-15 12:46:38 -05:00
Vincent Dondain a48669ead5
[appkit] Make NSCell and NSControl 'Formatter' accept null (#6042)
- Fixes #6032: NSTextField.Formatter missing null-allowed
  (https://github.com/xamarin/xamarin-macios/issues/6032)
- Update 'NSObject Formatter' to 'NSFormatter'
2019-05-14 10:37:14 -07:00
Manuel de la Pena 81d6225eb7
[XHarness] Fix some issues in the BCL test generator. (#5938)
We had issues in the code that adds a type found in an assembly to
ensure that it was not removed by the linker. This resulted in some
assemblies having 0 tests.

Added the needed ignore for the corlib tests and system ones.
2019-05-11 12:03:38 +02:00
Rolf Bjarne Kvinge 9d31f99b96
Bump mono. (#6036)
New commits in mono/mono:

* 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..7361a4f01c
2019-05-10 15:52:18 +02:00
Rolf Bjarne Kvinge 8d6215f9ec Bump mono.
New commits in mono/mono:

* 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)

Diff: 7361a4f01c..f1aa58d9a9
2019-05-10 15:17:30 +02:00
Rolf Bjarne Kvinge 3a72377b70 [xharness] Don't run the mono-native-compat test on ARM64_32.
ARM64_32 only supports the unified native mode.
2019-05-10 11:28:22 +02:00
Rolf Bjarne Kvinge 3881b86f61 Bump mono.
New commits in mono/mono:

* 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

Diff: 7814ea810c..7361a4f01c
2019-05-10 11:28:22 +02:00
Rolf Bjarne Kvinge b67fa47edb Bump mono.
New commits in mono/mono:

* 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..7814ea810c
2019-05-10 11:28:22 +02:00
Rolf Bjarne Kvinge e3fc04a8a3 [tests][mtouch] Adjust Xamarin.Tests.ProductTests.MinOSVersion for watchOS/arm64_32 slices. 2019-05-10 11:28:22 +02:00
Rolf Bjarne Kvinge 76c2361965 [tests][mtouch] Adjust minOS version test for arm64_32. 2019-05-10 11:28:22 +02:00
Rolf Bjarne Kvinge adbc87ff1d [monotouch-test] LLVM's too smart for our tests, so ignore Symbols.FunctionNames when LLVM is enabled. 2019-05-10 11:28:22 +02:00
Rolf Bjarne Kvinge 1bf8ed3ebc [tests][mtouch] Add abi/architecture tests for arm64_32. 2019-05-10 11:28:22 +02:00
Rolf Bjarne Kvinge c4c17fa293 [monotouch-test] Adjust for arm64_32 abi. 2019-05-10 11:28:22 +02:00
Rolf Bjarne Kvinge b2c5c8689a [introspection] ARM64_32 adjustments. 2019-05-10 11:28:22 +02:00
Rolf Bjarne Kvinge 321c6e7a87 [xharness] Don't add Debug variations for arm64_32, we don't support it yet. 2019-05-10 11:28:22 +02:00
Rolf Bjarne Kvinge 2f8100d962 [xharness] Add ARM64_32 support. 2019-05-10 11:28:22 +02:00
Rolf Bjarne Kvinge bb09ab8a24 [generator] Treat arm64_32 as arm64 when dealing with objc_msgSend behavior. 2019-05-10 08:28:43 +02:00
Rolf Bjarne Kvinge e58a31ee84 [CoreGraphics] Fix CGColorConversionInfo on arm64_32. 2019-05-10 08:28:43 +02:00
Rolf Bjarne Kvinge 91a5dc29ae [ObjCRuntime] The NSLog_arm64 P/Invoke is now needed on watchOS (ARM64_32) too. 2019-05-10 08:28:43 +02:00
Rolf Bjarne Kvinge 9c3754b52f [msbuild] Make using the fake watchOS 4.3 SDK disabled by default.
Since we now have support for ARM64_32.
2019-05-10 08:28:43 +02:00
Rolf Bjarne Kvinge f272f69e3a [runtime] Enable the varargs dynamic trampolines for arm64_32.
The varargs dynamic is not even close to correct for arm64_32, but it's still
better than failing to compile the runtime.

A proper dynamic registrar for arm64_32 is much more complicated, in
particular because we can't use assembly code, so it will have to be
implemented later.
2019-05-10 08:28:43 +02:00
Bernhard Urban 4606d37d64 [build/runtime] Add build rules for arm64_32 2019-05-10 08:28:43 +02:00
Bernhard Urban 9dd2340972 [mtouch] Add support for arm64_32 2019-05-10 08:28:43 +02:00
Rolf Bjarne Kvinge 1a6deebb64 Add an 'arm64_32' capability. 2019-05-10 08:28:43 +02:00
Manuel de la Pena 0fc7cff218 [Jenkins] Do not run device tests in the internal jenkins instance. (#6034) 2019-05-10 08:25:14 +02:00
Rolf Bjarne Kvinge 6d8eba812d
[xharness] Show links to previous test runs in html report in server mode. (#6031)
* [xharness] Change url for server mode.

* [xharness] Show links to previous test runs in html report in server mode.

This makes it much easier to see what failed in a previous test run.
2019-05-10 07:40:45 +02:00
Ankit Jain 3a7bdc0a13 [msbuild] Add reference to `System.Drawing.Common.dll` to XI projects. (#6011)
* [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 01:20:52 +02:00
Rolf Bjarne Kvinge b31b02002e
[xharness] Flush the log after getting results from listing simulators/devices with mlaunch. (#6030)
Now constantly refreshing the device/simulator listing log will show the
output as mlaunch writes it, which makes the impatient me happier.
2019-05-09 21:38:43 +02:00
Rolf Bjarne Kvinge d657c723ee
[mtouch/mmp] Make the mono native mode a Target-specific variable. (#6028)
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-09 21:36:42 +02:00
Rolf Bjarne Kvinge 6eeb2201a9
[mtouch] Move string null/empty check into CompilerFlags.AddOtherFlag. (#6027) 2019-05-09 18:43:39 +02:00
Rolf Bjarne Kvinge c0d68b7e85
[xharness] Don't only build if asked to run using the UI. (#6026)
This makes it possible to run tests that are marked as 'BuildOnly' to see if
they've been fixed or not.

There's already a 'build' button if only a build is desired.
2019-05-09 18:22:35 +02:00
Manuel de la Pena de0691a22a
[XHarness] List the simulators and devices in the html. (#6020) 2019-05-09 15:12:52 +02:00
Rolf Bjarne Kvinge 6df96ffa9f
Merge pull request #6004 from rolfbjarne/xharness-old-simulators5
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.
2019-05-09 13:20:21 +02:00
Manuel de la Pena f2f345ac25
[VSTS] Ensure that the corrent tests are run on devices. (#6019)
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-09 13:06:49 +02:00