Singularity/Library/PackageCache/com.unity.test-framework@1..../UnityEditor.TestRunner/TestRun/Tasks/LegacyEditModeRunTask.cs

26 lines
827 B
C#
Raw Normal View History

2024-05-06 14:45:45 -04:00
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;
}
}
}
}