[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:
Родитель
80d69516ae
Коммит
f53f602590
|
@ -503,7 +503,7 @@ namespace xharness
|
||||||
await tv.FindSimulatorAsync ();
|
await tv.FindSimulatorAsync ();
|
||||||
|
|
||||||
var rv = new List<AggregatedRunSimulatorTask> ();
|
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) {
|
rv.Add (new AggregatedRunSimulatorTask (taskGroup) {
|
||||||
Jenkins = this,
|
Jenkins = this,
|
||||||
TestName = $"Tests for {taskGroup.Key}",
|
TestName = $"Tests for {taskGroup.Key}",
|
||||||
|
|
|
@ -352,6 +352,11 @@ namespace xharness
|
||||||
object lock_obj = new object ();
|
object lock_obj = new object ();
|
||||||
Task<SimDevice []> findTask;
|
Task<SimDevice []> findTask;
|
||||||
|
|
||||||
|
public override string ToString ()
|
||||||
|
{
|
||||||
|
return $"Simulators for {Target} (MinVersion: {MinVersion})";
|
||||||
|
}
|
||||||
|
|
||||||
public IEnumerator<SimDevice> GetEnumerator ()
|
public IEnumerator<SimDevice> GetEnumerator ()
|
||||||
{
|
{
|
||||||
return new Enumerator ()
|
return new Enumerator ()
|
||||||
|
|
Загрузка…
Ссылка в новой задаче