This commit is contained in:
2025-01-17 13:10:42 +01:00
commit 4536213c91
15115 changed files with 1442174 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
using System;
using System.Diagnostics;
namespace UnityEngine.TestRunner.TestProtocol
{
[Serializable]
internal class MessageForRetryRepeat
{
public string type;
// Milliseconds since unix epoch
public ulong time;
public int version;
public string phase;
public int processId;
public MessageForRetryRepeat()
{
type = "TestStatus";
version = 2;
phase = "Immediate";
processId = Process.GetCurrentProcess().Id;
AddTimeStamp();
}
public void AddTimeStamp()
{
time = Convert.ToUInt64((DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalMilliseconds);
}
internal const string UtpPrefix = "\n##utp:";
public override string ToString()
{
var msgJson = JsonUtility.ToJson(this);
return $"{UtpPrefix}{msgJson}";
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 1c15a1275ff24d1092facf3f75065ab6
timeCreated: 1677662133

View File

@@ -0,0 +1,18 @@
namespace UnityEngine.TestRunner.TestProtocol
{
internal class TestFinishedMessage : MessageForRetryRepeat
{
public string name;
public TestState state;
public string message;
public ulong duration; // milliseconds
public ulong durationMicroseconds;
public string stackTrace;
public TestFinishedMessage()
{
type = "TestStatus";
phase = "End";
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 2cc8cb8ea0b84a54b6caf6601d63ece6
timeCreated: 1677663668

View File

@@ -0,0 +1,15 @@
namespace UnityEngine.TestRunner.TestProtocol
{
internal class TestStartedMessage : MessageForRetryRepeat
{
public string name;
public TestState state;
public TestStartedMessage()
{
type = "TestStatus";
phase = "Begin";
state = TestState.Inconclusive;
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: db9a20ff62f649c7b64172ebec68370c
timeCreated: 1677663646

View File

@@ -0,0 +1,12 @@
namespace UnityEngine.TestRunner.TestProtocol
{
internal enum TestState
{
Inconclusive = 0,
Skipped = 2,
Ignored = 3,
Success = 4,
Failure = 5,
Error = 6
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: c3a9378562b345c4ac08e605d35c0d93
timeCreated: 1677663618