Fix device usage comment calls for any UnrealTests that don't have an AppInstance

#rb J.Baumgartner

#ROBOMERGE-OWNER: j.baumgartner
#ROBOMERGE-AUTHOR: william.ewen
#ROBOMERGE-SOURCE: CL 17057251 via CL 17059887 via CL 17060149 via CL 17062904 via CL 17078316
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Test -> Main) (v853-17066230)

[CL 17078326 by william ewen in ue5-main branch]
This commit is contained in:
william ewen
2021-08-05 19:34:21 -04:00
parent a721988243
commit 445a0420f7
@@ -734,8 +734,11 @@ namespace Gauntlet
// Add info from test context to device usage log
foreach(IAppInstance AppInstance in TestInstance.ClientApps)
{
IDeviceUsageReporter.RecordComment(AppInstance.Device.Name, (UnrealTargetPlatform)AppInstance.Device.Platform, IDeviceUsageReporter.EventType.Device, Context.Options.JobDetails);
IDeviceUsageReporter.RecordComment(AppInstance.Device.Name, (UnrealTargetPlatform)AppInstance.Device.Platform, IDeviceUsageReporter.EventType.Test, this.GetType().Name);
if (AppInstance != null)
{
IDeviceUsageReporter.RecordComment(AppInstance.Device.Name, (UnrealTargetPlatform)AppInstance.Device.Platform, IDeviceUsageReporter.EventType.Device, Context.Options.JobDetails);
IDeviceUsageReporter.RecordComment(AppInstance.Device.Name, (UnrealTargetPlatform)AppInstance.Device.Platform, IDeviceUsageReporter.EventType.Test, this.GetType().Name);
}
}