[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.
This commit is contained in:
Rolf Bjarne Kvinge 2019-05-16 15:22:59 -07:00
Родитель 281ea5f97d
Коммит d2c4e4ac96
1 изменённых файлов: 11 добавлений и 17 удалений

Просмотреть файл

@ -265,12 +265,6 @@ namespace xharness
var supports_dynamic_registrar_on_device = test.Platform == TestPlatform.iOS_Unified64 || test.Platform == TestPlatform.tvOS; 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. // arm64_32 is only supported for Release builds for now.
var supports_debug = test.Platform != TestPlatform.watchOS_64_32; 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) { switch (test.ProjectPlatform) {
case "iPhone": 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 = "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) 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 = "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, Ignored = ignored_release, MonoNativeLinkMode = MonoNativeLinkMode.Static, MonoNativeFlavor = flavor }; 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) { switch (test.TestName) {
case "monotouch-test": 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 // interpreter is broken for monotouch-test: https://github.com/xamarin/maccore/issues/1613, so ignore for now
var ignore_interpreter_because_of_1613 = true; var ignore_interpreter_because_of_1613 = true;
if (supports_debug) { 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)", 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 -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; break;
case "mscorlib": 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)", 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 = "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; break;
case "mini": 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)", 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 = "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; break;
} }
@ -369,7 +364,7 @@ namespace xharness
{ {
foreach (var task in tests) { foreach (var task in tests) {
if (string.IsNullOrEmpty (task.Variation)) if (string.IsNullOrEmpty (task.Variation))
task.Variation = "Debug"; task.Variation = task.ProjectConfiguration.Contains ("Debug") ? "Debug" : "Release";
} }
var rv = new List<T> (tests); var rv = new List<T> (tests);
@ -609,11 +604,10 @@ namespace xharness
if (!project.SkipwatchOSARM64_32Variation) { if (!project.SkipwatchOSARM64_32Variation) {
var buildWatch64_32 = new XBuildTask { var buildWatch64_32 = new XBuildTask {
Jenkins = this, Jenkins = this,
ProjectConfiguration = "Debug64_32", ProjectConfiguration = "Release64_32", // We don't support Debug for ARM64_32 yet.
ProjectPlatform = "iPhone", ProjectPlatform = "iPhone",
Platform = TestPlatform.watchOS_64_32, Platform = TestPlatform.watchOS_64_32,
TestName = project.Name, TestName = project.Name,
Ignored = true,
}; };
buildWatch64_32.CloneTestProject (watchOSProject); buildWatch64_32.CloneTestProject (watchOSProject);
rv.Add (new RunDeviceTask (buildWatch64_32, Devices.ConnectedWatch32_64.Where (d => d.IsSupported (project))) { Ignored = ignored || !IncludewatchOS, BuildOnly = project.BuildOnly }); rv.Add (new RunDeviceTask (buildWatch64_32, Devices.ConnectedWatch32_64.Where (d => d.IsSupported (project))) { Ignored = ignored || !IncludewatchOS, BuildOnly = project.BuildOnly });