From d2c4e4ac966967999fd49d8f36a84faab5d005fd Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 16 May 2019 15:22:59 -0700 Subject: [PATCH] [xharness] Rework arm64_32 variations a bit so that they're not always enabled. We don't want to try to run arm64_32 tests on bots that don't have devices attached, so make sure they follow the logic of other device tests. --- tests/xharness/Jenkins.cs | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/tests/xharness/Jenkins.cs b/tests/xharness/Jenkins.cs index b61db2b48e..cae69c99b5 100644 --- a/tests/xharness/Jenkins.cs +++ b/tests/xharness/Jenkins.cs @@ -265,12 +265,6 @@ namespace xharness var supports_dynamic_registrar_on_device = test.Platform == TestPlatform.iOS_Unified64 || test.Platform == TestPlatform.tvOS; // arm64_32 is only supported for Release builds for now. var supports_debug = test.Platform != TestPlatform.watchOS_64_32; - bool? ignored_release = null; - if (test.Platform == TestPlatform.watchOS_64_32) { - // The template test is in the Debug configuration, but we only support arm64_32 in Release, which means the template test is ignored. - // We still want to run any Release configurations, so forcefully unignore those. - ignored_release = false; - } switch (test.ProjectPlatform) { case "iPhone": @@ -282,10 +276,11 @@ namespace xharness yield return new TestData { Variation = "AssemblyBuildTarget: SDK framework (debug, profiling)", MTouchExtraArgs = "--assembly-build-target=@sdk=framework=Xamarin.Sdk --assembly-build-target=@all=staticobject", Debug = true, Profiling = true, MonoNativeLinkMode = MonoNativeLinkMode.Static, MonoNativeFlavor = flavor }; } - yield return new TestData { Variation = "Release", MTouchExtraArgs = "", Debug = false, Profiling = false, Ignored = ignored_release, MonoNativeLinkMode = MonoNativeLinkMode.Static }; + if (test.ProjectConfiguration.Contains ("Debug")) + yield return new TestData { Variation = "Release", MTouchExtraArgs = "", Debug = false, Profiling = false, MonoNativeLinkMode = MonoNativeLinkMode.Static }; if (test.Platform == TestPlatform.iOS_Unified32) - yield return new TestData { Variation = "Release: UseThumb", MTouchExtraArgs = "", Debug = false, Ignored = ignored_release, Profiling = false, MonoNativeLinkMode = MonoNativeLinkMode.Static, UseThumb = true }; - yield return new TestData { Variation = "AssemblyBuildTarget: SDK framework (release)", MTouchExtraArgs = "--assembly-build-target=@sdk=framework=Xamarin.Sdk --assembly-build-target=@all=staticobject", Debug = false, Profiling = false, Ignored = ignored_release, MonoNativeLinkMode = MonoNativeLinkMode.Static, MonoNativeFlavor = flavor }; + yield return new TestData { Variation = "Release: UseThumb", MTouchExtraArgs = "", Debug = false, Profiling = false, MonoNativeLinkMode = MonoNativeLinkMode.Static, UseThumb = true }; + yield return new TestData { Variation = "AssemblyBuildTarget: SDK framework (release)", MTouchExtraArgs = "--assembly-build-target=@sdk=framework=Xamarin.Sdk --assembly-build-target=@all=staticobject", Debug = false, Profiling = false, MonoNativeLinkMode = MonoNativeLinkMode.Static, MonoNativeFlavor = flavor }; switch (test.TestName) { case "monotouch-test": @@ -298,10 +293,10 @@ namespace xharness // interpreter is broken for monotouch-test: https://github.com/xamarin/maccore/issues/1613, so ignore for now var ignore_interpreter_because_of_1613 = true; if (supports_debug) { - yield return new TestData { Variation = "Debug (interpreter)", MTouchExtraArgs = "--interpreter", Debug = true, Profiling = false, Ignored = ignore_interpreter_because_of_1613,, }; - yield return new TestData { Variation = "Debug (interpreter -mscorlib)", MTouchExtraArgs = "--interpreter=-mscorlib", Debug = true, Profiling = false, Ignored = ignore_interpreter_because_of_1613,, }; + yield return new TestData { Variation = "Debug (interpreter)", MTouchExtraArgs = "--interpreter", Debug = true, Profiling = false, Ignored = ignore_interpreter_because_of_1613, }; + yield return new TestData { Variation = "Debug (interpreter -mscorlib)", MTouchExtraArgs = "--interpreter=-mscorlib", Debug = true, Profiling = false, Ignored = ignore_interpreter_because_of_1613, }; } - yield return new TestData { Variation = "Release (interpreter -mscorlib)", MTouchExtraArgs = "--interpreter=-mscorlib", Debug = false, Profiling = false, Ignored = ignored_release || ignore_interpreter_because_of_1613, }; + yield return new TestData { Variation = "Release (interpreter -mscorlib)", MTouchExtraArgs = "--interpreter=-mscorlib", Debug = false, Profiling = false, Ignored = ignore_interpreter_because_of_1613, }; } break; case "mscorlib": @@ -311,7 +306,7 @@ namespace xharness yield return new TestData { Variation = "Debug (interpreter)", MTouchExtraArgs = "--interpreter", Debug = true, Profiling = false, Undefines = "FULL_AOT_RUNTIME" }; yield return new TestData { Variation = "Debug (interpreter -mscorlib)", MTouchExtraArgs = "--interpreter=-mscorlib", Debug = true, Profiling = false, Undefines = "FULL_AOT_RUNTIME" }; } - yield return new TestData { Variation = "Release (interpreter -mscorlib)", MTouchExtraArgs = "--interpreter=-mscorlib", Debug = false, Profiling = false, Ignored = ignored_release, Undefines = "FULL_AOT_RUNTIME" }; + yield return new TestData { Variation = "Release (interpreter -mscorlib)", MTouchExtraArgs = "--interpreter=-mscorlib", Debug = false, Profiling = false, Undefines = "FULL_AOT_RUNTIME" }; } break; case "mini": @@ -321,7 +316,7 @@ namespace xharness yield return new TestData { Variation = "Debug (interpreter)", MTouchExtraArgs = "--interpreter", Debug = true, Profiling = false, Undefines = "FULL_AOT_RUNTIME" }; yield return new TestData { Variation = "Debug (interpreter -mscorlib)", MTouchExtraArgs = "--interpreter=-mscorlib", Debug = true, Profiling = false, Undefines = "FULL_AOT_RUNTIME" }; } - yield return new TestData { Variation = "Release (interpreter -mscorlib)", MTouchExtraArgs = "--interpreter=-mscorlib", Debug = false, Profiling = false, Ignored = ignored_release, Undefines = "FULL_AOT_RUNTIME" }; + yield return new TestData { Variation = "Release (interpreter -mscorlib)", MTouchExtraArgs = "--interpreter=-mscorlib", Debug = false, Profiling = false, Undefines = "FULL_AOT_RUNTIME" }; } break; } @@ -369,7 +364,7 @@ namespace xharness { foreach (var task in tests) { if (string.IsNullOrEmpty (task.Variation)) - task.Variation = "Debug"; + task.Variation = task.ProjectConfiguration.Contains ("Debug") ? "Debug" : "Release"; } var rv = new List (tests); @@ -609,11 +604,10 @@ namespace xharness if (!project.SkipwatchOSARM64_32Variation) { var buildWatch64_32 = new XBuildTask { Jenkins = this, - ProjectConfiguration = "Debug64_32", + ProjectConfiguration = "Release64_32", // We don't support Debug for ARM64_32 yet. ProjectPlatform = "iPhone", Platform = TestPlatform.watchOS_64_32, TestName = project.Name, - Ignored = true, }; buildWatch64_32.CloneTestProject (watchOSProject); rv.Add (new RunDeviceTask (buildWatch64_32, Devices.ConnectedWatch32_64.Where (d => d.IsSupported (project))) { Ignored = ignored || !IncludewatchOS, BuildOnly = project.BuildOnly });