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

2653 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 27e8c737f4 [xharness] Rename MacTarget.Mobile to MacTarget.Modern. 2019-06-20 10:36:15 +02:00
Rolf Bjarne Kvinge 49e62ec992 [xharness] Unify some code. 2019-06-20 10:36:15 +02:00
Rolf Bjarne Kvinge b5dc6201dd [xharness] Move *TestProject.BCLInfo and *TestProject.MonoNativeInfo to their base class. 2019-06-20 10:36:15 +02:00
Rolf Bjarne Kvinge d9cf090a65 [xharness] Rename MacUnifiedTarget to MacTarget.
Everything is Unified now, so specifying it is redundant.
2019-06-20 10:36:15 +02:00
Rolf Bjarne Kvinge aaf29c559f [xharness] Incorporate MacTarget into MacUnifiedTarget.
Since there's no MacClassicTarget anymore, we don't need the intermediate
class.
2019-06-20 10:36:15 +02:00
Rolf Bjarne Kvinge bdb67b0514 [xharness] Improve ProjectFileExtensions.FixInfoPListNode.
* Share code with GetInfoPListInclude to find the same Info.plist nodes, so
  that FixInfoPListNode also finds existing nodes whose names isn't
  "Info.plist".
* Add support for specifying the new Info.plist name.
2019-06-20 10:36:15 +02:00
Rolf Bjarne Kvinge 0eff97976a [xharness] Refactor/rename TestPlatform fields.
Rename TestPlatform fields to be more in line with the rest of the code, and
drop the Unified prefix, since everything is Unified now.

