mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Merge branch 'master' into restore-ruleset-tests
This commit is contained in:
19
osu.Game/Tests/CleanRunHeadlessGameHost.cs
Normal file
19
osu.Game/Tests/CleanRunHeadlessGameHost.cs
Normal file
@ -0,0 +1,19 @@
|
||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework.Platform;
|
||||
|
||||
namespace osu.Game.Tests
|
||||
{
|
||||
/// <summary>
|
||||
/// A headless host which cleans up before running (removing any remnants from a previous execution).
|
||||
/// </summary>
|
||||
public class CleanRunHeadlessGameHost : HeadlessGameHost
|
||||
{
|
||||
public CleanRunHeadlessGameHost(string gameName = @"", bool bindIPC = false, bool realtime = true)
|
||||
: base(gameName, bindIPC, realtime)
|
||||
{
|
||||
Storage.DeleteDirectory(string.Empty);
|
||||
}
|
||||
}
|
||||
}
|
@ -13,11 +13,8 @@ namespace osu.Game.Tests.Visual
|
||||
{
|
||||
public override void RunTest()
|
||||
{
|
||||
using (var host = new HeadlessGameHost($"test-{Guid.NewGuid()}", realtime: false))
|
||||
{
|
||||
host.Storage.DeleteDirectory(string.Empty);
|
||||
using (var host = new CleanRunHeadlessGameHost($"test-{Guid.NewGuid()}", realtime: false))
|
||||
host.Run(new OsuTestCaseTestRunner(this));
|
||||
}
|
||||
}
|
||||
|
||||
public class OsuTestCaseTestRunner : OsuGameBase
|
||||
|
Reference in New Issue
Block a user