Skip to content

Instantly share code, notes, and snippets.

@dorgonman
Created July 8, 2020 13:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dorgonman/e563eef688097d0515c76efbd72fcce5 to your computer and use it in GitHub Desktop.
Save dorgonman/e563eef688097d0515c76efbd72fcce5 to your computer and use it in GitHub Desktop.
UE4 YourProjectPGONode
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using AutomationTool;
using Gauntlet;
using UnrealBuildTool;
using System.Text.RegularExpressions;
namespace UE4Game
{
/// <summary>
/// YourProject PGO configuration
/// </summary>
public class YourProjectPGOConfig : PGOConfig
{
public override void ParametersWereApplied(string[] Params)
{
base.ParametersWereApplied(Params);
}
}
public class YourProjectPGONode
: PGONode<YourProjectPGOConfig>
{
public YourProjectPGONode(UnrealTestContext InContext)
: base(InContext)
{
}
public override YourProjectPGOConfig GetConfiguration()
{
if (CachedConfig != null)
{
return CachedConfig as YourProjectPGOConfig;
}
var Config = base.GetConfiguration();
// Set max duration to 10 hour
Config.MaxDuration = 10 * 60 * 60;
// create a client role
UnrealTestRole ClientRole = Config.RequireRole(UnrealTargetRole.Client);
ClientRole.CommandLine += string.Format(" -Deterministic ");
if (UnrealTargetPlatform.Switch == Context.GetRoleContext(UnrealTargetRole.Client).Platform)
{
ClientRole.CommandLine += " -novsync ";
}
return Config;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment