UnityGame/Library/PackageCache/com.unity.test-framework/UnityEditor.TestRunner/TestRun/Tasks/CleanupTestControllerTask.cs

26 lines
638 B
C#
Raw Normal View History

2024-10-27 10:53:47 +03:00
using System;
using System.Collections;
using UnityEngine.TestTools.TestRunner;
namespace UnityEditor.TestTools.TestRunner.TestRun.Tasks
{
internal class CleanupTestControllerTask : TestTaskBase
{
public CleanupTestControllerTask()
{
RunOnCancel = true;
RunOnError = ErrorRunMode.RunAlways;
}
public override IEnumerator Execute(TestJobData testJobData)
{
if (testJobData.PlaymodeTestsController == null)
{
yield break;
}
testJobData.PlaymodeTestsController.Cleanup();
}
}
}