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

4081 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge f79efc29f6 [tests] Fix template projects to use Touch.Client. 2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge 1cc265838a [xharness] Add the Touch.Client projects to our solutions instead of MonoTouch.NUnitLite. 2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge e4aaf6a8d6 [xharness] Change how we run macOS unit tests to work with Touch.Client.
This is very similar to how we run iOS unit tests.
2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge fcb8446eb5 [tests] Remove dead code related to GuiUnit and the GuiUnit submodule. 2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge dcfa5015cc [tests] Update Xamarin.Mac tests to use Touch.Client and the official NUnit[Lite]. 2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge 0a5b72d64b [tests] Update attributes in tests according to breaking changes in NUnit[Lite]. 2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge 4a8cd19f93 [tests] Move the TestRuntime class out of MacTestMain.cs.
This makes it easier to re-use the TestRuntime code together with other Main implementations.
2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge 349a6b6d5a [xharness] Add support for generating/duplicating projects with a Touch.Client reference.
This also means removing support for generating/duplicating MonoTouch.NUnit references,
since we're not using those anymore.
2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge a528c4e869 [monotouch-test] Update setting the default floating point tolerance to how it's done in the official NUnitLite. 2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge 4cee581ba5 [tests] Use Assert.IsInstanceOf instead of Assert.IsInstanceOfType.
The latter doesn't exist anymore in the official NUnitLite.
2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge f516fcfb07 [tests] Use the Does.[BeginWith|Contain|EndWith] constraints instead of the Is.[StringStarting|StringContaining|StringEnding] constraints.
The latter don't exist in the official NUnitLite anymore.
2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge 191ad80088 [tests] [linksdk] Add a dummy interface for an interface provided by our old NUnitLite.
It didn't look like this interface was used anywhere expect to check for its
presence, so just provide another, identically named, interface.
2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge 99081123a7 [tests] Update a few TestCase attributes to be compatible with official NUnitLite. 2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge b7db211e2d [tests] Use MonoTouch.Dialog from NuGet and Touch.Client instead of MonoTouch.NUnit.
* Touch.Client references the official NUnitLite package, which means we're using
  a non-forked version of NUnit.

* This makes it easier for our .NET 5 effort, since we won't have to port an ancient
  version of NUnitLite to .NET 5 (nor will we have to keep using it in our existing
  code, we can use more modern NUnit patterns).

* Reference MonoTouch.Dialog from the NuGet package. This also eases the .NET 5 effort,
  since we won't have to port MonoTouch.Dialog to .NET 5 (we'll probably still do it
  though at some point, but it doesn't have to be done right away), nor build it
  ourselves / ship it.
