// Copyright Epic Games, Inc. All Rights Reserved.
using Gauntlet;
namespace UE
{
public class InstallOnlyConfiguration : UnrealTestConfiguration
{
[AutoParam]
public int ClientCount = 1;
[AutoParam]
public int ServerCount = 0;
}
///
/// No-op test that only installs a build
///
public class InstallOnly : UnrealTestNode
{
///
public InstallOnly(Gauntlet.UnrealTestContext InContext)
: base(InContext)
{
}
///
/// Returns the configuration description for this test
///
///
public override InstallOnlyConfiguration GetConfiguration()
{
InstallOnlyConfiguration Config = base.GetConfiguration();
for (int i = 0; i < Config.ClientCount; i++)
{
Config.RequireRole(UnrealTargetRole.Client).InstallOnly = true;
}
for (int i = 0; i < Config.ServerCount; i++)
{
Config.RequireRole(UnrealTargetRole.Server).InstallOnly = true;
}
// Force disable test results for Horde as there is not actual test running. It will always pass.
Config.WriteTestResultsForHorde = false;
return Config;
}
///
/// Completes the test as soon as it starts because this test is a no-op
///
public override void TickTest()
{
MarkTestComplete();
SetTestResult(TestResult.Passed);
}
}
}