Skip to content

Commit ffdaeb6

Browse files
committed
Merge branch 'test/multiprocess-tests/execute-step-in-context' into test/multiprocess-tests/adding-perf-tests-for-spawn
* test/multiprocess-tests/execute-step-in-context: 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 17c6b6d + 2fba2c4 commit ffdaeb6

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
@@ -25,7 +25,7 @@ public static class BuildMultiprocessTestPlayer
2525

2626
#if UNITY_EDITOR
2727
[MenuItem(BuildAndExecuteMenuName)]
28-
public static void BuildNoDebug()
28+
public static void BuildRelease()
2929
{
3030
var report = BuildPlayer();
3131
if (report.summary.result != BuildResult.Succeeded)
@@ -34,7 +34,7 @@ public static void BuildNoDebug()
3434
}
3535
}
3636

37-
[MenuItem(MultiprocessBaseMenuName+"/Build Test Player in debug mode")]
37+
[MenuItem(MultiprocessBaseMenuName + "/Build Test Player (Debug)")]
3838
public static void BuildDebug()
3939
{
4040
var report = BuildPlayer(true);
@@ -99,7 +99,7 @@ private static BuildReport BuildPlayer(bool isDebug = false)
9999
EditorUserBuildSettings.activeBuildTarget,
100100
buildOptions);
101101

102-
Debug.Log($"done building");
102+
Debug.Log("Build finished");
103103
return buildReport;
104104
}
105105
#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
@@ -27,33 +27,33 @@ public static void StartWorkerNode()
2727
{
2828
case RuntimePlatform.OSXPlayer:
2929
case RuntimePlatform.OSXEditor:
30-
workerNode.StartInfo.FileName = $"{buildPath}.app/Contents/MacOS/testproject";
30+
workerProcess.StartInfo.FileName = $"{buildPath}.app/Contents/MacOS/testproject";
3131
break;
3232
case RuntimePlatform.WindowsPlayer:
3333
case RuntimePlatform.WindowsEditor:
34-
workerNode.StartInfo.FileName = $"{buildPath}.exe";
34+
workerProcess.StartInfo.FileName = $"{buildPath}.exe";
3535
break;
3636
default:
3737
throw new NotImplementedException($"{nameof(StartWorkerNode)}: Current platform is not supported");
3838
}
3939
}
4040
catch (FileNotFoundException)
4141
{
42-
Debug.LogError($"Couldn't find build info file. {buildInstructions}");
42+
Debug.LogError($"Could not find build info file. {buildInstructions}");
4343
throw;
4444
}
4545

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

0 commit comments

Comments
 (0)