From 0402d1d8d9cf33a022b593322c1bca589d26060d Mon Sep 17 00:00:00 2001 From: Chris Hamons Date: Thu, 27 Sep 2018 10:51:28 -0500 Subject: [PATCH 1/9] Disable device tests using xharness --- tests/xharness/Harness.cs | 11 ++++++----- tests/xharness/Jenkins.cs | 20 ++++++++++++++++++++ 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/tests/xharness/Harness.cs b/tests/xharness/Harness.cs index a4731ca3719a..525e8c65623d 100644 --- a/tests/xharness/Harness.cs +++ b/tests/xharness/Harness.cs @@ -329,19 +329,20 @@ void AutoConfigureIOS () IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "bcl-test/mscorlib/mscorlib-0.csproj")), false)); IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "bcl-test/mscorlib/mscorlib-1.csproj")), false)); foreach (var p in test_suites) - IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, p + "/" + p + ".csproj")))); + IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, p + "/" + p + ".csproj"))) { Name = p }); foreach (var p in fsharp_test_suites) - IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, p + "/" + p + ".fsproj")))); + IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, p + "/" + p + ".fsproj"))) { Name = p }); foreach (var p in library_projects) - IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, p + "/" + p + ".csproj")), false)); + IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, p + "/" + p + ".csproj")), false) { Name = p }); foreach (var p in fsharp_library_projects) - IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, p + "/" + p + ".fsproj")), false)); + IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, p + "/" + p + ".fsproj")), false) { Name = p }); foreach (var p in bcl_suites) { BCLTestInfo bclTestInfo = new BCLTestInfo (this, p); IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "bcl-test/" + p + "/" + p + ".csproj"))) { SkipwatchOSVariation = bcl_skip_watchos.Contains (p), - BCLInfo = bclTestInfo + BCLInfo = bclTestInfo, + Name = p }); } diff --git a/tests/xharness/Jenkins.cs b/tests/xharness/Jenkins.cs index afb804b8eea3..d5f832db4cbe 100644 --- a/tests/xharness/Jenkins.cs +++ b/tests/xharness/Jenkins.cs @@ -38,6 +38,8 @@ public class Jenkins public Log SimulatorLoadLog; public Log DeviceLoadLog; + public HashSet TestsToSkipOnDevice = new HashSet (); + public string LogDirectory { get { return Path.Combine (Harness.JENKINS_RESULTS_DIRECTORY, "tests"); @@ -371,6 +373,9 @@ IEnumerable CreateRunDeviceTasks () foreach (var project in Harness.IOSTestProjects) { if (!project.IsExecutableProject) continue; + + if (TestsToSkipOnDevice.Contains (project.Name)) + continue; bool ignored = !IncludeDevice; if (!IsIncluded (project)) @@ -460,6 +465,8 @@ void SelectTests () // whatever we did automatically. SelectTestsByLabel (pull_request); + DisableKnownFailingDeviceTests (); + if (!Harness.INCLUDE_IOS) { MainLog.WriteLine ("The iOS build is diabled, so any iOS tests will be disabled as well."); IncludeiOS = false; @@ -481,6 +488,19 @@ void SelectTests () } } + void DisableKnownFailingDeviceTests () + { + // https://github.com/xamarin/maccore/issues/1008 + // Also hits https://github.com/xamarin/maccore/issues/1009 which will need seperate exclusion if 1008 is fixed first + IncludeiOSExtensions = false; + + // https://github.com/xamarin/maccore/issues/1014 + TestsToSkipOnDevice.Add ("System"); + + // https://github.com/xamarin/maccore/issues/1011 + TestsToSkipOnDevice.Add ("mini"); + } + void SelectTestsByModifiedFiles (int pull_request) { var files = GitHub.GetModifiedFiles (Harness, pull_request); From 65990b9219dfff73825ffbfc89480941ffadaa8b Mon Sep 17 00:00:00 2001 From: Chris Hamons Date: Mon, 1 Oct 2018 13:48:20 -0500 Subject: [PATCH 2/9] Refactor to build only not skipping tests --- tests/xharness/Jenkins.cs | 83 ++++++++++++++++++++++++----------- tests/xharness/Simulators.cs | 11 ++--- tests/xharness/TestProject.cs | 1 + 3 files changed, 64 insertions(+), 31 deletions(-) diff --git a/tests/xharness/Jenkins.cs b/tests/xharness/Jenkins.cs index d5f832db4cbe..d529a935c52c 100644 --- a/tests/xharness/Jenkins.cs +++ b/tests/xharness/Jenkins.cs @@ -23,6 +23,7 @@ public class Jenkins public bool IncludeMac32 = true; public bool IncludeiOS = true; public bool IncludeiOSExtensions; + public bool ForceExtensionBuildOnly; public bool IncludetvOS = true; public bool IncludewatchOS = true; public bool IncludeMmpTest; @@ -38,8 +39,6 @@ public class Jenkins public Log SimulatorLoadLog; public Log DeviceLoadLog; - public HashSet TestsToSkipOnDevice = new HashSet (); - public string LogDirectory { get { return Path.Combine (Harness.JENKINS_RESULTS_DIRECTORY, "tests"); @@ -366,6 +365,17 @@ IEnumerable CreateRunSimulatorTasks () } } + RunDeviceTask CreateRunTask (XBuildTask build_task, IEnumerable connected, bool buildOnly, bool ignored) + { + RunDeviceTask task; + if (buildOnly) + task = RunDeviceTask.CreateBuildOnly (build_task); + else + task = new RunDeviceTask (build_task, connected); + task.Ignored = ignored; + return task; + } + IEnumerable CreateRunDeviceTasks () { var rv = new List (); @@ -374,9 +384,6 @@ IEnumerable CreateRunDeviceTasks () if (!project.IsExecutableProject) continue; - if (TestsToSkipOnDevice.Contains (project.Name)) - continue; - bool ignored = !IncludeDevice; if (!IsIncluded (project)) ignored = true; @@ -390,7 +397,7 @@ IEnumerable CreateRunDeviceTasks () TestName = project.Name, }; build64.CloneTestProject (project); - rv.Add (new RunDeviceTask (build64, Devices.ConnectedDevices.Where ((dev) => dev.DevicePlatform == DevicePlatform.iOS && dev.Supports64Bit)) { Ignored = ignored || !IncludeiOS }); + rv.Add (CreateRunTask (build64, Devices.Connected64BitIOS, project.BuildOnly, ignored || !IncludeiOS)); var build32 = new XBuildTask { Jenkins = this, @@ -400,8 +407,8 @@ IEnumerable CreateRunDeviceTasks () TestName = project.Name, }; build32.CloneTestProject (project); - rv.Add (new RunDeviceTask (build32, Devices.ConnectedDevices.Where ((dev) => dev.DevicePlatform == DevicePlatform.iOS && dev.Supports32Bit)) { Ignored = ignored || !IncludeiOS }); - + rv.Add (CreateRunTask (build32, Devices.Connected32BitIOS, project.BuildOnly, ignored || !IncludeiOS)); + var todayProject = project.AsTodayExtensionProject (); var buildToday = new XBuildTask { Jenkins = this, @@ -411,7 +418,7 @@ IEnumerable CreateRunDeviceTasks () TestName = project.Name, }; buildToday.CloneTestProject (todayProject); - rv.Add (new RunDeviceTask (buildToday, Devices.ConnectedDevices.Where ((dev) => dev.DevicePlatform == DevicePlatform.iOS && dev.Supports64Bit)) { Ignored = ignored || !IncludeiOSExtensions }); + rv.Add (CreateRunTask (buildToday, Devices.Connected64BitIOS, project.BuildOnly || ForceExtensionBuildOnly, ignored || !IncludeiOSExtensions)); } if (!project.SkiptvOSVariation) { @@ -424,7 +431,7 @@ IEnumerable CreateRunDeviceTasks () TestName = project.Name, }; buildTV.CloneTestProject (tvOSProject); - rv.Add (new RunDeviceTask (buildTV, Devices.ConnectedDevices.Where ((dev) => dev.DevicePlatform == DevicePlatform.tvOS)) { Ignored = ignored || !IncludetvOS }); + rv.Add (CreateRunTask (buildTV, Devices.ConnectedTV, project.BuildOnly, ignored || !IncludetvOS)); } if (!project.SkipwatchOSVariation) { @@ -437,7 +444,7 @@ IEnumerable CreateRunDeviceTasks () TestName = project.Name, }; buildWatch.CloneTestProject (watchOSProject); - rv.Add (new RunDeviceTask (buildWatch, Devices.ConnectedDevices.Where ((dev) => dev.DevicePlatform == DevicePlatform.watchOS)) { Ignored = ignored || !IncludewatchOS }); + rv.Add (CreateRunTask (buildWatch, Devices.ConnectedWatch, project.BuildOnly, ignored || !IncludewatchOS)); } } @@ -491,14 +498,15 @@ void SelectTests () void DisableKnownFailingDeviceTests () { // https://github.com/xamarin/maccore/issues/1008 - // Also hits https://github.com/xamarin/maccore/issues/1009 which will need seperate exclusion if 1008 is fixed first - IncludeiOSExtensions = false; + ForceExtensionBuildOnly = false; - // https://github.com/xamarin/maccore/issues/1014 - TestsToSkipOnDevice.Add ("System"); + // https://github.com/xamarin/maccore/issues/1009 + foreach (var fsharp in Harness.IOSTestProjects.Where (x => x.Name == "fsharp" || x.Name == "fsharplibrary")) + fsharp.BuildOnly = true; // https://github.com/xamarin/maccore/issues/1011 - TestsToSkipOnDevice.Add ("mini"); + foreach (var mono in Harness.IOSTestProjects.Where (x => x.Name == "mini")) + mono.BuildOnly = true; } void SelectTestsByModifiedFiles (int pull_request) @@ -3103,10 +3111,12 @@ protected override async Task RunTestAsync () abstract class RunTestTask : TestTask { public readonly BuildToolTask BuildTask; + public bool BuildOnly; - public RunTestTask (BuildToolTask build_task) + public RunTestTask (BuildToolTask build_task, bool buildOnly = false) { - this.BuildTask = build_task; + BuildTask = build_task; + BuildOnly = buildOnly; Jenkins = build_task.Jenkins; TestProject = build_task.TestProject; @@ -3160,6 +3170,9 @@ public async Task BuildAsync () protected override async Task ExecuteAsync () { + if (BuildOnly) + return; + if (Finished) return; @@ -3219,6 +3232,12 @@ public RunXITask (BuildToolTask build_task, IEnumerable candidates) this.candidates = candidates; } + protected RunXITask (BuildToolTask build_task) + : base (build_task, buildOnly: true) + { + this.candidates = Enumerable.Empty (); + } + public override IEnumerable AggregatedLogs { get { var rv = base.AggregatedLogs; @@ -3306,22 +3325,34 @@ public override string ProgressMessage { public RunDeviceTask (XBuildTask build_task, IEnumerable candidates) : base (build_task, candidates.OrderBy ((v) => v.DebugSpeed)) { + AppRunnerTarget = GetBuildTaskPlatform (build_task); + } + + public static RunDeviceTask CreateBuildOnly (XBuildTask build_task) + { + return new RunDeviceTask (build_task); + } + + RunDeviceTask (XBuildTask build_task) + : base (build_task) + { + AppRunnerTarget = GetBuildTaskPlatform (build_task); + } + + private AppRunnerTarget GetBuildTaskPlatform (XBuildTask build_task) + { switch (build_task.Platform) { case TestPlatform.iOS: case TestPlatform.iOS_Unified: case TestPlatform.iOS_Unified32: case TestPlatform.iOS_Unified64: - AppRunnerTarget = AppRunnerTarget.Device_iOS; - break; + return AppRunnerTarget.Device_iOS; case TestPlatform.iOS_TodayExtension64: - AppRunnerTarget = AppRunnerTarget.Device_iOS; - break; + return AppRunnerTarget.Device_iOS; case TestPlatform.tvOS: - AppRunnerTarget = AppRunnerTarget.Device_tvOS; - break; + return AppRunnerTarget.Device_tvOS; case TestPlatform.watchOS: - AppRunnerTarget = AppRunnerTarget.Device_watchOS; - break; + return AppRunnerTarget.Device_watchOS; default: throw new NotImplementedException (); } diff --git a/tests/xharness/Simulators.cs b/tests/xharness/Simulators.cs index 976ee404eb80..f121ef2394f9 100644 --- a/tests/xharness/Simulators.cs +++ b/tests/xharness/Simulators.cs @@ -646,11 +646,12 @@ public class Devices bool loaded; BlockingEnumerableCollection connected_devices = new BlockingEnumerableCollection (); - public IEnumerable ConnectedDevices { - get { - return connected_devices; - } - } + + public IEnumerable ConnectedDevices => connected_devices; + public IEnumerable Connected64BitIOS => connected_devices.Where (x => x.DevicePlatform == DevicePlatform.iOS && x.Supports64Bit); + public IEnumerable Connected32BitIOS => connected_devices.Where (x => x.DevicePlatform == DevicePlatform.iOS && x.Supports32Bit); + public IEnumerable ConnectedTV => connected_devices.Where (x => x.DevicePlatform == DevicePlatform.tvOS); + public IEnumerable ConnectedWatch => connected_devices.Where (x => x.DevicePlatform == DevicePlatform.watchOS); public async Task LoadAsync (Log log, bool extra_data = false, bool removed_locked = false, bool force = false) { diff --git a/tests/xharness/TestProject.cs b/tests/xharness/TestProject.cs index 0e18547221fc..ff79cab882f2 100644 --- a/tests/xharness/TestProject.cs +++ b/tests/xharness/TestProject.cs @@ -145,6 +145,7 @@ public class iOSTestProject : TestProject public bool SkipiOSVariation; public bool SkipwatchOSVariation; public bool SkiptvOSVariation; + public bool BuildOnly; // Optional public BCLTestInfo BCLInfo { get; set; } From e721a46abe5e68e467030206e95835b9972f02d2 Mon Sep 17 00:00:00 2001 From: Chris Hamons Date: Mon, 1 Oct 2018 14:03:34 -0500 Subject: [PATCH 3/9] Cleanup --- tests/xharness/Jenkins.cs | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/tests/xharness/Jenkins.cs b/tests/xharness/Jenkins.cs index d529a935c52c..fe7ff9b4f9b3 100644 --- a/tests/xharness/Jenkins.cs +++ b/tests/xharness/Jenkins.cs @@ -369,7 +369,7 @@ RunDeviceTask CreateRunTask (XBuildTask build_task, IEnumerable connecte { RunDeviceTask task; if (buildOnly) - task = RunDeviceTask.CreateBuildOnly (build_task); + task = new RunDeviceTask (build_task, Enumerable.Empty ()) { BuildOnly = true }; else task = new RunDeviceTask (build_task, connected); task.Ignored = ignored; @@ -383,7 +383,7 @@ IEnumerable CreateRunDeviceTasks () foreach (var project in Harness.IOSTestProjects) { if (!project.IsExecutableProject) continue; - + bool ignored = !IncludeDevice; if (!IsIncluded (project)) ignored = true; @@ -408,7 +408,7 @@ IEnumerable CreateRunDeviceTasks () }; build32.CloneTestProject (project); rv.Add (CreateRunTask (build32, Devices.Connected32BitIOS, project.BuildOnly, ignored || !IncludeiOS)); - + var todayProject = project.AsTodayExtensionProject (); var buildToday = new XBuildTask { Jenkins = this, @@ -3232,12 +3232,6 @@ public RunXITask (BuildToolTask build_task, IEnumerable candidates) this.candidates = candidates; } - protected RunXITask (BuildToolTask build_task) - : base (build_task, buildOnly: true) - { - this.candidates = Enumerable.Empty (); - } - public override IEnumerable AggregatedLogs { get { var rv = base.AggregatedLogs; @@ -3328,18 +3322,7 @@ public RunDeviceTask (XBuildTask build_task, IEnumerable candidates) AppRunnerTarget = GetBuildTaskPlatform (build_task); } - public static RunDeviceTask CreateBuildOnly (XBuildTask build_task) - { - return new RunDeviceTask (build_task); - } - - RunDeviceTask (XBuildTask build_task) - : base (build_task) - { - AppRunnerTarget = GetBuildTaskPlatform (build_task); - } - - private AppRunnerTarget GetBuildTaskPlatform (XBuildTask build_task) + AppRunnerTarget GetBuildTaskPlatform (XBuildTask build_task) { switch (build_task.Platform) { case TestPlatform.iOS: From 1954361c631a66d7f06e4be8f4b83cba6a21dbc7 Mon Sep 17 00:00:00 2001 From: Chris Hamons Date: Mon, 1 Oct 2018 14:04:37 -0500 Subject: [PATCH 4/9] More cleanup --- tests/xharness/Jenkins.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/xharness/Jenkins.cs b/tests/xharness/Jenkins.cs index fe7ff9b4f9b3..28fb7c350b5e 100644 --- a/tests/xharness/Jenkins.cs +++ b/tests/xharness/Jenkins.cs @@ -3113,10 +3113,9 @@ abstract class RunTestTask : TestTask public readonly BuildToolTask BuildTask; public bool BuildOnly; - public RunTestTask (BuildToolTask build_task, bool buildOnly = false) + public RunTestTask (BuildToolTask build_task) { BuildTask = build_task; - BuildOnly = buildOnly; Jenkins = build_task.Jenkins; TestProject = build_task.TestProject; From 11bb9000571432814a334d42ca9fcd8b84f3842a Mon Sep 17 00:00:00 2001 From: Chris Hamons Date: Mon, 1 Oct 2018 14:07:14 -0500 Subject: [PATCH 5/9] Actually force extensions to be build only --- tests/xharness/Jenkins.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/xharness/Jenkins.cs b/tests/xharness/Jenkins.cs index 28fb7c350b5e..b14d70fbe85c 100644 --- a/tests/xharness/Jenkins.cs +++ b/tests/xharness/Jenkins.cs @@ -498,7 +498,7 @@ void SelectTests () void DisableKnownFailingDeviceTests () { // https://github.com/xamarin/maccore/issues/1008 - ForceExtensionBuildOnly = false; + ForceExtensionBuildOnly = true; // https://github.com/xamarin/maccore/issues/1009 foreach (var fsharp in Harness.IOSTestProjects.Where (x => x.Name == "fsharp" || x.Name == "fsharplibrary")) From d8053bce003001bc16f4778bea4c2a70958cc838 Mon Sep 17 00:00:00 2001 From: Chris Hamons Date: Tue, 2 Oct 2018 12:28:05 -0500 Subject: [PATCH 6/9] Actually make BuildOnly do what it should --- tests/xharness/Jenkins.cs | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/tests/xharness/Jenkins.cs b/tests/xharness/Jenkins.cs index b14d70fbe85c..1dd04dcd81bf 100644 --- a/tests/xharness/Jenkins.cs +++ b/tests/xharness/Jenkins.cs @@ -369,7 +369,7 @@ RunDeviceTask CreateRunTask (XBuildTask build_task, IEnumerable connecte { RunDeviceTask task; if (buildOnly) - task = new RunDeviceTask (build_task, Enumerable.Empty ()) { BuildOnly = true }; + task = new RunDeviceTask (build_task, connected) { BuildOnly = true }; else task = new RunDeviceTask (build_task, connected); task.Ignored = ignored; @@ -397,7 +397,7 @@ IEnumerable CreateRunDeviceTasks () TestName = project.Name, }; build64.CloneTestProject (project); - rv.Add (CreateRunTask (build64, Devices.Connected64BitIOS, project.BuildOnly, ignored || !IncludeiOS)); + rv.Add (new RunDeviceTask (build64, Devices.Connected64BitIOS) { Ignored = ignored || !IncludeiOS, BuildOnly = project.BuildOnly }); var build32 = new XBuildTask { Jenkins = this, @@ -407,7 +407,7 @@ IEnumerable CreateRunDeviceTasks () TestName = project.Name, }; build32.CloneTestProject (project); - rv.Add (CreateRunTask (build32, Devices.Connected32BitIOS, project.BuildOnly, ignored || !IncludeiOS)); + rv.Add (new RunDeviceTask (build32, Devices.Connected32BitIOS) { Ignored = ignored || !IncludeiOS, BuildOnly = project.BuildOnly }); var todayProject = project.AsTodayExtensionProject (); var buildToday = new XBuildTask { @@ -418,7 +418,7 @@ IEnumerable CreateRunDeviceTasks () TestName = project.Name, }; buildToday.CloneTestProject (todayProject); - rv.Add (CreateRunTask (buildToday, Devices.Connected64BitIOS, project.BuildOnly || ForceExtensionBuildOnly, ignored || !IncludeiOSExtensions)); + rv.Add (new RunDeviceTask (buildToday, Devices.Connected64BitIOS) { Ignored = ignored || !IncludeiOSExtensions, BuildOnly = project.BuildOnly || ForceExtensionBuildOnly }); } if (!project.SkiptvOSVariation) { @@ -431,7 +431,7 @@ IEnumerable CreateRunDeviceTasks () TestName = project.Name, }; buildTV.CloneTestProject (tvOSProject); - rv.Add (CreateRunTask (buildTV, Devices.ConnectedTV, project.BuildOnly, ignored || !IncludetvOS)); + rv.Add (new RunDeviceTask (buildTV, Devices.ConnectedTV) { Ignored = ignored || !IncludetvOS, BuildOnly = project.BuildOnly }); } if (!project.SkipwatchOSVariation) { @@ -444,7 +444,7 @@ IEnumerable CreateRunDeviceTasks () TestName = project.Name, }; buildWatch.CloneTestProject (watchOSProject); - rv.Add (CreateRunTask (buildWatch, Devices.ConnectedWatch, project.BuildOnly, ignored || !IncludewatchOS)); + rv.Add (new RunDeviceTask (buildWatch, Devices.ConnectedWatch) { Ignored = ignored || !IncludewatchOS, BuildOnly = project.BuildOnly }); } } @@ -3169,9 +3169,6 @@ public async Task BuildAsync () protected override async Task ExecuteAsync () { - if (BuildOnly) - return; - if (Finished) return; @@ -3182,6 +3179,11 @@ protected override async Task ExecuteAsync () if (!await BuildAsync ()) return; + if (BuildOnly) { + ExecutionResult = TestExecutingResult.Succeeded; + return; + } + ExecutionResult = TestExecutingResult.Running; duration.Restart (); // don't count the build time. await RunTestAsync (); From 222476d15a9ae7c0d4bcbc69210fae4baea8d4b7 Mon Sep 17 00:00:00 2001 From: Chris Hamons Date: Tue, 2 Oct 2018 12:37:34 -0500 Subject: [PATCH 7/9] Remove unnecessary bit --- tests/xharness/Jenkins.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/xharness/Jenkins.cs b/tests/xharness/Jenkins.cs index 1dd04dcd81bf..438347d9663f 100644 --- a/tests/xharness/Jenkins.cs +++ b/tests/xharness/Jenkins.cs @@ -500,10 +500,6 @@ void DisableKnownFailingDeviceTests () // https://github.com/xamarin/maccore/issues/1008 ForceExtensionBuildOnly = true; - // https://github.com/xamarin/maccore/issues/1009 - foreach (var fsharp in Harness.IOSTestProjects.Where (x => x.Name == "fsharp" || x.Name == "fsharplibrary")) - fsharp.BuildOnly = true; - // https://github.com/xamarin/maccore/issues/1011 foreach (var mono in Harness.IOSTestProjects.Where (x => x.Name == "mini")) mono.BuildOnly = true; From ead48064b94b0c31df5460f21569e809dfa00c00 Mon Sep 17 00:00:00 2001 From: Chris Hamons Date: Tue, 2 Oct 2018 12:42:30 -0500 Subject: [PATCH 8/9] Remove dead code --- tests/xharness/Jenkins.cs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/tests/xharness/Jenkins.cs b/tests/xharness/Jenkins.cs index 438347d9663f..0994318bdf5e 100644 --- a/tests/xharness/Jenkins.cs +++ b/tests/xharness/Jenkins.cs @@ -365,17 +365,6 @@ IEnumerable CreateRunSimulatorTasks () } } - RunDeviceTask CreateRunTask (XBuildTask build_task, IEnumerable connected, bool buildOnly, bool ignored) - { - RunDeviceTask task; - if (buildOnly) - task = new RunDeviceTask (build_task, connected) { BuildOnly = true }; - else - task = new RunDeviceTask (build_task, connected); - task.Ignored = ignored; - return task; - } - IEnumerable CreateRunDeviceTasks () { var rv = new List (); From 17281bba4e8bcae65c0d1556ec46eb9650057d27 Mon Sep 17 00:00:00 2001 From: Chris Hamons Date: Tue, 2 Oct 2018 12:46:54 -0500 Subject: [PATCH 9/9] Remove unnecessary diffs --- tests/xharness/Jenkins.cs | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/tests/xharness/Jenkins.cs b/tests/xharness/Jenkins.cs index 0994318bdf5e..da94ab25178b 100644 --- a/tests/xharness/Jenkins.cs +++ b/tests/xharness/Jenkins.cs @@ -3100,7 +3100,7 @@ abstract class RunTestTask : TestTask public RunTestTask (BuildToolTask build_task) { - BuildTask = build_task; + this.BuildTask = build_task; Jenkins = build_task.Jenkins; TestProject = build_task.TestProject; @@ -3305,23 +3305,22 @@ public override string ProgressMessage { public RunDeviceTask (XBuildTask build_task, IEnumerable candidates) : base (build_task, candidates.OrderBy ((v) => v.DebugSpeed)) { - AppRunnerTarget = GetBuildTaskPlatform (build_task); - } - - AppRunnerTarget GetBuildTaskPlatform (XBuildTask build_task) - { switch (build_task.Platform) { case TestPlatform.iOS: case TestPlatform.iOS_Unified: case TestPlatform.iOS_Unified32: case TestPlatform.iOS_Unified64: - return AppRunnerTarget.Device_iOS; + AppRunnerTarget = AppRunnerTarget.Device_iOS; + break; case TestPlatform.iOS_TodayExtension64: - return AppRunnerTarget.Device_iOS; + AppRunnerTarget = AppRunnerTarget.Device_iOS; + break; case TestPlatform.tvOS: - return AppRunnerTarget.Device_tvOS; + AppRunnerTarget = AppRunnerTarget.Device_tvOS; + break; case TestPlatform.watchOS: - return AppRunnerTarget.Device_watchOS; + AppRunnerTarget = AppRunnerTarget.Device_watchOS; + break; default: throw new NotImplementedException (); }