WuhuIslandTesting/Library/PackageCache/com.unity.test-framework@1.1.31/UnityEditor.TestRunner/TestRun/Tasks/LegacyPlayerRunTask.cs
2025-01-07 02:06:59 +01:00

18 lines
No EOL
842 B
C#

using System.Collections;
using System.Linq;
using UnityEngine.TestTools.TestRunner;
namespace UnityEditor.TestTools.TestRunner.TestRun.Tasks
{
internal class LegacyPlayerRunTask : TestTaskBase
{
public override IEnumerator Execute(TestJobData testJobData)
{
var executionSettings = testJobData.executionSettings;
var settings = PlaymodeTestsControllerSettings.CreateRunnerSettings(executionSettings.filters.Select(filter => filter.ToRuntimeTestRunnerFilter(executionSettings.runSynchronously)).ToArray());
var launcher = new PlayerLauncher(settings, executionSettings.targetPlatform, executionSettings.overloadTestRunSettings, executionSettings.playerHeartbeatTimeout, executionSettings.playerSavePath);
launcher.Run();
yield return null;
}
}
}