From 0ee1361387049ed7efa3200e03c1e1efd9c61db0 Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Date: Tue, 17 Oct 2017 17:46:21 +0200 Subject: [PATCH 1/4] [XHarness] Add the Mono.Data.Tds tests. --- tests/Makefile | 2 +- .../Mono.Data.Sqlite-mac.csproj.template | 2 +- tests/bcl-test/Mono.Data.Tds/Info-mac.plist | 18 ++ tests/bcl-test/Mono.Data.Tds/Info.plist | 36 ++++ tests/bcl-test/Mono.Data.Tds/Makefile | 5 + .../Mono.Data.Tds-mac.csproj.template | 92 ++++++++++ .../Mono.Data.Tds.csproj.template | 160 ++++++++++++++++++ tests/xharness/Harness.cs | 40 ++++- 8 files changed, 351 insertions(+), 4 deletions(-) create mode 100644 tests/bcl-test/Mono.Data.Tds/Info-mac.plist create mode 100644 tests/bcl-test/Mono.Data.Tds/Info.plist create mode 100644 tests/bcl-test/Mono.Data.Tds/Makefile create mode 100644 tests/bcl-test/Mono.Data.Tds/Mono.Data.Tds-mac.csproj.template create mode 100644 tests/bcl-test/Mono.Data.Tds/Mono.Data.Tds.csproj.template diff --git a/tests/Makefile b/tests/Makefile index bfe6fa146b7a..4dd64ec568e0 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -12,7 +12,7 @@ MTOUCH=$(IOS_DESTDIR)/$(MONOTOUCH_PREFIX)/bin/mtouch UNIT_SERVER_DIR=$(TOUCH_UNIT_PATH)/Touch.Server UNIT_SERVER=$(UNIT_SERVER_DIR)/bin/Debug/Touch.Server.exe TEST_SUITES=monotouch-test link\ sdk link\ all dont\ link framework-test mini -BCL_TEST_SUITES=mscorlib System System.Core System.Data System.Net.Http System.Numerics System.Runtime.Serialization System.Transactions System.Web.Services System.Xml System.Xml.Linq Mono.Security System.ComponentModel.DataAnnotations System.Json System.ServiceModel.Web Mono.Data.Sqlite +BCL_TEST_SUITES=mscorlib System System.Core System.Data System.Net.Http System.Numerics System.Runtime.Serialization System.Transactions System.Web.Services System.Xml System.Xml.Linq Mono.Security System.ComponentModel.DataAnnotations System.Json System.ServiceModel.Web Mono.Data.Sqlite Mono.Data.Tds ALL_TEST_SUITES=$(TEST_SUITES) $(BCL_TEST_SUITES) EXEC_UNIT_SERVER=XCODE_DEVELOPER_ROOT=$(XCODE_DEVELOPER_ROOT) MONOTOUCH_ROOT=$(IOS_DESTDIR)/$(MONOTOUCH_PREFIX) $(SYSTEM_MONO) --debug $(UNIT_SERVER) diff --git a/tests/bcl-test/Mono.Data.Sqlite/Mono.Data.Sqlite-mac.csproj.template b/tests/bcl-test/Mono.Data.Sqlite/Mono.Data.Sqlite-mac.csproj.template index 428f1f5daffc..6dbced9fd01d 100644 --- a/tests/bcl-test/Mono.Data.Sqlite/Mono.Data.Sqlite-mac.csproj.template +++ b/tests/bcl-test/Mono.Data.Sqlite/Mono.Data.Sqlite-mac.csproj.template @@ -53,7 +53,7 @@ - ..\..\..\external\guiunit\src\framework\obj\Debug\net-4.5\GuiUnit.exe + ..\..\..\external\guiunit\src\framework\obj\Debug\xammac_mobile\GuiUnit.exe diff --git a/tests/bcl-test/Mono.Data.Tds/Info-mac.plist b/tests/bcl-test/Mono.Data.Tds/Info-mac.plist new file mode 100644 index 000000000000..c6860fd071e6 --- /dev/null +++ b/tests/bcl-test/Mono.Data.Tds/Info-mac.plist @@ -0,0 +1,18 @@ + + + + + CFBundleDisplayName + corelibtests + CFBundleIdentifier + com.xamarin.corelibtests + CFBundleName + corelibtests + CFBundleVersion + 1 + LSMinimumSystemVersion + 10.7 + NSPrincipalClass + NSApplication + + diff --git a/tests/bcl-test/Mono.Data.Tds/Info.plist b/tests/bcl-test/Mono.Data.Tds/Info.plist new file mode 100644 index 000000000000..ab826a7e231e --- /dev/null +++ b/tests/bcl-test/Mono.Data.Tds/Info.plist @@ -0,0 +1,36 @@ + + + + + CFBundleIdentifier + com.xamarin.monodatatdstests + MinimumOSVersion + 6.0 + UIApplicationExitsOnSuspend + + UIDeviceFamily + + 1 + 2 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + NSAppTransportSecurity + + + NSAllowsArbitraryLoads + + + + diff --git a/tests/bcl-test/Mono.Data.Tds/Makefile b/tests/bcl-test/Mono.Data.Tds/Makefile new file mode 100644 index 000000000000..50198136c967 --- /dev/null +++ b/tests/bcl-test/Mono.Data.Tds/Makefile @@ -0,0 +1,5 @@ + +LIB=Mono.Data.Tds +APP=Mono.Data.Tds + +include ../Make.frag diff --git a/tests/bcl-test/Mono.Data.Tds/Mono.Data.Tds-mac.csproj.template b/tests/bcl-test/Mono.Data.Tds/Mono.Data.Tds-mac.csproj.template new file mode 100644 index 000000000000..08fe63916623 --- /dev/null +++ b/tests/bcl-test/Mono.Data.Tds/Mono.Data.Tds-mac.csproj.template @@ -0,0 +1,92 @@ + + + + Debug + AnyCPU + {DB31B844-0297-4D45-A0A1-E6EC18FECB42} + {60B24E98-250D-4E81-963D-6570CE7495DD};{BEF8D622-AFAA-44C4-9E86-F360BAAD445C} + Exe + BCL.Tests + Resources + Mono.Data.TdsTests + 168,169,219,414,612,618,649,672 + v4.5 + true + obj\$(Platform)\$(Configuration)-unified + XAMCORE_2_0;ADD_BCL_EXCLUSIONS + + + true + full + false + bin\Debug + DEBUG;INSIDE_CORLIB;LIBC;NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;NET_4_5;MONO_DATACONVERTER_STATIC_METHODS;MONOMAC;DISABLE_CAS_USE;NO_GUI_TESTING;$(DefineConstants) + True + prompt + 4 + false + false + Mac Developer + false + false + None + x86_64 + + + full + true + bin\Release + DEBUG;INSIDE_CORLIB;LIBC;NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;NET_4_5;MONO_DATACONVERTER_STATIC_METHODS;MONOMAC;DISABLE_CAS_USE;NO_GUI_TESTING;$(DefineConstants) + True + prompt + 4 + false + None + false + Mac Developer + false + false + + + + + + + + + ..\..\..\external\guiunit\src\framework\obj\Debug\xammac_mobile\GuiUnit.exe + + + + + + + + + Info.plist + + + + + MacTestMain.cs + + + +#FILES# + + + + + Resources\Resources.es-ES.resx + Resources.es-ES.resources + + + Resources\Resources.nn-NO.resx + Resources.nn-NO.resources + + + Resources\Resources.resx + Resources.resources + + + diff --git a/tests/bcl-test/Mono.Data.Tds/Mono.Data.Tds.csproj.template b/tests/bcl-test/Mono.Data.Tds/Mono.Data.Tds.csproj.template new file mode 100644 index 000000000000..29fda7fee064 --- /dev/null +++ b/tests/bcl-test/Mono.Data.Tds/Mono.Data.Tds.csproj.template @@ -0,0 +1,160 @@ + + + + Debug + iPhoneSimulator + 10.0.0 + 2.0 + {3ACEBA7C-F2A0-4592-8096-C2644459FE4A} + {1A34DEC2-39A1-4BB1-AE02-C3B2DDD3FA41};{86E2A577-5169-467A-968F-9D48F45FDF2A} + Exe + BCL.Tests + Resources + MonoDataTdsTests + 67,168,169,219,414,612,618,649,672 + Xamarin.iOS + obj\$(Platform)\$(Configuration)-unified + XAMCORE_2_0 + + + True + full + False + bin\iPhoneSimulator\$(Configuration)-unified + DEBUG;NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;NET_4_5;NET_2_1;MOBILE;MONOTOUCH;FULL_AOT_RUNTIME;DISABLE_CAS_USE;$(DefineConstants) + prompt + 4 + True + None + True + i386, x86_64 + + + none + True + bin\iPhoneSimulator\$(Configuration)-unified + NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;NET_4_5;NET_2_1;MOBILE;MONOTOUCH;FULL_AOT_RUNTIME;DISABLE_CAS_USE;$(DefineConstants) + prompt + 4 + None + True + i386, x86_64 + + + True + full + False + bin\iPhone\$(Configuration)-unified + DEBUG;NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;NET_4_5;NET_2_1;MOBILE;MONOTOUCH;FULL_AOT_RUNTIME;DISABLE_CAS_USE;$(DefineConstants) + prompt + 4 + iPhone Developer + True + True + ARMv7, ARM64 + + + True + full + False + bin\iPhone\$(Configuration)-unified + DEBUG;NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;NET_4_5;NET_2_1;MOBILE;MONOTOUCH;FULL_AOT_RUNTIME;DISABLE_CAS_USE;$(DefineConstants) + prompt + 4 + iPhone Developer + True + True + ARMv7 + + + True + full + False + bin\iPhone\$(Configuration)-unified + DEBUG;NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;NET_4_5;NET_2_1;MOBILE;MONOTOUCH;FULL_AOT_RUNTIME;DISABLE_CAS_USE;$(DefineConstants) + prompt + 4 + iPhone Developer + True + True + ARM64 + + + none + True + bin\iPhone\$(Configuration)-unified + NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;NET_4_5;NET_2_1;MOBILE;MONOTOUCH;FULL_AOT_RUNTIME;DISABLE_CAS_USE;$(DefineConstants) + prompt + 4 + iPhone Developer + True + NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;NET_4_5;NET_2_1;MOBILE;MONOTOUCH;FULL_AOT_RUNTIME;DISABLE_CAS_USE;$(DefineConstants) + ARMv7, ARM64 + + + none + True + bin\iPhone\$(Configuration)-unified + NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;NET_4_5;NET_2_1;MOBILE;MONOTOUCH;FULL_AOT_RUNTIME;DISABLE_CAS_USE;$(DefineConstants) + prompt + 4 + iPhone Developer + True + NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;NET_4_5;NET_2_1;MOBILE;MONOTOUCH;FULL_AOT_RUNTIME;DISABLE_CAS_USE;$(DefineConstants) + ARMv7 + + + none + True + bin\iPhone\$(Configuration)-unified + NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;NET_4_5;NET_2_1;MOBILE;MONOTOUCH;FULL_AOT_RUNTIME;DISABLE_CAS_USE;$(DefineConstants) + prompt + 4 + iPhone Developer + True + NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;NET_4_5;NET_2_1;MOBILE;MONOTOUCH;FULL_AOT_RUNTIME;DISABLE_CAS_USE;$(DefineConstants) + ARM64 + + + none + True + bin\iPhone\$(Configuration)-unified + NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;NET_4_5;NET_2_1;MOBILE;MONOTOUCH;FULL_AOT_RUNTIME;DISABLE_CAS_USE;$(DefineConstants) + prompt + 4 + iPhone Developer + True + NET_1_1;NET_2_0;NET_3_0;NET_3_5;NET_4_0;NET_4_5;NET_2_1;MOBILE;MONOTOUCH;FULL_AOT_RUNTIME;DISABLE_CAS_USE;$(DefineConstants) + ARMv7, ARM64 + --bitcode:full + true + + + + + + + + + + + + + + + Info.plist + + + + + Main.cs + + + AppDelegate.cs + + + +#FILES# + + + diff --git a/tests/xharness/Harness.cs b/tests/xharness/Harness.cs index d30036386b9c..90b1925358b3 100644 --- a/tests/xharness/Harness.cs +++ b/tests/xharness/Harness.cs @@ -294,7 +294,24 @@ void AutoConfigureMac () }); } - var bcl_suites = new string[] { "mscorlib", "System", "System.Core", "System.Data", "System.Net.Http", "System.Numerics", "System.Runtime.Serialization", "System.Transactions", "System.Web.Services", "System.Xml", "System.Xml.Linq", "Mono.Security", "System.ComponentModel.DataAnnotations", "System.Json", "System.ServiceModel.Web", "Mono.Data.Sqlite" }; + var bcl_suites = new string[] { + "mscorlib", + "System", + "System.Core", + "System.Data", + "System.Net.Http", + "System.Numerics", + "System.Runtime.Serialization", + "System.Transactions", "System.Web.Services", + "System.Xml", + "System.Xml.Linq", + "Mono.Security", + "System.ComponentModel.DataAnnotations", + "System.Json", + "System.ServiceModel.Web", + "Mono.Data.Sqlite", + "Mono.Data.Tds", + }; foreach (var p in bcl_suites) { MacTestProjects.Add (new MacTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "bcl-test/" + p + "/" + p + "-Mac.csproj")), generateVariations: false) { Name = p }); MacBclTests.Add (new MacBCLTest (p)); @@ -307,7 +324,26 @@ void AutoConfigureIOS () var library_projects = new string [] { "BundledResources", "EmbeddedResources", "bindings-test", "bindings-test2", "bindings-framework-test" }; var fsharp_test_suites = new string [] { "fsharp" }; var fsharp_library_projects = new string [] { "fsharplibrary" }; - var bcl_suites = new string [] { "mscorlib", "System", "System.Core", "System.Data", "System.Net.Http", "System.Numerics", "System.Runtime.Serialization", "System.Transactions", "System.Web.Services", "System.Xml", "System.Xml.Linq", "Mono.Security", "System.ComponentModel.DataAnnotations", "System.Json", "System.ServiceModel.Web", "Mono.Data.Sqlite" }; + var bcl_suites = new string [] { + "mscorlib", + "System", + "System.Core", + "System.Data", + "System.Net.Http", + "System.Numerics", + "System.Runtime.Serialization", + "System.Transactions", + "System.Web.Services", + "System.Xml", + "System.Xml.Linq", + "Mono.Security", + "System.ComponentModel.DataAnnotations", + "System.Json", + "System.ServiceModel.Web", + "Mono.Data.Sqlite", + "Mono.Data.Tds", + "Mono.Data.Tds", + }; var bcl_skip_watchos = new string [] { "Mono.Security", }; From 690eb102ad48d6475ce752632000f2fd34ddcd71 Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Date: Tue, 17 Oct 2017 18:33:58 +0200 Subject: [PATCH 2/4] Address comments from rolf in the review. --- .../Mono.Data.Tds-mac.csproj.template | 16 ---------------- tests/xharness/Harness.cs | 2 +- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/tests/bcl-test/Mono.Data.Tds/Mono.Data.Tds-mac.csproj.template b/tests/bcl-test/Mono.Data.Tds/Mono.Data.Tds-mac.csproj.template index 08fe63916623..decd66d5eacb 100644 --- a/tests/bcl-test/Mono.Data.Tds/Mono.Data.Tds-mac.csproj.template +++ b/tests/bcl-test/Mono.Data.Tds/Mono.Data.Tds-mac.csproj.template @@ -7,7 +7,6 @@ {60B24E98-250D-4E81-963D-6570CE7495DD};{BEF8D622-AFAA-44C4-9E86-F360BAAD445C} Exe BCL.Tests - Resources Mono.Data.TdsTests 168,169,219,414,612,618,649,672 v4.5 @@ -58,9 +57,6 @@ - - - Info.plist @@ -76,17 +72,5 @@ - - Resources\Resources.es-ES.resx - Resources.es-ES.resources - - - Resources\Resources.nn-NO.resx - Resources.nn-NO.resources - - - Resources\Resources.resx - Resources.resources - diff --git a/tests/xharness/Harness.cs b/tests/xharness/Harness.cs index 90b1925358b3..79c10761dd95 100644 --- a/tests/xharness/Harness.cs +++ b/tests/xharness/Harness.cs @@ -342,10 +342,10 @@ void AutoConfigureIOS () "System.ServiceModel.Web", "Mono.Data.Sqlite", "Mono.Data.Tds", - "Mono.Data.Tds", }; var bcl_skip_watchos = new string [] { "Mono.Security", + "Mono.Data.Tds", }; 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)); From 16b4f97ebbc757f051e4b858bc64efdb9ed4c16c Mon Sep 17 00:00:00 2001 From: Chris Hamons Date: Fri, 20 Oct 2017 10:14:02 -0500 Subject: [PATCH 3/4] [macos] Fix guiunit error on clean builds by depending on correct copy (#2912) * [macos] Fix guiunit error on clean builds by depending on correct copy - From a clean build making a BCL test would error due to the non-mobile guiunit not being built - This was because the Makefile-mac.inc target was incorrect - This was because xharness assumed that non variation based targets were always Modern - However, BCL tests are Full, not Modern * Code review change * Swap to var to reduce diff --- tests/xharness/Harness.cs | 38 ++++++++++++++++-------------- tests/xharness/Jenkins.cs | 2 +- tests/xharness/MacUnifiedTarget.cs | 20 +++++++++------- tests/xharness/TestProject.cs | 12 +++++++--- 4 files changed, 42 insertions(+), 30 deletions(-) diff --git a/tests/xharness/Harness.cs b/tests/xharness/Harness.cs index 79c10761dd95..3256fef5cd20 100644 --- a/tests/xharness/Harness.cs +++ b/tests/xharness/Harness.cs @@ -278,7 +278,7 @@ void AutoConfigureMac () foreach (var p in test_suites) MacTestProjects.Add (new MacTestProject (Path.GetFullPath (Path.Combine (RootDirectory, p.ProjectFile + "/" + p.ProjectFile + ".sln"))) { Name = p.Name }); - MacTestProjects.Add (new MacTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "introspection", "Mac", "introspection-mac.csproj")), skipXMVariations: true) { Name = "introspection" }); + MacTestProjects.Add (new MacTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "introspection", "Mac", "introspection-mac.csproj")), targetFrameworkFlavor: MacFlavors.Modern) { Name = "introspection" }); var hard_coded_test_suites = new [] { new { ProjectFile = "mmptest", Name = "mmptest", IsNUnit = true, Configurations = (string[]) null }, @@ -313,7 +313,7 @@ void AutoConfigureMac () "Mono.Data.Tds", }; foreach (var p in bcl_suites) { - MacTestProjects.Add (new MacTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "bcl-test/" + p + "/" + p + "-Mac.csproj")), generateVariations: false) { Name = p }); + MacTestProjects.Add (new MacTestProject (Path.GetFullPath (Path.Combine (RootDirectory, "bcl-test/" + p + "/" + p + "-Mac.csproj")), targetFrameworkFlavor: MacFlavors.Full, generateVariations: false) { Name = p }); MacBclTests.Add (new MacBCLTest (p)); } } @@ -449,16 +449,18 @@ void ConfigureMac () foreach (bool thirtyTwoBit in new bool[] { false, true }) { - var unifiedMobile = new MacUnifiedTarget (true, thirtyTwoBit) - { - TemplateProjectPath = file, - Harness = this, - IsNUnitProject = proj.IsNUnitProject, - }; - unifiedMobile.Execute (); - unified_targets.Add (unifiedMobile); + if (proj.GenerateModern) { + var unifiedMobile = new MacUnifiedTarget (true, thirtyTwoBit) + { + TemplateProjectPath = file, + Harness = this, + IsNUnitProject = proj.IsNUnitProject, + }; + unifiedMobile.Execute (); + unified_targets.Add (unifiedMobile); + } - if (!proj.SkipXMVariations) { + if (proj.GenerateFull) { var unifiedXM45 = new MacUnifiedTarget (false, thirtyTwoBit) { TemplateProjectPath = file, @@ -479,14 +481,14 @@ void ConfigureMac () foreach (var proj in MacTestProjects.Where ((v) => !v.GenerateVariations)) { var file = proj.Path; - var unifiedMobile = new MacUnifiedTarget (true, false, true) - { - TemplateProjectPath = file, - Harness = this, + + var unifiedTarget = new MacUnifiedTarget (proj.GenerateModern, false, true, true) { + TemplateProjectPath = file, + Harness = this, IsNUnitProject = proj.IsNUnitProject, - }; - unifiedMobile.Execute (); - hardcoded_unified_targets.Add (unifiedMobile); + }; + unifiedTarget.Execute (); + hardcoded_unified_targets.Add (unifiedTarget); } MakefileGenerator.CreateMacMakefile (this, classic_targets.Union (unified_targets).Union (hardcoded_unified_targets) ); diff --git a/tests/xharness/Jenkins.cs b/tests/xharness/Jenkins.cs index 3eb71b7476e1..bf79a4cdfbcd 100644 --- a/tests/xharness/Jenkins.cs +++ b/tests/xharness/Jenkins.cs @@ -550,7 +550,7 @@ async Task PopulateTasksAsync () if (project.GenerateVariations) { Tasks.Add (CloneExecuteTask (exec, TestPlatform.Mac_Unified, "-unified", ignored)); Tasks.Add (CloneExecuteTask (exec, TestPlatform.Mac_Unified32, "-unified-32", ignored)); - if (!project.SkipXMVariations) { + if (project.GenerateFull) { Tasks.Add (CloneExecuteTask (exec, TestPlatform.Mac_UnifiedXM45, "-unifiedXM45", ignored)); Tasks.Add (CloneExecuteTask (exec, TestPlatform.Mac_UnifiedXM45_32, "-unifiedXM45-32", ignored)); } diff --git a/tests/xharness/MacUnifiedTarget.cs b/tests/xharness/MacUnifiedTarget.cs index e247a4d4d1c1..87553b8cef33 100644 --- a/tests/xharness/MacUnifiedTarget.cs +++ b/tests/xharness/MacUnifiedTarget.cs @@ -9,12 +9,14 @@ public class MacUnifiedTarget : MacTarget bool SkipProjectGeneration; bool ThirtyTwoBit; + bool SkipSuffix; - public MacUnifiedTarget (bool mobile, bool thirtyTwoBit, bool shouldSkipProjectGeneration = false) : base () + public MacUnifiedTarget (bool mobile, bool thirtyTwoBit, bool shouldSkipProjectGeneration = false, bool skipSuffix = false) : base () { Mobile = mobile; ThirtyTwoBit = thirtyTwoBit; SkipProjectGeneration = shouldSkipProjectGeneration; + SkipSuffix = skipSuffix; } public override bool ShouldSkipProjectGeneration @@ -29,7 +31,15 @@ public override string Suffix { get { if (SkipProjectGeneration) return ""; - return "-unified" + (Mobile ? "" : "XM45") + (ThirtyTwoBit ? "-32" : ""); + string suffix = (Mobile ? "" : "XM45") + (ThirtyTwoBit ? "-32" : ""); + return "-unified" + (SkipSuffix ? "" : suffix); + } + } + + public override string MakefileWhereSuffix { + get { + string suffix = (Mobile ? "" : "XM45") + (ThirtyTwoBit ? "32" : ""); + return "unified" + (SkipSuffix ? "" : suffix); } } @@ -81,12 +91,6 @@ public override string Platform { } } - public override string MakefileWhereSuffix { - get { - return "unified" + (Mobile ? "" : "XM45") + (ThirtyTwoBit ? "32" : ""); - } - } - public override string DefaultAssemblyReference { get { return "XamMac"; } } public override IEnumerable ReferenceToRemove { get { yield return "System.Drawing"; } } diff --git a/tests/xharness/TestProject.cs b/tests/xharness/TestProject.cs index 536204c3db27..bf596ace0976 100644 --- a/tests/xharness/TestProject.cs +++ b/tests/xharness/TestProject.cs @@ -138,18 +138,24 @@ public iOSTestProject (string path, bool isExecutableProject = true, bool genera } } + public enum MacFlavors { All, Modern, Full } + public class MacTestProject : TestProject { - public bool SkipXMVariations; + public MacFlavors TargetFrameworkFlavor; + + public bool GenerateModern => TargetFrameworkFlavor == MacFlavors.All || TargetFrameworkFlavor == MacFlavors.Modern; + public bool GenerateFull => TargetFrameworkFlavor == MacFlavors.All || TargetFrameworkFlavor == MacFlavors.Full; + public string [] Configurations; public MacTestProject () : base () { } - public MacTestProject (string path, bool isExecutableProject = true, bool generateVariations = true, bool skipXMVariations = false) : base (path, isExecutableProject, generateVariations) + public MacTestProject (string path, bool isExecutableProject = true, bool generateVariations = true, MacFlavors targetFrameworkFlavor = MacFlavors.All) : base (path, isExecutableProject, generateVariations) { - SkipXMVariations = skipXMVariations; + TargetFrameworkFlavor = targetFrameworkFlavor; } } } From bc6cb4653dc934f2ad6420a208d41f2319a08d20 Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Date: Tue, 24 Oct 2017 13:27:32 +0200 Subject: [PATCH 4/4] Revert changes in the paths for GuiUnit. --- .../Mono.Data.Sqlite/Mono.Data.Sqlite-mac.csproj.template | 2 +- tests/bcl-test/Mono.Data.Tds/Mono.Data.Tds-mac.csproj.template | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/bcl-test/Mono.Data.Sqlite/Mono.Data.Sqlite-mac.csproj.template b/tests/bcl-test/Mono.Data.Sqlite/Mono.Data.Sqlite-mac.csproj.template index 6dbced9fd01d..428f1f5daffc 100644 --- a/tests/bcl-test/Mono.Data.Sqlite/Mono.Data.Sqlite-mac.csproj.template +++ b/tests/bcl-test/Mono.Data.Sqlite/Mono.Data.Sqlite-mac.csproj.template @@ -53,7 +53,7 @@ - ..\..\..\external\guiunit\src\framework\obj\Debug\xammac_mobile\GuiUnit.exe + ..\..\..\external\guiunit\src\framework\obj\Debug\net-4.5\GuiUnit.exe diff --git a/tests/bcl-test/Mono.Data.Tds/Mono.Data.Tds-mac.csproj.template b/tests/bcl-test/Mono.Data.Tds/Mono.Data.Tds-mac.csproj.template index decd66d5eacb..25e4a7cea627 100644 --- a/tests/bcl-test/Mono.Data.Tds/Mono.Data.Tds-mac.csproj.template +++ b/tests/bcl-test/Mono.Data.Tds/Mono.Data.Tds-mac.csproj.template @@ -53,7 +53,7 @@ - ..\..\..\external\guiunit\src\framework\obj\Debug\xammac_mobile\GuiUnit.exe + ..\..\..\external\guiunit\src\framework\obj\Debug\net-4.5\GuiUnit.exe