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

26 lines
638 B
C#
Raw Normal View History

2024-08-26 13:07:20 -07: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();
}
}
}