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

288 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge f634ea9b3c Merge remote-tracking branch 'origin/main' into dev/rolf/bump-main-in-net9.0-2024-09-18 2024-09-19 09:48:34 +02:00
Rolf Bjarne Kvinge 58ebbe7a06 [tests] Don't use an iOS-specific storyboard on other platforms. 2024-09-17 08:45:29 +02:00
Rolf Bjarne Kvinge a6a11784d4 [net9.0] Merge main into net9.0. 2024-09-04 15:24:51 +02:00
Rolf Bjarne Kvinge a26a7fd231 [xcode16] Merge main into xcode16. 2024-08-31 02:49:11 +02:00
dotnet-maestro[bot] a58c044830
[main] Update dependencies from dotnet/installer (#21021)
This pull request updates the following dependencies

## From https://github.com/dotnet/installer

- **Subscription**: 80cb9ffd-f92f-4fc8-9f8b-08dbca46abfb
- **Build**: 20240819.10
- **Date Produced**: August 19, 2024 9:04:53 PM UTC
- **Commit**: 6e9002c2efcfc09687feca31864ebc987c3c9ec8
- **Branch**: refs/heads/release/8.0.1xx

- **Updates**:
  - **Microsoft.Dotnet.Sdk.Internal**: [from 8.0.109-servicing.24416.1 to 8.0.109-servicing.24419.10][8]

[8]: 228439883b...6e9002c2ef

## Coherency Updates

The following updates ensure that dependencies with a *CoherentParentDependency*
attribute were produced in a build used as input to the parent dependency's build.
See [Dependency Description Format](https://github.com/dotnet/arcade/blob/master/Documentation/DependencyDescriptionFormat.md#dependency-description-overview)

- **Coherency Updates**:
  - **Microsoft.NET.ILLink.Tasks**: from 8.0.7 to 8.0.8 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.AspNetCore.App.Ref**: from 8.0.7 to 8.0.8 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.NETCore.App.Ref**: from 8.0.7 to 8.0.8 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100**: from 8.0.7 to 8.0.8 (parent: Microsoft.NETCore.App.Ref)
  - **Microsoft.NETCore.App.Ref**: from 8.0.7 to 8.0.8 (parent: Microsoft.Dotnet.Sdk.Internal)
2024-08-28 20:41:27 +02:00
dotnet-maestro[bot] 2142e3190c
[net9.0] Update dependencies from dotnet/sdk (#20994)
This pull request updates the following dependencies

## Coherency Updates

The following updates ensure that dependencies with a *CoherentParentDependency*
attribute were produced in a build used as input to the parent dependency's build.
See [Dependency Description Format](https://github.com/dotnet/arcade/blob/master/Documentation/DependencyDescriptionFormat.md#dependency-description-overview)

- **Coherency Updates**:
  - **Microsoft.NET.ILLink.Tasks**: from 9.0.0-rc.1.24406.14 to 9.0.0-rc.1.24408.12 (parent: Microsoft.NET.Sdk)
  - **Microsoft.NETCore.App.Ref**: from 9.0.0-rc.1.24406.14 to 9.0.0-rc.1.24408.12 (parent: Microsoft.NET.Sdk)
  - **Microsoft.NET.Workload.Emscripten.Current.Manifest-9.0.100.Transport**: from 9.0.0-rc.1.24379.5 to 9.0.0-rc.1.24402.2 (parent: Microsoft.NETCore.App.Ref)
  - **Microsoft.NETCore.App.Ref**: from 9.0.0-rc.1.24406.14 to 9.0.0-rc.1.24408.12 (parent: Microsoft.NET.Sdk)

## From https://github.com/dotnet/sdk

- **Subscription**: 3727984b-7a79-4ba3-37dd-08dbe6bddf31
- **Build**: 20240809.1
- **Date Produced**: August 9, 2024 8:31:14 AM UTC
- **Commit**: 43360291a50c9c7c471551f8f8363919d38014ea
- **Branch**: refs/heads/main

- **Updates**:
  - **Microsoft.NET.Sdk**: [from 9.0.100-rc.1.24408.2 to 9.0.100-rc.1.24409.1][9]
  - **Microsoft.NET.ILLink.Tasks**: [from 9.0.0-rc.1.24406.14 to 9.0.0-rc.1.24408.12][10]
  - **Microsoft.NETCore.App.Ref**: [from 9.0.0-rc.1.24406.14 to 9.0.0-rc.1.24408.12][10]
  - **Microsoft.NET.Workload.Emscripten.Current.Manifest-9.0.100.Transport**: [from 9.0.0-rc.1.24379.5 to 9.0.0-rc.1.24402.2][11]
  - **Microsoft.NETCore.App.Ref**: [from 9.0.0-rc.1.24406.14 to 9.0.0-rc.1.24408.12][10]

[9]: 196789faff...43360291a5
[10]: 4985021ebf...68511fd27f
[11]: bdc1e33d5d...edf3e90fa2
2024-08-12 11:22:46 +02:00
dotnet-maestro[bot] dfa48ff895
[net9.0] Update dependencies from dotnet/sdk (#20794)
This pull request updates the following dependencies

## Coherency Updates

The following updates ensure that dependencies with a *CoherentParentDependency*
attribute were produced in a build used as input to the parent dependency's build.
See [Dependency Description Format](https://github.com/dotnet/arcade/blob/master/Documentation/DependencyDescriptionFormat.md#dependency-description-overview)

- **Coherency Updates**:
  - **Microsoft.NET.ILLink.Tasks**: from 9.0.0-preview.6.24319.11 to 9.0.0-preview.7.24357.2 (parent: VS.Tools.Net.Core.SDK.Resolver)
  - **Microsoft.AspNetCore.App.Ref**: from 9.0.0-preview.6.24320.4 to 9.0.0-preview.7.24360.7 (parent: VS.Tools.Net.Core.SDK.Resolver)
  - **Microsoft.NETCore.App.Ref**: from 9.0.0-preview.6.24319.11 to 9.0.0-preview.7.24357.2 (parent: VS.Tools.Net.Core.SDK.Resolver)
  - **Microsoft.NET.Workload.Emscripten.Current.Manifest-9.0.100.Transport**: from 9.0.0-preview.6.24317.2 to 9.0.0-preview.7.24319.4 (parent: Microsoft.NETCore.App.Ref)
  - **Microsoft.NETCore.App.Ref**: from 9.0.0-preview.6.24319.11 to 9.0.0-preview.7.24357.2 (parent: VS.Tools.Net.Core.SDK.Resolver)
  - **Microsoft.DotNet.Cecil**: from 0.11.4-alpha.24313.1 to 0.11.5-alpha.24324.1 (parent: Microsoft.NETCore.App.Ref)

## From https://github.com/dotnet/sdk

- **Subscription**: 3727984b-7a79-4ba3-37dd-08dbe6bddf31
- **Build**: 20240711.1
- **Date Produced**: July 11, 2024 8:29:26 AM UTC
- **Commit**: 81ac886071828da7f14d0c26d731ac06abd0c7f6
- **Branch**: refs/heads/main

- **Updates**:
  - **VS.Tools.Net.Core.SDK.Resolver**: [from 9.0.100-preview.7.24323.5 to 9.0.100-preview.7.24361.1][58]
  - **Microsoft.NET.ILLink.Tasks**: [from 9.0.0-preview.6.24319.11 to 9.0.0-preview.7.24357.2][59]
  - **Microsoft.AspNetCore.App.Ref**: [from 9.0.0-preview.6.24320.4 to 9.0.0-preview.7.24360.7][60]
  - **Microsoft.NETCore.App.Ref**: [from 9.0.0-preview.6.24319.11 to 9.0.0-preview.7.24357.2][59]
  - **Microsoft.NET.Workload.Emscripten.Current.Manifest-9.0.100.Transport**: [from 9.0.0-preview.6.24317.2 to 9.0.0-preview.7.24319.4][61]
  - **Microsoft.NETCore.App.Ref**: [from 9.0.0-preview.6.24319.11 to 9.0.0-preview.7.24357.2][59]
  - **Microsoft.DotNet.Cecil**: [from 0.11.4-alpha.24313.1 to 0.11.5-alpha.24324.1][62]

[58]: ea9243f9cb...81ac886071
[59]: 117cfccdd7...4e278fe17f
[60]: 613c1e990b...71b5ef3f5c
[61]: 9880d891dd...ffe9afdc04
[62]: d145726036...7e4af02521
2024-07-11 19:58:14 +02:00
Rolf Bjarne Kvinge 34a06c8d4e [msbuild] Fix computing target device for tvOS.
Also use a tvOS storyboard (and not an iOS storyboard) for tvOS test projects (or
alternatively no storyboard at all, whenever that's possible).
2024-07-09 10:22:36 +02:00
dotnet-maestro[bot] 4a9bfcb154
[net9.0] Update dependencies from dotnet/sdk (#20621)
This pull request updates the following dependencies

## Coherency Updates

The following updates ensure that dependencies with a *CoherentParentDependency*
attribute were produced in a build used as input to the parent dependency's build.
See [Dependency Description Format](https://github.com/dotnet/arcade/blob/master/Documentation/DependencyDescriptionFormat.md#dependency-description-overview)

- **Coherency Updates**:
  - **Microsoft.NET.ILLink.Tasks**: from 9.0.0-preview.5.24256.1 to 9.0.0-preview.6.24281.1 (parent: VS.Tools.Net.Core.SDK.Resolver)
  - **Microsoft.AspNetCore.App.Ref**: from 9.0.0-preview.5.24256.2 to 9.0.0-preview.6.24305.3 (parent: VS.Tools.Net.Core.SDK.Resolver)
  - **Microsoft.NETCore.App.Ref**: from 9.0.0-preview.5.24256.1 to 9.0.0-preview.6.24281.1 (parent: VS.Tools.Net.Core.SDK.Resolver)
  - **Microsoft.NET.Workload.Emscripten.Current.Manifest-9.0.100.Transport**: from 9.0.0-preview.5.24223.2 to 9.0.0-preview.6.24277.2 (parent: Microsoft.NETCore.App.Ref)
  - **Microsoft.NETCore.App.Ref**: from 9.0.0-preview.5.24256.1 to 9.0.0-preview.6.24281.1 (parent: VS.Tools.Net.Core.SDK.Resolver)

## From https://github.com/dotnet/sdk

- **Subscription**: 3727984b-7a79-4ba3-37dd-08dbe6bddf31
- **Build**: 20240605.17
- **Date Produced**: June 5, 2024 11:40:08 PM UTC
- **Commit**: 6ecc573c92a1237627b37310c6aec65ff3caacc8
- **Branch**: refs/heads/main

- **Updates**:
  - **VS.Tools.Net.Core.SDK.Resolver**: [from 9.0.100-preview.5.24262.2 to 9.0.100-preview.6.24305.17][65]
  - **Microsoft.NET.ILLink.Tasks**: [from 9.0.0-preview.5.24256.1 to 9.0.0-preview.6.24281.1][66]
  - **Microsoft.AspNetCore.App.Ref**: [from 9.0.0-preview.5.24256.2 to 9.0.0-preview.6.24305.3][67]
  - **Microsoft.NETCore.App.Ref**: [from 9.0.0-preview.5.24256.1 to 9.0.0-preview.6.24281.1][66]
  - **Microsoft.NET.Workload.Emscripten.Current.Manifest-9.0.100.Transport**: [from 9.0.0-preview.5.24223.2 to 9.0.0-preview.6.24277.2][68]
  - **Microsoft.NETCore.App.Ref**: [from 9.0.0-preview.5.24256.1 to 9.0.0-preview.6.24281.1][66]

[65]: 1741345c63...6ecc573c92
[66]: 84b3339505...3750ac5161
[67]: da3aa27233...8adff2c3cf
[68]: 53288f87c5...fae2c95346

---------

Co-authored-by: Alex Soto <alex@alexsoto.me>
2024-06-25 13:49:44 +02:00
Rolf Bjarne Kvinge 9cd3e86ced [tests] Bump min OS versions in all tests. 2024-02-28 12:08:24 +01:00
Rolf Bjarne Kvinge 3fb52c3ed7 [tests] Bump min OS versions in all tests. 2024-01-29 15:24:30 +01:00
Simon Rozsival 7a45bad062 Update test 2023-11-24 14:51:40 +01:00
GitHub Actions Autoformatter 7a39369644 Auto-format source code 2023-11-23 14:19:08 +00:00
Simon Rozsival 635ef072c9 Change the transformation of Preserve attribute into DynamicDependency 2023-11-23 14:08:31 +01:00
Rolf Bjarne Kvinge ad7996ee7b
Add the .NET TFM as a constant to the generated SdkVersions.cs from our Makefile variables. (#19401)
This way we can avoid hardcoding the TFM in a few more places.
2023-11-08 13:36:50 +01:00
Rolf Bjarne Kvinge 79ff82d046 [net8.0-xcode15] Merge net8.0 into net8.0-xcode15. 2023-09-18 18:28:24 +02:00
Rolf Bjarne Kvinge f88dc4406d [net8.0] Merge main into net8.0. 2023-09-14 07:23:52 +02:00
Rolf Bjarne Kvinge 059975888c
[tests] Move a calendar test from being macOS-specific to run on all platforms. Fixes #12468. (#18971)
By moving the test from a macOS-specific location to a general location, it
becomes obvious that the test behaves the same on all platforms (which the
issue was about: it looked like we had different behavior on macOS vs the
other platforms, and the issue requested validation that this was correct - by
running the test on all platforms, with no platform-specific code, it
demonstrates that there's no macOS-specific behavior).

Fixes https://github.com/xamarin/xamarin-macios/issues/12468.
2023-09-12 09:53:46 +02:00
Rolf Bjarne Kvinge 8bb54d360f [net8.0-xcode15] Merge net8.0 into net8.0-xcode15. 2023-08-16 11:21:06 +02:00
Rolf Bjarne Kvinge b7a7b4d1d2 Merge remote-tracking branch 'origin/net8.0' into bump-main-in-net8.0-2023-08-14 2023-08-15 08:27:14 +02:00
Rolf Bjarne Kvinge f8b7b5326c
[dotnet] Enable the reflection-based json serializer by default. Fixes #18057. (#18710)
Fixes https://github.com/xamarin/xamarin-macios/issues/18057.
2023-08-15 08:19:50 +02:00
Rolf Bjarne Kvinge 167d765dc8 [tests] Limit JsonSerializer tests to .NET. 2023-08-14 16:52:41 +02:00
GitHub Actions Autoformatter 2ea82619d0 Auto-format source code 2023-08-14 13:43:00 +00:00
Rolf Bjarne Kvinge ac90c511d1 [net8.0] Merge main into net8.0. 2023-08-14 15:36:54 +02:00
Manuel de la Pena 558e45f9b8 [Linker] Fix regression tests for xcode 15. 2023-08-04 11:47:29 -04:00
Rolf Bjarne Kvinge e2c673972b [net8.0] Merge main into net8.0. 2023-06-29 17:05:54 +02:00
Rolf Bjarne Kvinge 64b4a5909a
[tests] Automatic network failure detection in tests. (#18439)
Detect if a url we use in our tests actually works, and if not, save the
results and ignore any subsequent test that tries to use that url.

---------

Co-authored-by: Haritha Mohan <harithamohan@microsoft.com>
2023-06-29 07:48:53 +02:00
Rolf Bjarne Kvinge 6f1c0ea534 [net8.0] Merge main into net8.0. 2023-06-08 13:32:48 +02:00
Rolf Bjarne Kvinge ea8a0c5fe7 Only print debug spew if the test fails. 2023-06-07 18:35:30 +02:00
Rolf Bjarne Kvinge 30fb5dfb42 Add some bot exclusions. 2023-06-07 15:10:34 +02:00
Rolf Bjarne Kvinge 94a56f9a05 Add more debug code. 2023-06-07 08:04:47 +02:00
Rolf Bjarne Kvinge 7a1c7a82c9 Add debug code. 2023-06-06 21:54:12 +02:00
Rolf Bjarne Kvinge b59587a0cd
[tests] Rework TestRuntime.RunAsync. (#18391)
* Move all the RunAsync logic to the TestRuntime class, instead of having some
  in TestRuntime and some in AppDelegate.
* Create a unified Task-based implementation for all platforms, optionally showing
  a UI on the platforms where we can do that.
* Remove all the overloads that took a DateTime timeout, and instead only use a
  TimeSpan timeout. This simplified some of the code.
* The new Task-based implementation will capture any exceptions (and rethrow most
  of them) from the tasks we're waiting for, so no need to do that in each RunAsync
  caller. This simplifies the testing code a lot for some tests.
* Add a new TryRunAsync method that will return (instead of rethrowing) any exceptions.
  This simplifies some of the testing code (which verifies the correct exception,
  or ignores the test in case of some exceptions).
* The new Task-based implementation will bubble up any NUnit exceptions, which
  means that the tasks we're waiting for can call NUnit's Assert and the right thing
  happens (in particular Assert.Ignore will actually ignore the test).
2023-06-06 21:36:49 +02:00
Rolf Bjarne Kvinge 1a182ec08d [tests] Improve assert message for easier test failure diagnostics. 2023-06-06 18:24:48 +02:00
Rolf Bjarne Kvinge b8c7dc7dc3 [net8.0] Merge main into net8.0. 2023-05-11 11:54:37 +02:00
Rolf Bjarne Kvinge 69eb2755b5
[tests] Ignore a network failure condition on bots in the LinkSdk.AsyncTests.Bug12221 test. (#18252) 2023-05-11 07:28:38 +02:00
Rolf Bjarne Kvinge 36af029204
Change all null checking expressions to use 'is' and 'is not'. (#18176)
Change all null checking expressions to use 'is null' and 'is not null'
instead of '== null' and '!= null'.

This was mostly done with sed, so code can probably be improved in many
other ways with manual inspection, but that will come over time.

Also add code to the autoformat script to automatically fix these issues in the future.
2023-05-05 17:52:19 +02:00
dotnet-maestro[bot] a7de036e62
[net8.0] Update dependencies from dotnet/installer (#17888)
This pull request updates the following dependencies

## Coherency Updates

The following updates ensure that dependencies with a *CoherentParentDependency*
attribute were produced in a build used as input to the parent dependency's build.
See [Dependency Description Format](https://github.com/dotnet/arcade/blob/master/Documentation/DependencyDescriptionFormat.md#dependency-description-overview)

- **Coherency Updates**:
  - **Microsoft.NET.ILLink.Tasks**: from 8.0.0-preview.3.23171.4 to 8.0.0-preview.4.23176.4 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.AspNetCore.App.Ref**: from 8.0.0-preview.4.23171.7 to 8.0.0-preview.4.23176.6 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.NETCore.App.Ref**: from 8.0.0-preview.3.23171.4 to 8.0.0-preview.4.23176.4 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100.Transport**: from 8.0.0-preview.3.23167.1 to 8.0.0-preview.4.23170.1 (parent: Microsoft.NETCore.App.Ref)
  - **Microsoft.NETCore.App.Ref**: from 8.0.0-preview.3.23171.4 to 8.0.0-preview.4.23176.4 (parent: Microsoft.Dotnet.Sdk.Internal)

## From https://github.com/dotnet/installer
- **Subscription**: 9a2944cb-7dee-4bf2-a65c-08dabd10ae64
- **Build**: 20230328.2
- **Date Produced**: March 28, 2023 10:27:20 AM UTC
- **Commit**: 69e28735b98581f2ee0825953de83a8581df7563
- **Branch**: refs/heads/main

- **Updates**:
  - **Microsoft.Dotnet.Sdk.Internal**: [from 8.0.100-preview.4.23172.3 to 8.0.100-preview.4.23178.2][21]
  - **Microsoft.NET.ILLink.Tasks**: [from 8.0.0-preview.3.23171.4 to 8.0.0-preview.4.23176.4][22]
  - **Microsoft.AspNetCore.App.Ref**: [from 8.0.0-preview.4.23171.7 to 8.0.0-preview.4.23176.6][23]
  - **Microsoft.NETCore.App.Ref**: [from 8.0.0-preview.3.23171.4 to 8.0.0-preview.4.23176.4][22]
  - **Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100.Transport**: [from 8.0.0-preview.3.23167.1 to 8.0.0-preview.4.23170.1][24]
  - **Microsoft.NETCore.App.Ref**: [from 8.0.0-preview.3.23171.4 to 8.0.0-preview.4.23176.4][22]

[21]: 27622e3898...69e28735b9
[22]: edb161ab06...8d5f520838
[23]: 16907a1efa...c2350729d0
[24]: 25d9f7a5e3...a464820353
2023-04-12 09:38:36 +02:00
Rolf Bjarne Kvinge a54ab5c42a
[tools/tests] Fix bug in 'link all' test and the resulting regression that showed up in code. (#18016)
There's a 'link all' test that's verifying that the IntroducedAttribute is
linked away. It does so by verifying that the linked app doesn't have a
'IntroducedAttribute' type - but the test was constructing the fully qualified
type name to look for incorrectly:

    ObjCRuntime.IntroducedAttribute, , Microsoft.iOS

Note the double comma: that meant we wouldn't find the type, even if it wasn't linked away.

The fix is easy (use a single comma), with one caveat (don't use a constant
string, because the linker sees the reference to
"ObjCRuntime.IntroducedAttribute" and _helpfully_ preserves it, exactly what
we don't want), but it revealed that the tested behavior regressed: a fully
linked app wouldn't link away the IntroducedAttribute.

So a fix is also needed: properly remove TVAttribute, WatchAttribute and
MacCatalystAttribute, which are subclasses of IntroducedAttribute (and what
would make the linker keep IntroducedAttribute).

Interestingly this showed up because of a bug in the runtime, where parsing
the invalid assembly name would now throw an exception
(https://github.com/dotnet/runtime/issues/84118).
2023-04-11 20:12:35 +02:00
Rolf Bjarne Kvinge c54f623141 [tests] Remove 32-bit architectures and logic from project files.
Additionally remove a lot of 64-bit-specific configurations
(Debug64/Release64) as well, and just make the default configurations
(Debug/Release) be 64-bit.
2023-02-02 16:30:29 +01:00
Rolf Bjarne Kvinge 94a3903df7 [tests] Bump min OS versions in all tests. 2023-02-02 16:30:28 +01:00
Rolf Bjarne Kvinge 50b6eda7c1 Merge main into net8.0. 2023-01-24 15:03:03 +01:00
Rolf Bjarne Kvinge 4453d773ce
[tests] Unify code related to how to load test assemblies. (#17111)
Unify a lot of code related to how to load test assemblies.

This resulted in adding a couple of test assemblies to monotouch-test when executed on macOS (this was a bug), and this also required adapting some of those tests to work correctly on macOS.
2023-01-13 22:20:47 +01:00
Rolf Bjarne Kvinge 9cdb2042ce Merge main into net8.0. 2022-12-12 18:01:02 +01:00
Rolf Bjarne Kvinge dc37be300e
Remove bitcode-related code, since bitcode is dead. (#16986) 2022-12-12 15:25:37 +01:00
Rolf Bjarne Kvinge 25fc6c84d1
[dotnet-linker] Handle null fields in BackingFieldDelayHandler as unmarked fields. Fixes #16957. (#16970)
The BackingFieldDelayHandler will temporarily remove the body of Dispose
methods, and then for every field accessed in the Dispose method that was
preserved by the linker, we'll keep the corresponding code in the Dispose
method (otherwise we'd remove the code).

This is a way to remove fields that are _only_ accessed (and nulled out) in
the Dispose method.

However, we were running into a problem with determining if a field was marked
by the linker: if the field is in a generic type, and that field was not
marked by the linker, the linker might have actually removed the field from
the containing type before we're processing the Dispose methods, and we'd find
a null field definition where no null field definition was expected
(eventually resulting in an ArgumentNullException).

Fix this by treating a null field definition as an unmarked field.

Also add a test.

Fixes https://github.com/xamarin/xamarin-macios/issues/16957.
2022-12-07 15:53:15 +01:00
Rolf Bjarne Kvinge 90c4972db1 Merge main into net8.0. 2022-12-07 08:07:44 +01:00
Rolf Bjarne Kvinge 407b4c4ac6
[tests] Add logic to detect when macOS and Mac Catalyst test apps don't launch properly. Fixes #xamarin/maccore@2414. (#16946)
Implement a launch timeout for macOS and Mac Catalyst apps where if a certain
environment variable (LAUNCH_SENTINEL_FILE) is set, the app will create that
file at launch. The code launching the test app will wait 10 seconds and check
if the file is there: if it's not, something went wrong, in which case the app
should be terminated and launched again.

This necessitated re-implementing the launch script in C#, since it got quite
complicated to implement in bash.

This fixes an issue with Mac Catalyst apps where something would go wrong
during the app launch and nothing would happen (but the app wouldn't be
deadlocked, it would just sit there, doing nothing).

The TestRuntime.cs and ApplePlatform.cs had to be added to a few test projects
to make this compile, which required a few fixes in these files for building
with legacy Xamarin.Mac.

Fixes https://github.com/xamarin/maccore/issues/2414.
2022-12-06 13:11:36 +01:00
Rolf Bjarne Kvinge 94bdee0d7c
[autoformat] Update some new code. (#16967)
This is code from PRs that were started before we started autoformatting
the files in question, and then merged afterwards.
2022-12-06 07:49:52 +01:00
Rolf Bjarne Kvinge b3cb85c0ad
[tests] Allow for timeouts in CI in a few tests. (#16945)
Also add some exception handling.

Hopefully fixes more issues with broken network in CI.
2022-12-05 08:53:33 +01:00