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:
commit
e869b7286a
@ -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()
|
||||
{
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user