Firstborn/Library/PackageCache/com.unity.test-framework@1..../UnityEditor.TestRunner/TestRun/TestJobDataHolder.cs
Schaken-Mods b486678290 Library -Artifacts
Library -Artifacts
2023-03-28 12:24:16 -05:00

28 lines
780 B
C#

using System.Collections.Generic;
using UnityEngine;
namespace UnityEditor.TestTools.TestRunner.TestRun
{
internal class TestJobDataHolder : ScriptableSingleton<TestJobDataHolder>
{
[SerializeField]
public List<TestJobData> TestRuns = new List<TestJobData>();
[InitializeOnLoadMethod]
private static void ResumeRunningJobs()
{
foreach (var testRun in instance.TestRuns.ToArray())
{
if (testRun.isRunning)
{
var runner = new TestJobRunner();
runner.RunJob(testRun);
}
else
{
instance.TestRuns.Remove(testRun);
}
}
}
}
}