* Unified -> Modern
* UnifiedXM45 -> Full
* UnifiedSystem -> System
2019-06-20 10:36:14 +02:00
Rolf Bjarne Kvinge ea55923f54 [tests] Simplify a few [Intermediate]OutputPaths.
Everything is Unified now, so no need to add it to the output path anymore to
make distinguished project output.
2019-06-20 10:36:14 +02:00
Rolf Bjarne Kvinge 29157da73e Cleanup .gitignores. 2019-06-20 10:36:14 +02:00
Rolf Bjarne Kvinge 523349bf69 Merge remote-tracking branch 'origin/d16-2' into xcode11-bump-mono-d16-2 2019-06-20 10:27:04 +02:00
Sebastien Pouliot e6b8f0e9e6
[corenfc] Update for Xcode 11 beta 1 (#6370)
There was no changes in beta 2

There's a generator issue https://github.com/xamarin/xamarin-macios/issues/6366
that prevent a fully correct `NFCNdefTag` protocol
2019-06-19 19:11:55 -04:00
Rolf Bjarne Kvinge f9d39c640b
Merge pull request #6164 from monojenkins/backport-pr-6159-to-d16-2
[d16-2] [Metal] Sprinkle [return: Release] on all 'new*' selectors. Fixes #5941.
2019-06-19 17:29:43 +02:00
Rolf Bjarne Kvinge 14cac96c90
[d16-2] Bump VSMac to 8.1.0.2742 to fix msbuild issues (#6279) (#6361)
* Bump VSMac to 8.1.0.2742 to fix msbuild issues (#6279)

* Bump VSMac to 8.1.0.2742 to fix msbuild issues

This is required to get the support for the msbuild `ToolsVersion`
change from `15.0` to `Current`.

* [tests][msbuild] Fix Binding resources test with updated msbuild

Test failure with updated msbuild and vsmac 8.1:

```
Xamarin.iOS.Tasks.NativeReferencesNoEmbedding("iPhone").ShouldNotUnnecessarilyRebuildBindingProject(True)
     Binding project build did not create package?
  Expected: True
  But was:  False

at Xamarin.iOS.Tasks.NativeReferencesNoEmbedding.ShouldNotUnnecessarilyRebuildBindingProject (System.Boolean framework) [0x000a0] in <74b8f7d8a53e40109916d305bb4d7403>:0
at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo cul
ture) [0x0006a] in <0519fa732e8845b6a809ce9180f541db>:0
```

The test builds the project multiple times. Before the 3rd build, the project
file's timestamp is updated and expects that the binding package will be
rebuilt. But it is not, because the target `_CreateBindingResourcePackage`
doesn't depend on that project file. So, add that to the target inputs.

* [nuget] Use xibuild to run nuget

Fix errors seen during `nuget restore` for tests:

```
Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/xammac_tests/xammac_tests.csproj(213,3): error MSB4024: The imported project file "/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac/Xamarin.Mac.CSharp.targets" could not be loaded. Could not find file "/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac/Xamarin.Mac.CSharp.targets"
```

* [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.

* [xibuild] Handle "incorrectly" cased msbuild property names  (#6202)

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`.

Fixed to ignore case.

Fixes https://github.com/mono/mono/issues/14765 .
2019-06-19 17:28:01 +02:00
Sebastien Pouliot 50701e6e94
[coreimage] Add new CoreImage filters from Xcode 11 beta 2. Fixes #6340 (#6358)
Update intro tests to generate bindings with more comments - which makes
it easier to bind `NSNumber` to the correct/better .net type.

https://github.com/xamarin/xamarin-macios/issues/6340
2019-06-19 05:26:40 -07:00
Sebastien Pouliot 0d5c664779
[usernotifications] Update for Xcode 11 beta 1 (#6355)
No changes in beta 2
2019-06-19 05:24:43 -07:00
Rolf Bjarne Kvinge 626a859a46
[xcode11] Fix several issues to make the mtouch tests pass. Fixes #6259. (#6332)
* [tests] Minor refactor to get better Xcode version parsing.

* Rename Configuration.XcodeVersion to XcodeVersionString.
* Add Configuration.XcodeVersion a parsed Version instane of XcodeString.

* [tests] Ignore all 'MT0099: Not linking with WatchKit because Xcode 11 beta 1' warnings in tests.

* [tests] Adjust min OS version tests for Xcode 11b1.

* [tests] Adjust tests for changes in 'nm' output.

* [tests] Adjust tests for name changes in Clang.

* [tests] Adjust tests for changes in ld warning format.

* [msbuild] 'metal' and 'metallib' aren't in PATH anymore, so use xcrun to execute them.

* [msbuild] Fix DevicePlatformBinDir for the Metal and MetalLib targets on iOS.

Also set the SDKROOT variable, otherwise metal and metallib don't work
properly, and revert the previous attempt at a fix (use xcrun).

* [tests] Simplify version parsing code to not version parse anymore.

* [tests] Add FIXME for once Apple fixes the WatchKit disappearance.
2019-06-19 07:20:02 +02:00
Sebastien Pouliot 53e25cc54a
[wkwebkit] Update for Xcode 11 beta 2 (#6354) 2019-06-18 18:00:35 -07:00
Sebastien Pouliot fee66b3505
[coregraphics] Update for Xcode 11 beta 1 and 2 (#6337)
along with unit tests for p/invokes
2019-06-18 17:59:08 -07:00
Vincent Dondain a797ea1fd3
Bump for Xcode 11 beta 2 (#6341)
- [tests] Fix PassKit monotouch-test
2019-06-18 15:34:07 -04:00
Rolf Bjarne Kvinge 9be8fdeb7b
[xharness] Automatically enable tests on older simulators if we're using a beta Xcode. (#6334)
Usually it's when working on beta Xcodes we make mistakes that only show up
when running on older simulators (and devices):

* Missing/wrong availability attributes.
* Tests for new API that don't check the OS if that API is available.

So automatically enable the tests on older simulators for PR builds when using
a beta Xcode.
2019-06-17 19:15:41 +02:00
Rolf Bjarne Kvinge 2fe7377003
[tests] Remove 32-bit Xamarin.Mac tests (both Classic and Unified). (#6301)
* [tests] Remove 32-bit Xamarin.Mac tests (both Classic and Unified).

We're removing support for 32-bit Xamarin.Mac apps (#6300), which means we
don't need to run the tests anymore.

This part of the implementation for #6300, I'm starting with the tests because
some of our XM/Classic tests are failing and making the bots unnecessarily red
(since we'll remove XM/Classic support anyway). Also CI will be faster if we
don't run these tests.

* [mmptest] Fix build.

* [tests] Fix build for mono-native-mac.csproj.
2019-06-17 08:03:58 +02:00
Sebastien Pouliot 99b2248284
Merge pull request #6306 from rolfbjarne/xcode11-monotouch-test
[monotouch-test] Make monotouch-test green with Xcode 11 beta 1.
2019-06-14 23:05:00 -04:00
Sebastien Pouliot 89606f49a0
[wkwebkit] Update for xcode 11 beta 1 (#6292) 2019-06-14 15:45:58 -04:00
Rolf Bjarne Kvinge 8e4067d486 [monotouch-test] Fix another case of Photos framework's problems. 2019-06-14 20:02:27 +02:00
Rolf Bjarne Kvinge f0958ac24f [monotouch-test] Workaround issue with UIPasteboard.General.Images.
Ref: 71f9341c59
Ref: https://github.com/xamarin/xamarin-macios/issues/6254
2019-06-14 20:02:27 +02:00
Rolf Bjarne Kvinge 1d85078962 [monotouch-test] Adjust tests to cope with changes in Xcode 11 beta 1. 2019-06-14 20:02:27 +02:00
Sebastien Pouliot 46dcdb40fd
[tests][intro] Enable (most) IOSurface API checks on simulator (#6290)
Reading thru header's diff hinted that IOSurface is now available to
the simulators.
2019-06-14 13:09:16 -04:00
Sebastien Pouliot 00ba38035f
[devicecheck] Update for xcode 11 beta 1 (#6286)
Added support for macOS 10.15 and for iOS simulator (>= 13)
2019-06-13 20:09:34 -04:00
Sebastien Pouliot 77399cb238
[watchconnectivity] Update for xcode 11 beta 1 (#6283)
Add new API for CompanionApp (watchOS only)
2019-06-13 16:44:54 -04:00
Sebastien Pouliot 1b02f0f616
[tests] Fix monotouch-test for "iOS Unified 32-bits - simulator" | "Release (all optimizations)" (#6281)
Photos.framework headers are broken in Xcode 11 beta 1 [1]. Optimizations
fails since the static registrar skip over the type [2]

```
	[FAIL] PHLivePhotoEditingContextTest.Linker : ObjCRuntime.RuntimeException : Can't register the class Photos.PHContentEditingInput when the dynamic registrar has been linked away.
		  at ObjCRuntime.Class.GetClassHandle (System.Type , System.Boolean , System.Boolean& ) [0x000de] in <d93fa0efd60442128943a9eb0e82eb8d>:0
		  at ObjCRuntime.Class.GetClassHandle (System.Type ) [0x00000] in <d93fa0efd60442128943a9eb0e82eb8d>:0
		  at ObjCRuntime.Class.GetHandle (System.Type ) [0x00000] in <d93fa0efd60442128943a9eb0e82eb8d>:0
		  at Foundation.NSObject.AllocIfNeeded () [0x00019] in <d93fa0efd60442128943a9eb0e82eb8d>:0
		  at Foundation.NSObject..ctor (Foundation.NSObjectFlag ) [0x00006] in <d93fa0efd60442128943a9eb0e82eb8d>:0
		  at Photos.PHContentEditingInput..ctor () [0x00000] in <d93fa0efd60442128943a9eb0e82eb8d>:0
		  at MonoTouchFixtures.Photos.PHLivePhotoEditingContextTest.Linker () [0x00001] in <6e792af97a28410a80fa790ecfb26b9c>:0
		  at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
		  at System.Reflection.RuntimeMethodInfo.Invoke (System.Object , System.Reflection.BindingFlags , System.Reflection.Binder , System.Object[] , System.Globalization.CultureInfo ) [0x0006a] in <3440dfbcd957471aabeed02fbc939d2a>:0
PHLivePhotoEditingContextTest : 2 ms
```

references
[1] https://github.com/xamarin/xamarin-macios/issues/6212
[2] 60a5392d35
2019-06-13 13:15:28 -04:00
Sebastien Pouliot d071568030 Merge branch 'xcode11' into mandel-macaque-xcode11-build-mono 2019-06-12 21:29:03 -04:00
Sebastien Pouliot dec78af591
[foundation] Fix NSCopying.Copy - the biggest offender of not releasing its return value (#6271)
Manual backport of https://github.com/xamarin/xamarin-macios/pull/6230

and part of https://github.com/xamarin/xamarin-macios/pull/6171 to get PR green
2019-06-12 16:02:04 -07:00
monojenkins 4c6ea0d2c3 [d16-2] [Tests] Try different urls before failing the test. (#6265)
Use a list of urls to try several times.

Related issue: https://github.com/xamarin/maccore/issues/1725
2019-06-12 12:45:22 -07:00
Sebastien Pouliot 2b7601ef8d [xtro] Create .todo files for new Xcode11 beta 1 API (so they won't be reported as error anymore) 2019-06-12 15:42:22 -04:00
Sebastien Pouliot 71f9341c59 [tests][link all] Workaround issue with UIPasteboard.General.Images
ref: https://github.com/xamarin/xamarin-macios/issues/6254
2019-06-12 13:57:51 -04:00
Sebastien Pouliot afe96ef09b Merge branch 'xcode11' into mandel-macaque-xcode11-build-mono 2019-06-12 10:49:59 -04:00
Rolf Bjarne Kvinge d3c60e516b
[xharness] Backport a few changes to get HE0038 reporting. (#6272)
* [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.

* [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.

* [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-06-12 16:47:15 +02:00
Sebastien Pouliot 6a852fdcc2
Merge pull request #6209 from spouliot/xcode11-backport-xtro
[tests] Backport xtro changes to xcode11
2019-06-12 06:35:34 -07:00
Sebastien Pouliot 87ed9ebfd4
[xtro] Exclude some frameworks that cause issues with sharpie on macOS 10.15 (#6207)
Also merge new `MPSNDArray` into its parent `MetalPerformanceShaders`
and use a `SortedSet` to avoid ending up with both `PdfKit` and `PDFKit`
2019-06-12 06:31:59 -07:00
Sebastien Pouliot 34096129e3 [tests][xtro] Update ignore files (largely Apple fixes in the SDK headers) 2019-06-12 01:13:15 -04:00
Sebastien Pouliot fb72e516e8 Merge branch 'xcode11' into xcode11-backport-xtro 2019-06-12 00:49:18 -04:00
Sebastien Pouliot e826d1d8a6 Merge xcode11 head 2019-06-12 00:44:31 -04:00
Sebastien Pouliot a71703a624 [tests][intro] Fix new failures using Xcode11 - some (protocols) might be changes in the public API 2019-06-12 00:27:40 -04:00
Sebastien Pouliot dd142561a1 [tests] Add support to check for Xcode 11.0 and macOS 10.15 from tests/attributes 2019-06-12 00:26:23 -04:00
Sebastien Pouliot b7cf2d3695 [tests][intro] Fix an alternative glyph name that works on iOS 13 2019-06-12 00:25:32 -04:00
Sebastien Pouliot eb33ed7a95 [generator] Forward more [return: Release] attributes to generated code.
Manual backport of https://github.com/xamarin/xamarin-macios/pull/6171
2019-06-12 00:24:20 -04:00
Sebastien Pouliot bf44459d8a Merge branch 'd16-2' into xcode11-d16-2-20190611 2019-06-11 13:23:04 -04:00
monojenkins 9b9e57b80d [monotouch-test] Ignore MessageHandlerTest.RejectSslCertificatesServicePointManager on macOS 10.10. (#6219)
This works around (but doesn't fix) https://github.com/xamarin/maccore/issues/1645.
2019-06-07 14:25:26 -07:00
Rolf Bjarne Kvinge 2e295036db [xtro] 'raw' files might not exist. (#6191)
If we just fixed all the entries in the corresponding '*.ignore' file, there
won't be a '*.raw' file.
2019-06-05 09:57:49 -07:00
Rolf Bjarne Kvinge 309da40ee4 [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-06-05 09:57:42 -07:00
monojenkins e27067ab30 [d16-2] [xharness] Don't report tests whose device were not found if there were no such tests. (#6169) 2019-06-03 22:47:41 +02:00
Rolf Bjarne Kvinge 62eb97d618 [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-31 06:32:58 +00:00
Rolf Bjarne Kvinge 7f4d8529a1 Fix availability correctly. 2019-05-31 06:32:58 +00:00
Rolf Bjarne Kvinge 9ed942659d Simplify nested usings. 2019-05-31 06:32:58 +00:00
Rolf Bjarne Kvinge 222a482fea Fix whitespace. 2019-05-31 06:32:58 +00:00
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 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
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 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
Bernhard Urban d26208422c [mtouch] Add support for arm64_32 2019-05-22 08:04:50 +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
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 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
Rolf Bjarne Kvinge 5cb3554518 [introspection] A few tweaks for iOS 8.1 / tvOS 9.0 / watchOS 2.0. 2019-05-09 13:24:43 +02:00
Rolf Bjarne Kvinge f53f602590 [xharness] Don't throw NRE if a simulator doesn't exist.
We automatically create simulators when needed, but it won't work if the
simulator runtime isn't installed. So handle the case where a test might not
have a simulator to execute in correctly.
2019-05-09 13:23:52 +02:00
Rolf Bjarne Kvinge 80d69516ae [xharness] Group simulator tasks by simulator UDID instead of platform.
Since we may have multiple simulators for each platform now.
2019-05-09 13:23:49 +02:00
Rolf Bjarne Kvinge beb60f2439 [xharness] Make old simulator tests opt-in by using a github label. 2019-05-09 13:23:45 +02:00
Rolf Bjarne Kvinge d69bd7f37f [xharness] Verify that tasks can be run in aggregated mode.
If tasks can't be run (because there aren't any available simulators), then
the task will now fail gracefully with a useful failure message.
2019-05-09 13:23:38 +02:00
Rolf Bjarne Kvinge f7796e1eee [xharness] Add support for running tests with the earliest possible simulator, and use it for introspection tests. 2019-05-09 13:23:34 +02:00
monojenkins 42154df8f3 [sampletester] Bump prebuilt-apps hash. (#6017)
Bump prebuilt-apps hash to get fix for https://github.com/xamarin/prebuilt-apps/pull/31.
2019-05-09 06:29:39 +02:00
Rolf Bjarne Kvinge 7b390683d2
Merge pull request #5966 from monojenkins/backport-pr-5963-to-d16-2
[d16-2] Fix/improve marshalling of out/ref parameters, arrays, Classes and Selectors. Fixes #5171.
2019-05-06 07:27:56 +02:00
monojenkins 2d82bd6c68 [tests] Fix another race condition in the MT5211 mtouch test. Fixes xamarin/maccore#1584. (#5973)
This is the second part to 9882746e37.

Fixes https://github.com/xamarin/maccore/issues/1584.
2019-05-01 13:12:51 -04:00