public override void ApplyToConfig(UnrealAppConfig AppConfig, UnrealSessionRole ConfigRole, IEnumerable <UnrealSessionRole> OtherRoles) { base.ApplyToConfig(AppConfig, ConfigRole, OtherRoles); string ReportOutputArg = string.IsNullOrEmpty(ReportOutputPath) ? "" : string.Format("-ReportOutputPath=\"{0}\"", ReportOutputPath); if (UseEditor) { if (ConfigRole.RoleType == UnrealTargetRole.Editor) { AppConfig.CommandLine += string.Format(" -NoWatchdog -stdout -FORCELOGFLUSH -CrashForUAT -unattended -buildmachine {0} -ExecCmds=\"Automation RunTests {1}; Quit;\"", ReportOutputArg, TestFilter); } if (VerifyDDC) { AppConfig.CommandLine += " -VerifyDDC"; } } else { string HostIP = UnrealHelpers.GetHostIpAddress(); if (ConfigRole.RoleType == UnrealTargetRole.Client) { AppConfig.CommandLine += string.Format("-sessionid={0} -messaging -log -TcpMessagingConnect={1}:6666", SessionID, HostIP); } else if (ConfigRole.RoleType == UnrealTargetRole.Editor) { AppConfig.CommandLine += string.Format("-nullrhi -ExecCmds=\"Automation StartRemoteSession {0};RunTests {1}; Quit\" -TcpMessagingListen={2}:6666 -log {3}", SessionID, TestFilter, HostIP, ReportOutputArg); } } }
public override UE4Game.UE4TestConfig GetConfiguration() { string ReportOutputPath = Globals.Params.ParseValue("ReportOutputPath", ""); string DisplayReportOutputPath = Globals.Params.ParseValue("DisplayReportOutputPath", ""); string SessionID = Guid.NewGuid().ToString(); string HostIP = UnrealHelpers.GetHostIpAddress(); UE4Game.UE4TestConfig Config = base.GetConfiguration(); Config.MaxDuration = 60.0f * 60.0f * 2.0f; // set to 2 hours. var ClientRole = Config.RequireRole(UnrealTargetRole.Client); ClientRole.ExplicitClientCommandLine = string.Format("-sessionid={0} -messaging -log -TcpMessagingConnect={1}:6666", SessionID, HostIP); var EditorRole = Config.RequireRole(UnrealTargetRole.Editor); EditorRole.CommandLine = string.Format("-nullrhi -ExecCmds=\"Automation StartRemoteSession {0};RunTests Project+System; Quit\" -TcpMessagingListen={1}:6666 -log -ReportOutputPath=\"{2}\" -DisplayReportOutputPath=\"{3}\"", SessionID, HostIP, ReportOutputPath, DisplayReportOutputPath); return(Config); }
public override void TickTest() { BuildData[] TestData = { // Test a content project new BuildData("ElementalDemo", "UE4Game.exe", UnrealTargetConfiguration.Development, UnrealTargetPlatform.Win64, UnrealTargetRole.Client, true), new BuildData("ElementalDemo", "UE4Game-Win64-Test.exe", UnrealTargetConfiguration.Test, UnrealTargetPlatform.Win64, UnrealTargetRole.Client, true), new BuildData("ElementalDemo", "UE4Game-Win64-Shippinge.exe", UnrealTargetConfiguration.Shipping, UnrealTargetPlatform.Win64, UnrealTargetRole.Client, true), // Test a regular monolithic project new BuildData("ActionRPG", "ActionRPG.exe", UnrealTargetConfiguration.Development, UnrealTargetPlatform.Win64, UnrealTargetRole.Client), new BuildData("ActionRPG", "ActionRPG-Win64-Test.exe", UnrealTargetConfiguration.Test, UnrealTargetPlatform.Win64, UnrealTargetRole.Client), new BuildData("ActionRPG", "ActionRPG-Win64-Shipping.exe", UnrealTargetConfiguration.Shipping, UnrealTargetPlatform.Win64, UnrealTargetRole.Client), new BuildData("ActionRPG", "ActionRPG.self", UnrealTargetConfiguration.Development, UnrealTargetPlatform.PS4, UnrealTargetRole.Client), new BuildData("ActionRPG", "ActionRPG-PS4-Test.self", UnrealTargetConfiguration.Test, UnrealTargetPlatform.PS4, UnrealTargetRole.Client), new BuildData("ActionRPG", "ActionRPG-PS4-Shipping.self", UnrealTargetConfiguration.Shipping, UnrealTargetPlatform.PS4, UnrealTargetRole.Client), new BuildData("ActionRPG", "ActionRPG.app", UnrealTargetConfiguration.Development, UnrealTargetPlatform.Mac, UnrealTargetRole.Client), new BuildData("ActionRPG", "ActionRPG-Mac-Test.app", UnrealTargetConfiguration.Test, UnrealTargetPlatform.Mac, UnrealTargetRole.Client), new BuildData("ActionRPG", "ActionRPG-Mac-Shipping.app", UnrealTargetConfiguration.Shipping, UnrealTargetPlatform.Mac, UnrealTargetRole.Client), new BuildData("ActionRPG", "ActionRPG.nss", UnrealTargetConfiguration.Development, UnrealTargetPlatform.Switch, UnrealTargetRole.Client), new BuildData("ActionRPG", "ActionRPG-Switch-Test.nss", UnrealTargetConfiguration.Test, UnrealTargetPlatform.Switch, UnrealTargetRole.Client), new BuildData("ActionRPG", "ActionRPG-Switch-Shipping.nss", UnrealTargetConfiguration.Shipping, UnrealTargetPlatform.Switch, UnrealTargetRole.Client), new BuildData("ActionRPG", "ActionRPG.ipa", UnrealTargetConfiguration.Development, UnrealTargetPlatform.IOS, UnrealTargetRole.Client), new BuildData("ActionRPG", "ActionRPG-IOS-Test.ipa", UnrealTargetConfiguration.Test, UnrealTargetPlatform.IOS, UnrealTargetRole.Client), new BuildData("ActionRPG", "ActionRPG-IOS-Shipping.ipa", UnrealTargetConfiguration.Shipping, UnrealTargetPlatform.IOS, UnrealTargetRole.Client), // Test Android where the name contains build data new BuildData("ActionRPG", "ActionRPG-arm64.apk", UnrealTargetConfiguration.Development, UnrealTargetPlatform.Android, UnrealTargetRole.Client), new BuildData("ActionRPG", "ActionRPG-Android-Test-arm64.apk", UnrealTargetConfiguration.Test, UnrealTargetPlatform.Android, UnrealTargetRole.Client), new BuildData("ActionRPG", "ActionRPG-Android-Shipping-arm64.apk", UnrealTargetConfiguration.Shipping, UnrealTargetPlatform.Android, UnrealTargetRole.Client), // Test a project like ForniteGame that emits dedicated Client executables new BuildData("FortniteGame", "FortniteClient.exe", UnrealTargetConfiguration.Development, UnrealTargetPlatform.Win64, UnrealTargetRole.Client), new BuildData("FortniteGame", "FortniteClient-Win64-Test.exe", UnrealTargetConfiguration.Test, UnrealTargetPlatform.Win64, UnrealTargetRole.Client), new BuildData("FortniteGame", "FortniteClient-Win64-Shipping.exe", UnrealTargetConfiguration.Shipping, UnrealTargetPlatform.Win64, UnrealTargetRole.Client), new BuildData("FortniteGame", "FortniteClient.self", UnrealTargetConfiguration.Development, UnrealTargetPlatform.PS4, UnrealTargetRole.Client), new BuildData("FortniteGame", "FortniteClient-PS4-Test.self", UnrealTargetConfiguration.Test, UnrealTargetPlatform.PS4, UnrealTargetRole.Client), new BuildData("FortniteGame", "FortniteClient-PS4-Shipping.self", UnrealTargetConfiguration.Shipping, UnrealTargetPlatform.PS4, UnrealTargetRole.Client), new BuildData("FortniteGame", "FortniteClient.app", UnrealTargetConfiguration.Development, UnrealTargetPlatform.Mac, UnrealTargetRole.Client), new BuildData("FortniteGame", "FortniteClient-Mac-Test.app", UnrealTargetConfiguration.Test, UnrealTargetPlatform.Mac, UnrealTargetRole.Client), new BuildData("FortniteGame", "FortniteClient-Mac-Shipping.app", UnrealTargetConfiguration.Shipping, UnrealTargetPlatform.Mac, UnrealTargetRole.Client), // Test a project like ForniteGame that emits dedicated Server executables new BuildData("FortniteGame", "FortniteServer.exe", UnrealTargetConfiguration.Development, UnrealTargetPlatform.Win64, UnrealTargetRole.Server), new BuildData("FortniteGame", "FortniteServer-Win64-Test.exe", UnrealTargetConfiguration.Test, UnrealTargetPlatform.Win64, UnrealTargetRole.Server), new BuildData("FortniteGame", "FortniteServer-Win64-Shipping.exe", UnrealTargetConfiguration.Shipping, UnrealTargetPlatform.Win64, UnrealTargetRole.Server), new BuildData("FortniteGame", "FortniteServer", UnrealTargetConfiguration.Development, UnrealTargetPlatform.Linux, UnrealTargetRole.Server), new BuildData("FortniteGame", "FortniteServer-Linux-Test", UnrealTargetConfiguration.Test, UnrealTargetPlatform.Linux, UnrealTargetRole.Server), new BuildData("FortniteGame", "FortniteServer-Linux-Shipping", UnrealTargetConfiguration.Shipping, UnrealTargetPlatform.Linux, UnrealTargetRole.Server), new BuildData("FortniteGame", "FortniteServer.app", UnrealTargetConfiguration.Development, UnrealTargetPlatform.Mac, UnrealTargetRole.Server), new BuildData("FortniteGame", "FortniteServer-Mac-Test.app", UnrealTargetConfiguration.Test, UnrealTargetPlatform.Mac, UnrealTargetRole.Server), new BuildData("FortniteGame", "FortniteServer-Mac-Shipping.app", UnrealTargetConfiguration.Shipping, UnrealTargetPlatform.Mac, UnrealTargetRole.Server), }; foreach (BuildData Data in TestData) { string Executable = Data.FileName; var FoundConfig = UnrealHelpers.GetConfigurationFromExecutableName(Data.ProjectName, Data.FileName); var FoundRole = UnrealHelpers.GetRoleFromExecutableName(Data.ProjectName, Data.FileName); var CalculatedName = UnrealHelpers.GetExecutableName(Data.ProjectName, Data.ExpectedPlatform, Data.ExpectedConfiguration, Data.ExpectedRole, Path.GetExtension(Data.FileName)); CheckResult(FoundConfig == Data.ExpectedConfiguration, "Parsed configuration was wrong for {0}. Detected {1}, Expected {2}", Data.FileName, FoundConfig, Data.ExpectedConfiguration); CheckResult(FoundRole == Data.ExpectedRole, "Parsed role was wrong for {0}. Detected {1}, Expected {2}", Data.FileName, FoundRole, Data.ExpectedRole); CheckResult(Data.ContentProject || CalculatedName.Equals(Data.FileName, StringComparison.OrdinalIgnoreCase), "Generated name from platform/config/was wrong. Calcualted {0}, Expected {1}", CalculatedName, Data.FileName); } MarkComplete(); }