You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Not all were converted because they were designed for packaged applications whereas low level tests are designed to run as "native" non-packaged applications. - reporting support for non-desktop platforms, for the moment Catch2 report type "console" is used that is sent to a .out file - most number of tests possible running multi platform, slower tests excluded on incremental builds - slow tests are moved to run on the monolithic build - Catch2 report failure event listener such that Horde detects them as build errors. Must add new Horde matcher for Catch2 failures #rb Mark.Lintott #preflight 623c8de389625f0612dabd64 [CL 19498448 by chris constantinescu in ue5-main branch]
57 lines
1.6 KiB
C#
57 lines
1.6 KiB
C#
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
using Gauntlet;
|
|
using System;
|
|
using System.Linq;
|
|
using System.Xml.Linq;
|
|
|
|
namespace LowLevelTests
|
|
{
|
|
public class LowLevelTestsReportParser
|
|
{
|
|
private XDocument ReportDoc;
|
|
public bool IsValid { get; protected set; }
|
|
|
|
public LowLevelTestsReportParser(string InLocalReportPath)
|
|
{
|
|
try
|
|
{
|
|
ReportDoc = XDocument.Load(InLocalReportPath);
|
|
IsValid = true;
|
|
}
|
|
catch (Exception LoadEx)
|
|
{
|
|
Log.Error("Encountered error while loading report {0}", LoadEx.ToString());
|
|
IsValid = false;
|
|
}
|
|
}
|
|
|
|
public bool HasPassed()
|
|
{
|
|
if (!IsValid)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
int NrOverallResultsFailures = -1;
|
|
int NrOverallResultsSuccesses = -1;
|
|
int NrOverallResultsCasesFailures = -1;
|
|
int NrOverallResultsCasesSuccesses = -1;
|
|
XElement OverallResults = ReportDoc.Descendants("OverallResults").FirstOrDefault();
|
|
if (OverallResults != null)
|
|
{
|
|
NrOverallResultsFailures = int.Parse(OverallResults.Attribute("failures").Value);
|
|
NrOverallResultsSuccesses = int.Parse(OverallResults.Attribute("successes").Value);
|
|
}
|
|
XElement OverallResultsCases = ReportDoc.Descendants("OverallResultsCases").FirstOrDefault();
|
|
if (OverallResultsCases != null)
|
|
{
|
|
NrOverallResultsCasesFailures = int.Parse(OverallResultsCases.Attribute("failures").Value);
|
|
NrOverallResultsCasesSuccesses = int.Parse(OverallResultsCases.Attribute("successes").Value);
|
|
}
|
|
|
|
return NrOverallResultsFailures == 0 && NrOverallResultsCasesFailures == 0 && NrOverallResultsSuccesses > 0 && NrOverallResultsCasesSuccesses > 0;
|
|
}
|
|
}
|
|
}
|