mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-17 21:10:43 +00:00
Add Xamarin support to the ORT nuget packages. - Update C# code to support Xamarin builds for iOS and Android - refactor some things to split out common code - include iOS and Android ORT native shared library in native nuget package
47 lines
No EOL
1.5 KiB
C#
47 lines
No EOL
1.5 KiB
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace Microsoft.ML.OnnxRuntime.Tests.Devices
|
|
{
|
|
public enum TestOutcome
|
|
{
|
|
Passed,
|
|
Failed,
|
|
Skipped,
|
|
NotRun
|
|
}
|
|
|
|
public class TestResultSummary
|
|
{
|
|
public int TestCount { get; set; }
|
|
public int Succeeded { get; set; }
|
|
public int Skipped { get; set; }
|
|
public int Failed { get; set; }
|
|
public int NotRun { get; set; }
|
|
public IList<TestResult> TestResults { get; set; }
|
|
|
|
public TestResultSummary() {}
|
|
|
|
public TestResultSummary(IList<TestResult> results)
|
|
{
|
|
TestResults = results == null ? new List<TestResult>() : results;
|
|
TestCount = TestResults.Count;
|
|
Succeeded = TestResults.Count(i => i.TestOutcome == TestOutcome.Passed);
|
|
Skipped = TestResults.Count(i => i.TestOutcome == TestOutcome.Skipped);
|
|
Failed = TestResults.Count(i => i.TestOutcome == TestOutcome.Failed);
|
|
NotRun = TestResults.Count(i => i.TestOutcome == TestOutcome.NotRun);
|
|
}
|
|
}
|
|
|
|
public class TestResult
|
|
{
|
|
public TestOutcome TestOutcome { get; set; } = TestOutcome.NotRun;
|
|
public string TestId { get; set; }
|
|
public string TestName { get; set; }
|
|
public string Duration { get; set; }
|
|
public string Output { get; set; }
|
|
|
|
[Newtonsoft.Json.JsonIgnore]
|
|
public string Outcome => TestOutcome.ToString().ToUpper();
|
|
}
|
|
} |