diff options
Diffstat (limited to 'Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol')
28 files changed, 0 insertions, 533 deletions
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/AssemblyCompilationErrorsMessage.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/AssemblyCompilationErrorsMessage.cs deleted file mode 100644 index 8ed6b3c..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/AssemblyCompilationErrorsMessage.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace UnityEditor.TestTools.TestRunner.UnityTestProtocol
-{
- internal class AssemblyCompilationErrorsMessage : Message
- {
- public string assembly;
- public string[] errors;
-
- public AssemblyCompilationErrorsMessage()
- {
- type = "AssemblyCompilationErrors";
- }
- }
-}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/AssemblyCompilationErrorsMessage.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/AssemblyCompilationErrorsMessage.cs.meta deleted file mode 100644 index 8c0fea1..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/AssemblyCompilationErrorsMessage.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2
-guid: c346a7445959bba46a96de0747e77c2a
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/ITestRunnerApiMapper.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/ITestRunnerApiMapper.cs deleted file mode 100644 index 231fe4b..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/ITestRunnerApiMapper.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Collections.Generic;
-using UnityEditor.TestTools.TestRunner.Api;
-
-namespace UnityEditor.TestTools.TestRunner.UnityTestProtocol
-{
- interface ITestRunnerApiMapper
- {
- string GetRunStateFromResultNunitXml(ITestResultAdaptor result);
- TestState GetTestStateFromResult(ITestResultAdaptor result);
- List<string> FlattenTestNames(ITestAdaptor testsToRun);
- TestPlanMessage MapTestToTestPlanMessage(ITestAdaptor testsToRun);
- TestStartedMessage MapTestToTestStartedMessage(ITestAdaptor test);
- TestFinishedMessage TestResultToTestFinishedMessage(ITestResultAdaptor result);
- }
-}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/ITestRunnerApiMapper.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/ITestRunnerApiMapper.cs.meta deleted file mode 100644 index af6635c..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/ITestRunnerApiMapper.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2
-guid: 6de79ae237e51554da96fd28f68b66a6
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/IUtpLogger.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/IUtpLogger.cs deleted file mode 100644 index 4d7fb71..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/IUtpLogger.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace UnityEditor.TestTools.TestRunner.UnityTestProtocol
-{
- interface IUtpLogger
- {
- void Log(Message msg);
- }
-}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/IUtpLogger.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/IUtpLogger.cs.meta deleted file mode 100644 index 82b7277..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/IUtpLogger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2
-guid: 9014630255533ed42915965b4065cde8
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/IUtpMessageReporter.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/IUtpMessageReporter.cs deleted file mode 100644 index c134615..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/IUtpMessageReporter.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Collections.Generic;
-using UnityEditor.Compilation;
-using UnityEditor.TestTools.TestRunner.Api;
-
-namespace UnityEditor.TestTools.TestRunner.UnityTestProtocol
-{
- internal interface IUtpMessageReporter
- {
- void ReportAssemblyCompilationErrors(string assembly, IEnumerable<CompilerMessage> errorCompilerMessages);
- void ReportTestFinished(ITestResultAdaptor result);
- void ReportTestRunStarted(ITestAdaptor testsToRun);
- void ReportTestStarted(ITestAdaptor test);
- }
-}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/IUtpMessageReporter.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/IUtpMessageReporter.cs.meta deleted file mode 100644 index d966c9a..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/IUtpMessageReporter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2
-guid: 952b3dc7b47846947b37c8d3ae46579a
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/Message.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/Message.cs deleted file mode 100644 index a654b7e..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/Message.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System;
-using System.Diagnostics;
-
-namespace UnityEditor.TestTools.TestRunner.UnityTestProtocol
-{
- [Serializable]
- internal abstract class Message
- {
- public string type;
- // Milliseconds since unix epoch
- public ulong time;
- public int version;
- public string phase;
- public int processId;
-
- protected Message()
- {
- version = 2;
- phase = "Immediate";
- processId = Process.GetCurrentProcess().Id;
- AddTimeStamp();
- }
-
- public void AddTimeStamp()
- {
- time = Convert.ToUInt64((DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalMilliseconds);
- }
- }
-}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/Message.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/Message.cs.meta deleted file mode 100644 index 6f55024..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/Message.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2
-guid: 321dc2c0720f8dd4f9396ecdc12b8746
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/TestFinishedMessage.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/TestFinishedMessage.cs deleted file mode 100644 index 63d7daf..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/TestFinishedMessage.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace UnityEditor.TestTools.TestRunner.UnityTestProtocol
-{
- internal class TestFinishedMessage : Message
- {
- 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";
- }
- }
-}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/TestFinishedMessage.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/TestFinishedMessage.cs.meta deleted file mode 100644 index 581ee84..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/TestFinishedMessage.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2
-guid: 423fe2ef878fa1140a7e1f7f9e365815
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/TestPlanMessage.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/TestPlanMessage.cs deleted file mode 100644 index 7e4ea41..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/TestPlanMessage.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Collections.Generic;
-
-namespace UnityEditor.TestTools.TestRunner.UnityTestProtocol
-{
- internal class TestPlanMessage : Message
- {
- public List<string> tests;
-
- public TestPlanMessage()
- {
- type = "TestPlan";
- }
- }
-}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/TestPlanMessage.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/TestPlanMessage.cs.meta deleted file mode 100644 index 5dcc09d..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/TestPlanMessage.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2
-guid: 28f79a0d7e64c2345bc46f8c4cf788f8
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/TestRunnerApiMapper.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/TestRunnerApiMapper.cs deleted file mode 100644 index 494646f..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/TestRunnerApiMapper.cs +++ /dev/null @@ -1,99 +0,0 @@ -using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Xml;
-using UnityEditor.TestTools.TestRunner.Api;
-
-namespace UnityEditor.TestTools.TestRunner.UnityTestProtocol
-{
- internal class TestRunnerApiMapper : ITestRunnerApiMapper
- {
- public TestPlanMessage MapTestToTestPlanMessage(ITestAdaptor testsToRun)
- {
- var testsNames = testsToRun != null ? FlattenTestNames(testsToRun) : new List<string>();
-
- var msg = new TestPlanMessage
- {
- tests = testsNames
- };
-
- return msg;
- }
-
- public TestStartedMessage MapTestToTestStartedMessage(ITestAdaptor test)
- {
- return new TestStartedMessage
- {
- name = test.FullName
- };
- }
-
- public TestFinishedMessage TestResultToTestFinishedMessage(ITestResultAdaptor result)
- {
- return new TestFinishedMessage
- {
- name = result.Test.FullName,
- duration = Convert.ToUInt64(result.Duration * 1000),
- durationMicroseconds = Convert.ToUInt64(result.Duration * 1000000),
- message = result.Message,
- state = GetTestStateFromResult(result),
- stackTrace = result.StackTrace
- };
- }
-
- public string GetRunStateFromResultNunitXml(ITestResultAdaptor result)
- {
- var doc = new XmlDocument();
- doc.LoadXml(result.ToXml().OuterXml);
- return doc.FirstChild.Attributes["runstate"].Value;
- }
-
- public TestState GetTestStateFromResult(ITestResultAdaptor result)
- {
- var state = TestState.Failure;
-
- if (result.TestStatus == TestStatus.Passed)
- {
- state = TestState.Success;
-
- var runstate = GetRunStateFromResultNunitXml(result);
- runstate = runstate ?? String.Empty;
-
- if (runstate.ToLowerInvariant().Equals("explicit"))
- state = TestState.Skipped;
- }
- else if (result.TestStatus == TestStatus.Skipped)
- {
- state = TestState.Skipped;
-
- if (result.ResultState.ToLowerInvariant().EndsWith("ignored"))
- state = TestState.Ignored;
- }
- else
- {
- if (result.ResultState.ToLowerInvariant().Equals("inconclusive"))
- state = TestState.Inconclusive;
-
- if (result.ResultState.ToLowerInvariant().EndsWith("cancelled") ||
- result.ResultState.ToLowerInvariant().EndsWith("error"))
- state = TestState.Error;
- }
-
- return state;
- }
-
- public List<string> FlattenTestNames(ITestAdaptor test)
- {
- var results = new List<string>();
-
- if (!test.IsSuite)
- results.Add(test.FullName);
-
- if (test.Children != null && test.Children.Any())
- foreach (var child in test.Children)
- results.AddRange(FlattenTestNames(child));
-
- return results;
- }
- }
-}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/TestRunnerApiMapper.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/TestRunnerApiMapper.cs.meta deleted file mode 100644 index 619f384..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/TestRunnerApiMapper.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2
-guid: 2011a59d3f76b3d4a85cb53f945fceee
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/TestStartedMessage.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/TestStartedMessage.cs deleted file mode 100644 index 7a878a6..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/TestStartedMessage.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace UnityEditor.TestTools.TestRunner.UnityTestProtocol
-{
- internal class TestStartedMessage : Message
- {
- public string name;
- public TestState state;
-
- public TestStartedMessage()
- {
- type = "TestStatus";
- phase = "Begin";
- state = TestState.Inconclusive;
- }
- }
-}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/TestStartedMessage.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/TestStartedMessage.cs.meta deleted file mode 100644 index 28492e7..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/TestStartedMessage.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2
-guid: bd3e81baa10021f4d877fa36382bab16
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/TestState.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/TestState.cs deleted file mode 100644 index 111813a..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/TestState.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace UnityEditor.TestTools.TestRunner.UnityTestProtocol
-{
- // This matches the state definitions expected by the Perl code, which in turn matches the NUnit 2 values...
- internal enum TestState
- {
- Inconclusive = 0,
- Skipped = 2,
- Ignored = 3,
- Success = 4,
- Failure = 5,
- Error = 6
- }
-}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/TestState.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/TestState.cs.meta deleted file mode 100644 index 125e419..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/TestState.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2
-guid: 77f432980bb30084299a138e15c6f571
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/UnityTestProtocolListener.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/UnityTestProtocolListener.cs deleted file mode 100644 index 8ba3d7f..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/UnityTestProtocolListener.cs +++ /dev/null @@ -1,35 +0,0 @@ -using UnityEditor.TestTools.TestRunner.Api;
-using UnityEngine;
-
-namespace UnityEditor.TestTools.TestRunner.UnityTestProtocol
-{
- internal class UnityTestProtocolListener : ScriptableObject, ICallbacks
- {
- private IUtpMessageReporter m_UtpMessageReporter;
-
- public UnityTestProtocolListener()
- {
- m_UtpMessageReporter = new UtpMessageReporter(new UtpDebugLogger());
- }
-
- public void RunStarted(ITestAdaptor testsToRun)
- {
- m_UtpMessageReporter.ReportTestRunStarted(testsToRun);
- }
-
- public void RunFinished(ITestResultAdaptor testResults)
- {
- // Apparently does nothing :)
- }
-
- public void TestStarted(ITestAdaptor test)
- {
- m_UtpMessageReporter.ReportTestStarted(test);
- }
-
- public void TestFinished(ITestResultAdaptor result)
- {
- m_UtpMessageReporter.ReportTestFinished(result);
- }
- }
-}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/UnityTestProtocolListener.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/UnityTestProtocolListener.cs.meta deleted file mode 100644 index e369442..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/UnityTestProtocolListener.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2
-guid: 900aac3710bc14542a8d164e3f0ff820
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/UnityTestProtocolStarter.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/UnityTestProtocolStarter.cs deleted file mode 100644 index 8d16ca5..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/UnityTestProtocolStarter.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System;
-using System.Linq;
-using UnityEditor.Compilation;
-using UnityEditor.TestTools.TestRunner.Api;
-using UnityEngine;
-using UnityEngine.TestTools;
-
-namespace UnityEditor.TestTools.TestRunner.UnityTestProtocol
-{
- [InitializeOnLoad]
- internal static class UnityTestProtocolStarter
- {
- static UnityTestProtocolStarter()
- {
- var commandLineArgs = Environment.GetCommandLineArgs();
- if (commandLineArgs.Contains("-automated") && commandLineArgs.Contains("-runTests")) // wanna have it only for utr run
- {
- var api = ScriptableObject.CreateInstance<TestRunnerApi>();
- var listener = ScriptableObject.CreateInstance<UnityTestProtocolListener>();
- api.RegisterCallbacks(listener);
- CompilationPipeline.assemblyCompilationFinished += OnAssemblyCompilationFinished;
- }
- }
-
- public static void OnAssemblyCompilationFinished(string assembly, CompilerMessage[] messages)
- {
- bool checkCompileErrors = RecompileScripts.Current == null || RecompileScripts.Current.ExpectScriptCompilationSuccess;
-
- if (checkCompileErrors && messages.Any(x => x.type == CompilerMessageType.Error))
- {
- var compilerErrorMessages = messages.Where(x => x.type == CompilerMessageType.Error);
- var utpMessageReporter = new UtpMessageReporter(new UtpDebugLogger());
- utpMessageReporter.ReportAssemblyCompilationErrors(assembly, compilerErrorMessages);
- }
- }
- }
-}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/UnityTestProtocolStarter.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/UnityTestProtocolStarter.cs.meta deleted file mode 100644 index 8d65f46..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/UnityTestProtocolStarter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2
-guid: 1ac58cb55fc8daf4abd3945a2bbbb0c5
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/UtpDebuglogger.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/UtpDebuglogger.cs deleted file mode 100644 index 537e350..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/UtpDebuglogger.cs +++ /dev/null @@ -1,13 +0,0 @@ -using UnityEngine;
-
-namespace UnityEditor.TestTools.TestRunner.UnityTestProtocol
-{
- class UtpDebugLogger : IUtpLogger
- {
- public void Log(Message msg)
- {
- var msgJson = JsonUtility.ToJson(msg);
- Debug.LogFormat(LogType.Log, LogOption.NoStacktrace, null, "\n##utp:{0}", msgJson);
- }
- }
-}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/UtpDebuglogger.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/UtpDebuglogger.cs.meta deleted file mode 100644 index eb25630..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/UtpDebuglogger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2
-guid: d0abdd8cb6b29a24c8ee19626ef741b9
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/UtpMessageReporter.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/UtpMessageReporter.cs deleted file mode 100644 index 22450c8..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/UtpMessageReporter.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System.Collections.Generic;
-using System.Linq;
-using UnityEditor.Compilation;
-using UnityEditor.TestTools.TestRunner.Api;
-
-namespace UnityEditor.TestTools.TestRunner.UnityTestProtocol
-{
- internal class UtpMessageReporter : IUtpMessageReporter
- {
- public ITestRunnerApiMapper TestRunnerApiMapper;
- public IUtpLogger Logger;
-
- public UtpMessageReporter(IUtpLogger utpLogger)
- {
- TestRunnerApiMapper = new TestRunnerApiMapper();
- Logger = utpLogger;
- }
-
- public void ReportAssemblyCompilationErrors(string assembly, IEnumerable<CompilerMessage> errorCompilerMessages)
- {
- var compilationErrorMessage = new AssemblyCompilationErrorsMessage
- {
- assembly = assembly,
- errors = errorCompilerMessages.Select(x => x.message).ToArray()
- };
-
- Logger.Log(compilationErrorMessage);
- }
-
- public void ReportTestRunStarted(ITestAdaptor testsToRun)
- {
- var msg = TestRunnerApiMapper.MapTestToTestPlanMessage(testsToRun);
-
- Logger.Log(msg);
- }
-
- public void ReportTestStarted(ITestAdaptor test)
- {
- if (test.IsSuite)
- return;
-
- var msg = TestRunnerApiMapper.MapTestToTestStartedMessage(test);
-
- Logger.Log(msg);
- }
-
- public void ReportTestFinished(ITestResultAdaptor result)
- {
- if (result.Test.IsSuite)
- return;
-
- var msg = TestRunnerApiMapper.TestResultToTestFinishedMessage(result);
-
- Logger.Log(msg);
- }
- }
-}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/UtpMessageReporter.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/UtpMessageReporter.cs.meta deleted file mode 100644 index 02cccdf..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/UnityTestProtocol/UtpMessageReporter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2
-guid: ebcc5f899d9277642868aeda9a17cbaf
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
|
