Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
384f53a
update timeout
zain-mecklai Jun 21, 2022
958e2ec
remote UNET
zain-mecklai Jun 21, 2022
f8468e2
fix: Stop populating ILPPMessageProvider with messages from outside t…
ShadauxCat Jun 27, 2022
c9c1cb8
reset the changes to the scene
zain-mecklai Jul 15, 2022
6ff8c7b
Initialiize the Rawgithash variable for the local execution case
zain-mecklai Jul 18, 2022
7644289
Add a little more logging and see if we can find why allactons hasn't…
zain-mecklai Jul 18, 2022
0964622
Merge branch 'develop' into test/multiprocess_2022.2
ashwinimurt Jul 18, 2022
5d519fc
Update the test to reduce the number of log messages as well as make …
zain-mecklai Jul 19, 2022
b2eacca
Merge branch 'test/multiprocess_2022.2' of github.com:Unity-Technolog…
zain-mecklai Jul 19, 2022
6406473
Lot when initlializatioon is complete
zain-mecklai Jul 19, 2022
00f9058
More logging clean up and adding information about registered test me…
zain-mecklai Jul 19, 2022
9fbe897
Move init all steps to Awake instead of Start, eventually need to fig…
zain-mecklai Jul 19, 2022
8344d90
Move init to Awake
zain-mecklai Jul 19, 2022
a7b3709
Fix missing log message in TestCoordinator Start method
zain-mecklai Jul 19, 2022
c43622b
Use GPU for Ubuntu image
zain-mecklai Jul 19, 2022
245bcfd
Remove the nographics requirement and see if we can stabilize 2022.2
zain-mecklai Jul 19, 2022
46fab8c
Merge branch 'develop' into test/multiprocess_2022.2
ashwinimurt Jul 20, 2022
9da0840
Use -nographics and don't request a GPU for Linux
zain-mecklai Jul 20, 2022
380d607
Merge branch 'test/multiprocess_2022.2' of github.com:Unity-Technolog…
zain-mecklai Jul 20, 2022
b4f6d1a
try to use ubuntu-20 and see if this is more stable
zain-mecklai Jul 21, 2022
13d7020
Use GPU for Linux and use Ubuntu 18
zain-mecklai Jul 21, 2022
b445de5
Merge branch 'develop' into test/multiprocess_2022.2
ashwinimurt Jul 21, 2022
013372c
Remove nographics again as it clearly makes an improvement
zain-mecklai Jul 21, 2022
55eda03
Merge branch 'test/multiprocess_2022.2' of github.com:Unity-Technolog…
zain-mecklai Jul 21, 2022
fa344b8
Adding a GPU and removing nographics just made things slower but stil…
zain-mecklai Jul 22, 2022
1080955
Merge branch 'develop' into test/multiprocess_2022.2
ashwinimurt Jul 26, 2022
43341f0
Merge branch 'develop' into test/multiprocess_2022.2
ashwinimurt Jul 27, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .yamato/multiprocess-project-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ singlenode_multiprocess_test_testproject_{{ editor }}_{{ platform.name }}:
{% if editor != "trunk" %}
- unity-downloader-cli -u {{ editor }} -c editor -w --fast
- curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr{% if platform.name == "win" %}.bat --output utr.bat{% endif %}{% if platform.name != "win" %} --output utr && chmod +x ./utr{% endif %}
- {{ platform.editorpath }} -projectpath testproject -batchmode -nographics -quit -logfile BuildMultiprocessTestPlayer.log -executeMethod Unity.Netcode.MultiprocessRuntimeTests.BuildMultiprocessTestPlayer.BuildRelease
- {{ platform.editorpath }} -projectpath testproject -batchmode -quit -nographics -logfile BuildMultiprocessTestPlayer.log -executeMethod Unity.Netcode.MultiprocessRuntimeTests.BuildMultiprocessTestPlayer.BuildRelease
{% if platform.name == "mac" %} - sudo codesign --force --deep --sign - ./testproject/Builds/MultiprocessTests/MultiprocessTestPlayer.app{% endif %}
- {{ platform.utr }} --suite=playmode --testproject=testproject --editor-location=.Editor --testfilter=Unity.Netcode.MultiprocessRuntimeTests --extra-editor-arg=-bypassIgnoreUTR
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion .yamato/project.metafile
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ scripting_backends:
- il2cpp

# Images with build-tools installed required for Standalone Tests - IL2CPP
win_il2cpp_test_image: dots-player/windows10:latest
win_il2cpp_test_image: dots-player/windows10:latest
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ internal sealed class INetworkMessageILPP : ILPPInterface
public override ILPPInterface GetInstance() => this;

public override bool WillProcess(ICompiledAssembly compiledAssembly) =>
compiledAssembly.Name == CodeGenHelpers.RuntimeAssemblyName ||
compiledAssembly.References.Any(filePath => Path.GetFileNameWithoutExtension(filePath) == CodeGenHelpers.RuntimeAssemblyName);
compiledAssembly.Name == CodeGenHelpers.RuntimeAssemblyName;

private readonly List<DiagnosticMessage> m_Diagnostics = new List<DiagnosticMessage>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,13 @@ public virtual void SetupTestSuite()

