From 78ea8fad9d12de14f96d58b84711123a2e532ae1 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Wed, 26 Aug 2020 19:29:50 +0200 Subject: [PATCH 1/2] [xharness] Enable monotouch-test/.NET by default, but ignore all variations. The default (Debug) configuration is green now, but the rest of the variations aren't yet. --- tests/xharness/Harness.cs | 2 +- tests/xharness/Jenkins/TestVariationsFactory.cs | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/xharness/Harness.cs b/tests/xharness/Harness.cs index e234cf42e32f..8a00ed0602d2 100644 --- a/tests/xharness/Harness.cs +++ b/tests/xharness/Harness.cs @@ -391,7 +391,7 @@ void AutoConfigureIOS () IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "interdependent-binding-projects", "dotnet", "iOS", "interdependent-binding-projects.csproj"))) { Name = "interdependent-binding-projects", IsDotNetProject = true, SkipiOSVariation = false, SkiptvOSVariation = true, SkipwatchOSVariation = true, SkipTodayExtensionVariation = true, SkipDeviceVariations = true, SkipiOS32Variation = true, }); IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "introspection", "iOS", "introspection-ios.csproj"))) { Name = "introspection" }); IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "introspection", "iOS", "introspection-ios-dotnet.csproj"))) { Name = "introspection", IsDotNetProject = true, SkipiOSVariation = false, SkiptvOSVariation = false, SkipwatchOSVariation = true, SkipTodayExtensionVariation = true, SkipDeviceVariations = true, SkipiOS32Variation = true, }); - IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "monotouch-test", "dotnet", "iOS", "monotouch-test.csproj"))) { Name = "monotouch-test", IsDotNetProject = true, SkipiOSVariation = false, SkiptvOSVariation = true, SkipwatchOSVariation = true, SkipTodayExtensionVariation = true, SkipDeviceVariations = true, SkipiOS32Variation = true, Ignore = true, }); + IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "monotouch-test", "dotnet", "iOS", "monotouch-test.csproj"))) { Name = "monotouch-test", IsDotNetProject = true, SkipiOSVariation = false, SkiptvOSVariation = true, SkipwatchOSVariation = true, SkipTodayExtensionVariation = true, SkipDeviceVariations = true, SkipiOS32Variation = true, }); IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "linker", "ios", "dont link", "dont link.csproj"))) { Configurations = new string [] { "Debug", "Release" } }); IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "linker", "ios", "dont link", "dotnet", "iOS", "dont link.csproj"))) { Configurations = new string [] { "Debug", "Release" }, IsDotNetProject = true, SkipiOSVariation = false, SkiptvOSVariation = true, SkipwatchOSVariation = true, SkipTodayExtensionVariation = true, SkipDeviceVariations = true, SkipiOS32Variation = true }); IOSTestProjects.Add (new iOSTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "linker", "ios", "link all", "link all.csproj"))) { Configurations = new string [] { "Debug", "Release" } }); diff --git a/tests/xharness/Jenkins/TestVariationsFactory.cs b/tests/xharness/Jenkins/TestVariationsFactory.cs index c2338d82697c..0ca386f7495b 100644 --- a/tests/xharness/Jenkins/TestVariationsFactory.cs +++ b/tests/xharness/Jenkins/TestVariationsFactory.cs @@ -56,6 +56,8 @@ IEnumerable GetTestData (RunTestTask test) switch (test.TestName) { case "monotouch-test": + if (test.TestProject.IsDotNetProject) + ignore = true; if (supports_dynamic_registrar_on_device) yield return new TestData { Variation = "Debug (dynamic registrar)", MTouchExtraArgs = "--registrar:dynamic", Debug = true, Profiling = false, Ignored = ignore }; yield return new TestData { Variation = "Release (all optimizations)", MTouchExtraArgs = "--registrar:static --optimize:all", Debug = false, Profiling = false, Defines = "OPTIMIZEALL", Ignored = ignore }; @@ -87,6 +89,8 @@ IEnumerable GetTestData (RunTestTask test) case "iPhoneSimulator": switch (test.TestName) { case "monotouch-test": + if (test.TestProject.IsDotNetProject) + ignore = true; // The default is to run monotouch-test with the dynamic registrar (in the simulator), so that's already covered yield return new TestData { Variation = "Debug (LinkSdk)", Debug = true, Profiling = false, LinkMode = "LinkSdk", Ignored = ignore }; yield return new TestData { Variation = "Debug (static registrar)", MTouchExtraArgs = "--registrar:static", Debug = true, Profiling = false, Undefines = "DYNAMIC_REGISTRAR", Ignored = ignore }; From e5c45cb3781adf97b4bf1a76adfcd7ad44a4bece Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 27 Aug 2020 14:24:36 +0200 Subject: [PATCH 2/2] [tests] Ignore LocaleTest.InitRegionInfo in .NET because it needs globalization data. Ref: https://github.com/xamarin/xamarin-macios/issues/8906 I can't reproduce locally, because it's ignored for me: [INCONCLUSIVE] InitRegionInfo : You can construct locale without countries at MonoTouchFixtures.Foundation.LocaleTest.InitRegionInfo() in [...]/xamarin-macios/tests/monotouch-test/Foundation/LocaleTest.cs:line 47 but this should fix this monotouch-test test failure (I'm guessing that 'IV' stands for 'Invariant', which is all the current .NET version ships with): MonoTouchFixtures.Foundation.LocaleTest [FAIL] InitRegionInfo : Name String lengths are both 2. Strings differ at index 0. Expected: "US" But was: "IV" -----------^ : at MonoTouchFixtures.Foundation.LocaleTest.InitRegionInfo() in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/monotouch-test/Foundation/LocaleTest.cs:line 49 --- tests/monotouch-test/Foundation/LocaleTest.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/monotouch-test/Foundation/LocaleTest.cs b/tests/monotouch-test/Foundation/LocaleTest.cs index b3a11a3798b0..e04897737106 100644 --- a/tests/monotouch-test/Foundation/LocaleTest.cs +++ b/tests/monotouch-test/Foundation/LocaleTest.cs @@ -38,6 +38,9 @@ public void FromLocaleIdentifier () Assert.That (NSLocale.FromLocaleIdentifier (ident).Identifier, Is.EqualTo (ident), "FromLocaleIdentifier"); } +#if NET + [Ignore ("No globalization data yet - https://github.com/xamarin/xamarin-macios/issues/8906")] +#endif [Test] public void InitRegionInfo () {