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

203 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 28102a55b7
[xharness] Set the EnableSGenConc value for all project configurations. (#12698)
* Update to use EnableSGenConc instead of MtouchEnableSGenConc (either works,
  the former is the new future).
* Set EnableSGenConc as a top-level property, so we make sure it's set no
  matter how the project is executed.

This makes it so that this setting work for .NET projects, where we're not using project configurations.
2021-09-13 16:13:59 +02:00
Rolf Bjarne Kvinge 7f1d62ca13
[xharness] Skip some device variations for .NET. (#12699)
Skip:

* Any Thumb variation (Thumb code isn't supported anymore in .NET).
* Any AssemblyBuildTarget variation (compiling assemblies to dylibs [fastdev]
  or frameworks - neither is supported/implemented for .NET).

This trims down the test list a bit.
2021-09-13 16:13:36 +02:00
Rolf Bjarne Kvinge 88cf80da2d
[xharness] Remove legacy Mac Catalyst support. (#12642)
We're going .NET all the way.

This simplifies xharness a little bit, and speeds up our test run somewhat.
2021-09-07 18:35:33 +02:00
Rolf Bjarne Kvinge 69b95172b3
[xharness] Unify the list of test projects for .NET between iOS and macOS. (#12469)
* [xharness] Unify the list of test projects for .NET between iOS and macOS.

* [xharness] Don't enable all .NET tests if .NET is enabled.

Some tests (such as device tests) have additional checks that must be honored as well.

* [xharness] If a test is ignored, then it doesn't matter what the corresponding build task is doing.

A build task can be shared between multiple tests, and it can be building for
another (enabled) test. This happens for iOS 32-bits and 64-bits simulator:
the app is built once, but have two different tests running.

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2021-09-06 15:23:41 +02:00
Manuel de la Pena 8e6eedfaf3
[XHarness] Ensure we do not crash with empty lines. (#12588) 2021-08-30 21:30:21 -04:00
Rolf Bjarne Kvinge c039e882cb
[xharness] Skip timestamps when processing logs. (#12539)
This fixes an issue where the html report wouldn't show test failures from
timestamped logs (which is the case for macOS test logs).

Also remove a duplicated condition.
2021-08-27 12:02:48 +02:00
Rolf Bjarne Kvinge 1175a13a54
[xharness] Move loading old test results into the background. (#12512)
At startup, we load old test results that may exist on disk. However, this may
take a while, especially since the disk is usually quite busy already with
everything else we do at startup, so don't wait for this to finish before
displaying the UI.
2021-08-23 15:47:02 +02:00
Rolf Bjarne Kvinge e3cac56a70
[tools] Pass the right arguments to the AOT compiler for Mac Catalyst. Fixes #12484. (#12498)
* [xharness] Add LLVM test case for Mac Catalyst.

* [tests] Add make target to build monotouch-test using LLVM on Mac Catalyst.

* [tools] Pass the right arguments to the AOT compiler for Mac Catalyst. Fixes #12484.

Mac Catalyst is just special.

Fixes https://github.com/xamarin/xamarin-macios/issues/12484.
2021-08-23 09:47:27 +02:00
Rolf Bjarne Kvinge d3c9f4b1b6
[dotnet] Make CoreCLR the only option for macOS. Fixes #12477. (#12480)
* [dotnet] Make CoreCLR the default for macOS.

* [dotnet] Show an error if trying to use MonoVM on macOS.

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

* [xharness] Remove CoreCLR variations for macOS tests.

The default is using CoreCLR for macOS, so having a specific variation for it
doesn't make sense.

* [tests] Adjust linker tests to work on CoreCLR as well.
2021-08-20 09:53:40 +02:00
Rolf Bjarne Kvinge 243cc4019f
[xharness] Bump timeout for .NET tests again. (#12470)
We keep adding more and more test cases...
2021-08-18 19:27:43 +02:00
Rolf Bjarne Kvinge 2972e1b715
Fix some whitespace issues in various files. (#12399)
* Remove BOM
* Add EOL at end of file.
2021-08-11 10:06:46 +02:00
Rolf Bjarne Kvinge 18a9a90450
[xharness] Gracefully handle any exceptions that may occur when parsing build logs. (#12318)
* [xharness] Gracefully handle any exceptions that may occur when parsing build logs.

Fixes a harness exception:

    Harness exception for 'monotouch-test': System.ArgumentException: '', hexadecimal value 0x1D, is an invalid character.
    at System.Xml.XmlEncodedRawTextWriter.InvalidXmlChar (System.Int32 ch, System.Char* pDst, System.Boolean entitize) [0x00026] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/System.Xml/System/Xml/Core/XmlEncodedRawTextWriter.cs:1420
    at System.Xml.XmlEncodedRawTextWriter.WriteCDataSection (System.String text) [0x00251] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/System.Xml/System/Xml/Core/XmlEncodedRawTextWriter.cs:1370
    at System.Xml.XmlEncodedRawTextWriter.WriteCData (System.String text) [0x0012a] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/System.Xml/System/Xml/Core/XmlEncodedRawTextWriter.cs:470
    at System.Xml.XmlEncodedRawTextWriterIndent.WriteCData (System.String text) [0x00007] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/System.Xml/System/Xml/Core/XmlEncodedRawTextWriter.cs:1750
    at System.Xml.XmlWellFormedWriter.WriteCData (System.String text) [0x00029] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/System.Xml/System/Xml/Core/XmlWellFormedWriter.cs:771
    at Microsoft.DotNet.XHarness.iOS.Shared.XmlResults.TestReportGenerator.WriteFailure (System.Xml.XmlWriter writer, System.String message, System.IO.TextReader stderr) [0x00031] in /_/src/Microsoft.DotNet.XHarness.iOS.Shared/XmlResults/TestReportGenerator.cs:41
    at Microsoft.DotNet.XHarness.iOS.Shared.XmlResults.NUnitV3TestReportGenerator.GenerateFailure (System.Xml.XmlWriter writer, System.String title, System.String message, System.IO.TextReader stderr) [0x0030e] in /_/src/Microsoft.DotNet.XHarness.iOS.Shared/XmlResults/NUnitV3TestReportGenerator.cs:122
    at Microsoft.DotNet.XHarness.iOS.Shared.XmlResults.XmlResultParser.GenerateFailureXml (System.String destination, System.String title, System.String message, System.IO.TextReader stderrReader, Microsoft.DotNet.XHarness.Common.XmlResultJargon jargon) [0x00033] in /_/src/Microsoft.DotNet.XHarness.iOS.Shared/XmlResults/XmlResultParser.cs:226
    at Microsoft.DotNet.XHarness.iOS.Shared.XmlResults.XmlResultParser.GenerateFailure (Microsoft.DotNet.XHarness.iOS.Shared.Logging.ILogs logs, System.String source, System.String appName, System.String variation, System.String title, System.String message, System.IO.TextReader stderrReader, Microsoft.DotNet.XHarness.Common.XmlResultJargon jargon) [0x000a4] in /_/src/Microsoft.DotNet.XHarness.iOS.Shared/XmlResults/XmlResultParser.cs:248
    at Xharness.Jenkins.TestTasks.RunTest.BuildAsync () [0x00274] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/xharness/Jenkins/TestTasks/RunTest.cs:74
    at Xharness.Jenkins.TestTasks.RunTest.ExecuteAsync () [0x000d8] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/xharness/Jenkins/TestTasks/RunTest.cs:99
    at Xharness.Jenkins.TestTasks.TestTasks.RunInternalAsync () [0x00226] in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/xharness/Jenkins/TestTasks/TestTask.cs:283

* Fix missing parenthesis in message.
2021-08-03 12:00:35 +02:00
Rolf Bjarne Kvinge 2ca8970122
[tests] Add a .NET version of introspection for Mac Catalyst. (#12039)
* [tests] Add a .NET version of introspection for Mac Catalyst.

It shows a lot of failures (so it's disabled by default), but this way we can
at least start to fix the failures.

* [xharness] Always ignore the new test.

* [xharness] Ignored projects should be ignored.
2021-07-28 09:39:29 +02:00
Rolf Bjarne Kvinge 2900ccb173
[xharness] Bump timeout for the .NET unit tests. (#12240)
Adding more and more tests make the tests take longer and longer...
2021-07-27 15:46:03 +02:00
Rolf Bjarne Kvinge 1b357204ee
[dotnet/msbuild] Add support for using LLVM to build .NET apps. Fixes #11379. (#12136)
Fixes https://github.com/xamarin/xamarin-macios/issues/11379.
2021-07-22 15:49:22 +02:00
Rolf Bjarne Kvinge e9c8b50e53
[xharness] Handle exceptions that occur while listing device candidates gracefully. (#12133)
This fixes a problem where the html report wouldn't be re-generated if there
was a problem loading a device (which for instance could happen if xharness
was unable to create a required simulator).
2021-07-20 12:19:31 +02:00
Rolf Bjarne Kvinge 7c30f55359 [xharness] Add test case for running monotouch-test with LLVM on .NET on device. 2021-07-16 14:50:55 +02:00
Rolf Bjarne Kvinge 78e2251671
[xharness] Don't fail when trying to set a RuntimeIdentifier if there isn't already a RuntimeIdentifier in the csproj. (#12105) 2021-07-13 18:51:03 +02:00
Rolf Bjarne Kvinge c88c0b5283
[dotnet] Remove the .NET workload resolver workaround, it's not needed anymore. (#11695) 2021-05-27 07:30:46 +02:00
Rolf Bjarne Kvinge 410167189b
[xharness] Run .NET tests when bumping .NET. (#11670) 2021-05-26 07:50:59 +02:00
Manuel de la Pena f3e596b675
[CI] If we modified xharness, run all tests. (#11640) 2021-05-21 10:08:59 -04:00
Rolf Bjarne Kvinge 7a5f03eb9c
[xharness] monotouch-test on CoreCLR is now green, so enable by default. (#11631)
* [xharness] monotouch-test on CoreCLR is now green, so enable by default.

* Update tests/xharness/Jenkins/TestVariationsFactory.cs

Co-authored-by: TJ Lambert <50846373+tj-devel709@users.noreply.github.com>
2021-05-21 07:52:07 +02:00
Rolf Bjarne Kvinge b4952521d3 Merge remote-tracking branch 'origin/main' into issue-11061 2021-05-20 16:22:50 +02:00
Rolf Bjarne Kvinge e3c8ac0a6a [xharness] Bump the timeout for the .NET unit tests to 30 minutes. 2021-05-20 16:22:33 +02:00
Manuel de la Pena 8ec9182b12
[CI] Allow to ignore tests if dotnet is enabled. (#11604) 2021-05-20 09:37:22 -04:00
Rolf Bjarne Kvinge bbfa3feee9 Merge remote-tracking branch 'origin/main' into tests-mac-catalyst-dotnet 2021-05-18 09:03:29 +02:00
Rolf Bjarne Kvinge b00b354f04
[xharness] Add a variation that uses the static registrar for monotouch-test/.NET/CoreCLR. (#11583) 2021-05-18 07:30:28 +02:00
Rolf Bjarne Kvinge 9e6704ea4e Merge remote-tracking branch 'origin/main' into tests-mac-catalyst-dotnet 2021-05-14 08:04:07 +02:00
Sebastien Pouliot b46cea29c7
[dotnet][tests] Fix monotouch-test RegistrarRemoval (#11527)
The registrar removal was fixed recently but the test was still failing.
Turns out xharness modify the linker setting for this test (as the
linker is required for this optimization) but the newer dotnet csproj
did not have an entry (to modify).

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

[xharness] Fix monotouch-test build when LinkSdk is used for dotnet projects

Skip failing assertion, issue filled
2021-05-13 17:01:20 -04:00
Rolf Bjarne Kvinge 12afa170bf [tests] Add a .NET/MacCatalyst variation of monotouch-test.
Also:

* Use the right arm64 runtime identifier depending on the target platform.
* Don't add CoreCLR variations of Mac Catalyst tests.
* Exclude UISearchDisplayController from tests, since it isn't available in
  Mac Catalyst anymore.
2021-05-13 16:03:34 +02:00
Rolf Bjarne Kvinge 913cbb67d7
[xharness] Add ARM64 variations for macOS/.NET using both MonoVM and CoreCLR. (#11516) 2021-05-12 15:04:14 +02:00
Rolf Bjarne Kvinge 4354b96889 [xharness] Add an ARM64 variation of the xammac tests. 2021-05-11 15:54:39 +02:00
Rolf Bjarne Kvinge 938f63da22
[tests] Make the mtouch test project reference the actual mtouch project. (#11400)
This makes it easier to test localized strings used in mtouch, since we don't have
to replicate the build for all the resources.

This required a few changes to avoid including code in the mtouch tests that already
exists in the mtouch executable.

Also rename the mtouch test project to mtouchtests.csproj.

This way the test project can reference the actual mtouch.csproj without
causing conflicts due to having two projects with the same name.

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2021-05-04 14:10:03 +02:00
Manuel de la Pena a1a5c01935
[Xharness] Fix the test selector. (#11315)
Fix the tests selector by setting the PR number in an env variable that
is not longer linked with Jenkins.

Fixes #11299
2021-04-27 09:23:21 -04:00
Filip Navara be14188892
Use the SDK UseMonoRuntime property instead of _XamarinRuntime in MSBuild (#11255)
* Use the SDK UseMonoRuntime property instead of _XamarinRuntime in MSBuild

* Fix typo

* Update Xamarin.Shared.Sdk.targets

Mono -> MonoVM
2021-04-22 16:02:56 +02:00
Sebastien Pouliot 4e48aa2ae1
[generator][dotnet] Add support for `[Uns|S]upportedOSPlatformAttribute` (#10580)
This moves our current/legacy attributes to the ones added in dotnet 5 [1].

Short Forms (only in bindings)

| Old                                   | New                                 |
|---------------------------------------|-------------------------------------|
| [iOS (7,0)]                           | [SupportedOSPlatform ("ios7.0")]    |
| [NoIOS]                               | [UnsupportedOSPlatform ("ios")]     |

Long Forms

| Old                                   | New                                 |
|---------------------------------------|-------------------------------------|
| [Introduced (PlatformName.iOS, 7,0)]  | [SupportedOSPlatform ("ios7.0")]    |
| [Obsoleted (PlatformName.iOS, 12,1)]  | [Obsolete (...)]                    |
| [Deprecated (PlatformName.iOS, 14,3)] | [UnsupportedOSPlatform ("ios14.3")] |
| [Unavailable (PlatformName.iOS)]      | [UnsupportedOSPlatform ("ios")]     |

Other changes

* `[SupportedOSPlatform]` and `[UnsupportedOSPlatform]` are not allowed on `interface` [2] which means they cannot be used for protocols. This is currently handled by inlining the existing attributes on all members.
* `[ObsoletedInOSPlatform]` was removed in net5 RC. This PR is now mapping the existing attributes to `[Obsolote]`, however multiple ones cannot be added so they need to be platform specific.

Remaining work (manual bindings update) tracked in https://github.com/xamarin/xamarin-macios/issues/11055

References

* [1] https://github.com/xamarin/xamarin-macios/issues/10170
* [2] https://github.com/dotnet/runtime/issues/47599
* [3] https://github.com/dotnet/runtime/issues/47601
2021-04-10 11:09:14 -04:00
Rolf Bjarne Kvinge 913d6e6f0e
[xharness] Fix execution results for mac tests. (#10852)
The test run can fail even if all the tests pass: in case the process crashes
or deadlocks at exit for instance. Don't overwrite such failures with the unit
test results.
2021-03-17 07:38:16 +01:00
Rolf Bjarne Kvinge 32e4d05195
[dotnet] Add support for specifying the VM with the _XamarinRuntime property. (#10881)
Use a private property (prefixed with underscore) for now, until we can decide
on a better/general name.

Also add a variation to xharness to build monotouch-test with CoreCLR
(building works fine, but it crashes at startup, which is expected at this
point).
2021-03-16 18:32:04 +01:00
Rolf Bjarne Kvinge 538fd86172
[tests] Add a .NET/macOS version of monotouch-test. (#10672)
* [tests] Add a .NET/macOS version of monotouch-test.

I made a macOS version of monotouch-test instead of a .NET version of xammac tests,
so that one day we might have only one test suite for all our API tests.

* Add a project file for .NET/macOS
* Fix some code to handle the fact that we're called 'monotouchtest' on macOS (but
  only on .NET).
* Ignore exception marshalling tests, those aren't working yet.

* [xharness] Add support for .NET/macOS and add a macOS version of monotouch-test to our tests

* [dotnet-linker] Skip libSystem.Net.Security.Native and libSystem.Native when collecting native methods to preserve for .NET/macOS.
2021-02-24 16:07:04 +01:00
Rolf Bjarne Kvinge d9af032dd5 [xharness] Run Mac Catalyst variations by default, and disable all but monotouch-test by default.
This will effectively run monotouch-test on Mac Catalyst by default.
2021-01-28 08:08:02 +01:00
Manuel de la Pena ff33a72a2b
[Xharness] Fix the xharness links to work with vsdrops. (#10469)
We need to add the prefix to the xharness logs or we will not be able to
acceess them via a click.
2021-01-20 08:00:24 -05:00
Rolf Bjarne Kvinge 93bbfe7a86
[tests] Merge apitest into xammac_tests. (#10276)
* [apitest] Sanitize files by adding missing eols.

* [apitest] Add #if __MACOS__ to all test files.

In preparation for the move into monotouchtest.

* [apitest] Move test files into monotouchtest.

* [tests] Remove the apitest project.

* [monotouch-test] Remove MessagingMac.cs, it's not needed.

* [xammac-tests] Add file PlatformInfo.cs to the build.

* [xammac-tests] Move files into monotouch-test.

* [monotouch-test] Rename test class to not clash with another test class of the same (Objective-C) name.

* [tests] How did this ever work?

Answer: it never did.

* [monotouch-test] Remove duplicated test code.

* [xammac-tests] Define DYNAMIC_REGISTRAR when we're using the dynamic registrar.

* [monotouch-test] Adjust the BundleTest.TestGetBundleId test to cope with having multiple apps for the same bundle id.

* [monotouch-test] Ignore a test that doesn't work with the static registrar (due to a bug in the static registrar).
2020-12-18 11:45:06 +01:00
Alex Soto bd16f26f88 Merge remote-tracking branch 'xamarin/xcode12.3' into main 2020-12-15 23:50:18 -05:00
Rolf Bjarne Kvinge daa7e123e2
Add very early support for Mac Catalyst. (#10199)
* Install the Mac Catalyst versions of the mono libraries and BCL.
   * The BCL is the same as the one for Xamarin.iOS, which means it has to be post-processed a bit to work with a Xamarin.MacCatalyst.dll
* Build our runtime for Mac Catalyst.
* Build a Xamarin.MacCatalyst.dll with the Mac Catalyst API (it compiles, but I haven't looked at the API surface at all). This PR assumes we're going to have a new TargetFrameworkIdentifier for Mac Catalyst, but a final decision has not been made (see https://github.com/dotnet/runtime/issues/44882), so this may change.
* Build a Xamarin.iOS.dll that contains type forwarders to Mac Catalyst for all the types that exist in both Mac Catalyst and Xamarin.iOS.
* Add support to xharness for running introspection on Mac Catalyst (there are a lot of failures because the API surface is wrong)
* Add support to our msbuild tasks and mtouch for building Mac Catalyst apps. This basically comes down to adding a new case in numerous places to either do things the iOS way or the macOS way, depending on each case.
* Add a __MACCATALYST__ define (which is in addition to the __IOS__ define).
2020-12-04 18:27:37 +01:00
Rolf Bjarne Kvinge 9e20285ebb
[tests] Merge the msbuild-mac tests into the Xamarin.MacDev.Tests project. (#10129) 2020-12-04 13:05:51 +01:00
Rolf Bjarne Kvinge eafa843ec2 [xharness] Add support for Mac Catalyst test suites. 2020-12-03 10:43:19 +01:00
Alex Soto 2b1d0799aa [xcode12.3][watchOS] Add x86_64 simulator support
* Bumps mono binaries to include x86_64 watchOS support
* Build runtime/registrar x86_64 slices
* Produce a 64 bit version of Xamarin.WatchOS.dll
* Allow building x86_64 for watch simulators in mtouch
* Let xharness know about x86_64

* [tests] Add x86_64 arch to test-libraries

* Make dotnet package aware of x64

* [ObjCRuntime] Fix computing if we're calling a stret function or not in a 64-bit watchOS simulator.

* [xharness] Re-enable some watchOS tests.

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

New commits in mono/mono:

* mono/mono@ac596375c7 Add support for OP_FCONV_TO_I to mini-arm64.c. (#20548)
* mono/mono@392fe5b87b [2020-02][watchOS] Add simwatch64 support (#20552)
* mono/mono@a22ed3f094 Fix potential crash for Encoder.Convert (#20522)
* mono/mono@970783731f Bump to F# 5.0 (#20511)
* mono/mono@32ab5066f7 Bump msbuild to fix a build issue
* mono/mono@93a7fe77e8 Ensure special static slots respect alignment. (#20506)
* mono/mono@3db5b35841 [debugger] Switch to GC Unsafe in signal handler callbacks (#20495)
* mono/mono@af315f44c4 [2020-02][corlib] ThreadAbortException protection for ArraySortHelper (#20468)
* mono/mono@ca11fb0fd8 [2020-02] Bump ikvm-fork to include https://github.com/mono/ikvm-fork/pull/20 (#20452)

Diff: be2226b5a1..ac596375c7
2020-12-02 22:23:45 -05:00
Alex Soto 72c7b1ffcc
[main][watchOS] Add x86_64 simulator support (#10059)
* [watchOS] Add x86_64 simulator support

* Build runtime/registrar x86_64 slices
* Produce a 64 bit version of Xamarin.WatchOS.dll
* Allow building x86_64 for watch simulators in mtouch
* Let xharness know about x86_64

* [tests] Add x86_64 arch to test-libraries

* Make dotnet package aware of x64

* [ObjCRuntime] Fix computing if we're calling a stret function or not in a 64-bit watchOS simulator.

* [xharness] Re-enable some watchOS tests.

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-11-20 09:27:46 -05:00
Manuel de la Pena 0f7bc75e50 Merge branch 'xcode12.2' into main-xcode12.2 2020-11-17 11:09:15 -05:00
Přemek Vysoký 0fba63cdc7
[xharness] Remove Microsoft.DotNet.XHarness.iOS.Shared project and use NuGet instead (#9980) 2020-11-13 11:05:10 -05:00