mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Force OsuGameTests to use a unique storage each run
This commit is contained in:
@ -118,6 +118,8 @@ namespace osu.Game.Tests.Visual
|
||||
base.Content.Add(content = new DrawSizePreservingFillContainer());
|
||||
}
|
||||
|
||||
protected virtual bool UseFreshStoragePerRun => false;
|
||||
|
||||
public virtual void RecycleLocalStorage()
|
||||
{
|
||||
if (localStorage?.IsValueCreated == true)
|
||||
@ -133,7 +135,7 @@ namespace osu.Game.Tests.Visual
|
||||
}
|
||||
|
||||
localStorage =
|
||||
new Lazy<Storage>(() => host is HeadlessGameHost ? host.Storage : new NativeStorage(Path.Combine(RuntimeInfo.StartupDirectory, $"{GetType().Name}-{Guid.NewGuid()}")));
|
||||
new Lazy<Storage>(() => !UseFreshStoragePerRun && host is HeadlessGameHost ? host.Storage : new NativeStorage(Path.Combine(RuntimeInfo.StartupDirectory, $"{GetType().Name}-{Guid.NewGuid()}")));
|
||||
}
|
||||
|
||||
[Resolved]
|
||||
|
Reference in New Issue
Block a user