Exemple #1
0
        void AutoConfigureMac()
        {
            var test_suites            = new string[] { "apitest", "dontlink-mac" };
            var hard_coded_test_suites = new string[] { "mmptest", "msbuild-mac" };

            //var library_projects = new string[] { "BundledResources", "EmbeddedResources", "bindings-test", "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" };
            foreach (var p in test_suites)
            {
                TestProjects.Add(Path.GetFullPath(Path.Combine(RootDirectory, p + "/" + p + ".csproj")));
            }
            TestProjects.Add(Path.GetFullPath(Path.Combine(RootDirectory, "introspection", "Mac", "introspection-mac.csproj")));
            foreach (var p in hard_coded_test_suites)
            {
                HardCodedTestProjects.Add(Path.GetFullPath(Path.Combine(RootDirectory, p + "/" + p + ".csproj")));
            }
            //foreach (var p in fsharp_test_suites)
            //	TestProjects.Add (Path.GetFullPath (Path.Combine (RootDirectory, p + "/" + p + ".fsproj")));
            //foreach (var p in library_projects)
            //TestProjects.Add (Path.GetFullPath (Path.Combine (RootDirectory, p + "/" + p + ".csproj")));
            //foreach (var p in fsharp_library_projects)
            //TestProjects.Add (Path.GetFullPath (Path.Combine (RootDirectory, p + "/" + p + ".fsproj")));
            //foreach (var p in bcl_suites)
            //TestProjects.Add (Path.GetFullPath (Path.Combine (RootDirectory, "bcl-test/" + p + "/" + p + ".csproj")));

            // BclTests.AddRange (bcl_suites);

            ParseConfigFiles();
            var src_root = Path.Combine(Path.GetDirectoryName(Path.GetDirectoryName(RootDirectory)));

            MONO_PATH = Path.GetFullPath(Path.Combine(src_root, "mono"));
        }
        private void LoadProjects()
        {
            try
            {
                ProjectType = FindProjectType();
                LogMessages.Add(LogMessage.Log("Loading projects", LogMessage.LogType.Info));
                TestProjects.Clear();
                AssemblyProjects.Clear();

                var projects = Common.Instance.Dte2Object.Solution.Projects;

                foreach (Project project in projects)
                {
                    if (!project.Name.Contains(".Test"))
                    {
                        if (project.Name.StartsWith("BeagleStreet."))
                        {
                            LogMessages.Add(LogMessage.Log($"Loaded test project {project.Name}", LogMessage.LogType.Success));
                            AssemblyProjects.Add(new LoadedProject {
                                IsSelected = true, Name = project.Name
                            });
                        }

                        continue;
                    }

                    var filePath = ProjectType == ProjectType.DotNetCore ?
                                   $"{Path.GetDirectoryName(project.FileName)}\\{project.Name}.csproj" :
                                   $"{Path.GetDirectoryName(project.FileName)}\\bin\\debug\\{project.Name}.dll";

                    if (File.Exists(filePath))
                    {
                        LogMessages.Add(LogMessage.Log($"Loaded test project {filePath}", LogMessage.LogType.Success));
                        TestProjects.Add(new LoadedProject {
                            IsSelected = true, Name = project.Name, AssemblyFilePath = filePath
                        });
                    }
                    else
                    {
                        LogMessages.Add(LogMessage.Log($"Could not find the file {filePath}", LogMessage.LogType.Error));
                    }
                }

                LogMessages.Add(TestProjects.Any()
                    ? LogMessage.Log($"Loaded {TestProjects.Count} test projects", LogMessage.LogType.Success)
                    : LogMessage.Log("Could not test load projects, click reload projects to try again", LogMessage.LogType.Error));
            }
            catch (Exception ex)
            {
                TestProjects.Clear();
                LogMessages.Add(LogMessage.Log($"Failed to load the projects, click reload to try again. ** {ex.Message} **", LogMessage.LogType.Error));
            }
        }
Exemple #3
0
        void AutoConfigure()
        {
            var test_suites             = new string [] { "monotouch-test", "framework-test", "mini" };
            var library_projects        = new string [] { "BundledResources", "EmbeddedResources", "bindings-test", "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" };

            foreach (var p in test_suites)
            {
                TestProjects.Add(Path.GetFullPath(Path.Combine(RootDirectory, p + "/" + p + ".csproj")));
            }
            foreach (var p in fsharp_test_suites)
            {
                TestProjects.Add(Path.GetFullPath(Path.Combine(RootDirectory, p + "/" + p + ".fsproj")));
            }
            foreach (var p in library_projects)
            {
                TestProjects.Add(Path.GetFullPath(Path.Combine(RootDirectory, p + "/" + p + ".csproj")));
            }
            foreach (var p in fsharp_library_projects)
            {
                TestProjects.Add(Path.GetFullPath(Path.Combine(RootDirectory, p + "/" + p + ".fsproj")));
            }
            foreach (var p in bcl_suites)
            {
                TestProjects.Add(Path.GetFullPath(Path.Combine(RootDirectory, "bcl-test/" + p + "/" + p + ".csproj")));
            }
            TestProjects.Add(Path.GetFullPath(Path.Combine(RootDirectory, "introspection", "iOS", "introspection-ios.csproj")));
            TestProjects.Add(Path.GetFullPath(Path.Combine(RootDirectory, "linker-ios", "dont link", "dont link.csproj")));
            TestProjects.Add(Path.GetFullPath(Path.Combine(RootDirectory, "linker-ios", "link all", "link all.csproj")));
            TestProjects.Add(Path.GetFullPath(Path.Combine(RootDirectory, "linker-ios", "link sdk", "link sdk.csproj")));
            BclTests.AddRange(bcl_suites);

            WatchOSContainerTemplate = Path.GetFullPath(Path.Combine(RootDirectory, "watchos/Container"));
            WatchOSAppTemplate       = Path.GetFullPath(Path.Combine(RootDirectory, "watchos/App"));
            WatchOSExtensionTemplate = Path.GetFullPath(Path.Combine(RootDirectory, "watchos/Extension"));

            ParseConfigFiles();
            var src_root = Path.GetDirectoryName(RootDirectory);

            MONO_PATH       = Path.GetFullPath(Path.Combine(src_root, "external", "mono"));
            WATCH_MONO_PATH = make_config ["WATCH_MONO_PATH"];
            TVOS_MONO_PATH  = MONO_PATH;
            INCLUDE_WATCH   = make_config.ContainsKey("INCLUDE_WATCH") && !string.IsNullOrEmpty(make_config ["INCLUDE_WATCH"]);
        }