GlobalGameJame/Library/PackageCache/com.unity.test-framework@1.1.9/UnityEditor.TestRunner/TestRun/Tasks/LegacyPlayModeRunTask.cs
JonatanRek bea2dce063 Initial
test
2020-01-31 16:10:04 +01:00

26 lines
775 B
C#

using System.Collections;
using System.Linq;
using UnityEngine.TestTools.TestRunner;
namespace UnityEditor.TestTools.TestRunner.TestRun.Tasks
{
internal class LegacyPlayModeRunTask : TestTaskBase
{
public LegacyPlayModeRunTask() : base(true)
{
}
public override IEnumerator Execute(TestJobData testJobData)
{
var settings = PlaymodeTestsControllerSettings.CreateRunnerSettings(testJobData.executionSettings.filters.Select(filter => filter.ToTestRunnerFilter()).ToArray());
var launcher = new PlaymodeLauncher(settings);
launcher.Run();
while (PlaymodeLauncher.IsRunning)
{
yield return null;
}
}
}
}