/// <summary> /// Returns information about how to configure our Unreal processes. For the most part the majority /// of Unreal tests should only need to override this function /// </summary> /// <returns></returns> public virtual TConfigClass GetConfiguration() { if (CachedConfig == null) { CachedConfig = new TConfigClass(); AutoParam.ApplyParamsAndDefaults(CachedConfig, this.Context.TestParams.AllArguments); } return(CachedConfig); }
/// <summary> /// Main UAT entrance point. Custom games can derive from RunUnrealTests to run custom setup steps or /// directly set params on ContextOptions to remove the need for certain command line params (e.g. /// -project=FooGame /// </summary> /// <returns></returns> public override ExitCode Execute() { Globals.Params = new Gauntlet.Params(this.Params); UnrealTestOptions ContextOptions = new UnrealTestOptions(); AutoParam.ApplyParamsAndDefaults(ContextOptions, Globals.Params.AllArguments); if (string.IsNullOrEmpty(ContextOptions.Project)) { throw new AutomationException("No project specified. Use -project=ShooterGame etc"); } ContextOptions.Namespaces = "Gauntlet.UnrealTest,UE4Game"; ContextOptions.UsesSharedBuildType = true; return(RunTests(ContextOptions)); }
public override ExitCode Execute() { AutoParam.ApplyParamsAndDefaults(this, Environment.GetCommandLineArgs()); if (Verbose) { Gauntlet.Log.Level = Gauntlet.LogLevel.Verbose; } IEnumerable <string> TestList = new string[0]; // If a group was specified... if (Group.Length > 0) { // if a group was specified, find those tests TestList = Utils.TestConstructor.GetTestNamesByGroup <ITestNode>(Group, new[] { "Gauntlet.SelfTest" }); } else if (Tests.Length > 0) { // list of tests? TestList = Tests.Split(',').Select(S => S.Trim()); } else { // Ok, run everything! TestList = Utils.TestConstructor.GetTestNamesByGroup <ITestNode>(null, new[] { "Gauntlet.SelfTest" }); } // Create the list of tests IEnumerable <ITestNode> Nodes = Utils.TestConstructor.ConstructTests <ITestNode, string[]>(TestList, null, new[] { "Gauntlet.SelfTest" }); // Create the test executor var Executor = new TextExecutor(); TestExecutorOptions Options = new TestExecutorOptions(); AutoParam.ApplyParamsAndDefaults(Options, this.Params); bool AllTestsPassed = Executor.ExecuteTests(Options, Nodes); return(AllTestsPassed ? ExitCode.Success : ExitCode.Error_TestFailure); }
public override AutomationTool.ExitCode Execute() { AutoParam.ApplyParamsAndDefaults(this, Environment.GetCommandLineArgs()); Gauntlet.Log.Level = Gauntlet.LogLevel.VeryVerbose; if (string.IsNullOrEmpty(TempDir) == false) { Globals.TempDir = TempDir; } // add devices. We're quick so can ignore constraints DevicePool.Instance.SetLocalOptions(TempDir, false, DeviceURL); DevicePool.Instance.AddDevices(UnrealTargetPlatform.Win64, Devices, false); UnrealTargetPlatform[] SupportedPlatforms = { UnrealTargetPlatform.PS4, UnrealTargetPlatform.Win64 }; foreach (UnrealTargetPlatform Platform in SupportedPlatforms) { DevicePool.Instance.EnumerateDevices(Platform, Device => { try { CleanDevice(Device); } catch (Exception Ex) { Gauntlet.Log.Warning("Exception cleaning device: {0}", Ex); } return(true); }); } DevicePool.Instance.Dispose(); return(AutomationTool.ExitCode.Success); }