Skip to content

Commit f34841f

Browse files
committed
Merge branch 'develop' into test/multiprocess-tests/base-multiprocess-tests
* develop: test: Perf tests part 1. Basis for multiprocess tests process orchestration. (#922) # Conflicts: # testproject/Assets/Tests/Runtime/MultiprocessRuntime/Helpers/BuildMultiprocessTestPlayer.cs # testproject/Assets/Tests/Runtime/MultiprocessRuntime/Helpers/MultiprocessOrchestration.cs
2 parents 65b214c + d08b84a commit f34841f

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

testproject/Assets/Tests/Runtime/MultiprocessRuntime/Helpers/BuildMultiprocessTestPlayer.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public static class BuildMultiprocessTestPlayer
2020

2121
#if UNITY_EDITOR
2222
[MenuItem(BuildAndExecuteMenuName)]
23-
public static void BuildNoDebug()
23+
public static void BuildRelease()
2424
{
2525
var report = BuildPlayer();
2626
if (report.summary.result != BuildResult.Succeeded)
@@ -29,7 +29,7 @@ public static void BuildNoDebug()
2929
}
3030
}
3131

32-
[MenuItem(MultiprocessBaseMenuName + "/Build Test Player in debug mode")]
32+
[MenuItem(MultiprocessBaseMenuName + "/Build Test Player (Debug)")]
3333
public static void BuildDebug()
3434
{
3535
var report = BuildPlayer(true);
@@ -89,7 +89,7 @@ private static BuildReport BuildPlayer(bool isDebug = false)
8989
EditorUserBuildSettings.activeBuildTarget,
9090
buildOptions);
9191

92-
Debug.Log($"done building");
92+
Debug.Log("Build finished");
9393
return buildReport;
9494
}
9595
#endif

testproject/Assets/Tests/Runtime/MultiprocessRuntime/Helpers/MultiprocessOrchestration.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class MultiprocessOrchestration
1313

1414
public static void StartWorkerNode()
1515
{
16-
var workerNode = new Process();
16+
var workerProcess = new Process();
1717

1818
//TODO this should be replaced eventually by proper orchestration for all supported platforms
1919
// Starting new local processes is a solution to help run perf tests locally. CI should have multi machine orchestration to
@@ -26,33 +26,33 @@ public static void StartWorkerNode()
2626
{
2727
case RuntimePlatform.OSXPlayer:
2828
case RuntimePlatform.OSXEditor:
29-
workerNode.StartInfo.FileName = $"{buildInfo}.app/Contents/MacOS/testproject";
29+
workerProcess.StartInfo.FileName = $"{buildInfo}.app/Contents/MacOS/testproject";
3030
break;
3131
case RuntimePlatform.WindowsPlayer:
3232
case RuntimePlatform.WindowsEditor:
33-
workerNode.StartInfo.FileName = $"{buildInfo}.exe";
33+
workerProcess.StartInfo.FileName = $"{buildInfo}.exe";
3434
break;
3535
default:
3636
throw new NotImplementedException($"{nameof(StartWorkerNode)}: Current platform is not supported");
3737
}
3838
}
3939
catch (FileNotFoundException)
4040
{
41-
Debug.LogError($"Couldn't find build info file. {buildInstructions}");
41+
Debug.LogError($"Could not find build info file. {buildInstructions}");
4242
throw;
4343
}
4444

45-
workerNode.StartInfo.UseShellExecute = false;
46-
workerNode.StartInfo.RedirectStandardError = true;
47-
workerNode.StartInfo.RedirectStandardOutput = true;
48-
workerNode.StartInfo.Arguments = $"{IsWorkerArg} -popupwindow -screen-width 100 -screen-height 100";
45+
workerProcess.StartInfo.UseShellExecute = false;
46+
workerProcess.StartInfo.RedirectStandardError = true;
47+
workerProcess.StartInfo.RedirectStandardOutput = true;
48+
workerProcess.StartInfo.Arguments = $"{IsWorkerArg} -popupwindow -screen-width 100 -screen-height 100";
4949
// workerNode.StartInfo.Arguments += " -deepprofiling"; // enable for deep profiling
5050
try
5151
{
52-
var newProcessStarted = workerNode.Start();
52+
var newProcessStarted = workerProcess.Start();
5353
if (!newProcessStarted)
5454
{
55-
throw new Exception("Failed to start process!");
55+
throw new Exception("Failed to start worker process!");
5656
}
5757
}
5858
catch (Win32Exception e)

0 commit comments

Comments
 (0)