private void OnSceneLoaded(Scene scene, LoadSceneMode mode)
{
MultiprocessLogger.Log($"OnSceneLoaded {scene.name}");
SceneManager.sceneLoaded -= OnSceneLoaded;
if (scene.name == BuildMultiprocessTestPlayer.MainSceneName)
{
SceneManager.SetActiveScene(scene);
}

var transport = NetworkManager.Singleton.NetworkConfig.NetworkTransport;
MultiprocessLogger.Log($"transport is {transport}");
switch (transport)
{
#if UNITY_UNET_PRESENT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using UnityEngine;
using UnityEngine.TestTools;
using Debug = UnityEngine.Debug;
using Unity.Netcode.MultiprocessRuntimeTests;

/// <summary>
/// Allows for context based delegate execution.
Expand Down Expand Up @@ -83,6 +84,7 @@ private static string GetMethodIdentifier(MethodBase callerMethod)

internal static void InitializeAllSteps()
{
MultiprocessLogger.Log("InitializeAllSteps - Start");
// registering magically all context based steps
IsRegistering = true;
var registeredMethods = typeof(TestCoordinator).Assembly.GetTypes().SelectMany(t => t.GetMethods())
Expand Down Expand Up @@ -147,6 +149,7 @@ object[] GetParameterValuesToPassFunc(ParameterInfo[] parameterInfo)

IsRegistering = false;
HasRegistered = true;
MultiprocessLogger.Log("InitializeAllSteps - Done");
}

/// <summary>
Expand Down Expand Up @@ -196,9 +199,11 @@ public ExecuteStepInContext(StepExecutionContext actionContext, Action<byte[]> s
{
Assert.That(AllActions, Does.Not.Contain(currentActionId)); // sanity check
AllActions[currentActionId] = this;
MultiprocessLogger.Log($"InitializeAllSteps - Registering {currentActionId}");
}
else
{
MultiprocessLogger.Log($"InitializeAllSteps - Not Registering {currentActionId}");
if (shouldExecuteLocally)
{
m_StepToExecute.Invoke(paramToPass);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ public static int ActiveWorkerCount()

if (s_Processes.Count > 0)
{
MultiprocessLogger.Log($"s_Processes.Count is {s_Processes.Count}");
foreach (var p in s_Processes)
{
if ((p != null) && (!p.HasExited))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class TestCoordinator : NetworkBehaviour
{
public const int PerTestTimeoutSec = 5 * 60; // seconds

public const float MaxWaitTimeoutSec = 20;
public const float MaxWaitTimeoutSec = 60;
private const char k_MethodFullNameSplitChar = '@';

private bool m_ShouldShutdown;
Expand Down Expand Up @@ -75,8 +75,10 @@ public void Awake()
enabled = false;
NetworkManager.OnClientConnectedCallback += OnClientConnectedCallback;

MultiprocessLogger.Log("Awake - Initialize All Steps");
ExecuteStepInContext.InitializeAllSteps();

s_ProcessId = Process.GetCurrentProcess().Id;
MultiprocessLogger.Log($"Awake {s_ProcessId}");
ReadGitHashFile();

// Configuration via command line (supported for many but not all platforms)
Expand Down Expand Up @@ -165,6 +167,7 @@ private async void ConfigureViaWebApi()

private void ReadGitHashFile()
{
Rawgithash = "uninitialized";
try
{
var githash_resource = Resources.Load<TextAsset>("Text/githash");
Expand Down Expand Up @@ -216,12 +219,7 @@ private void SetAddressAndPort()

public void Start()
{
MultiprocessLogger.Log("Start");
MultiprocessLogger.Log("Initialize All Steps");
ExecuteStepInContext.InitializeAllSteps();
MultiprocessLogger.Log($"Initialize All Steps... done");
MultiprocessLogger.Log($"IsInvoking: {NetworkManager.Singleton.IsInvoking()}");
MultiprocessLogger.Log($"IsActiveAndEnabled: {NetworkManager.Singleton.isActiveAndEnabled}");
MultiprocessLogger.Log($"TestCoordinator - Start");
}

public void Update()
Expand Down Expand Up @@ -282,8 +280,11 @@ public void OnDisable()
// Once we are connected, we can run the update method
public void OnClientConnectedCallback(ulong clientId)
{
MultiprocessLogger.Log("Client start callback, enabling behavior");
enabled = true;
if (enabled == false)
{
MultiprocessLogger.Log($"OnClientConnectedCallback enabling behavior clientId: {clientId} {NetworkManager.Singleton.IsHost}/{NetworkManager.Singleton.IsClient} IsRegistering:{ExecuteStepInContext.IsRegistering}");
enabled = true;
}
}

private static void OnClientDisconnectCallback(ulong clientId)
Expand Down Expand Up @@ -424,6 +425,7 @@ public void InvokeFromMethodActionRpc(Action methodInfo)
public void TriggerActionIdClientRpc(string actionId, byte[] args, bool ignoreException, ClientRpcParams clientRpcParams = default)
{
MultiprocessLogger.Log($"received RPC from server, client side triggering action ID {actionId}");
WriteLogServerRpc($"received RPC from server, client side triggering action ID {actionId} {ExecuteStepInContext.AllActions.Count}");
try
{
ExecuteStepInContext.AllActions[actionId].Invoke(args);
Expand Down Expand Up @@ -519,5 +521,11 @@ public void WriteErrorServerRpc(string errorMessage, ServerRpcParams receivePara
{
MultiprocessLogger.LogError($"[Netcode-Server Sender={receiveParams.Receive.SenderClientId}] {errorMessage}");
}

[ServerRpc(RequireOwnership = false)]
public void WriteLogServerRpc(string logMessage, ServerRpcParams receiveParams = default)
{
MultiprocessLogger.Log($"[Netcode-Server Sender={receiveParams.Receive.SenderClientId}] {logMessage}");
}
}