/// <summary> /// Test entry point /// </summary> public override void TickTest() { // create the build source UnrealBuildSource BuildSource = new UnrealBuildSource(this.ProjectName, ProjectFile, this.UnrealPath, UsesSharedBuildType, BuildPath, new string[] { "" }); // check editor and statged info is valid CheckResult(BuildSource.EditorValid, "Editor build was invalid"); CheckResult(BuildSource.BuildCount > 0, "staged build was invalid"); // simple check with an editor role UnrealSessionRole EditorRole = new UnrealSessionRole(UnrealTargetRole.Editor, BuildHostPlatform.Current.Platform, UnrealTargetConfiguration.Development); List <string> Reasons = new List <string>(); // Check the build source can support this role bool ContainsEditor = BuildSource.CanSupportRole(EditorRole, ref Reasons); CheckResult(ContainsEditor, "{0", string.Join(", ", Reasons)); // now actually try to create it UnrealAppConfig Config = BuildSource.CreateConfiguration(EditorRole, new UnrealSessionRole[] { }); CheckResult(Config != null, "Build source did not return a config for {0}", EditorRole.ToString()); ValidateEditorConfig(Config, BuildSource); // Check all editor types (game, server, etc) TestBuildSourceForEditorTypes(BuildSource); // Test all monolithics that our base test says we support TestBuildSourceForMonolithics(BuildSource); MarkComplete(); }
/// <summary> /// Tests that this BuildSource is capable of returning configs for all the roles, /// platforms, and configurations that our base class says it should support /// </summary> /// <param name="BuildSource"></param> /// <returns></returns> void TestBuildSourceForMonolithics(UnrealBuildSource BuildSource) { List <UnrealSessionRole> AllRoles = new List <UnrealSessionRole>(); // Add a role for all supported clients on all supported configurations foreach (var Platform in SupportedClientPlatforms) { foreach (var Config in SupportedConfigurations) { AllRoles.Add(new UnrealSessionRole(UnrealTargetRole.Client, Platform, Config)); } } // Add a role for all supported servers on all supported configurations foreach (var Platform in SupportedServerPlatforms) { foreach (var Config in SupportedConfigurations) { AllRoles.Add(new UnrealSessionRole(UnrealTargetRole.Server, Platform, Config)); } } // Now check the build source can create all of these foreach (var Role in AllRoles) { List <string> Issues = new List <string>(); bool Result = BuildSource.CanSupportRole(Role, ref Issues); Issues.ForEach(S => Log.Error(S)); CheckResult(Result, "Failed to get artifacts for {0}", Role); // now actually try to create it UnrealAppConfig Config = BuildSource.CreateConfiguration(Role); CheckResult(Config != null, "Build source did not return a config for {0}", Role.ToString()); } }