2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge 7df8652579 Update .gitignore. 2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge 77771f7893
[xharness] Don't try to parse a build log that doesn't exist. (#9253) 2020-07-31 19:32:33 +02:00
Rolf Bjarne Kvinge 1e6e17cb2d
[xharness] Resolve relative project references using the referencing project's directory. (#9252)
Otherwise it would end up being resolved from the current directory, which is
not dependable.
2020-07-31 16:50:34 +02:00
Rolf Bjarne Kvinge cc06a93976
[xharness] Mark the .NET tests project as a .NET project so that we don't try to call nuget restore on it. (#9251)
* [xharness] Mark the .NET tests project as a .NET project so that we don't try to call nuget restore on it.

* [xharness] Mark the .NET generator project as a .NET project as well.
2020-07-31 16:50:10 +02:00
Rolf Bjarne Kvinge 30650b5f87
[tests] Switch msbuild-mac and mmptest to use package references. (#9246)
And don't specify the solution path anymore, because we can restore using just
the csproj just fine now.
2020-07-31 15:20:50 +02:00
Rolf Bjarne Kvinge e3cb32c23b
[tests] Switch msbuild-mac to use package references. (#9245)
And don't specify the solution path anymore, because we can restore using just
the csproj just fine now.
2020-07-31 11:20:09 +02:00
Rolf Bjarne Kvinge 43102c09bf
[tests] Migrate the sample tests to use package references. (#9244) 2020-07-31 11:19:57 +02:00
Whitney Schmidt c999bd5f57
[HealthKit][Xcode12] Update beta 1 (no b2, b3 changes) (#9249)
* HealthKit updates for Xcode12
2020-07-30 16:41:38 -04:00
Rolf Bjarne Kvinge 631073dafe
[xharness] Improve restoring NuGets for Xamarin.Mac projects in the makefile by depending on the csproj files in addition to the packages.conf files. (#9242)
Packages are listed in the csproj when we're using package references.

Also only list files in git, otherwise we pick up all the generated project files as well.
2020-07-30 17:00:41 +02:00
Rolf Bjarne Kvinge 28e3e2c5b6
[tests] Migrate Xamarin.Mac template projects to use package references. (#9241) 2020-07-30 16:21:10 +02:00
Rolf Bjarne Kvinge 2e59986723
[tests] Migrate the generator tests to use package references. (#9239) 2020-07-30 16:20:39 +02:00
Rolf Bjarne Kvinge ab90bb7a95
[tests] Migrate the mtouch test project to use package references. (#9238) 2020-07-30 16:19:58 +02:00
Rolf Bjarne Kvinge d304198536
[xharness] Make restoring nugets the default for all test projects. (#9237)
But don't do it for .NET projects, since 'dotnet build' automatically restores.
2020-07-30 16:19:53 +02:00
Rolf Bjarne Kvinge 6d26688d1e
[tests] mmptest doesn't need to include MacTestMain.cs (#9236)
Because mmptest is a library, not an executable.
2020-07-30 16:19:41 +02:00
Rolf Bjarne Kvinge dc2404de51
[tests] Migrate the xtro sharpie project to use package references. (#9240)
This also bumps Mono.Cecil to the latest available version (that way we use
the same version as in other tests).
2020-07-30 16:19:08 +02:00
Alex Soto b3194f5d57
[UIKit] Update bindings to Xcode 12 Beta 3 (#9224)
* [UIKit] Update bindings to Xcode 12 Beta 3

* Update src/uikit.cs
2020-07-30 09:39:52 -04:00
Alex Soto 3107356250
[Intents] Update bindings from Xcode 12 Beta 1 to Beta 3 (#9220)
* [Intents] Update bindings from Xcode 12 Beta 1 to Beta 3

* Apply suggestions from code review

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>

* Implement feedback

* Fix more feedback

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-07-30 09:36:59 -04:00
Alex Soto 4d23d42ea3
[AppKit] Update bindings to Xcode 12 Beta 3 (#9232) 2020-07-30 09:33:29 -04:00
Manuel de la Pena e821b2708a
[CoreMIDI] Add support for Xcode 12 beta 3. (#9125) 2020-07-29 16:51:45 -04:00
Sebastien Pouliot c7f6ca0506
[mediaplayer] Update for Xcode 12 beta 3 (#9214)
tvOS mostly catch up with (much older) iOS changes
2020-07-29 13:36:43 -04:00
Sebastien Pouliot e8de7afd4d
[mlcompute] New Xcode 12 framework. Up-to-date with beta 3 (#9208)
Framework not shipped for iOS/tvOS simulators - even if it's available
on macOS...

Feedback FB8132074 / https://github.com/xamarin/maccore/issues/2271
2020-07-28 20:55:28 -04:00
Whitney Schmidt 8fc88096ad
Revert "[Xcode12] HealthKit b1 update (#9152)" (#9217)
This reverts commit 74e8421f2c.
2020-07-28 14:04:31 -04:00
Whitney Schmidt 74e8421f2c
[Xcode12] HealthKit b1 update (#9152)
* HealthKit updates for beta 3
2020-07-28 14:03:56 -04:00
Rolf Bjarne Kvinge 988edad1d3
[tests] Skip 32-bit iOS tests in the simulator, because the 32-bit iOS simulator is broken. (#9201) 2020-07-28 14:19:39 +02:00
Rolf Bjarne Kvinge a3a9cf1558 [tests] Update the list of .apps to package. 2020-07-28 08:42:07 +02:00
Whitney Schmidt 0f7aa312e1
[CoreVideo][Xcode12] Update through beta 3 (#9209)
* corevideo changes
2020-07-27 19:44:37 -04:00
Whitney Schmidt 0e4749c207
[Xcode12][GameKit] Update for beta 1-2 (#9126)
* initial gamekit commit for xcode12
2020-07-27 11:12:02 -04:00
Chris Hamons b101d7e8b9
Add support for arbitrary extensions to be bundled in XI/XM apps (#9048) (#9107)
- This commit adds a hook, "AdditionalAppExtensions", to the msbuild to allow
extensions written in other languages, such as Swift, to be embedded and signed in an
Xamarin App bundle easily.
- Example:
<AdditionalAppExtensions Include="$(MSBuildProjectDirectory)/../../native">
	<Name>NativeTodayExtension</Name>
	<BuildOutput Condition="'$(Platform)' == 'iPhone'">build/Debug-iphoneos</BuildOutput>
	<BuildOutput Condition="'$(Platform)' == 'iPhoneSimulator'">build/Debug-iphonesimulator</BuildOutput>
</AdditionalAppExtensions>
2020-07-27 09:27:19 -05:00
Rolf Bjarne Kvinge 815de988d3 [xharness] If we're not generating projects in the Target class, the project path equals the template path. 2020-07-27 11:31:19 +02:00
Rolf Bjarne Kvinge b5a1251592 Merge remote-tracking branch 'origin/main' into xharness-a-directory-per-project 2020-07-27 11:20:16 +02:00
Alex Soto 5289facd04 [xcode11.6] Bump to final version of Xcode 11.6 (#9112) 2020-07-26 18:27:06 -04:00
Alex Soto f9c2a62127 [MetalPerformanceShaders] Neural Networks Update to Xcode 11 (#8844)
* [MetalPerformanceShaders] Neural Networks Update to Xcode 11

This includes updates from PRs xamarin/xamarin-macios#6932, xamarin/xamarin-macios#6935 and xamarin/xamarin-macios#7461

It adds new functionality to the neural network components.
This is still not the complete API for 11.3

* Update src/metalperformanceshaders.cs

Co-Authored-By: Rolf Bjarne Kvinge <rolf@xamarin.com>

* Make changes requested by @rolfbjarne

* Fix binding of default random distribution creation

The parameterless function creates new
default distributions and is not a property.
It is a counterpart of CreateUniform.

* Expose public APIs for MPSCnnConvolutionTransposeNode

These APIs are public and documented at: https://developer.apple.com/documentation/metalperformanceshaders/mpscnnconvolutiontransposenode/2942641-initwithsource?language=objc

I have also tested that they work.

* Reintroduce compat API.

* Fix acronym casing.

* Fix introspection tests.

* Fix xtro.

* One last xtro issue.

* Fix more xtro.

* Another introspection fix.

Co-authored-By: Frank A. Krueger <fak@praeclarum.org>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>

* Apply suggestions from code review

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>

* Apply feedback

* Please the typo guardians

Co-authored-by: Frank A. Krueger <fak@praeclarum.org>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-07-26 18:27:06 -04:00
Alex Soto ac42dad8de [xcode11.6] Initial bump to support Xcode 11.6 Beta 1 2020-07-26 18:27:06 -04:00
monojenkins 8c587f89a3
[generator] Add nullability `?` when [BindAs] is used with an array type (#9185)
Fix two false positives in AVFoundation.
Needed for xcode12 too (to be backported)
2020-07-25 11:30:42 -04:00
Sebastien Pouliot dd6f12bb5d
[tools][tests] Update to use macOS 11.0 (instead of 10.16) (#9188) 2020-07-24 22:03:46 -04:00
Sebastien Pouliot e47e10addf
[corebluetooth] Update for Xcode 12 beta 3 (#9186)
Apple removed the 10.16 API instead of marking them for 11.0 ?!?
2020-07-24 18:16:46 -04:00
Sebastien Pouliot 04e84477b2
[uniformtypeidentifiers] Update for Xcode 12 beta 3 (#9181) 2020-07-24 13:38:44 -04:00
Sebastien Pouliot ecedb498c7
[generator] Add nullability `?` when [BindAs] is used with an array type (#9179)
Fix two false positives in AVFoundation.
2020-07-24 11:50:26 -04:00
Sebastien Pouliot 1497988e21
[wkwebkit] Update for Xcode 12 beta 3 (#9178) 2020-07-24 11:45:47 -04:00
Rolf Bjarne Kvinge e0986916e5
[xharness] Fix how .NET projects are ignored. (#9168)
* [xharness] Fix how .NET projects are ignored.

Now they're actually ignored if .NET tests are not included.

* Fix compile error.
2020-07-24 14:56:08 +02:00
Sebastien Pouliot 142ff3127b
[xcode12] Bump for beta 3 (#9162)
* Disable iOS 32bits simulator based tests
2020-07-24 08:52:33 -04:00
Rolf Bjarne Kvinge 4a5dc20338
[dotnet] Only pass a single custom step to the linker. (#9173)
* [dotnet] Only pass a single custom step to the linker.

The linker will load the assemblies with the custom steps once per custom step
argument, which means that each step is effectively in a different assembly,
making it impossible to share state between steps.

This behavior is filed as a linker bug: https://github.com/mono/linker/issues/1314

Until this is fixed, we can just have a single step that injects all the other
steps programmatically.

* [tests] Adjust .NET tests according to new behavior.
2020-07-24 09:20:52 +02:00
Rolf Bjarne Kvinge 96034db9d1 [xharness] Fix finding Info.plist, and add some tests too. 2020-07-24 09:13:33 +02:00
Rolf Bjarne Kvinge 570a2e03a1
[test-libraries] Don't include all the dependencies in the ar archives we create. (#9167)
We only want the *.o files in the *.a archives, not the source files (*.m files).
2020-07-23 15:37:39 +02:00
Rolf Bjarne Kvinge 4a2236f7e0 Merge remote-tracking branch 'origin/main' into xharness-a-directory-per-project 2020-07-23 15:37:06 +02:00
Rolf Bjarne Kvinge 1eb0c2cd3b [tests] Info.plists should be inside LogicalName, not Link.
This makes it possible to simplify a bit more code inside xharness as well.
2020-07-23 15:34:58 +02:00
Rolf Bjarne Kvinge 1e9ac8099e [tests] Fix mtouch test according to project file move. 2020-07-23 15:34:50 +02:00
Rolf Bjarne Kvinge 568dc5d32a
[xharness] Backport Touch.Unit fix for command line parsing. (#9165)
Apply https://github.com/spouliot/Touch.Unit/pull/78 to the duplicated file.
2020-07-23 15:32:54 +02:00
Rolf Bjarne Kvinge 4780f8b1f9
[tests] Move the aot.cs inside the mmptest directory, and remove some redundant code/files. (#9166) 2020-07-23 15:31:44 +02:00
Rolf Bjarne Kvinge 4e8219b42e
[tests] The HttpWebRequest constructors are not publicly available in .NET 5, so use WebRequest.CreateHttp instead. (#9157) 2020-07-23 08:37:45 +02:00
Rolf Bjarne Kvinge 14d95df81a
[xharness] Generate makefile targets for non-executable projects. (#9158)
It turns out some Xamarin.Mac projects are library projects (for unit tests),
and we still need to generate makefile targets for those (because we use them
to build Xamarin.Mac tests to run on older macOS bots).
2020-07-23 08:31:45 +02:00
Alex Soto 98a4c2bd60 [tests] Accommodate intro test to .NET 5 changes 2020-07-22 15:44:42 -04:00
Alex Soto 250c372cad [xcode11.6] Bump to final version of Xcode 11.6 (#9112) 2020-07-22 15:44:42 -04:00
Alex Soto 5d6b8057ed [MetalPerformanceShaders] Neural Networks Update to Xcode 11 (#8844)
* [MetalPerformanceShaders] Neural Networks Update to Xcode 11

This includes updates from PRs xamarin/xamarin-macios#6932, xamarin/xamarin-macios#6935 and xamarin/xamarin-macios#7461

It adds new functionality to the neural network components.
This is still not the complete API for 11.3

* Update src/metalperformanceshaders.cs

Co-Authored-By: Rolf Bjarne Kvinge <rolf@xamarin.com>

* Make changes requested by @rolfbjarne

* Fix binding of default random distribution creation

The parameterless function creates new
default distributions and is not a property.
It is a counterpart of CreateUniform.

* Expose public APIs for MPSCnnConvolutionTransposeNode

These APIs are public and documented at: https://developer.apple.com/documentation/metalperformanceshaders/mpscnnconvolutiontransposenode/2942641-initwithsource?language=objc

I have also tested that they work.

* Reintroduce compat API.

* Fix acronym casing.

* Fix introspection tests.

* Fix xtro.

* One last xtro issue.

* Fix more xtro.

* Another introspection fix.

Co-authored-By: Frank A. Krueger <fak@praeclarum.org>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>

* Apply suggestions from code review

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>

* Apply feedback

* Please the typo guardians

Co-authored-by: Frank A. Krueger <fak@praeclarum.org>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-07-22 15:44:42 -04:00
Alex Soto 10059f1add [xcode11.6] Initial bump to support Xcode 11.6 Beta 1 2020-07-22 15:44:42 -04:00
Sebastien Pouliot 038db0fa51
[metrickit] Update for Xcode 12 beta 2 (#9151) 2020-07-22 13:32:06 -04:00
Sebastien Pouliot 52e51bccfc
[corewlan] Update for Xcode 12 beta 2 (#9156) 2020-07-22 13:30:47 -04:00
Rolf Bjarne Kvinge 7fab4abf96
[xharness] Allow for null environment variables to mlaunch. (#9140)
It's a valid scenario to set a null environment variable.

This happens when changing InCI to always return true (to test locally what's
done on the bots), in which case we try to forward BUILD_REVISION to mlaunch,
but BUILD_REVISION isn't necessarily set. Not forwarding it to mlaunch should
not cause problems in most tests, so just allow this scenario.
2020-07-22 18:13:17 +02:00
Rolf Bjarne Kvinge 3efc9baced [tests][mtouch] Update after bindings-test.csproj move.
Also remove an unused property.
2020-07-22 14:26:45 +02:00
Rolf Bjarne Kvinge 1867b421e6 [tests] Improve exception message a little bit. 2020-07-22 14:25:47 +02:00
Rolf Bjarne Kvinge bdada6e21b Merge remote-tracking branch 'origin/main' into xharness-a-directory-per-project 2020-07-22 10:36:23 +02:00
Rolf Bjarne Kvinge 554845905a [xharness] Remove a redundant ToArray. 2020-07-22 10:35:36 +02:00
Rolf Bjarne Kvinge e47a995797 [tests] Set the correct mono-native link mode and flavor defines in the csproj itself.
This makes it possible to simplify a lot of C# code.
2020-07-22 10:33:03 +02:00
Rolf Bjarne Kvinge 12b30b709f [tests] Fix path to AssemblyOriginatorKeyFile in bindings-test.csproj. 2020-07-22 09:06:49 +02:00
Rolf Bjarne Kvinge 9cfe57bffa
[xharness] Fix logic to not create makefile targets to run BCL tests. (#9148)
According to the existing code, we're already not supposed to create makefile
targets for BCL tests. However, the code to detect BCL tests wasn't quite
reliable, so we ended up creating makefile targets for some BCL tests.

So always use the same logic to detect BCL tests.

Also remove a lot of dead code to generate makefile code for BCL tests.
2020-07-22 08:28:38 +02:00
Rolf Bjarne Kvinge 35c44e82fc
[xharness] Fix compiler warning. (#9147) 2020-07-22 08:28:08 +02:00
Sebastien Pouliot 5cdfa2ebd6
[devicecheck] Update for Xcode 12 beta 2 (#9145) 2020-07-21 19:21:18 -04:00
Sebastien Pouliot f36b2ae7b8
[sensorkit] Update for Xcode 12 beta 2 (#9142) 2020-07-21 13:12:51 -04:00
Rolf Bjarne Kvinge cff47214ec [tests] Move bindings-test[-mac].csproj to their own directory. 2020-07-21 17:24:15 +02:00
Rolf Bjarne Kvinge 6d26599997 [xharness] Simplify the MonoNativeInfo class a bit by removing the custom Mac-specific subclass (there's almost no difference anymore). 2020-07-21 17:24:15 +02:00
Rolf Bjarne Kvinge 5fa43d073e [tests] Put the iOS and macOS mono-native templates in their own directory.
This makes it possible to remove a few conditions in the code.
2020-07-21 17:24:15 +02:00
Rolf Bjarne Kvinge f2d9764123 [xharness] Make the BCL project generation generate each project file into its own subdirectory. 2020-07-21 17:24:15 +02:00
Rolf Bjarne Kvinge 52c56933dc [xharness] Make the templates path an input parameter for the BCL templates. 2020-07-21 17:24:15 +02:00
Rolf Bjarne Kvinge ca0885b33e [xharness] Add a TestPlatform value to TestProject, and use it to indicate that a TestProject might be of a specific platform already. 2020-07-21 17:24:15 +02:00
Rolf Bjarne Kvinge 6a59d2b87b [xharness] Don't generate variations for BCL projects using the normal procedure, we generate them differently already.
This makes it possible to remove some dead code.
2020-07-21 17:24:15 +02:00
Rolf Bjarne Kvinge e3fdcf59ca [xharness] Add support for specifying whether variations should be generated for Xamarin.iOS projects. 2020-07-21 17:24:15 +02:00
Rolf Bjarne Kvinge a510af6078 [xharness] Make ProjectFileExtensions.GetInfoPListInclude a bit clearer.
Add a comment to document what's supposed to happen, and simplify the code a little bit.
2020-07-21 17:24:15 +02:00
Rolf Bjarne Kvinge cbe780d734 [xharness] Store attribute in local variable instead of fetching it twice. 2020-07-21 17:24:14 +02:00
Rolf Bjarne Kvinge 1c52a14566 [xharness] Remove a lot of special-casing for the mono-native tests.
It's not needed anymore.
2020-07-21 17:24:14 +02:00
Rolf Bjarne Kvinge 8e6e17ea89 [xharness] Generate projects into a subdirectory for each project.
Because it's cumbersome to keep the build working when the same directory has
multiple project files.
2020-07-21 17:24:14 +02:00
Rolf Bjarne Kvinge ba61b68f11 [xharness] Document the test loading process a little bit. 2020-07-21 17:24:14 +02:00
Rolf Bjarne Kvinge 4a10ba51db
[xharness] Generate BCL projects asynchronously. (#9083)
Split the BCL project generation in two: one part that figures out which
projects to generate, and which is done synchronously (because we need it to
compute the list of tests), then split out the actual generation and run it on
a background thread (since that doesn't have to happen until we want to
execute those tests).

This speeds up launching xharness in server mode significantly (from ~2s to
~0.2s).
2020-07-21 17:14:36 +02:00
Rolf Bjarne Kvinge cd0cca50c8
[tests] Remove the mono-native CheckSymbols test. (#9138)
It's running into different behavior between OS versions, and it's getting
time-consuming and annoying to keep up with the changes.

So instead just remove the test, because as far as I can see it's not testing
something important anyway (we don't care exactly which library provides the
'mono_native_initialize' function, the important part is that it's callable,
which we already test elsewhere).
2020-07-21 14:49:05 +02:00
Rolf Bjarne Kvinge f9fbf56544
[xharness] Disable default inclusion behavior for the introspection .NET tests. (#9137)
It gets too annoying to keep track of which files are where with the project
cloning we're doing, if files are implicitly included.
2020-07-21 14:48:52 +02:00
Sebastien Pouliot 819acdaad3
[mediaplayer] Update for Xcode 12 beta 2 (#9136) 2020-07-21 08:45:38 -04:00
Rolf Bjarne Kvinge 7d47d8742d
[xharness] Don't generate into the same directory/files for macOS Modern and macOS Full. (#9121)
* [xharness] Don't generate into the same directory/files for macOS Modern and macOS Full.

This meant that we were overwriting some generated files, which meant that we
were executing the Modern set of tests instead of the Full set of tests for at
least some configurations.

* Add a few ignored tests to the System.Configuration test now that we actually run it.
2020-07-21 13:15:14 +02:00
Sebastien Pouliot 38fb1018a7
[naturallanguage] Update for Xcode 12 beta 2 (#9133) 2020-07-20 16:15:00 -04:00
Rolf Bjarne Kvinge 858e44aa4d
[xharness] Only try to parse the build log if we have a build log. (#9130) 2020-07-20 14:32:52 +02:00
Rolf Bjarne Kvinge 121032e8f9
[xharness] Fix BCL project generation for watchOS projects. (#9131)
Reading from a file named as the actual content of the watchOS template doesn't
_quite_ work. Instead just use the content directly.
2020-07-20 14:32:42 +02:00
Rolf Bjarne Kvinge ba7e73b5dd
[xharness] Don't replace existing files, instead add new files, when providing human-readable logs. (#9123)
This makes understanding what's going on much easier.
2020-07-20 10:27:07 +02:00
Rolf Bjarne Kvinge 64bc5ea6eb
[xharness] Don't try to write cleaned xml into the same file as the dirty xml was. (#9122) 2020-07-20 10:20:33 +02:00
Alex Soto 0221d22239 [xcode11.6] Bump to final version of Xcode 11.6 (#9112) 2020-07-18 18:19:53 -04:00
Alex Soto 7768cc8f05 [MetalPerformanceShaders] Neural Networks Update to Xcode 11 (#8844)
* [MetalPerformanceShaders] Neural Networks Update to Xcode 11

This includes updates from PRs xamarin/xamarin-macios#6932, xamarin/xamarin-macios#6935 and xamarin/xamarin-macios#7461

It adds new functionality to the neural network components.
This is still not the complete API for 11.3

* Update src/metalperformanceshaders.cs

Co-Authored-By: Rolf Bjarne Kvinge <rolf@xamarin.com>

* Make changes requested by @rolfbjarne

* Fix binding of default random distribution creation

The parameterless function creates new
default distributions and is not a property.
It is a counterpart of CreateUniform.

* Expose public APIs for MPSCnnConvolutionTransposeNode

These APIs are public and documented at: https://developer.apple.com/documentation/metalperformanceshaders/mpscnnconvolutiontransposenode/2942641-initwithsource?language=objc

I have also tested that they work.

* Reintroduce compat API.

* Fix acronym casing.

* Fix introspection tests.

* Fix xtro.

* One last xtro issue.

* Fix more xtro.

* Another introspection fix.

Co-authored-By: Frank A. Krueger <fak@praeclarum.org>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>

* Apply suggestions from code review

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>

* Apply feedback

* Please the typo guardians

Co-authored-by: Frank A. Krueger <fak@praeclarum.org>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-07-18 18:19:53 -04:00
Alex Soto 772e6518e6 [xcode11.6] Initial bump to support Xcode 11.6 Beta 1 2020-07-18 18:19:53 -04:00
Sebastien Pouliot 1966e155cf
[coreml] Update for Xcode 12 beta 2 (#9124) 2020-07-17 17:46:47 -04:00
Chris Hamons fbcbdcde77
[AppKit] Xcode 12.0 Beta 1 (#9106)
* [AppKit] Xcode 12.0 Beta 1

* Apply suggestions from code review

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Alex Soto <alex@alexsoto.me>

* More code review changes

* Apply suggestions from code review

Co-authored-by: Alex Soto <alex@alexsoto.me>

* Code review changes

* Apply suggestions from code review

Co-authored-by: Whitney Schmidt <whschm@microsoft.com>

* Remove unnecessary 10.7 mac attribute

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Alex Soto <alex@alexsoto.me>
Co-authored-by: Whitney Schmidt <whschm@microsoft.com>
2020-07-17 15:19:31 -05:00
Rolf Bjarne Kvinge 4f78e8c51b
[xharness] Improve process killing a bit. (#9120)
* Log what we're doing.
* Wait a bit after sending SIGABRT, to allow for the OS to create any crash
  reports.
2020-07-17 18:24:58 +02:00
Rolf Bjarne Kvinge a4d19dad29
[xharness] Try harder to make lldb quit after trying to get a backtrace. (#9119)
When a process times out, we try to print a stack trace for all threads. This
involves executing "lldb --source <script>", where the script contains:

	process attach --pid 1234
	thread list
	thread backtrace all
	detach
	quit

Basically we attach to the project, and ask lldb to print stack traces.

The problem:

    16:09:02.9522580 Printing backtrace for pid=25276
    16:09:02.9528060 /usr/bin/lldb --source /var/folders/q7/mkzwrzcn7bzf3g2v38f3c1cw0000gn/T/tmp58e75d85.tmp
    16:09:04.6127570 (lldb) command source -s 0 '/var/folders/q7/mkzwrzcn7bzf3g2v38f3c1cw0000gn/T/tmp58e75d85.tmp'
    16:09:04.6130020 Executing commands in '/var/folders/q7/mkzwrzcn7bzf3g2v38f3c1cw0000gn/T/tmp58e75d85.tmp'.
    16:09:04.6130200 (lldb) process attach --pid 25276
    16:09:05.6458750 error: attach failed: Error 1
    16:09:05.7529100 25276 Execution timed out after 1200 seconds and the process was killed.
    16:09:05.7588770 Execution timed out after 1200 seconds.

If any of those commands fail, the subsequent commands aren't executed. This
includes the final "quit" command, which means we end up waiting forever for
lldb to do its thing, when lldb doesn't think it needs to do anything at all.

The fix: pass two different scripts. It turns out subsequent scripts are
executed even if previous scripts fail, so we do the equivalent of:

     lldb --source <attach script> --source <quit script>

And now lldb will quit no matter what the attach script does (it still works
even if the attach script succeeds, in which case we'll ask lldb to quit
twice).
2020-07-17 17:34:03 +02:00
Rolf Bjarne Kvinge 3cd9bafbcc
[xharness] Improve code to not throw exceptions in the first place instead of catching and ignoring. (#9118) 2020-07-17 17:33:13 +02:00
Rolf Bjarne Kvinge 7b1592bd4e
[tests] Remove common.mk, it doesn't look like this file is used anymore. (#9115) 2020-07-17 15:26:48 +02:00
Rolf Bjarne Kvinge 026a58b6c4
[monotouch-test] Second attempt at fixing the broken UrlRequestTest.Mutability_30744 test. (#9116)
This has been tested on:

* macOS 10.9, 10.10, 10.11, 10.12, 10.13, 10.14 and 10.15.
* iOS device:
	* iOS 8.2
	* iOS 9.3.5
	* iOS 11.4.1
	* iOS 13.6
2020-07-17 15:26:38 +02:00
Rolf Bjarne Kvinge c394c12c54
[xharness] De-asyncify template expansion. (#9104)
This avoids:

* Getting the resource stream for every template expansion
* Reading the resource stream
* A lot of async code.

Instead just read the resource stream once, into a string, and return that.

This speeds up the startup by ~10% (from ~0.96s to ~0.83s on my machine).
2020-07-17 11:09:09 +02:00
Rolf Bjarne Kvinge 965245086d
[apitest] Sleep for 0.05s instead of 0.5s. (#9108)
This makes these tests exactly 3.6s faster.
2020-07-17 11:00:51 +02:00
Rolf Bjarne Kvinge d0241e1707
[apitest] Refactor tests to not be async. (#9109)
* [apitest] Refactor tests to not be async.

The macOS tests will soon be upgraded to use the official NUnit[Lite], and in
that case we can't use async tests, because they end up deadlocking the
processes.

So refactor the two tests this affect to not be async, but instead use other
methods of accomplishing the same thing.

* Fix grammar

Co-authored-by: Whitney Schmidt <whschm@microsoft.com>
2020-07-17 08:51:53 +02:00
Rolf Bjarne Kvinge 92821b5dec
[xharness] Parse NUnit v2 xml reports correctly. (#9110) 2020-07-17 08:50:00 +02:00
Rolf Bjarne Kvinge 2995cd086a
[tests] Update tests to make native type vs normal type comparison explicit (#9097)
We've modified our NUnitLite to special-case the native types, so that they
can easily be compared with the standard types, but that doesn't work anymore
when switching to the official NUnit[Lite], so change all asserts to
explicitly convert whenever needed.
2020-07-17 08:48:09 +02:00
Sebastien Pouliot 59bd868952
[wkwebkit] Update for Xcode 12 beta 2 (#9113) 2020-07-16 20:35:00 -04:00
Sebastien Pouliot 486ded93dc
[mediasetup] Update for Xcode 12 beta 2 (#9087)
The framework is not available (binary or even headers) for the iOS
simulator, only devices.

As such `tools/mtouch/Makefile` is not updated with a `-weak-framework`

Tracked with
* https://github.com/xamarin/maccore/issues/2266
* https://feedbackassistant.apple.com/feedback/8001312
2020-07-16 20:34:19 -04:00
Manuel de la Pena f5d61b4db4
[CoreNFC] Add support for xcode 12 beta 1. (#9089) 2020-07-16 18:50:22 -04:00
Sebastien Pouliot 376ad7444d
[authenticationservices] Update for Xcode 12 beta 2 (#9099) 2020-07-16 11:53:02 -04:00
Rolf Bjarne Kvinge 7509c6bfcd
[xharness] Fix finding testable types in test assemblies. Fixes #xamarin/maccore@2267. (#9103)
Apparently a null namespace when using Reflection can be an empty namespace in Cecil.

Fixes https://github.com/xamarin/maccore/issues/2267.
2020-07-16 17:16:25 +02:00
Chris Hamons 5657a63539
Add support for arbitrary extensions to be bundled in XI/XM apps (#9048)
- This commit adds a hook, "AdditionalAppExtensions", to the msbuild to allow
extensions written in other languages, such as Swift, to be embedded and signed in an
Xamarin App bundle easily.
- Example:
<AdditionalAppExtensions Include="$(MSBuildProjectDirectory)/../../native">
	<Name>NativeTodayExtension</Name>
	<BuildOutput Condition="'$(Platform)' == 'iPhone'">build/Debug-iphoneos</BuildOutput>
	<BuildOutput Condition="'$(Platform)' == 'iPhoneSimulator'">build/Debug-iphonesimulator</BuildOutput>
</AdditionalAppExtensions>
2020-07-16 10:13:15 -05:00
Rolf Bjarne Kvinge 4b0fd5529c
[xharness] Don't group simulators when running in server mode. (#9098)
Grouping simulators means we have to wait until we know which simulators are
available, because we group by the simulator's UDID.

When running in server mode, we don't need to group simulator test runs,
because we run the as the user chooses, not in any particular order.

This way the test list loads faster at startup, since we don't have to wait
until we've loaded the simulators before we can show the list.
2020-07-16 08:20:51 +02:00
Rolf Bjarne Kvinge 839f586344
[monotouch-test] Fix broken UrlRequestTest.Mutability_30744 test. (#9096)
* [monotouch-test] Fix broken UrlRequestTest.Mutability_30744 test.

This test is supposed to assert that setting a header on an immutable
dictionary throws an exception.

The problem is that the tested code always throws an exception: either when
setting the header, or when asserting right after because no exception was
thrown, effectively always passing.

This showed up with current versions of NUnit[Lite], which keeps track of
assertion failures, and fails a test even if those assertion
failures/exceptions are caught in exception handlers.

So remove the whole exception verification logic, and just try to set the
value. We'll see if the test start failing somewhere (I've already tested both
on device and simulator, and no problems found so far).

* Remove a simulator condition.

It works on device for me (iPhone 7 with iOS 11.4.1)... maybe Apple changed
something?
2020-07-16 08:20:09 +02:00
Rolf Bjarne Kvinge e344698612
[tests] Use Assert.Throws instead of the ExpectedException attribute. (#9092)
* [tests] Use Assert.Throws instead of the ExpectedException attribute.

The ExpectedExceptionAttribute doesn't exist in newer versions of NUnit[Lite] anymore.

* [monotouch-test] Rework some CaptiveNetwork tests.

They need permissions, and entitlements, and something else I couldn't figure
out, so just assert they're returning null instead.
2020-07-16 08:19:33 +02:00
Rolf Bjarne Kvinge 3ac93d2330
[monotouch-test] Comparing uint to int for inequality doesn't work newer versions of NUnit[Lite]. (#9094)
So make sure we pass two values of the same type to Assert.AreNotEqual.
2020-07-16 08:19:01 +02:00
Sebastien Pouliot 3c2e4d619a
[foundation] Update for Xcode12 beta 2 (#9095)
Some backlog from Xcode11 still exists and requires generator changes
Tracked in https://github.com/xamarin/xamarin-macios/issues/8943
2020-07-15 16:59:19 -04:00
Manuel de la Pena 2b35db02ae
[Accessibility] Add new Framework from Xcode 12 beta 1. (#9086)
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-07-15 16:29:15 -04:00
Rolf Bjarne Kvinge a59742a8ec
[monotouch-test] Use Is.EqualTo instead of Is.EquivalentTo for equal arrays. (#9093)
The latter is much, much, *much* slower when using a recent version of NUnit[Lite].

I have no idea exactly how much slower, because it was so slow that I got
tired of waiting, and stopped the tests.

So use EqualTo instead, since the arrays should be equal in the first place.
2020-07-15 18:07:57 +02:00
Rolf Bjarne Kvinge 93b5c223d6
[tests] Provide an ignore reason for Ignore attributes. (#9091)
Newer versions of NUnit[Lite] require this.
2020-07-15 14:50:54 +02:00
Rolf Bjarne Kvinge 6c4e357d3b
[monotouch-test] Fix debug naming. (#9084) 2020-07-15 09:05:34 +02:00
Rolf Bjarne Kvinge 7beb88089a
[xharness] Use Cecil to inspect assemblies, instead of Reflection. (#9082)
This is slightly faster - ~0.95s vs ~1.4s - (probably because reflection tries
to load a lot of other referenced assemblies, which may or may not exist,
causing exceptions (if they don't exist) or spend time loading them (which
Cecil won't)).

It also avoids a lot of exception details showing up when tracing xharness
execution.
2020-07-15 09:01:31 +02:00
Manuel de la Pena 061f6a7cba
[CoreMedia] Add xcode12 beta 1 support. (#9081) 2020-07-14 15:09:35 -04:00
Manuel de la Pena cc3a04b173
[Contacts] Add support for Xcode 12 beta 1. (#9080) 2020-07-14 15:09:10 -04:00
Manuel de la Pena 8bb60059e5
[ClockKit] Add support for Xcode 12 beta 1. (#9010)
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Alex Soto <alex@alexsoto.me>
2020-07-14 11:12:26 -04:00
Manuel de la Pena 6aceb81539
[CloudKit] Add support for Xcode 12 beta 2. (#9075)
Added support for the Xcode 12 beta 2. There are a number of methods
that should be obsoleted, but have not been. Added issue
https://github.com/xamarin/maccore/issues/2265 to let apple now and
track it.
2020-07-14 06:32:56 -04:00
Sebastien Pouliot 3fed5d74d5
[corefoundation] Update for Xcode 12 beta 2 (#9074)
Only constants part of unbound `kCFUrl*` group as they are also part of
`NSUrl` inside `Foundation.framework`.
2020-07-13 22:18:35 -04:00
Manuel de la Pena c170ba2fe0
[MTouch] Add a workaround for a failing tests in the Xcode 12 betas. (#9073)
There is an issue in the linker warnings (https://github.com/xamarin/maccore/issues/2264) which makes our CI read. Added a workaround in the test for
the Xcode version until is fixed by Apple.
2020-07-13 21:32:59 -04:00
Sebastien Pouliot 100357b419
[imageio] Update for Xcode 12 beta 2 (#9069) 2020-07-13 16:49:51 -04:00
Sebastien Pouliot 3eeb15ff72
[coregraphics] Update for Xcode 12 beta 2 (#9070) 2020-07-13 16:36:40 -04:00
Whitney Schmidt 4ac7540d75
[Xcode12][PhotosUI] Update for beta 1 (#9059)
* Xcode 12 beta 1 update
2020-07-13 14:47:18 -04:00
Rolf Bjarne Kvinge 64c63279b3
[xharness] Add support for generating a tvOS version of .NET iOS projects. (#9032)
* [xharness] Add support for generating a tvOS version of .NET iOS projects.

And use it to run the tvOS version of introspection for .NET.

* [xharness] Change according to reviews.
2020-07-13 17:12:11 +02:00
Rolf Bjarne Kvinge 96327dee88
[monotouch-test] Use a normal thread instead of MulticastDelegate.BeginInvoke in AVAssetImageGeneratorTest. (#9067)
MulticastDelegate.BeginInvoke isn't supported in .NET.

Ref: https://github.com/dotnet/runtime/issues/16312
2020-07-13 15:07:05 +02:00
Sebastien Pouliot 8a57e7daf6
[coretext] Update for Xcode 12 beta 2 (#9062) 2020-07-13 08:41:14 -04:00
Whitney Schmidt 32c82f3f95
[xcode12][pencilkit] Update for beta 1 (add macOS support, new apis for iOS) (#8982)
* PencilKit changes for xcode12
2020-07-10 14:30:57 -04:00
Sebastien Pouliot 41e204f81f
[coremotion] Update for Xcode 12 beta 2 (#9056) 2020-07-10 13:56:09 -04:00
Alex Soto 802bd4e069
[UIKit] Update bindings to Xcode 12 Beta 2 (#8992) 2020-07-10 13:21:18 -04:00
Whitney Schmidt 79f33e494a
[Xcode12][Photos] Update for beta1 (no beta2 changes) (#9045)
* photo updates for xcode12
2020-07-10 11:05:26 -04:00
Sebastien Pouliot 83fd7694ff
[scenekit] Update for Xcode 12 beta 2 (#9051) 2020-07-10 08:58:24 -04:00
Sebastien Pouliot 05cff07082
[xcode12] Update for Xcode 12 beta 2 (#9052) 2020-07-10 08:56:23 -04:00
Sebastien Pouliot 5246bacb19
[safariservices] Update for Xcode 12 beta 2 (#9053) 2020-07-10 08:55:03 -04:00
Sebastien Pouliot 829eb27986
[spritekit] Update for Xcode 12 beta 2 (#9047) 2020-07-09 15:34:21 -04:00
Sebastien Pouliot 017160caf0
[corespotlight] Update for Xcode 12 beta 2 (#9044) 2020-07-09 11:17:44 -04:00
Sebastien Pouliot 66ae40a442
[tests][monotouch-test] Re-enable some tests with beta 2 (#9042)
Some issues we detected in beta 1 are not present in beta 2
https://github.com/xamarin/xamarin-macios/issues/8943
2020-07-09 08:53:56 -04:00
Sebastien Pouliot e5100b74d3
[uniformtypeidentifiers] Update for Xcode 12 beta 2 (#9039)
Includes support for `UTType`-based `[Field]` in the generator as an
hundred (or so) of them were added. Unit test shows the field-based
properties are working as expected.
2020-07-09 08:50:57 -04:00
Manuel de la Pena f76253b0a8
[CallKit] Add support for Xcode 12 beta 1. (#9004)
There are two method not bound due to a dependency on AVAudioSession that
does not seem to be exposed on Mac OS X.

Related issue: https://github.com/xamarin/maccore/issues/2257

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-07-08 22:53:47 -04:00
Sebastien Pouliot 5bf1073cdb
[corebluetooth] Update for Xcode 12 beta 2 (#9037) 2020-07-08 17:27:02 -04:00
Manuel de la Pena 10b3ddba31
[xharness] Make ConsoleLog thread-safe. Fixes #8569. (#8864) (#9038)
Fixes https://github.com/xamarin/xamarin-macios/issues/8569.

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-07-08 15:42:33 -04:00
monojenkins 9c8d1cc5f2
[tests][xtro] Fix NSUrl-based categories (#9034)
We were using the managed name, e.g. `NSUrl`, instead of the native name,
e.g. `NSURL`, when dealing with categories.

To fix this we must resolve the type and this caused issues as other
assemblies (e.g. OpenTK) were not already loaded/cached and some type
could not be resolved (and this throw exceptions)

The runner now loads all assemblies before starting to visit them.

The fix solved a known issue (iOS-NetworkExtension.ignore), some API
that were already bound (common-Foundation.ignore) and also caught an
additional API where we missed a `[NullAllowed]` on a return value
2020-07-08 13:23:43 -04:00
Sebastien Pouliot 1b09465acf
[tests][xtro] Fix NSUrl-based categories (#9029)
We were using the managed name, e.g. `NSUrl`, instead of the native name,
e.g. `NSURL`, when dealing with categories.

To fix this we must resolve the type and this caused issues as other
assemblies (e.g. OpenTK) were not already loaded/cached and some type
could not be resolved (and this throw exceptions)

The runner now loads all assemblies before starting to visit them.

The fix solved a known issue (iOS-NetworkExtension.ignore), some API
that were already bound (common-Foundation.ignore) and also caught an
additional API where we missed a `[NullAllowed]` on a return value
2020-07-08 09:26:54 -04:00
Sebastien Pouliot de306cd96d
Bump for Xcode 12 beta 2 (#9027)
* [arkit] Remove fields (from beta2) to fix introspection
* [tests][introspection] AVMutableMediaSelection is as bad as it's non mutable parent
* [tools] Update IsFrameworkBroken (remove CoreAudioTypes and MediaPlayer)
* [tests][monotouch-test] MKPinAnnotationView seems fixed in beta 2
* [tests][xtro] Update ARKit todo (with previous fix)
2020-07-08 09:26:24 -04:00
Manuel de la Pena c0781c4a13
[CoreLocation] Add support for Xcode 12 beta 1. (#9001)
A number of APIs added and deprecated in the same release. We will see
that is that about.

The status property move to be a instance property in CLLocationManager,
we expose those and add a deprecation warning. That needs to be ignored in xtro due to issue https://github.com/xamarin/xamarin-macios/issues/9026


Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-07-07 17:55:15 -04:00
Manuel de la Pena 93103e23ed
[CFNetwork] Add support for xcode 12 beta 1. (#9006) 2020-07-07 17:53:50 -04:00
Sebastien Pouliot 579ef29d52
[replaykit] Update for xcode12 beta 1 (#9025) 2020-07-07 13:45:52 -04:00
monojenkins 110f13759c
[tests] Skip a few networking tests on macOS 10.9. Fixes #xamarin/maccore@2221. (#9021)
Fixes https://github.com/xamarin/maccore/issues/2221.

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-07-07 15:56:43 +02:00
monojenkins 069f4a4628
[tests] Skip a few networking tests on macOS 10.9. Fixes #xamarin/maccore@2221. (#9022)
Fixes https://github.com/xamarin/maccore/issues/2221.

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-07-07 15:56:32 +02:00
Manuel de la Pena 5fae175cf6
[ARKit] Add support for Xcode 12 beta 1. (#9002)
PInvoke that is missing is due to a dependency with Visio which is not
yet updated.



Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-07-07 09:37:16 -04:00
Manuel de la Pena bae53fac16
[AVKit] Add support for Xcode 12 beta 1. (#9005) 2020-07-06 10:57:31 -04:00
Manuel de la Pena 599249fd27
[ClassKit] Add support for Xcode 12 beta 1. (#9008) 2020-07-06 10:56:54 -04:00
Manuel de la Pena 347a4959b1
[AddSupport] Updting binding xcode 12 beta 1. (#8999) 2020-07-06 10:55:40 -04:00
Rolf Bjarne Kvinge 31f4a2e22a
[tests] Skip a few networking tests on macOS 10.9. Fixes #xamarin/maccore@2221. (#9012)
Fixes https://github.com/xamarin/maccore/issues/2221.
2020-07-06 13:26:09 +02:00
Rolf Bjarne Kvinge 2e11f0bf4e [xharness] Don't generate makefile targets for .NET projects.
They end up with the same make targets as non-.NET targets, which prints
warnings in the terminal when running make.

We're not using the makefile targets much anymore, so postpone implementing
them for .NET until we need them for some reason.
2020-07-03 11:31:45 +02:00
Rolf Bjarne Kvinge 6f6b8e281b Merge remote-tracking branch 'origin/main' into dotnet-xharness-introspection 2020-07-03 11:12:50 +02:00
Rolf Bjarne Kvinge d621e3a854
[dotnet] Use the exact same dotnet version in our global.jsons as in Make.config. (#8984)
This avoids a possible difference in behavior, because in our system
dependency check we verify that the system has a specific version (which might
succeed), but if we don't pick a specific dotnet version in global.json,
dotnet will pick the latest version, which may behave differently than the one
we have in Make.config.

Thus always use the exact same version, so that we don't run into a difference
in behavior between developers and/or bots.
2020-07-01 17:08:46 +02:00
Rolf Bjarne Kvinge e4523d8f9d
[xharness] Try to not have log directories with spaces in them. (#8976)
The simulators won't write stdout/stderr to a path with a space.
2020-07-01 08:28:30 +02:00
Rolf Bjarne Kvinge 919edef176 [introspection] Skip verification of P/Invokes to the libhostpolicy library.
System.Private.CoreLib.dll contains P/Invokes to a libhostpolicy library,
which isn't shipped.

An isssue has been filed to fix this in the runtime: https://github.com/dotnet/runtime/issues/38543
2020-06-30 19:01:07 +02:00
Rolf Bjarne Kvinge 9075929561 [introspection] Skip verification of GlobalizationNative_* functions for .NET, they're not shipped yet. 2020-06-30 19:01:07 +02:00
Rolf Bjarne Kvinge 8f4877a665 [introspection] Adjust native filename for 'libSystem.Native'. 2020-06-30 19:01:07 +02:00
Rolf Bjarne Kvinge cf7e855857 [introspection] Skip NUnitLite and MonoTouch.Dialog in .NET 5. 2020-06-30 19:01:07 +02:00
Rolf Bjarne Kvinge b303f5e699 [introspection] Disable tests that require crypto due to dotnet/runtime#36897 on .NET. 2020-06-30 19:01:07 +02:00
Rolf Bjarne Kvinge f69ed9a25e [introspection] Adapt to .NET 5's vision of how ConstructorInfo.ToString () should behave. 2020-06-30 19:01:07 +02:00
Rolf Bjarne Kvinge 650e6e134e [xharness] Skip the old simulator variation for introspection/dotnet for now. 2020-06-30 19:01:07 +02:00
Rolf Bjarne Kvinge 76f456cc0f [xharness] Retrieve a .NET project's OutputPath by running MSBuild.
.NET projects are vastly simplified, which means that the OutputPath can't be
determined by reading the project file itself, it has to be calculated by
MSBuild.

So that's exactly what we do: we run MSBuild on the project file and get it to
print the property we're interested in.
2020-06-30 19:01:07 +02:00
Rolf Bjarne Kvinge 73881846e2 [xharness] Add a GetDotNetExecutable callback and an MSBuildPath property to [I]ProcessManager. 2020-06-30 19:01:06 +02:00
Rolf Bjarne Kvinge 5d257bfb8f [xharness] Improve project cloning to take into account default inclusion behavior for .NET projects.
.NET projects will include files from the current directory by default, which
means that if we clone the project file and write the cloned project file in a
different directory, we'll have to add an automatically included files into
the cloned file manually.
2020-06-30 19:01:06 +02:00
Rolf Bjarne Kvinge 1b703c5fdd [xharness] Create DotNetBuildTasks when we need to build .NET projects. 2020-06-30 19:01:06 +02:00
Rolf Bjarne Kvinge 55cc695697 [xharness] Disable project generation for .NET projects for now. 2020-06-30 19:01:06 +02:00
Rolf Bjarne Kvinge c42803cfde [xharness] Clearly label .NET projects as such. 2020-06-30 19:00:40 +02:00
Rolf Bjarne Kvinge 989cda8b2d [xharness] Add the dotnet introspection project file to our list of projects, and mark it as a .NET project. 2020-06-30 19:00:40 +02:00
Rolf Bjarne Kvinge 55a9697b66 [xharness] Add support for skipping more test variations. 2020-06-30 18:58:42 +02:00
Rolf Bjarne Kvinge 85f0424a55 [tests] AppDomain.DefineDynamicAssembly doesn't exist in .NET, so exclude it from the build. 2020-06-30 18:41:20 +02:00
Rolf Bjarne Kvinge 022092a002 [introspection] Add a .NET project for iOS. 2020-06-30 18:41:16 +02:00
Sebastien Pouliot ae548380c4
[xcode12][security] Update for beta 1 (#8969) 2020-06-29 15:02:16 -04:00
Rolf Bjarne Kvinge b465739d23
[xharness] Disable diagnostics when killing Xcode processes. (#8961)
We won't get any useful information anyway, because we won't get stack traces.
2020-06-29 10:10:20 +02:00
Sebastien Pouliot c21caece19
[xcode12][usernotificationui] Update for beta 1 (add macOS support) (#8970) 2020-06-26 21:54:25 -04:00
Sebastien Pouliot e582c501c0
[xcode12][notificationcenter] Update for beta 1 (#8968) 2020-06-26 20:01:34 -04:00
Sebastien Pouliot 039f58c876
[xcode12][linkpresentation] Update for beta 1 (add tvOS support) (#8965) 2020-06-26 20:00:54 -04:00
Sebastien Pouliot c188f593fe
[xcode12][watchkit] Update for beta 1 (#8967) 2020-06-26 20:00:16 -04:00
Sebastien Pouliot b6c3e1a84f
[xcode12][tvmlkit] Update for beta 1 (#8966) 2020-06-26 17:14:35 -04:00
Sebastien Pouliot 1bb720b687
[xcode12][appclip] Update for beta 1 (#8964) 2020-06-26 17:13:30 -04:00
Sebastien Pouliot f427b5e91d
[xcode12] Bump for beta 1 (#8935)
Known issues https://github.com/xamarin/xamarin-macios/issues/8943
2020-06-26 14:02:44 -04:00
monojenkins ad92cdb6a2
[xharness] Add crash reports to a logs collection we care about. (#8960)
Add crash reports to a logs collection we care about, instead of to a logs
collection that's promptly forgotten.

This makes sure crash reports actually show up in the html report.

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-06-26 14:18:47 +02:00
Rolf Bjarne Kvinge 56a896d371
[xharness] Don't access the simulator tasks if we failed to created them. (#8950)
This fixes this:

    Unexpected exception: System.AggregateException: One or more errors occurred. (One or more errors occurred. (ApplicationName='[...]/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mlaunch', CommandLine='--listsim=/var/folders/43/h027tm1n101cdrq2_b6n9n2m0000gn/T/tmp12c3d415.tmp --output-format=XML', CurrentDirectory='', Native error= Cannot find the specified file)) ---> System.AggregateException: One or more errors occurred. (ApplicationName='[...]/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mlaunch', CommandLine='--listsim=/var/folders/43/h027tm1n101cdrq2_b6n9n2m0000gn/T/tmp12c3d415.tmp --output-format=XML', CurrentDirectory='', Native error= Cannot find the specified file) ---> System.ComponentModel.Win32Exception: ApplicationName='[...]/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mlaunch', CommandLine='--listsim=/var/folders/43/h027tm1n101cdrq2_b6n9n2m0000gn/T/tmp12c3d415.tmp --output-format=XML', CurrentDirectory='', Native error= Cannot find the specified file
      at System.Diagnostics.Process.StartWithCreateProcess (System.Diagnostics.ProcessStartInfo startInfo) [0x0029f] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/System/System.Diagnostics/Process.cs:778
      at System.Diagnostics.Process.Start () [0x0003a] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/System/services/monitoring/system/diagnosticts/Process.cs:2006
      at (wrapper remoting-invoke-with-check) System.Diagnostics.Process.Start()
      at Microsoft.DotNet.XHarness.iOS.Shared.Execution.ProcessManager.RunAsyncInternal (System.Diagnostics.Process process, Microsoft.DotNet.XHarness.iOS.Shared.Logging.ILog log, Microsoft.DotNet.XHarness.iOS.Shared.Logging.ILog stdout, Microsoft.DotNet.XHarness.iOS.Shared.Logging.ILog stderr, System.Nullable`1[T] timeout, System.Collections.Generic.Dictionary`2[TKey,TValue] environmentVariables, System.Nullable`1[T] cancellationToken, System.Nullable`1[T] diagnostics) [0x00469] in [...]/xamarin-macios/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/Execution/ProcessManager.cs:185
      at Microsoft.DotNet.XHarness.iOS.Shared.Hardware.SimulatorLoader+<>c__DisplayClass16_0.<LoadDevices>b__0 () [0x00107] in [...]/xamarin-macios/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/Hardware/SimulatorLoader.cs:65
      at Microsoft.DotNet.XHarness.iOS.Shared.Hardware.SimulatorLoader.LoadDevices (Microsoft.DotNet.XHarness.iOS.Shared.Logging.ILog log, System.Boolean includeLocked, System.Boolean forceRefresh, System.Boolean listExtraData) [0x00155] in [...]/xamarin-macios/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/Hardware/SimulatorLoader.cs:54
      at Microsoft.DotNet.XHarness.iOS.Shared.Hardware.SimulatorLoader.FindOrCreateDevicesAsync (Microsoft.DotNet.XHarness.iOS.Shared.Logging.ILog log, System.String runtime, System.String devicetype, System.Boolean force) [0x0023c] in [...]/xamarin-macios/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/Hardware/SimulatorLoader.cs:156
      at Microsoft.DotNet.XHarness.iOS.Shared.Hardware.SimulatorLoader.FindSimulators (Microsoft.DotNet.XHarness.iOS.Shared.TestTarget target, Microsoft.DotNet.XHarness.iOS.Shared.Logging.ILog log, System.Boolean create_if_needed, System.Boolean min_version) [0x00267] in [...]/xamarin-macios/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/Hardware/SimulatorLoader.cs:277
      at Xharness.Jenkins.TestTasks.RunSimulatorTask.FindSimulatorAsync () [0x0005a] in [...]/xamarin-macios/tests/xharness/Jenkins/TestTasks/RunSimulatorTask.cs:53
      at Xharness.Jenkins.Jenkins.CreateRunSimulatorTasksAsync () [0x004ee] in [...]/xamarin-macios/tests/xharness/Jenkins/Jenkins.cs:558
       --- End of inner exception stack trace ---
      at System.Threading.Tasks.Task.ThrowIfExceptional (System.Boolean includeTaskCanceledExceptions) [0x00011] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:2027
      at System.Threading.Tasks.Task`1[TResult].GetResultCore (System.Boolean waitCompletionNotification) [0x0002b] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Future.cs:496
      at System.Threading.Tasks.Task`1[TResult].get_Result () [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Future.cs:466
      at Xharness.Jenkins.Jenkins+<>c__DisplayClass72_0.<PopulateTasksAsync>b__0 (System.Threading.Tasks.Task`1[TResult] v) [0x0001e] in [...]/xamarin-macios/tests/xharness/Jenkins/Jenkins.cs:941
      at System.Threading.Tasks.ContinuationTaskFromResultTask`1[TAntecedentResult].InnerInvoke () [0x00024] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/TaskContinuation.cs:155
      at System.Threading.Tasks.Task.Execute () [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:2319
    --- End of stack trace from previous location where exception was thrown ---
2020-06-26 10:27:10 +02:00
monojenkins bf4b5f4db8
[xcode12] [ImageIO] Update bindings for Xcode11 (#8942) 2020-06-25 15:28:29 -04:00
Manuel de la Pena c568f42571
[Tests] Add missing resource needed by tests. Fixes #2248 (#8954)
New test that did not consider that tests are shared with mac os x.

fixes: #2248
2020-06-25 11:58:41 -04:00
Rolf Bjarne Kvinge 79fccc3065
[xharness] Automatically detect and use .NET 5 (#8909)
Automatically detect which .NET version to use based on the global.json reachable from the project directory.

Due to how things are designed, some parts of the code wants the dotnet
executable before the code in question knows the project directory, which
isn't possible anymore. So there's a minor change to pass around a lambda that
can calculate the path to the executable instead of the executable itself.
2020-06-25 08:46:03 +02:00
Manuel de la Pena 8c081605a0
[DevOps] Allow to use vsdrops AND xamarin storage. (#8916)
Use both in those labs that support xamarin-storage so that we have a
backup. To do so, move the parameter to be a bool but keep the rest of
the logic the same.


Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-06-24 18:01:51 -04:00
Rolf Bjarne Kvinge 8c963e84d6
[dotnet] Make the generated main function work. (#8908)
With this PR a very basic sample app will build and launch successfully in the simulator.

This PR is best reviewed commit-by-commit; each change is explained by its commit message.
2020-06-23 15:14:01 +02:00
Rolf Bjarne Kvinge e6afca196c
[xcode12] Backport a few linker changes. (#8926)
* [linker] Fix infinite queue found with nullability PR (#8337)

and removed previous workaround

Replace previous attempt https://github.com/xamarin/xamarin-macios/pull/8336

* [linker] Remove code to deal with ExportedTypes (#8632)

This is now supported by upstream mono/linker

* [linker] Remove internal [NullablePublicOnly] attribute from apps (#8568)

I've only seen it with .net5 so far but it's better handled in master
and flow back into the branch

* [linker] Update custom attributes that can be removed (#8535)

Some are no longer part of the SDK (or converted into new ones
at build time), others were new (and missing).

A full list of attributes and their usage frequency in what we ship can
be seen in https://gist.github.com/spouliot/ca03c6da7d4d75670ca77749350eb8a2

Also update tests: no need to check for removals of stuff that does not
exists anymore.

Co-authored-by: Sebastien Pouliot <sebastien.pouliot@gmail.com>
2020-06-23 09:01:36 +02:00
Rolf Bjarne Kvinge ea3aa68426
[xharness] Implement parsing the trx files that .NET produces. (#8919) 2020-06-23 08:54:28 +02:00
monojenkins 5f71492418
[xcode12] [AppKit] NSTextView allows passing nil to PasteAsPlainText and PasteAsRichText. (#8923)
* [AppKit] NSTextView allows passing nil to PasteAsPlainText and PasteAsRichText.

This is documented in Apple's documentation, their headers, and even proved
experimentally.

* Update xtro.

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-06-23 08:53:47 +02:00
monojenkins 5e75a06b32
[runtime] Remove memcpy usage from Runtime.CloneMemory (#8925)
instead use `Buffer.MemoryCopy`.

Currently only used from `CGDataProvider`. Added unit tests for the
public/indirect, usage of the API (we had none).

Co-authored-by: Sebastien Pouliot <sebastien.pouliot@microsoft.com>
2020-06-23 08:52:32 +02:00
monojenkins 2525b21d23
[AppKit][Tests] Do not fail when we cannot create a NSPasteboard. (#8914)
The test has started failign more commonly, but only in a number of old
OS versions and not all the time. The function should return a new
Pasteboard, but it is true that we are not releasing the old ones,
meaning that the pasteboard is left after the app is done as stated by
the apple documenation.

The test has been updated to:

1. Release the pasteboard.
2. Be inconclusive if the pasteboard service could not create a new one.

fixes: https://github.com/xamarin/xamarin-macios/issues/8787

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2020-06-22 15:35:31 +02:00
Rolf Bjarne Kvinge 36a1ec4fc1
[xharness] Set the working directory to the project directory when building projects. (#8910)
This is particularly important when we have global.json and NuGet.config in
the project directory, because those are looked up starting with the current
directory, so those two need to match.
2020-06-22 10:25:19 +02:00
Rolf Bjarne Kvinge ce94d5545d [tests] Simplify MySingleView test to work without a storyboard. 2020-06-19 17:47:49 +02:00
Rolf Bjarne Kvinge b39bd0e420
[msbuild] Make sure all the Base/Core tasks are abstract. (#8888)
Also add a cecil test ensure our leaf MSBuild tasks don't have code.
2020-06-19 17:40:18 +02:00
Sebastien Pouliot 76a61f1290
[runtime] Remove internal memcpy p/invoke (#8890)
* Replace `memcpy` with `Buffer.MemoryCopy`
* Add cecil-based test to make sure we're not p/invoke into it again (nor any other MS banned API)
* Remove `memcpy` from xtro ignore file
2020-06-19 09:41:54 -04:00
Manuel de la Pena 34362be245
[Harness] Add an extra index that will use full uris. (#8889)
Vsdrops does not support serving a static html. Therefore we need to use
full uris that will be used to download the logs. To make things less
dangerous, we leave the xamarin-storage report as it was and create a
new one for vsdrops.

This means that:

1. xamarin-storage index.html is left as is.
2. vsdrops_index.html contains full uris to download (the env var will
   have to be set in the step) and js and css are in the header.
3. because we use and env var, jenkins won't generate the
   vsdrops_index.html only device pipelines will.

For this to take effect needs updates in the device pipelines. The
solution is not yet optimal since we need to add some workaround to
rather than make the monitoring person open a text file, we should
display it in the browser.

Co-authored-by: Chris Hamons <chris.hamons@xamarin.com>
2020-06-18 19:51:14 -04:00
Rolf Bjarne Kvinge 6ad1cba473
[monotouch-test] Lower indirect command buffer availability. (#8886)
Apple's charts say indirect command buffers are available with MTLGpuFamilyCommon2.

That's not quite so, devices that support MTLGpuFamilyCommon2 may crash when
MTLDevice.CreateIndirectCommandBuffer is called.

So make the conditions for calling CreateIndirectCommandBuffer an intersection
of the previous condition for macOS (MTLFeatureSet.macOS_GPUFamily2_v1) + the
new condition (MTLGpuFamily.Common2) + Xcode 11+ (just to make things
simpler).

I've tested this on all our macOS bots, and it worked on all of them.

If it fails anywhere else (iOS devices), the next patch will remove the entire
test.
2020-06-18 17:55:20 +02:00
Sebastien Pouliot ce45a0267b
[runtime] Remove memcpy usage from Runtime.CloneMemory (#8880)
instead use `Buffer.MemoryCopy`.

Currently only used from `CGDataProvider`. Added unit tests for the
public/indirect, usage of the API (we had none).
2020-06-18 08:01:16 -04:00
Rolf Bjarne Kvinge c3bcfac582
Unify code for executing processes. (#8848)
* Create a simple Xamarin.Utils.Execution class that can handle all our
  process execution needs:
    * Captures or streams stdout/stderr (in UTF8).
    * Supports async
    * Supports a timeout
    * Does not depend on any other source file we have, only uses BCL API.
* Have the execution helper classes from mtouch/mmp
  (Xamarin.BundlerDriver.RunCommand) and the tests
  (Xamarin.Tests.ExecutionHelper) use this new class.
* Some simplifications were made:
    * All API that took a string array for the environment now takes a
      Dictionary<string, string>.
    * The Driver.RunCommand methods were split out to a separate file. This
      file also contains a Verbosity field, which is conditioned on not being
      in mtouch nor mmp, which makes including this file from other projects
      simpler (such as bgen - in particular bgen was modified to use this
      Verbosity field instead of its own).
2020-06-18 12:34:07 +02:00
Rolf Bjarne Kvinge 7a97cc9f31
[AppKit] NSTextView allows passing nil to PasteAsPlainText and PasteAsRichText. (#8873)
* [AppKit] NSTextView allows passing nil to PasteAsPlainText and PasteAsRichText.

This is documented in Apple's documentation, their headers, and even proved
experimentally.

* Update xtro.
2020-06-18 10:57:23 +02:00
Rolf Bjarne Kvinge 1d269a12d0
[monotouch-test] Check for Metal compatibility for all platforms before creating indirect command buffers. Fixes #xamarin/maccore@2235. (#8863)
This fixes an iOS assertion (crash) when running on iPhone 6 with iOS 12+:

    2020-06-15 13:52:35.138 monotouchtest[6887:5713672] failed assertion 0 at line 54 in NopIndirectCommandBuffer

    =================================================================
    	Native Crash Reporting
    =================================================================
    Got a abrt while executing native code. This usually indicates
    a fatal error in the mono runtime or one of the native libraries
    used by your application.
    =================================================================

    =================================================================
    	Native stacktrace:
    =================================================================
    	0x1060b23fc - /private/var/containers/Bundle/Application/B3C2F137-4C0F-48EF-A50A-8972FF268069/monotouchtest.app/libmonosgen-2.0.dylib : mono_dump_native_crash_info
    	0x1060a8674 - /private/var/containers/Bundle/Application/B3C2F137-4C0F-48EF-A50A-8972FF268069/monotouchtest.app/libmonosgen-2.0.dylib : mono_handle_native_crash
    	0x1060b1948 - /private/var/containers/Bundle/Application/B3C2F137-4C0F-48EF-A50A-8972FF268069/monotouchtest.app/libmonosgen-2.0.dylib : sigabrt_signal_handler
    	0x20049e9fc - /usr/lib/system/libsystem_platform.dylib : <redacted>
    	0x2004a4094 - /usr/lib/system/libsystem_pthread.dylib : <redacted>
    	0x200383ea8 - /usr/lib/system/libsystem_c.dylib : abort
    	0x2029c5dac - /System/Library/Frameworks/Metal.framework/Metal : MTLGetWarningMode
    	0x2210cff78 - /System/Library/Extensions/AGXMetalA8.bundle/AGXMetalA8 :
    	0x20299fb80 - /System/Library/Frameworks/Metal.framework/Metal : <redacted>
    	0x103143c58 - /private/var/containers/Bundle/Application/B3C2F137-4C0F-48EF-A50A-8972FF268069/monotouchtest.app/libXamarin.iOS.dll.dylib : wrapper_managed_to_native_ObjCRuntime_Messaging_IntPtr_objc_msgSend_IntPtr_nuint_UInt64_intptr_intptr_intptr_System_nuint_ulong
    	0x102f4cbdc - /private/var/containers/Bundle/Application/B3C2F137-4C0F-48EF-A50A-8972FF268069/monotouchtest.app/libXamarin.iOS.dll.dylib : Metal_MTLDevice_Extensions_CreateIndirectCommandBuffer_Metal_IMTLDevice_Metal_MTLIndirectCommandBufferDescriptor_System_nuint_Metal_MTLResourceOptions
    	0x101a8bd58 - /private/var/containers/Bundle/Application/B3C2F137-4C0F-48EF-A50A-8972FF268069/monotouchtest.app/libmonotouchtest.exe.dylib : MonoTouchFixtures_Metal_MTLDeviceTests_ReturnReleaseTest
    	[...]

Fixes https://github.com/xamarin/maccore/issues/2235.
2020-06-18 08:59:35 +02:00
Manuel de la Pena 9ddb35720b
[Harness] Add a more general IHarness interface. (#8868)
In order to be able to test the TestSelectro in PR
https://github.com/xamarin/xamarin-macios/pull/8768 we need a more
general interface to mock and ensure that the correct properties are set
by the TestSelector.
2020-06-16 16:04:38 -04:00
Rolf Bjarne Kvinge 6ced972a68
[msbuild] Add a GetMinimumOSVersion target that reads the app manifest and outputs the MinimumOSVersion. (#8858)
This makes it possible for several other tasks to take the MinimumOSVersion as
direct input, instead of the app manifest's path. Previously the app manifest
(Info.plist) was loaded and parsed in each task, slightly differently in each
place, and in addition there are differences between macOS and other
platforms, which made it even worse. This code refactoring also made it
possible to remove an error code which wasn't necessary anymore.

This task also computes the default MinimumOSVersion if none is specified in
the app manifest.

There is one breaking change: a library project could previously specify an
inexistent Info.plist, and it would build fine. This will now result in a
"Error loading 'Info.plist': File not found" error. This is trivial to fix:
just remove the Info.plist from the project file (or an alternative solution
could be to condition the inclusion of the Info.plist in the project file on
the existence of the Info.plist).

New commits in xamarin/Xamarin.MacDev:

* xamarin/Xamarin.MacDev@a1bc6f3 [Xamarin.MacDev] Split IAppleSdkVersion.TryParse in two methods. (#73)

Diff: 45c5a680e2..a1bc6f39b3
2020-06-16 17:40:04 +02:00
Rolf Bjarne Kvinge 24719920dc
[xharness] Make ConsoleLog thread-safe. Fixes #8569. (#8864)
Fixes https://github.com/xamarin/xamarin-macios/issues/8569.
2020-06-16 17:39:06 +02:00
Rolf Bjarne Kvinge 95e42b9266
Rename master to main. (#8851)
* Fix links that point to master to point to main instead.
* Implement support in the sample tester for specifying the default branch for
  each sample repo.
* Fix various text / documentation to say 'main' instead of 'master.'
* Push to 'main' instead of 'master' in xamarin-macios-data.
* Fix xharness to make 'main' the special branch with regards to documentation tests as opposed to 'master'.
* Fix various CI to use 'main' instead of 'master'.
* Bump maccore

    New commits in xamarin/maccore:

    * xamarin/maccore@ed6d146822 Rename 'master' to 'main'. (#2233)

    Diff: 424fa26148..ed6d146822
2020-06-16 15:51:44 +02:00
Rolf Bjarne Kvinge f236e2fc94
[xharness] Don't ignore a failure to restore nugets. (#8852) 2020-06-16 08:07:37 +02:00
Rolf Bjarne Kvinge 4e71aa43b9
[tests] Use Cache.CreateTemporaryDirectory to create temporary directories for the msbuild-mac tests. (#8856)
This makes it easier to diagnose failures, because the temporary directory stay on disk after
the test has finished executing (until the next time the test is run).
2020-06-16 08:07:23 +02:00
Chris Hamons 78dcb51fe3
Remove notice from generated iOS Apps (#8857)
- The notice points to an out of date page, currently dead (will be redirected soon)
- https://github.com/xamarin/xamarin-macios/issues/8849 is the new home
2020-06-15 15:52:08 -05:00
Rolf Bjarne Kvinge 8917f2224b
[xharness] Always use nuget to restore nugets, and always use xibuild to run nuget. (#8845) 2020-06-15 09:17:02 +02:00
Rolf Bjarne Kvinge 75341a9f20
[msbuild/tests] Set MSBUILD_EXE_PATH when running unit tests from within VS. Fixes #5042. (#8846)
Also fix several tests to work when executed from within VS due to some difference

There's also a change to the MtouchTask: lookup of framework assemblies won't
succeed anymore if the path to the assembly is just an unrooted filename
(which may happen to be a file in the current directory (as a test proved
accidentally) - in which case it will never be a framework assembly).

Unfortunately this won't make all tests pass, around 20 tests will still fail with:

     #RunTarget-ErrorCount
    	The "GetReferenceNearestTargetFrameworkTask" task could not be instantiated from the assembly "/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/msbuild/15.0/bin/NuGet.Build.Tasks.dll". Please verify the task assembly has been built using the same version of the Microsoft.Build.Framework assembly as the one installed on your computer and that your host application is not missing a binding redirect for Microsoft.Build.Framework. Specified cast is not valid.
    	The "GetReferenceNearestTargetFrameworkTask" task has been declared or used incorrectly, or failed during construction. Check the spelling of the task name and the assembly name.
      Expected: 0
      But was:  2

but I couldn't figure out how to fix these errors.

Fixes https://github.com/xamarin/xamarin-macios/issues/5042.
2020-06-15 09:16:39 +02:00
Rolf Bjarne Kvinge 2722ff1eec
[tests] Don't add the build output to the assert message our mmp tests, it makes html reports hard to read. (#8847)
The build output is very verbose, which means the html reports are just
impossible to navigate due to the amount of text. The build output will be
printed to the terminal anyway, so it'll still be available.
2020-06-15 09:16:11 +02:00
Rolf Bjarne Kvinge 24117c5180
[dotnet] Rebuild nugets and global.json when we switch branches or commit something, or change any of the project files involved in package creation. (#8834) 2020-06-11 11:57:28 +02:00
Rolf Bjarne Kvinge b8dac12704
[tests] Update the MT0051 tests to use newer test helper API. (#8799)
And delete the test case about Xcode 4.4, that's a bit old by now.

However, keep the Xcode 5.1.1 test case (which I've confirmed to work by
installing Xcode 5.1.1), since we'll probably want to have the test around for
when we update our min Xcode requirement (which is currently 6.0).
2020-06-08 18:34:12 +02:00
Rolf Bjarne Kvinge e2efa955b9
[tests] Remove the MT1211 mtouch test. (#8798)
This tests functionality that's been moved to mlaunch.
2020-06-08 17:50:58 +02:00
Manuel de la Pena ae9c08a550
[AppKit][Tests] Do not fail when we cannot create a NSPasteboard. (#8788)
The test has started failign more commonly, but only in a number of old
OS versions and not all the time. The function should return a new
Pasteboard, but it is true that we are not releasing the old ones,
meaning that the pasteboard is left after the app is done as stated by
the apple documenation.

The test has been updated to:

1. Release the pasteboard.
2. Be inconclusive if the pasteboard service could not create a new one.

fixes: https://github.com/xamarin/xamarin-macios/issues/8787
2020-06-05 16:06:19 -04:00
monojenkins fdaa8e01be
[tools] Remove MD5 from tooling (#8774)
Note: affected tools are not included in the code shipping inside the SDK

Usage of deprecated cryptographic algorithms is not approved anymore,
even if not used for cryptographic purpose.

MD5 was used to create immutable GUID since it's output is 128bits which
is just what a GUID wants as it's input (16 bytes). The same can be
achieved (even if a bit slower) with a newer/longer hash function

https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1128148
2020-06-05 09:02:41 -04:00
Rolf Bjarne Kvinge ab6b418483
[dotnet] Detect, compile and publish Info.plist into the app. (#8752)
* [dotnet] Detect, compile and publish Info.plist into the app.

* Automatically detect any property lists in the root project directory, and
  include them into the build.
* Introduce the existing build targets to detect and compile Info.plist into
  the .NET build.
* Add documentation for default inclusion. This document will grow over time
  as more file types are automatically included.
* Add some tests.

* [dotnet] Adjust default inclusion behavior.

* Use a single platform-specific variable to control all types of
  platform-specific inclusions.

* [dotnet] Move the default inclusion to .targets instead of .props, so that .NET's default inclusion logic is already imported.

.NET sets EnableDefaultItems in their .targets: https://github.com/dotnet/sdk/blob/master/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.DefaultItems.targets#L16
2020-06-05 14:47:54 +02:00
Sebastien Pouliot 97d2504d51
[tools] Remove MD5 from tooling (#8769)
Note: affected tools are not included in the code shipping inside the SDK

Usage of deprecated cryptographic algorithms is not approved anymore,
even if not used for cryptographic purpose.

MD5 was used to create immutable GUID since it's output is 128bits which
is just what a GUID wants as it's input (16 bytes). The same can be
achieved (even if a bit slower) with a newer/longer hash function

https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1128148
2020-06-04 22:14:13 -04:00
monojenkins c22a1a72c5
[sharpie] Bump version of sharpie and accommodate xtro to new output (#8760)
Co-authored-by: Alex Soto <alex@alexsoto.me>
2020-06-04 15:17:09 -04:00
Alex Soto 80210e9663
[sharpie] Bump version of sharpie and accommodate xtro to new output (#8759) 2020-06-04 14:11:30 -04:00
Rolf Bjarne Kvinge 374f2cf293
[tools] Fix printing failed command to print the actual arguments instead of the list itself. (#8749)
Fixes this:

    Process exited with code 1, command:
    /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tools/xibuild/xibuild System.Collections.Generic.List`1[System.String]
2020-06-04 16:40:37 +02:00
Rolf Bjarne Kvinge cb637a08a0
Merge pull request #8733 from rolfbjarne/dotnet-linker
[dotnet] Add dotnet-linker, a project to contain custom linker steps for our net5.0 build.
2020-06-03 09:11:15 +02:00
Rolf Bjarne Kvinge 246b65fa6d
[tests] Add a global.json targeting dotnet 3.1.100 to the dotnet unit tests. (#8728)
Because VSfM isn't able to build this project otherwise:
https://developercommunity.visualstudio.com/content/problem/1056720/cant-build-net-5-project-error-net-core-31-sdk-is.html
2020-06-03 09:00:33 +02:00
monojenkins b492f5a33e
[runtime] Remove Classic code. (#8722)
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-06-02 16:14:17 +02:00
Rolf Bjarne Kvinge 3589a3b99d [dotnet] Improve tests to verify that the linker has (or hasn't) run. 2020-06-02 16:00:04 +02:00
Rolf Bjarne Kvinge 24ed1ddc66
[runtime] Remove Classic code. (#8720) 2020-06-02 08:18:24 +02:00
Rolf Bjarne Kvinge 7751708022
[dotnet] Add class library test project for every platform. (#8714)
And tests to make sure it builds successfully as well.
2020-06-01 11:28:23 +02:00
Rolf Bjarne Kvinge 9a1bd54aba
[tests] Remove unused file from the mtouch tests. (#8713) 2020-06-01 11:27:51 +02:00
Rolf Bjarne Kvinge aec9c93bee
[dotnet] Add tests for our various platforms. (#8708)
* [tests] Add a unit test project to test our net5 support.

* [tests] Fix clearing environment variables when launching processes.

* [tests] Add net5 macOS test app.

* [tests] Add net5 tvOS test app.

* [tests] Add net5 watchOS test app.

* [msbuild] Exclude CreateAppBundleDependsOn from net5 builds as well.

* [msbuild] We're not required to know the signing identity to figure out the app extension bundle name.
2020-05-29 17:58:34 +02:00
Rolf Bjarne Kvinge bebbeb18a3
[msbuild] Improve xharness and makefiles make it easier to run both iOS and Mac MSBuild tests. (#8709)
It even looks like running the Xamarin.Mac MSBuild tests from the command line
has never worked... so fix that as well.
2020-05-29 17:50:46 +02:00
Rolf Bjarne Kvinge 952037b7a3
[tests] Remove Classic code from all tests. (#8707) 2020-05-29 16:43:06 +02:00
Manuel de la Pena da6e6f2800
[Harness] Move logic to create the device tests our of Jenkins.cs (#8699)
Making Jenkins just orchestrate. Later this class will be testable.
2020-05-28 22:32:48 -04:00
Manuel de la Pena d241d8dae1
[Harness] Create a TestServer that will serve the Xharness page. (#8706)
Move all the logic of the server to its own class to later be able to
add tests in Jenkins (make sure that we do run it) and in the server
itself (check that files are server, correct actions are executed etc..)

At this point Jenkins just creates the tests tasks via other objects and
executes in server mode or not depending on the env.
2020-05-28 12:54:45 -04:00
Rolf Bjarne Kvinge 2b2f1d08dc
[tests] Remove Classic code from all tests. (#8702) 2020-05-28 16:35:09 +02:00
Manuel de la Pena 8b69ddb960
[Harness] Remove logic that builds sim tasks. (#8697)
One step closer to make the Jenkins class just know how to spin the
tasks and what tests are selected. This new class, once we can have a
clean Jenkins class will be testeable.
2020-05-28 09:34:27 -04:00
Manuel de la Pena 46b36b4252
[Harness] Remove not needed private var by Jenkins. (#8698) 2020-05-28 07:44:20 -04:00
Manuel de la Pena 0f3435bff1
[Harness] Fix markdown take two. (#8701)
The grouping of the tasks was moved to the html report. This meant that
the markdown was not getting all the correct tasks. Move the grouping of
the tasks out of the hml report and use it with the markdown so that
both reports have the same data.

Also fixes an issue when tests failed and did not appear correctly in
the comment such as in comment: https://github.com/xamarin/xamarin-macios/pull/8698#issuecomment-635006243
2020-05-28 07:43:54 -04:00
Manuel de la Pena 8d433815c4
[Harness] Fix issues in the markdown when reporting failures. (#8696)
The failures are aggregated tasks, we need to get the, use the key as
the name of the test and use the rest of the data from the ITestTask.
The reason is that the ITestTask.Name was modified by Jenkins.cs to
group them.

fixes: https://github.com/xamarin/xamarin-macios/issues/8695
2020-05-27 17:03:06 -04:00
Rolf Bjarne Kvinge af1323f4c5
[xharness] Always capture stdout/stderr from the simulator to actual files. (#8689)
This avoids confusion when tests are run locally using 'make runner' (and
would print the simulator's stdout/stderr to the terminal) versus when run on
bots (and would write the simulator's stdout/stderr to separate files that
would show up in the html report).
2020-05-27 15:31:20 +02:00
Rolf Bjarne Kvinge a3516c33aa
[xharness] Add crash reports to a logs collection we care about. (#8690)
Add crash reports to a logs collection we care about, instead of to a logs
collection that's promptly forgotten.

This makes sure crash reports actually show up in the html report.
2020-05-27 15:27:32 +02:00
Manuel de la Pena 488bce571e
[Harness] Refactor Hml generation. (#8686)
This is a step towards trying to make the modification of the html
easier for other team members, the are just to small logical changes:

1. Removed the GenerateReportImpl to a HtmlReportWriter.
2. Do not make the HtmlReportWriter call the Marckdown one, the are
independent.

There is room for improvement, since there are some collections
re-calculated. That change will come once we have this out of the way.

At some point, we ought to be able to make changes in the html just be
as hard as they should be (html + css, we are not experts on that).
2020-05-26 22:11:09 -04:00
Manuel de la Pena a512056c95
[Harness] Make sure that the error knowledgebase is used in device runs. (#8682)
The knowledgebase was just added in the simulator case, not in the
device. That meant that the tcp error was not reported.

Also added another possible case of tcp errors to be picked up and be
shown as a known error (device throws a diff error when on airplane
mode).

fixes: https://github.com/xamarin/xamarin-macios/issues/8659
2020-05-26 17:58:44 -04:00
Sebastien Pouliot e819d09658
[corefoundation] Safer NativeObject (#8667)
Do not allow calling `CFRetain` or `CFRelease` on a null handle as this
will crash the process, instead use `GetCheckedHandle` so a managed (and
catchable) `ObjectDisposedException` can be thrown.

Make `GetCheckedHandle` public so subclasses (outside the platform
assembly) can use it - it's already recommended in some `[Obsolete]`
attributes (but was not made available).

Move the `ObjectDisposedException` thrower into a new `ThrowHelper`
class. This will allow sharing it (to be re-used in future PR).

Add unit tests for `NativeObject`.
2020-05-26 12:09:26 -04:00
Manuel de la Pena 17e413fa7b
[Harness] Move the logic to reload the simulators outside Jenkins. (#8658)
Following other PRs, try to reduce the work of the Jenkins class to
orchestrate the different classes and move any other logic to classes
with a single concern. Add tests for the new class.
2020-05-25 20:03:04 -04:00
Manuel de la Pena efd7fa6d46
[Harness] Move the resource manager implementation out of Jenkins. (#8660)
Move the resource management out of Jenkins. Add tests to the new class.
2020-05-25 16:10:50 -04:00
Rolf Bjarne Kvinge f0aa8ea4ec
[dotnet] Add a KnownFrameworkReference node to the targets to tell the .NETCore build system about us. (#8665)
Also add another nuget source to get Mono's net5 runtime packs.

This makes the tests/dotnet/MySingleView test app:

* Compile managed code successfully, referencing Xamarin.iOS.dll.
* Resolve the correct targeting and runtime packs (aka Mono).

The compiled result is not put into an .app bundle as iOS expects, so the
result isn't actually executable.
2020-05-25 17:38:35 +02:00
Manuel de la Pena 98016a760e
[Harness] Move the periodic command execution logic out of Jenkins. (#8657)
Move the logic out, Jenkins class should just orchestrate all the diff
tasks but should not know how they are executed.
2020-05-25 10:00:57 -04:00
Rolf Bjarne Kvinge 98788f8558
[dotnet] Add the Sdk build files to the Sdk NuGet. (#8644)
Also add a very simple net5 test app (which doesn't build yet).

Current (expected) build result:

    > xamarin-macios/tests/dotnet/MySingleView $ dotnet build
    Microsoft (R) Build Engine version 16.7.0-preview-20258-02+26f6d1d87 for .NET
    Copyright (C) Microsoft Corporation. All rights reserved.

      Determining projects to restore...
    xamarin-macios/tests/dotnet/MySingleView/MySingleView.csproj : error NU1102: Unable to find package Microsoft.NETCore.App.Runtime.ios-x64 with version (= 5.0.0-preview.6.20264.1)
    xamarin-macios/tests/dotnet/MySingleView/MySingleView.csproj : error NU1102:   - Found 1 version(s) in nuget.org [ Nearest version: 5.0.0-preview.4.20251.6 ]
    xamarin-macios/tests/dotnet/MySingleView/MySingleView.csproj : error NU1102:   - Found 1 version(s) in Nuget Official [ Nearest version: 5.0.0-preview.4.20251.6 ]
    xamarin-macios/tests/dotnet/MySingleView/MySingleView.csproj : error NU1102:   - Found 0 version(s) in local-dotnet-feed
    xamarin-macios/tests/dotnet/MySingleView/MySingleView.csproj : error NU1102:   - Found 0 version(s) in Dotnet arcade
      Failed to restore xamarin-macios/tests/dotnet/MySingleView/MySingleView.csproj (in 951 ms).

This fails because the .NET build logic isn't being told that it should look
for the mono runtime packs instead of the .NET Core runtime packs.
2020-05-25 15:22:29 +02:00
Rolf Bjarne Kvinge d10a387ffa
[tests] Port cecil-tests to new-style csproj. (#8663)
Also switch xharness to build the csproj instead of running the makefile to
build the tests, because that way xharness is able to automatically use the
correct NUnit runner depending on the NUnit version the tests are using.
2020-05-25 14:47:20 +02:00
Rolf Bjarne Kvinge b601c5c62a
[xharness] Make AppBundleInformationParser.ParseFromProject async and make it take an ILog and a IProcessManager. (#8662)
This will be required in a later PR.
2020-05-25 14:47:10 +02:00
Rolf Bjarne Kvinge e73bf6cb29
[xharness] Don't use the MSBuild xml namespace when processing sdk-style projects. (#8647)
* [xharness] Don't use the MSBuild xml namespace when processing sdk-style projects.

The sdk-style projects don't use MSBuild's xml namespace, which means that it
will be added to every node we create if we use it.

* Fix merge conflict resolution failure.
2020-05-25 11:42:41 +02:00
Rolf Bjarne Kvinge eb3c1eeb0f
[xharness] Fix showing unit test failure list and summary when there are many failing tests. (#8649)
We'd check for more than 100 tests in the wrong location, and completely break
out of showing anything at all.
2020-05-25 09:34:01 +02:00
Manuel de la Pena 465ba9b2e7
[Harness] Move the Markdown code out of Jenkins + tests. (#8651)
Move the generation of the markdown out and add tests. Make sure that
the report writes the expected results and specially that it shows the
known issues.
2020-05-21 23:56:30 -04:00
Alex Soto bb5a3d353a
[Tests] Use safe listed password by our Credentials Scanner tool (#8580) (#8652) 2020-05-21 20:47:43 -04:00
Alex Soto 1614d569cc
[d16-7] Merge Xcode11.5 Support and include provisionator changes (#8645)
New commits in xamarin/maccore:

* xamarin/maccore@ef861db73e [devops] Enhance Xcode renaming script (#2208)

Diff: 92a06f7303..ef861db73e
2020-05-21 14:11:27 -04:00
Manuel de la Pena ea514286ba
[Harness] Move the definition of the tasks outside of the jenkins class. (#8635)
Create some enumerables that will state the tests to run, that way, if
new tests need to be added, there will not be a need to edit the
jenkins class.

Add tests to ensure that all the tests are added. That away we will make
sure that tests are not removed by accident.
2020-05-21 12:48:05 -04:00
Alex Soto 5dc1b55dc6
[master] Merge Xcode11.5 Support and include provisionator changes (#8643)
New commits in xamarin/maccore:

* xamarin/maccore@4bfce64847 Update README.md
* xamarin/maccore@24682998f7 [devops] Enhance Xcode renaming script (#2206)
* xamarin/maccore@e03f16b862 [Localization][Mlaunch] Fix watchos timeout issue (#2196)

Diff: ad1696d6f3..4bfce64847
2020-05-21 12:16:33 -04:00
Manuel de la Pena 406026cd1a
[Harness] When we have a known issue, add it to the markdown. (#8633)
If we have a knonw issue, lets add the message and the link to the
markdown so that the monitoring person does not need to look at the
html page.

fixes: https://github.com/xamarin/xamarin-macios/issues/8625
2020-05-20 21:58:09 -04:00
Sebastien Pouliot 4cc33f4d80
[src] Use `Runtime.NSLog` instead of `System.Console.WriteLine` (#8626)
inside the product assemblies [1]. The latter brings a lot [2] of the BCL
into the application for, eventually, ending up back to `NSLog` anyway

Also include a, cecil-based, test to ensure we don't regress.

[1] except for Xamarin.Mac.dll since there's a workaround for a
Sierra (only) bug

[2] https://gist.github.com/spouliot/c63343c1a76f4e49248be3a2c7aa25ed
2020-05-20 13:38:44 -04:00
Rolf Bjarne Kvinge 944ec6dc2f
[introspection] Remove Classic code. (#8620) 2020-05-20 09:29:21 +02:00
Rolf Bjarne Kvinge 1b570ebb20
[msbuild] Update to NUnit 3.12 and NUnit.ConsoleRunner 3.11.1. (#8613) 2020-05-20 09:26:05 +02:00
Manuel de la Pena 37fb9ded52
[Harness] Remove not longer used method. (#8618) 2020-05-19 17:55:05 -04:00
Manuel de la Pena 7d320fb9b6
[Harness] Move GetColor method out of Jekins. (#8616)
Reduce the logic that is not related to the execution of tests out of
jenkins. Add tests.
2020-05-19 15:37:56 -04:00
Manuel de la Pena 02f73a567e
[Harness] Remove methods that are already present in the KnowledgeBase class. (#8619) 2020-05-19 13:57:09 -04:00
Manuel de la Pena 2187eadf05
[Harness] Move the generation of the variations out. (#8611)
Try to make the Jenkins class do a single task. Move the generation of
the variations logic out (which is hard to test atm, but will be doable
in a second round).

Moved some useful methos also out and add tests.
2020-05-19 11:13:31 -04:00
Rolf Bjarne Kvinge 694d921324
[tests] Fix computing the dependencies for the mtouch test project by including the makefile that contains the rule to compute the dependencies. (#8598) 2020-05-18 09:01:03 +02:00
Rolf Bjarne Kvinge 76fc9dc3bf
Improve our error handling code. (#8591)
* Move much of ErrorHandler.cs into a partial class in ErrorHandler.tools.cs,
  which is referenced by mtouch and mmp (but not our runtime).
* Add ErrorHandler.runtime.cs for runtime-specific bits, including a simpler
  version of ErrorHandler.Show. In particular this gets rid of the call to
  Environment.Exit, which should never happen at runtime.
* Rename MonoTouchException and MonoMacException to ProductException, which
  allows us to remove a lot of ifdefs.
* This required moving Application.LoadSymbols and Target.LoadSymbols to
  shared mtouch/mmp code.
2020-05-14 16:45:05 +02:00
Rolf Bjarne Kvinge 16ab321951
[tests] Remove some Classic code. (#8592) 2020-05-14 09:36:21 +02:00
Rolf Bjarne Kvinge 5834572741
Create and publish .NET NuGet packages. (#8576)
Create the various NuGet packages to support .NET 5+. The packages are
currently empty (and not very useful), but the actual content will come later.

The current set of NuGet packages are (this list is duplicated for each
platform: iOS, tvOS, watchOS and macOS):

* Microsoft.iOS.Sdk: currently contains the basic MSBuild targets files for an
  MSBuild Project SDK. Will eventually contain all the build logic. Might also
  eventually contain other tools (mlaunch, bgen, etc.), but these might also
  end up in a different package.
* Microsoft.iOS.Ref: will contain the Xamarin.iOS.dll reference assembly.
* Microsoft.iOS.Runtime.[RID]: will contain architecture-specific files
  (libxamarin*.dylib, the Xamarin.iOS.dll implementation assembly, etc.):

The NuGets built on CI are automatically published to a NuGet feed.

The versioning for the NuGet packages required a few changes: OS bumps are now
changed in Make.versions instead of Make.config (this is explained in the
files themselves as well).
2020-05-13 15:23:29 +02:00
Manuel de la Pena edb4fe8d27
[Harness] Move GitHub to be a VCS interface to simplify testing. (#8579)
Move to be a non static class so that we can later easily test the
TestSelector class.
2020-05-12 16:14:40 -04:00
Alex Soto 06871ab24f
[Tests] Use safe listed password by our Credentials Scanner tool (#8580) 2020-05-12 14:02:16 -04:00
Rolf Bjarne Kvinge 29dc484922
Make makefiles compatible with make 4.3. (#8573)
In make 4.3 the pattern `.libs/watchos/%.arm64_32.dylib` in mk/rules.mk takes
precedence over the pattern `.libs/watchos/libtest.%.dylib` in
tests/test-libraries/Makefile when the pattern replacements are 'libtest' and
'arm64_32' respectively, because the former is shorter.

This seems to be a bug (in make 3.81) that has been fixed, because that's the
documented behavior.

Rewrite the logic to not use a pattern target in test/test-libraries/Makefile.
2020-05-12 16:38:05 +02:00
Manuel de la Pena 52afa11bbd
[Harness] Fix broken tests. (#8551)
Tests are not ran as part of the CI and got borken again. Fix them, will
add them as part of the CI once they land fixed.
2020-05-11 09:52:24 -04:00
Rolf Bjarne Kvinge 1457f8666d
[jenkins] Add support for specifying custom labels using a file. (#8549)
This makes it possible to select what should be done on CI when building a
commit on internal Jenkins (as opposed to when building a pull request, in
which case labels can be set on the pull request).
2020-05-08 15:44:41 +02:00