[xharness] Don't throw NRE if a simulator doesn't exist.
We automatically create simulators when needed, but it won't work if the simulator runtime isn't installed. So handle the case where a test might not have a simulator to execute in correctly.
This commit is contained in:
Родитель
3a83936dfd
Коммит
fa9125dcd0
|
@ -504,7 +504,7 @@ namespace xharness
|
|||
await tv.FindSimulatorAsync ();
|
||||
|
||||
var rv = new List<AggregatedRunSimulatorTask> ();
|
||||
foreach (var taskGroup in testVariations.GroupBy ((RunSimulatorTask task) => task.Device.UDID)) {
|
||||
foreach (var taskGroup in testVariations.GroupBy ((RunSimulatorTask task) => task.Device?.UDID ?? task.Candidates.ToString ())) {
|
||||
rv.Add (new AggregatedRunSimulatorTask (taskGroup) {
|
||||
Jenkins = this,
|
||||
TestName = $"Tests for {taskGroup.Key}",
|
||||
|
|
|
@ -352,6 +352,11 @@ namespace xharness
|
|||
object lock_obj = new object ();
|
||||
Task<SimDevice []> findTask;
|
||||
|
||||
public override string ToString ()
|
||||
{
|
||||
return $"Simulators for {Target} (MinVersion: {MinVersion})";
|
||||
}
|
||||
|
||||
public IEnumerator<SimDevice> GetEnumerator ()
|
||||
{
|
||||
return new Enumerator ()
|
||||
|
|
Загрузка…
Ссылка в новой задаче