Singularity/Library/PackageCache/com.unity.test-framework@1..../UnityEditor.TestRunner/TestRun/Tasks/LegacyEditModeRunTask.cs
2024-05-06 11:45:45 -07:00

26 lines
827 B
C#

using System.Collections;
using UnityEngine;
using UnityEngine.TestTools;
namespace UnityEditor.TestTools.TestRunner.TestRun.Tasks
{
internal class LegacyEditModeRunTask : TestTaskBase
{
public LegacyEditModeRunTask() : base(true)
{
}
public override IEnumerator Execute(TestJobData testJobData)
{
var testLauncher = new EditModeLauncher(testJobData.executionSettings.filters, TestPlatform.EditMode, testJobData.executionSettings.runSynchronously);
testJobData.editModeRunner = testLauncher.m_EditModeRunner;
testLauncher.Run();
while (testJobData.editModeRunner != null && !testJobData.editModeRunner.RunFinished)
{
yield return null;
}
}
}
}