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

3 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 744902f014
Simplify argument logic in the C# scripts. (#19805)
When passing -s to the csharp binary, the remaining arguments passed to the
script will be available in the global 'Args' variable.

This way makes it easier to consume arguments in the script, since we won't
have to call Environment.GetCommandLineArgs () and then manually skip the
arguments to the native executable (which would be: the path to mono, the path
to the csharp binary, and the '-s' argument if applicable).
2024-01-15 16:51:36 +01:00
Rolf Bjarne Kvinge 0e813a9a14
[tests] Improve the run-with-timeout script to trigger a crash report if launch/execution times out. (#19670)
Improve the run-with-timeout script to trigger a crash report (by sending
SIGABRT to the target process before SIGKILL) if launch/execution times out.
This will hopefully help in diagnosing startup/execution hangs.
2023-12-21 18:10:45 +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