Ejemplo n.º 1
0
        IEnumerable <MacExecuteTask> CreateMacExecuteTask(MacTestProject project, MSBuildTask build, bool ignored)
        {
            if (project == null)
            {
                throw new ArgumentNullException(nameof(project));
            }
            if (build == null)
            {
                throw new ArgumentNullException(nameof(build));
            }

            var exec = new MacExecuteTask(jenkins, build, processManager, crashReportSnapshotFactory)
            {
                Ignored    = ignored,
                BCLTest    = project.IsBclTest(),
                TestName   = project.Name,
                IsUnitTest = true,
            };

            return(testVariationsFactory.CreateTestVariations(new [] { exec }, (buildTask, test, candidates) =>
                                                              new MacExecuteTask(jenkins, buildTask, processManager, crashReportSnapshotFactory)
            {
                IsUnitTest = true
            }));
        }
Ejemplo n.º 2
0
        NUnitExecuteTask CreateNUnitTask(MacTestProject project, MSBuildTask build, bool ignored)
        {
            if (project == null)
            {
                throw new ArgumentNullException(nameof(project));
            }
            if (build == null)
            {
                throw new ArgumentNullException(nameof(build));
            }

            var dll = Path.Combine(Path.GetDirectoryName(build.TestProject.Path), project.Xml.GetOutputAssemblyPath(build.ProjectPlatform, build.ProjectConfiguration).Replace('\\', '/'));

            return(new NUnitExecuteTask(jenkins, build, processManager)
            {
                Ignored = ignored,
                TestLibrary = dll,
                TestProject = project,
                Platform = build.Platform,
                TestName = project.Name,
                Timeout = TimeSpan.FromMinutes(120),
                Mode = "macOS",
            });
        }