예제 #1
0
        protected BenchmarkEditorTaskBase(FileReference InProjectFile, DDCTaskOptions InTaskOptions, string InEditorArgs)
        {
            TaskOptions = InTaskOptions;
            EditorArgs  = InEditorArgs.Trim().Replace("  ", " ");
            ProjectFile = InProjectFile;

            if (TaskOptions == DDCTaskOptions.None || TaskOptions.HasFlag(DDCTaskOptions.WarmDDC))
            {
                TaskModifiers.Add("warmddc");
            }

            if (TaskOptions.HasFlag(DDCTaskOptions.ColdDDC))
            {
                TaskModifiers.Add("coldddc");
            }

            if (TaskOptions.HasFlag(DDCTaskOptions.HotDDC))
            {
                TaskModifiers.Add("hotddc");
            }

            if (TaskOptions.HasFlag(DDCTaskOptions.NoSharedDDC))
            {
                TaskModifiers.Add("noddc");
            }

            if (TaskOptions.HasFlag(DDCTaskOptions.NoShaderDDC))
            {
                TaskModifiers.Add("noshaderddc");
            }

            if (TaskOptions.HasFlag(DDCTaskOptions.KeepMemoryDDC))
            {
                TaskModifiers.Add("withbootddc");
            }

            if (!string.IsNullOrEmpty(EditorArgs))
            {
                TaskModifiers.Add(EditorArgs);
            }
        }
예제 #2
0
 public BenchmarkRunEditorTask(FileReference InProjectFile, DDCTaskOptions InOptions, string InEditorArgs = "")
     : base(InProjectFile, InOptions, InEditorArgs)
 {
     TaskName = string.Format("{0} PIE", ProjectName, BuildHostPlatform.Current.Platform);
 }
예제 #3
0
        public BenchmarkCookTask(FileReference InProjectFile, UnrealTargetPlatform InPlatform, bool bCookAsClient, DDCTaskOptions InOptions, string InCookArgs)
            : base(InProjectFile, InOptions, InCookArgs)
        {
            CookArgs     = InCookArgs;
            CookAsClient = bCookAsClient;

            var PlatformToCookPlatform = new Dictionary <UnrealTargetPlatform, string> {
                { UnrealTargetPlatform.Win64, "WindowsClient" },
                { UnrealTargetPlatform.Mac, "MacClient" },
                { UnrealTargetPlatform.Linux, "LinuxClient" },
                { UnrealTargetPlatform.Android, "Android_ASTCClient" }
            };

            CookPlatformName = InPlatform.ToString();

            if (PlatformToCookPlatform.ContainsKey(InPlatform))
            {
                CookPlatformName = PlatformToCookPlatform[InPlatform];
            }

            TaskName = string.Format("Cook {0} {1}", ProjectName, CookPlatformName);
        }
예제 #4
0
            public void ParseParams(string[] InParams)
            {
                this.Params = InParams;

                bool AllThings  = ParseParam("all");
                bool AllCompile = AllThings | ParseParam("allcompile");

                Preview    = ParseParam("preview");
                DoUE4Tests = AllThings || ParseParam("ue4");

                // compilation
                DoBuildEditorTests          = AllCompile | ParseParam("editor");
                DoBuildClientTests          = AllCompile | ParseParam("client");
                DoNoCompileTests            = AllCompile | ParseParam("nopcompile");
                DoSingleCompileTests        = AllCompile | ParseParam("singlecompile");
                DoAcceleratedCompileTests   = AllCompile | ParseParam("xge") | ParseParam("fastbuild");
                DoNoAcceleratedCompileTests = AllCompile | ParseParam("noxge") | ParseParam("nofastbuild");

                // cooking
                DoCookTests = AllThings | ParseParam("cook");

                // editor startup tests
                DoPIETests = AllThings | ParseParam("pie");

                // DDC options
                DDCOptions |= ParseParam("warmddc") ? DDCTaskOptions.WarmDDC : DDCTaskOptions.None;
                DDCOptions |= ParseParam("hotddc") ? DDCTaskOptions.HotDDC : DDCTaskOptions.None;
                DDCOptions |= ParseParam("coldddc") ? DDCTaskOptions.ColdDDC : DDCTaskOptions.None;
                DDCOptions |= ParseParam("noshaderddc") ? DDCTaskOptions.NoShaderDDC : DDCTaskOptions.None;
                DDCOptions |= ParseParam("noxge") ? DDCTaskOptions.NoXGE : DDCTaskOptions.None;

                // sanity
                DoAcceleratedCompileTests = DoAcceleratedCompileTests && BenchmarkBuildTask.SupportsAcceleration;

                Preview          = ParseParam("Preview");
                Iterations       = ParseParamInt("Iterations", Iterations);
                TimeBetweenTasks = ParseParamInt("Wait", TimeBetweenTasks);

                FileName = ParseParamValue("filename", FileName);

                CookArgs = ParseParamValue("CookArgs", "");
                PIEArgs  = ParseParamValue("PIEArgs", "");

                // Parse the project arg
                {
                    string ProjectsArg = ParseParamValue("project", null);
                    ProjectsArg = ParseParamValue("projects", ProjectsArg);

                    // Look at the project argument and verify it's a valid uproject
                    if (!string.IsNullOrEmpty(ProjectsArg))
                    {
                        ProjectsToTest = ProjectsArg.Split(new[] { '+', ',' }, StringSplitOptions.RemoveEmptyEntries);
                    }
                }

                // Parse and validate platform list from arguments
                {
                    string PlatformArg = ParseParamValue("platform", "");
                    PlatformArg = ParseParamValue("platforms", PlatformArg);

                    if (!string.IsNullOrEmpty(PlatformArg))
                    {
                        List <UnrealTargetPlatform> ClientPlatforms = new List <UnrealTargetPlatform>();

                        var PlatformList = PlatformArg.Split(new[] { '+', ',' }, StringSplitOptions.RemoveEmptyEntries);

                        foreach (var Platform in PlatformList)
                        {
                            UnrealTargetPlatform PlatformEnum;
                            if (!UnrealTargetPlatform.TryParse(Platform, out PlatformEnum))
                            {
                                throw new AutomationException("{0} is not a valid Unreal Platform", Platform);
                            }

                            ClientPlatforms.Add(PlatformEnum);
                        }

                        PlatformsToTest = ClientPlatforms;
                    }
                    else
                    {
                        PlatformsToTest = new[] { BuildHostPlatform.Current.Platform };
                    }
                }

                // parse processor args
                {
                    string ProcessorArg = ParseParamValue("cores", "");

                    if (!string.IsNullOrEmpty(ProcessorArg))
                    {
                        var ProcessorList = ProcessorArg.Split(new[] { '+', ',' }, StringSplitOptions.RemoveEmptyEntries);

                        CoresForLocalJobs = ProcessorList.Select(P => Convert.ToInt32(P));
                    }
                }

                // parse ddc args
                {
                    string Arg = ParseParamValue("ddc", "");

                    if (!string.IsNullOrEmpty(Arg))
                    {
                        DCCTypes = Arg.Split(new[] { '+', ',' }, StringSplitOptions.RemoveEmptyEntries);
                    }
                }

                // parse map args
                {
                    string Arg = ParseParamValue("map", "");

                    if (!string.IsNullOrEmpty(Arg))
                    {
                        MapList = Arg.Split(new[] { '+', ',' }, StringSplitOptions.RemoveEmptyEntries);
                    }
                }
            }