/// <summary> /// Constructor taking optional params /// </summary> /// <param name="InType"></param> /// <param name="InPlatform"></param> /// <param name="InConfiguration"></param> /// <param name="InCommandLine"></param> /// <param name="InOptions"></param> public UnrealSessionRole(UnrealTargetRole InType, UnrealTargetPlatform InPlatform, UnrealTargetConfiguration InConfiguration, string InCommandLine = null, IConfigOption <UnrealAppConfig> InOptions = null) { RoleType = InType; Platform = InPlatform; Configuration = InConfiguration; if (string.IsNullOrEmpty(InCommandLine)) { CommandLine = ""; } else { CommandLine = InCommandLine; } RequiredBuildFlags = BuildFlags.None; if (Globals.Params.ParseParam("dev") && !RoleType.UsesEditor()) { RequiredBuildFlags |= BuildFlags.CanReplaceExecutable; } if (Globals.Params.ParseParam("bulk") && InPlatform == UnrealTargetPlatform.Android) { RequiredBuildFlags |= BuildFlags.Bulk; } Options = InOptions; FilesToCopy = new List <UnrealFileToCopy>(); RoleModifier = ERoleModifier.None; }
/// <summary> /// Constructor taking optional params /// </summary> /// <param name="InType"></param> /// <param name="InPlatform"></param> /// <param name="InConfiguration"></param> /// <param name="InCommandLine"></param> /// <param name="InOptions"></param> public UnrealSessionRole(UnrealTargetRole InType, UnrealTargetPlatform?InPlatform, UnrealTargetConfiguration InConfiguration, string InCommandLine = null, IConfigOption <UnrealAppConfig> InOptions = null) { RoleType = InType; Platform = InPlatform; Configuration = InConfiguration; MapOverride = string.Empty; if (string.IsNullOrEmpty(InCommandLine)) { CommandLine = string.Empty; } else { CommandLine = InCommandLine; } RequiredBuildFlags = BuildFlags.None; if (Globals.Params.ParseParam("dev") && !RoleType.UsesEditor()) { RequiredBuildFlags |= BuildFlags.CanReplaceExecutable; } //@todo: for bulk/packaged builds, we should mark the platform as capable of these as we're catching global and not test specific flags // where we may be running parallel tests on multiple platforms if (InPlatform == UnrealTargetPlatform.Android || InPlatform == UnrealTargetPlatform.IOS) { if (Globals.Params.ParseParam("bulk")) { RequiredBuildFlags |= BuildFlags.Bulk; } else { RequiredBuildFlags |= BuildFlags.NotBulk; } } if (Globals.Params.ParseParam("packaged") && (InPlatform == UnrealTargetPlatform.Switch || InPlatform == UnrealTargetPlatform.XboxOne || InPlatform == UnrealTargetPlatform.PS4)) { RequiredBuildFlags |= BuildFlags.Packaged; } Options = InOptions; FilesToCopy = new List <UnrealFileToCopy>(); CommandLineParams = new GauntletCommandLine(); RoleModifier = ERoleModifier.None; }
public IEnumerable <UnrealTestRole> RequireRoles(UnrealTargetRole InRole, UnrealTargetPlatform?PlatformOverride, int Count, ERoleModifier roleType = ERoleModifier.None) { if (RequiredRoles.ContainsKey(InRole) == false) { RequiredRoles[InRole] = new List <UnrealTestRole>(); } List <UnrealTestRole> RoleList = new List <UnrealTestRole>(); RequiredRoles[InRole].ForEach((R) => { if (R.PlatformOverride == PlatformOverride) { RoleList.Add(R); } }); for (int i = RoleList.Count; i < Count; i++) { UnrealTestRole NewRole = new UnrealTestRole(InRole, PlatformOverride); NewRole.RoleType = roleType; RoleList.Add(NewRole); RequiredRoles[InRole].Add(NewRole); } return(RoleList); }