void ConfigureIOS() { var unified_targets = new List <UnifiedTarget> (); var tvos_targets = new List <TVOSTarget> (); var watchos_targets = new List <WatchOSTarget> (); var today_targets = new List <TodayExtensionTarget> (); RootDirectory = Path.GetFullPath(RootDirectory).TrimEnd('/'); if (AutoConf) { AutoConfigureIOS(); } foreach (var bclTestInfo in IOSTestProjects.Where(x => x.BCLInfo != null).Select(x => x.BCLInfo)) { bclTestInfo.Convert(); } foreach (var proj in IOSTestProjects) { var file = proj.Path; if (!File.Exists(file)) { throw new FileNotFoundException(file); } if (!proj.SkipwatchOSVariation) { var watchos = new WatchOSTarget() { TemplateProjectPath = file, Harness = this, TestProject = proj, }; watchos.Execute(); watchos_targets.Add(watchos); } if (!proj.SkiptvOSVariation) { var tvos = new TVOSTarget() { TemplateProjectPath = file, Harness = this, TestProject = proj, }; tvos.Execute(); tvos_targets.Add(tvos); } if (!proj.SkipiOSVariation) { var unified = new UnifiedTarget() { TemplateProjectPath = file, Harness = this, TestProject = proj, }; unified.Execute(); unified_targets.Add(unified); var today = new TodayExtensionTarget { TemplateProjectPath = file, Harness = this, TestProject = proj, }; today.Execute(); today_targets.Add(today); } } SolutionGenerator.CreateSolution(this, watchos_targets, "watchos"); SolutionGenerator.CreateSolution(this, tvos_targets, "tvos"); SolutionGenerator.CreateSolution(this, today_targets, "today"); MakefileGenerator.CreateMakefile(this, unified_targets, tvos_targets, watchos_targets, today_targets); }
int ConfigureIOS() { var rv = 0; var unified_targets = new List <UnifiedTarget> (); var tvos_targets = new List <TVOSTarget> (); var watchos_targets = new List <WatchOSTarget> (); var today_targets = new List <TodayExtensionTarget> (); RootDirectory = Path.GetFullPath(RootDirectory).TrimEnd('/'); if (AutoConf) { AutoConfigureIOS(); } foreach (var bclTestInfo in IOSTestProjects.Where(x => x.BCLInfo != null).Select(x => x.BCLInfo)) { bclTestInfo.Convert(); } foreach (var monoNativeInfo in IOSTestProjects.Where(x => x.MonoNativeInfo != null).Select(x => x.MonoNativeInfo)) { monoNativeInfo.Convert(); } foreach (var proj in IOSTestProjects) { var file = proj.Path; if (proj.MonoNativeInfo != null) { file = proj.MonoNativeInfo.TemplatePath; } if (!File.Exists(file)) { Console.WriteLine($"Can't find the project file {file}."); rv = 1; continue; } if (!proj.SkipwatchOSVariation) { var watchos = new WatchOSTarget() { TemplateProjectPath = file, Harness = this, TestProject = proj, }; watchos.Execute(); watchos_targets.Add(watchos); } if (!proj.SkiptvOSVariation) { var tvos = new TVOSTarget() { TemplateProjectPath = file, Harness = this, TestProject = proj, }; tvos.Execute(); tvos_targets.Add(tvos); } if (!proj.SkipiOSVariation) { var unified = new UnifiedTarget() { TemplateProjectPath = file, Harness = this, TestProject = proj, }; unified.Execute(); unified_targets.Add(unified); var today = new TodayExtensionTarget { TemplateProjectPath = file, Harness = this, TestProject = proj, }; today.Execute(); today_targets.Add(today); } } SolutionGenerator.CreateSolution(this, watchos_targets, "watchos"); SolutionGenerator.CreateSolution(this, tvos_targets, "tvos"); SolutionGenerator.CreateSolution(this, today_targets, "today"); MakefileGenerator.CreateMakefile(this, unified_targets, tvos_targets, watchos_targets, today_targets); return(rv); }
void AutoConfigureIOS() { var test_suites = new string [] { "monotouch-test", "framework-test", "mini", "interdependent-binding-projects" }; 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", "Mono.Data.Tds", "System.IO.Compression", "System.IO.Compression.FileSystem", "Mono.CSharp", "System.Security", "System.ServiceModel", "System.IdentityModel", }; var bcl_skip_watchos = new string [] { "Mono.Security", "Mono.Data.Tds", "Mono.CSharp", }; 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)); foreach (var p in test_suites) { IOSTestProjects.Add(new iOSTestProject(Path.GetFullPath(Path.Combine(RootDirectory, p + "/" + p + ".csproj"))) { Name = p }); } foreach (var p in fsharp_test_suites) { IOSTestProjects.Add(new iOSTestProject(Path.GetFullPath(Path.Combine(RootDirectory, p + "/" + p + ".fsproj"))) { Name = p }); } foreach (var p in library_projects) { IOSTestProjects.Add(new iOSTestProject(Path.GetFullPath(Path.Combine(RootDirectory, p + "/" + p + ".csproj")), false) { Name = p }); } foreach (var p in fsharp_library_projects) { IOSTestProjects.Add(new iOSTestProject(Path.GetFullPath(Path.Combine(RootDirectory, p + "/" + p + ".fsproj")), false) { Name = p }); } foreach (var p in bcl_suites) { BCLTestInfo bclTestInfo = new BCLTestInfo(this, p); IOSTestProjects.Add(new iOSTestProject(Path.GetFullPath(Path.Combine(RootDirectory, "bcl-test/" + p + "/" + p + ".csproj"))) { SkipwatchOSVariation = bcl_skip_watchos.Contains(p), BCLInfo = bclTestInfo, Name = p }); } 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, "linker", "ios", "dont link", "dont link.csproj"))) { Configurations = new string [] { "Debug", "Release" } }); IOSTestProjects.Add(new iOSTestProject(Path.GetFullPath(Path.Combine(RootDirectory, "linker", "ios", "link all", "link all.csproj"))) { Configurations = new string [] { "Debug", "Release" } }); IOSTestProjects.Add(new iOSTestProject(Path.GetFullPath(Path.Combine(RootDirectory, "linker", "ios", "link sdk", "link sdk.csproj"))) { Configurations = new string [] { "Debug", "Release" } }); // add all the tests that are using the precompiled mono assemblies var monoImportTestFactory = new BCLTestImportTargetFactory(this); foreach (var target in monoImportTestFactory.GetBclTargets()) { IOSTestProjects.Add(target); } WatchOSContainerTemplate = Path.GetFullPath(Path.Combine(RootDirectory, "templates/WatchContainer")); WatchOSAppTemplate = Path.GetFullPath(Path.Combine(RootDirectory, "templates/WatchApp")); WatchOSExtensionTemplate = Path.GetFullPath(Path.Combine(RootDirectory, "templates/WatchExtension")); TodayContainerTemplate = Path.GetFullPath(Path.Combine(RootDirectory, "templates", "TodayContainer")); TodayExtensionTemplate = Path.GetFullPath(Path.Combine(RootDirectory, "templates", "TodayExtension")); }
void AutoConfigureIOS() { var test_suites = new string [] { "monotouch-test", "framework-test", "mini", "interdependent-binding-projects" }; 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", }; var bcl_skip_watchos = new string [] { }; 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)); foreach (var p in test_suites) { IOSTestProjects.Add(new iOSTestProject(Path.GetFullPath(Path.Combine(RootDirectory, p + "/" + p + ".csproj"))) { Name = p }); } foreach (var p in fsharp_test_suites) { IOSTestProjects.Add(new iOSTestProject(Path.GetFullPath(Path.Combine(RootDirectory, p + "/" + p + ".fsproj"))) { Name = p }); } foreach (var p in library_projects) { IOSTestProjects.Add(new iOSTestProject(Path.GetFullPath(Path.Combine(RootDirectory, p + "/" + p + ".csproj")), false) { Name = p }); } foreach (var p in fsharp_library_projects) { IOSTestProjects.Add(new iOSTestProject(Path.GetFullPath(Path.Combine(RootDirectory, p + "/" + p + ".fsproj")), false) { Name = p }); } foreach (var p in bcl_suites) { BCLTestInfo bclTestInfo = new BCLTestInfo(this, p); IOSTestProjects.Add(new iOSTestProject(Path.GetFullPath(Path.Combine(RootDirectory, "bcl-test/" + p + "/" + p + ".csproj"))) { SkipwatchOSVariation = bcl_skip_watchos.Contains(p), BCLInfo = bclTestInfo, Name = p }); } 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, "linker", "ios", "dont link", "dont link.csproj"))) { Configurations = new string [] { "Debug", "Release" } }); IOSTestProjects.Add(new iOSTestProject(Path.GetFullPath(Path.Combine(RootDirectory, "linker", "ios", "link all", "link all.csproj"))) { Configurations = new string [] { "Debug", "Release" } }); IOSTestProjects.Add(new iOSTestProject(Path.GetFullPath(Path.Combine(RootDirectory, "linker", "ios", "link sdk", "link sdk.csproj"))) { Configurations = new string [] { "Debug", "Release" } }); foreach (var flavor in new MonoNativeFlavor[] { MonoNativeFlavor.Compat, MonoNativeFlavor.Unified }) { var monoNativeInfo = new MonoNativeInfo(this, flavor); var iosTestProject = new iOSTestProject(monoNativeInfo.ProjectPath, generateVariations: false) { MonoNativeInfo = monoNativeInfo, Name = monoNativeInfo.ProjectName }; IOSTestProjects.Add(iosTestProject); } // add all the tests that are using the precompiled mono assemblies var monoImportTestFactory = new BCLTestImportTargetFactory(this); IOSTestProjects.AddRange(monoImportTestFactory.GetiOSBclTargets()); WatchOSContainerTemplate = Path.GetFullPath(Path.Combine(RootDirectory, "templates/WatchContainer")); WatchOSAppTemplate = Path.GetFullPath(Path.Combine(RootDirectory, "templates/WatchApp")); WatchOSExtensionTemplate = Path.GetFullPath(Path.Combine(RootDirectory, "templates/WatchExtension")); TodayContainerTemplate = Path.GetFullPath(Path.Combine(RootDirectory, "templates", "TodayContainer")); TodayExtensionTemplate = Path.GetFullPath(Path.Combine(RootDirectory, "templates", "TodayExtension")); BCLTodayExtensionTemplate = Path.GetFullPath(Path.Combine(RootDirectory, "bcl-test", "BCLTests", "templates", "today")); }