You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
780 B
28 lines
780 B
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); |
|
} |
|
} |
|
} |
|
} |
|
} |