From 4b0fd5529cb7728aaf6946be37e6080ee29e3874 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 16 Jul 2020 08:20:51 +0200 Subject: [PATCH] [xharness] Don't group simulators when running in server mode. (#9098) Grouping simulators means we have to wait until we know which simulators are available, because we group by the simulator's UDID. When running in server mode, we don't need to group simulator test runs, because we run the as the user chooses, not in any particular order. This way the test list loads faster at startup, since we don't have to wait until we've loaded the simulators before we can show the list. --- tests/xharness/Jenkins/Jenkins.cs | 6 ++++++ tests/xharness/Jenkins/RunSimulatorTasksFactory.cs | 3 +++ 2 files changed, 9 insertions(+) diff --git a/tests/xharness/Jenkins/Jenkins.cs b/tests/xharness/Jenkins/Jenkins.cs index c9f64c788b9..79363caa310 100644 --- a/tests/xharness/Jenkins/Jenkins.cs +++ b/tests/xharness/Jenkins/Jenkins.cs @@ -361,6 +361,12 @@ public void GenerateReport () continue; } + var simulator = task as RunSimulatorTask; + if (simulator != null) { + allSimulatorTasks.Add (simulator); + continue; + } + if (task is DotNetTestTask dotnet) { allDotNetTestTasks.Add (dotnet); continue; diff --git a/tests/xharness/Jenkins/RunSimulatorTasksFactory.cs b/tests/xharness/Jenkins/RunSimulatorTasksFactory.cs index 479f400c07f..8b3dfb811cb 100644 --- a/tests/xharness/Jenkins/RunSimulatorTasksFactory.cs +++ b/tests/xharness/Jenkins/RunSimulatorTasksFactory.cs @@ -72,6 +72,9 @@ public async Task> CreateAsync (Jenkins jenkins, IProcess tunnelBore: jenkins.TunnelBore, candidates: candidates?.Cast () ?? test.Candidates)).ToList (); + if (jenkins.IsServerMode) + return testVariations; + foreach (var tv in testVariations) { if (!tv.Ignored) await tv.FindSimulatorAsync ();