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.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..25e4a7cea627 --- /dev/null +++ b/tests/bcl-test/Mono.Data.Tds/Mono.Data.Tds-mac.csproj.template @@ -0,0 +1,76 @@ + + + + Debug + AnyCPU + {DB31B844-0297-4D45-A0A1-E6EC18FECB42} + {60B24E98-250D-4E81-963D-6570CE7495DD};{BEF8D622-AFAA-44C4-9E86-F360BAAD445C} + Exe + BCL.Tests + 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\net-4.5\GuiUnit.exe + + + + + + Info.plist + + + + + MacTestMain.cs + + + +#FILES# + + + + + 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..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 }, @@ -294,9 +294,26 @@ 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 }); + 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)); } } @@ -307,9 +324,28 @@ 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", + }; 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)); @@ -413,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, @@ -443,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; } } }