1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 02:43:19 +08:00

Merge pull request #17547 from frenzibyte/m1-ignore-realm-migration

Ignore EF-to-realm migration tests on M1 ARM architectures
This commit is contained in:
Dan Balasescu 2022-03-30 11:47:29 +09:00 committed by GitHub
commit e869b7286a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 1 deletions

View File

@ -3,7 +3,9 @@
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using NUnit.Framework;
using osu.Framework;
using osu.Framework.Allocation;
using osu.Game.Beatmaps;
using osu.Game.Database;
@ -28,6 +30,23 @@ namespace osu.Game.Tests.Visual.Navigation
stream.CopyTo(outStream);
}
[SetUp]
public void SetUp()
{
if (RuntimeInfo.OS == RuntimeInfo.Platform.macOS && RuntimeInformation.OSArchitecture == Architecture.Arm64)
Assert.Ignore("EF-to-realm migrations are not supported on M1 ARM architectures.");
}
public override void SetUpSteps()
{
// base SetUpSteps are executed before the above SetUp, therefore early-return to allow ignoring test properly.
// attempting to ignore here would yield a TargetInvocationException instead.
if (RuntimeInfo.OS == RuntimeInfo.Platform.macOS && RuntimeInformation.OSArchitecture == Architecture.Arm64)
return;
base.SetUpSteps();
}
[Test]
public void TestMigration()
{

View File

@ -74,7 +74,7 @@ namespace osu.Game.Tests.Visual
[TearDownSteps]
public void TearDownSteps()
{
if (DebugUtils.IsNUnitRunning)
if (DebugUtils.IsNUnitRunning && Game != null)
{
AddStep("exit game", () => Game.Exit());
AddUntilStep("wait for game exit", () => Game.Parent == null);